@atlaskit/editor-plugin-table 9.3.3 → 9.3.5

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 (76) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/nodeviews/toDOM.js +2 -1
  3. package/dist/cjs/pm-plugins/utils/paste.js +60 -11
  4. package/dist/es2019/nodeviews/toDOM.js +2 -1
  5. package/dist/es2019/pm-plugins/utils/paste.js +57 -8
  6. package/dist/esm/nodeviews/toDOM.js +2 -1
  7. package/dist/esm/pm-plugins/utils/paste.js +60 -11
  8. package/dist/types/nodeviews/ExternalDropTargets.d.ts +2 -2
  9. package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +2 -2
  10. package/dist/types/nodeviews/TableContainer.d.ts +2 -2
  11. package/dist/types/nodeviews/TableResizer.d.ts +2 -1
  12. package/dist/types/nodeviews/table.d.ts +2 -2
  13. package/dist/types/ui/DragHandle/HandleIconComponent.d.ts +2 -2
  14. package/dist/types/ui/DragPreview/index.d.ts +2 -2
  15. package/dist/types/ui/FloatingDeleteButton/index.d.ts +2 -2
  16. package/dist/types/ui/FloatingDragMenu/DropdownMenu.d.ts +2 -2
  17. package/dist/types/ui/FloatingDragMenu/index.d.ts +2 -2
  18. package/dist/types/ui/FloatingInsertButton/index.d.ts +1 -1
  19. package/dist/types/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +1 -1
  20. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -2
  21. package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +2 -2
  22. package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/index.d.ts +2 -2
  23. package/dist/types/ui/TableFloatingColumnControls/index.d.ts +2 -2
  24. package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +2 -2
  25. package/dist/types/ui/TableFloatingControls/NumberColumn/index.d.ts +2 -2
  26. package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +3 -3
  27. package/dist/types/ui/TableFloatingControls/RowDropTarget/index.d.ts +1 -1
  28. package/dist/types/ui/TableFloatingControls/index.d.ts +2 -2
  29. package/dist/types/ui/TableFullWidthLabel/index.d.ts +2 -2
  30. package/dist/types/ui/icons/AddColLeftIcon.d.ts +2 -2
  31. package/dist/types/ui/icons/AddColRightIcon.d.ts +2 -2
  32. package/dist/types/ui/icons/AddRowAboveIcon.d.ts +2 -2
  33. package/dist/types/ui/icons/AddRowBelowIcon.d.ts +2 -2
  34. package/dist/types/ui/icons/DragHandleDisabledIcon.d.ts +1 -1
  35. package/dist/types/ui/icons/DragHandleIcon.d.ts +2 -2
  36. package/dist/types/ui/icons/DragInMotionIcon.d.ts +1 -1
  37. package/dist/types/ui/icons/MergeCellsIcon.d.ts +2 -2
  38. package/dist/types/ui/icons/MinimisedHandle.d.ts +2 -2
  39. package/dist/types/ui/icons/SortingIconWrapper.d.ts +1 -1
  40. package/dist/types/ui/icons/SplitCellIcon.d.ts +2 -2
  41. package/dist/types-ts4.5/nodeviews/ExternalDropTargets.d.ts +2 -2
  42. package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +2 -2
  43. package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +2 -2
  44. package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +2 -1
  45. package/dist/types-ts4.5/nodeviews/table.d.ts +2 -2
  46. package/dist/types-ts4.5/ui/DragHandle/HandleIconComponent.d.ts +2 -2
  47. package/dist/types-ts4.5/ui/DragPreview/index.d.ts +2 -2
  48. package/dist/types-ts4.5/ui/FloatingDeleteButton/index.d.ts +2 -2
  49. package/dist/types-ts4.5/ui/FloatingDragMenu/DropdownMenu.d.ts +2 -2
  50. package/dist/types-ts4.5/ui/FloatingDragMenu/index.d.ts +2 -2
  51. package/dist/types-ts4.5/ui/FloatingInsertButton/index.d.ts +1 -1
  52. package/dist/types-ts4.5/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +1 -1
  53. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -2
  54. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +2 -2
  55. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/index.d.ts +2 -2
  56. package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +2 -2
  57. package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +2 -2
  58. package/dist/types-ts4.5/ui/TableFloatingControls/NumberColumn/index.d.ts +2 -2
  59. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +3 -3
  60. package/dist/types-ts4.5/ui/TableFloatingControls/RowDropTarget/index.d.ts +1 -1
  61. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +2 -2
  62. package/dist/types-ts4.5/ui/TableFullWidthLabel/index.d.ts +2 -2
  63. package/dist/types-ts4.5/ui/icons/AddColLeftIcon.d.ts +2 -2
  64. package/dist/types-ts4.5/ui/icons/AddColRightIcon.d.ts +2 -2
  65. package/dist/types-ts4.5/ui/icons/AddRowAboveIcon.d.ts +2 -2
  66. package/dist/types-ts4.5/ui/icons/AddRowBelowIcon.d.ts +2 -2
  67. package/dist/types-ts4.5/ui/icons/DragHandleDisabledIcon.d.ts +1 -1
  68. package/dist/types-ts4.5/ui/icons/DragHandleIcon.d.ts +2 -2
  69. package/dist/types-ts4.5/ui/icons/DragInMotionIcon.d.ts +1 -1
  70. package/dist/types-ts4.5/ui/icons/MergeCellsIcon.d.ts +2 -2
  71. package/dist/types-ts4.5/ui/icons/MinimisedHandle.d.ts +2 -2
  72. package/dist/types-ts4.5/ui/icons/SortingIconWrapper.d.ts +1 -1
  73. package/dist/types-ts4.5/ui/icons/SplitCellIcon.d.ts +2 -2
  74. package/package.json +11 -5
  75. package/src/nodeviews/toDOM.ts +4 -1
  76. package/src/pm-plugins/utils/paste.ts +71 -4
@@ -1,4 +1,4 @@
1
- import { Component } from 'react';
1
+ import React, { Component } from 'react';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  interface Props {
4
4
  editorView: EditorView;
@@ -15,7 +15,7 @@ interface Props {
15
15
  isDragAndDropEnabled?: boolean;
16
16
  }
17
17
  export default class NumberColumn extends Component<Props, any> {
18
- render(): JSX.Element;
18
+ render(): React.JSX.Element;
19
19
  private hoverRows;
20
20
  private selectRow;
21
21
  private clearHoverSelection;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
@@ -22,6 +22,6 @@ type DragControlsProps = {
22
22
  api?: ExtractInjectionAPI<TablePlugin>;
23
23
  selection?: Selection;
24
24
  };
25
- export declare const DragControls: ({ tableRef, tableNode, tableWidth, hoveredCell, tableActive, editorView, isInDanger, isResizing, isTableHovered, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, selection, }: DragControlsProps) => JSX.Element | null;
26
- export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps, 'selection'>) => JSX.Element;
25
+ export declare const DragControls: ({ tableRef, tableNode, tableWidth, hoveredCell, tableActive, editorView, isInDanger, isResizing, isTableHovered, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, selection, }: DragControlsProps) => React.JSX.Element | null;
26
+ export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps, 'selection'>) => React.JSX.Element;
27
27
  export {};
@@ -4,5 +4,5 @@ type RowDropTargetProps = {
4
4
  localId?: string;
5
5
  style?: React.CSSProperties;
6
6
  };
7
- declare const RowDropTarget: ({ index, localId, style }: RowDropTargetProps) => JSX.Element;
7
+ declare const RowDropTarget: ({ index, localId, style }: RowDropTargetProps) => React.JSX.Element;
8
8
  export default RowDropTarget;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { TableColumnOrdering } from '@atlaskit/custom-steps';
3
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
@@ -38,5 +38,5 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
38
38
  commands: import("../../tablePluginType").TablePluginCommands;
39
39
  dependencies: import("../../tablePluginType").TablePluginDependencies;
40
40
  }> | undefined;
41
- }) => JSX.Element | null;
41
+ }) => React.JSX.Element | null;
42
42
  export default TableFloatingControls;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const FullWidthDisplay: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const FullWidthDisplay: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const AddColLeftIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AddColLeftIcon: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const AddColRightIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AddColRightIcon: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const AddRowAboveIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AddRowAboveIcon: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const AddRowBelowIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AddRowBelowIcon: () => React.JSX.Element;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  interface DragHandleDisabledIconProps {
3
3
  style?: React.CSSProperties;
4
4
  }
5
- export declare const DragHandleDisabledIcon: ({ style }: DragHandleDisabledIconProps) => JSX.Element;
5
+ export declare const DragHandleDisabledIcon: ({ style }: DragHandleDisabledIconProps) => React.JSX.Element;
6
6
  export {};
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const DragHandleIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const DragHandleIcon: () => React.JSX.Element;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  interface DragInMotionIconProps {
3
3
  style?: React.CSSProperties;
4
4
  }
5
- export declare const DragInMotionIcon: ({ style }: DragInMotionIconProps) => JSX.Element;
5
+ export declare const DragInMotionIcon: ({ style }: DragInMotionIconProps) => React.JSX.Element;
6
6
  export {};
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const MergeCellsIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const MergeCellsIcon: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const MinimisedHandleIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const MinimisedHandleIcon: () => React.JSX.Element;
@@ -6,5 +6,5 @@ type SortingIconProps = React.ComponentProps<typeof SortingIcon>;
6
6
  type SortingIconWrapperProps = SortingIconProps & {
7
7
  api: ExtractInjectionAPI<TablePlugin>;
8
8
  };
9
- export declare const SortingIconWrapper: (props: SortingIconWrapperProps) => JSX.Element | null;
9
+ export declare const SortingIconWrapper: (props: SortingIconWrapperProps) => React.JSX.Element | null;
10
10
  export {};
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const SplitCellIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const SplitCellIcon: () => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  export declare const ExternalDropTargets: ({ editorView, node, getScrollOffset, getTableWrapperWidth, }: {
@@ -6,4 +6,4 @@ export declare const ExternalDropTargets: ({ editorView, node, getScrollOffset,
6
6
  node?: PMNode | undefined;
7
7
  getScrollOffset: () => number;
8
8
  getTableWrapperWidth: () => number;
9
- }) => JSX.Element | null;
9
+ }) => React.JSX.Element | null;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
4
  import type { GetEditorFeatureFlags, getPosHandlerNode } from '@atlaskit/editor-common/types';
@@ -25,5 +25,5 @@ type TableComponentWithSharedStateProps = {
25
25
  /**
26
26
  * Use useSharedPluginState to control re-renders from plugin dependencies
27
27
  */
28
- export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, allowTableAlignment, allowTableResizing, }: TableComponentWithSharedStateProps) => JSX.Element | null;
28
+ export declare const TableComponentWithSharedState: ({ view, options, getNode, dispatchAnalyticsEvent, api, getEditorFeatureFlags, eventDispatcher, allowColumnResizing, allowControls, getPos, forwardRef, allowTableAlignment, allowTableResizing, }: TableComponentWithSharedStateProps) => React.JSX.Element | null;
29
29
  export {};
@@ -22,7 +22,7 @@ type ResizableTableContainerProps = {
22
22
  shouldUseIncreasedScalingPercent?: boolean;
23
23
  isCommentEditor?: boolean;
24
24
  };
25
- export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, }: PropsWithChildren<ResizableTableContainerProps>) => JSX.Element>;
25
+ export declare const ResizableTableContainer: React.MemoExoticComponent<({ children, className, node, containerWidth, lineLength, editorView, getPos, tableRef, isResizing, pluginInjectionApi, tableWrapperHeight, isWholeTableInDanger, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, }: PropsWithChildren<ResizableTableContainerProps>) => React.JSX.Element>;
26
26
  type TableContainerProps = {
27
27
  node: PMNode;
28
28
  className: string;
@@ -43,5 +43,5 @@ type TableContainerProps = {
43
43
  isCommentEditor?: boolean;
44
44
  isChromelessEditor?: boolean;
45
45
  };
46
- export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, }: PropsWithChildren<TableContainerProps>) => JSX.Element;
46
+ export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, }: PropsWithChildren<TableContainerProps>) => React.JSX.Element;
47
47
  export {};
@@ -1,4 +1,5 @@
1
1
  import type { PropsWithChildren } from 'react';
2
+ import React from 'react';
2
3
  import type { TableEventPayload } from '@atlaskit/editor-common/analytics';
3
4
  import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
4
5
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
@@ -30,5 +31,5 @@ interface TableResizerProps {
30
31
  onResizeStart?: () => void;
31
32
  disabled?: boolean;
32
33
  }
33
- export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, isCommentEditor, disabled, }: PropsWithChildren<TableResizerProps>) => JSX.Element;
34
+ export declare const TableResizer: ({ children, width, maxWidth, containerWidth, lineLength, updateWidth, onResizeStop, onResizeStart, editorView, getPos, node, tableRef, displayGuideline, attachAnalyticsEvent, displayGapCursor, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, isWholeTableInDanger, shouldUseIncreasedScalingPercent, pluginInjectionApi, isFullWidthModeEnabled, isCommentEditor, disabled, }: PropsWithChildren<TableResizerProps>) => React.JSX.Element;
34
35
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
3
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
4
  import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
@@ -23,7 +23,7 @@ export default class TableView extends ReactNodeView<Props> {
23
23
  };
24
24
  setDomAttrs(node: PmNode): void;
25
25
  getNode: () => PmNode;
26
- render(props: Props, forwardRef: ForwardRef): JSX.Element;
26
+ render(props: Props, forwardRef: ForwardRef): React.JSX.Element;
27
27
  private hasHoveredRows;
28
28
  viewShouldUpdate(nextNode: PmNode): boolean;
29
29
  ignoreMutation(mutation: MutationRecord | {
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  type HandleIconProps = {
3
3
  forceDefaultHandle: boolean;
4
4
  isHandleHovered: boolean;
5
5
  hasMergedCells: boolean;
6
6
  };
7
- export declare const HandleIconComponent: (props: HandleIconProps) => JSX.Element;
7
+ export declare const HandleIconComponent: (props: HandleIconProps) => React.JSX.Element;
8
8
  export {};
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { TableDirection } from '../../types';
3
3
  export declare const DragPreview: ({ direction, width, height, }: {
4
4
  direction: TableDirection;
5
5
  width: number;
6
6
  height: number;
7
- }) => JSX.Element;
7
+ }) => React.JSX.Element;
@@ -1,4 +1,4 @@
1
- import { Component } from 'react';
1
+ import React, { Component } from 'react';
2
2
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
@@ -50,6 +50,6 @@ declare class FloatingDeleteButton extends Component<Props, State> {
50
50
  * @memberof FloatingDeleteButton
51
51
  */
52
52
  private handleClick;
53
- render(): JSX.Element | null;
53
+ render(): React.JSX.Element | null;
54
54
  }
55
55
  export default FloatingDeleteButton;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
3
3
  type DropdownMenuProps = {
4
4
  items: Array<{
@@ -32,5 +32,5 @@ type DropdownMenuProps = {
32
32
  boundariesElement?: HTMLElement;
33
33
  scrollableElement?: HTMLElement;
34
34
  };
35
- export declare const DropdownMenu: ({ items, section, disableKeyboardHandling, onItemActivated, handleClose, onMouseEnter, onMouseLeave, fitWidth, fitHeight, direction, mountPoint, boundariesElement, scrollableElement, }: DropdownMenuProps) => JSX.Element;
35
+ export declare const DropdownMenu: ({ items, section, disableKeyboardHandling, onItemActivated, handleClose, onMouseEnter, onMouseLeave, fitWidth, fitHeight, direction, mountPoint, boundariesElement, scrollableElement, }: DropdownMenuProps) => React.JSX.Element;
36
36
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
4
4
  import type { AriaLiveElementAttributes } from '@atlaskit/editor-plugin-accessibility-utils';
@@ -28,7 +28,7 @@ interface Props {
28
28
  isCommentEditor?: boolean;
29
29
  }
30
30
  declare const FloatingDragMenu: {
31
- ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableNode, direction, index, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, stickyHeaders, pluginConfig, isTableScalingEnabled, getEditorFeatureFlags, ariaNotifyPlugin, api, isCommentEditor, }: Props): JSX.Element | null;
31
+ ({ mountPoint, boundariesElement, scrollableElement, editorView, isOpen, tableNode, direction, index, targetCellPosition, getEditorContainerWidth, editorAnalyticsAPI, stickyHeaders, pluginConfig, isTableScalingEnabled, getEditorFeatureFlags, ariaNotifyPlugin, api, isCommentEditor, }: Props): React.JSX.Element | null;
32
32
  displayName: string;
33
33
  };
34
34
  export default FloatingDragMenu;
@@ -30,7 +30,7 @@ export interface Props {
30
30
  export declare class FloatingInsertButton extends React.Component<Props & WrappedComponentProps, any> {
31
31
  static displayName: string;
32
32
  constructor(props: Props & WrappedComponentProps);
33
- render(): JSX.Element | null;
33
+ render(): React.JSX.Element | null;
34
34
  private getCellPosition;
35
35
  private insertRow;
36
36
  private insertColumn;
@@ -12,5 +12,5 @@ interface Props {
12
12
  number
13
13
  ];
14
14
  }
15
- export declare const FloatingToolbarLabel: React.MemoExoticComponent<(props: Props) => JSX.Element>;
15
+ export declare const FloatingToolbarLabel: React.MemoExoticComponent<(props: Props) => React.JSX.Element>;
16
16
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { TablePlugin } from '../../../tablePluginType';
@@ -28,5 +28,5 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
28
28
  commands: import("../../../tablePluginType").TablePluginCommands;
29
29
  dependencies: import("../../../tablePluginType").TablePluginDependencies;
30
30
  }> | undefined;
31
- }) => JSX.Element;
31
+ }) => React.JSX.Element;
32
32
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface Props {
3
3
  index: number;
4
4
  localId?: string;
@@ -6,5 +6,5 @@ interface Props {
6
6
  height?: number;
7
7
  marginTop?: number;
8
8
  }
9
- export declare const ColumnDropTarget: ({ index, localId, width, height, marginTop }: Props) => JSX.Element;
9
+ export declare const ColumnDropTarget: ({ index, localId, width, height, marginTop }: Props) => React.JSX.Element;
10
10
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  interface Props {
3
3
  tableRef: HTMLTableElement;
4
4
  tableHeight?: number;
@@ -7,5 +7,5 @@ interface Props {
7
7
  isHeaderSticky?: boolean;
8
8
  getScrollOffset?: () => number;
9
9
  }
10
- export declare const ColumnDropTargets: ({ tableRef, tableHeight, localId, colWidths, isHeaderSticky, getScrollOffset, }: Props) => JSX.Element | null;
10
+ export declare const ColumnDropTargets: ({ tableRef, tableHeight, localId, colWidths, isHeaderSticky, getScrollOffset, }: Props) => React.JSX.Element | null;
11
11
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { TableColumnOrdering } from '@atlaskit/custom-steps';
3
3
  import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
4
4
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
@@ -29,5 +29,5 @@ interface Props {
29
29
  api?: PluginInjectionAPI;
30
30
  isChromelessEditor?: boolean;
31
31
  }
32
- declare const TableFloatingColumnControls: ({ editorView, tableRef, getNode, tableActive, hasHeaderRow, hoveredCell, isResizing, stickyHeader, selection, isInDanger, isTableHovered, tableContainerWidth, isNumberColumnEnabled, getScrollOffset, tableWrapperHeight, api, isChromelessEditor, }: Props) => JSX.Element | null;
32
+ declare const TableFloatingColumnControls: ({ editorView, tableRef, getNode, tableActive, hasHeaderRow, hoveredCell, isResizing, stickyHeader, selection, isInDanger, isTableHovered, tableContainerWidth, isNumberColumnEnabled, getScrollOffset, tableWrapperHeight, api, isChromelessEditor, }: Props) => React.JSX.Element | null;
33
33
  export default TableFloatingColumnControls;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
4
  import type { TablePlugin } from '../../tablePluginType';
@@ -16,5 +16,5 @@ type FloatingControlsWithSelectionProps = {
16
16
  tableActive: boolean;
17
17
  api?: ExtractInjectionAPI<TablePlugin>;
18
18
  };
19
- export declare const FloatingControlsWithSelection: ({ editorView, tableRef, isInDanger, isResizing, isHeaderRowEnabled, isHeaderColumnEnabled, hoveredRows, stickyTop, hoverRows, selectRow, tableActive, api, }: FloatingControlsWithSelectionProps) => JSX.Element;
19
+ export declare const FloatingControlsWithSelection: ({ editorView, tableRef, isInDanger, isResizing, isHeaderRowEnabled, isHeaderColumnEnabled, hoveredRows, stickyTop, hoverRows, selectRow, tableActive, api, }: FloatingControlsWithSelectionProps) => React.JSX.Element;
20
20
  export {};
@@ -1,4 +1,4 @@
1
- import { Component } from 'react';
1
+ import React, { Component } from 'react';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  interface Props {
4
4
  editorView: EditorView;
@@ -15,7 +15,7 @@ interface Props {
15
15
  isDragAndDropEnabled?: boolean;
16
16
  }
17
17
  export default class NumberColumn extends Component<Props, any> {
18
- render(): JSX.Element;
18
+ render(): React.JSX.Element;
19
19
  private hoverRows;
20
20
  private selectRow;
21
21
  private clearHoverSelection;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { Selection } from '@atlaskit/editor-prosemirror/state';
@@ -22,6 +22,6 @@ type DragControlsProps = {
22
22
  api?: ExtractInjectionAPI<TablePlugin>;
23
23
  selection?: Selection;
24
24
  };
25
- export declare const DragControls: ({ tableRef, tableNode, tableWidth, hoveredCell, tableActive, editorView, isInDanger, isResizing, isTableHovered, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, selection, }: DragControlsProps) => JSX.Element | null;
26
- export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps, 'selection'>) => JSX.Element;
25
+ export declare const DragControls: ({ tableRef, tableNode, tableWidth, hoveredCell, tableActive, editorView, isInDanger, isResizing, isTableHovered, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, selection, }: DragControlsProps) => React.JSX.Element | null;
26
+ export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps, 'selection'>) => React.JSX.Element;
27
27
  export {};
@@ -4,5 +4,5 @@ type RowDropTargetProps = {
4
4
  localId?: string;
5
5
  style?: React.CSSProperties;
6
6
  };
7
- declare const RowDropTarget: ({ index, localId, style }: RowDropTargetProps) => JSX.Element;
7
+ declare const RowDropTarget: ({ index, localId, style }: RowDropTargetProps) => React.JSX.Element;
8
8
  export default RowDropTarget;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import type { TableColumnOrdering } from '@atlaskit/custom-steps';
3
3
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
@@ -38,5 +38,5 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
38
38
  commands: import("../../tablePluginType").TablePluginCommands;
39
39
  dependencies: import("../../tablePluginType").TablePluginDependencies;
40
40
  }> | undefined;
41
- }) => JSX.Element | null;
41
+ }) => React.JSX.Element | null;
42
42
  export default TableFloatingControls;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const FullWidthDisplay: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const FullWidthDisplay: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const AddColLeftIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AddColLeftIcon: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const AddColRightIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AddColRightIcon: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const AddRowAboveIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AddRowAboveIcon: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const AddRowBelowIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const AddRowBelowIcon: () => React.JSX.Element;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  interface DragHandleDisabledIconProps {
3
3
  style?: React.CSSProperties;
4
4
  }
5
- export declare const DragHandleDisabledIcon: ({ style }: DragHandleDisabledIconProps) => JSX.Element;
5
+ export declare const DragHandleDisabledIcon: ({ style }: DragHandleDisabledIconProps) => React.JSX.Element;
6
6
  export {};
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const DragHandleIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const DragHandleIcon: () => React.JSX.Element;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  interface DragInMotionIconProps {
3
3
  style?: React.CSSProperties;
4
4
  }
5
- export declare const DragInMotionIcon: ({ style }: DragInMotionIconProps) => JSX.Element;
5
+ export declare const DragInMotionIcon: ({ style }: DragInMotionIconProps) => React.JSX.Element;
6
6
  export {};
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const MergeCellsIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const MergeCellsIcon: () => React.JSX.Element;
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const MinimisedHandleIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const MinimisedHandleIcon: () => React.JSX.Element;
@@ -6,5 +6,5 @@ type SortingIconProps = React.ComponentProps<typeof SortingIcon>;
6
6
  type SortingIconWrapperProps = SortingIconProps & {
7
7
  api: ExtractInjectionAPI<TablePlugin>;
8
8
  };
9
- export declare const SortingIconWrapper: (props: SortingIconWrapperProps) => JSX.Element | null;
9
+ export declare const SortingIconWrapper: (props: SortingIconWrapperProps) => React.JSX.Element | null;
10
10
  export {};
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const SplitCellIcon: () => JSX.Element;
1
+ import React from 'react';
2
+ export declare const SplitCellIcon: () => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "9.3.3",
3
+ "version": "9.3.5",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,9 +28,9 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@atlaskit/adf-schema": "^46.1.0",
31
- "@atlaskit/button": "^20.4.0",
31
+ "@atlaskit/button": "^20.5.0",
32
32
  "@atlaskit/custom-steps": "^0.9.0",
33
- "@atlaskit/editor-common": "^99.7.0",
33
+ "@atlaskit/editor-common": "^99.9.0",
34
34
  "@atlaskit/editor-palette": "1.7.0",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^1.3.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.11.0",
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/editor-prosemirror": "6.2.1",
44
44
  "@atlaskit/editor-shared-styles": "^3.2.0",
45
45
  "@atlaskit/editor-tables": "^2.8.0",
46
- "@atlaskit/icon": "^23.6.0",
46
+ "@atlaskit/icon": "^23.7.0",
47
47
  "@atlaskit/menu": "^2.14.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.0.0",
49
49
  "@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
52
52
  "@atlaskit/primitives": "^13.4.0",
53
53
  "@atlaskit/theme": "^14.1.0",
54
- "@atlaskit/tmp-editor-statsig": "^2.41.0",
54
+ "@atlaskit/tmp-editor-statsig": "^2.43.0",
55
55
  "@atlaskit/toggle": "^14.1.0",
56
56
  "@atlaskit/tokens": "^3.3.0",
57
57
  "@atlaskit/tooltip": "^19.1.0",
@@ -143,6 +143,12 @@
143
143
  },
144
144
  "platform_editor_nested_tables_resizing": {
145
145
  "type": "boolean"
146
+ },
147
+ "platform_editor_nested_tables_paste_wrap_fix": {
148
+ "type": "boolean"
149
+ },
150
+ "platform_editor_table_layout_shift_fix": {
151
+ "type": "boolean"
146
152
  }
147
153
  }
148
154
  }
@@ -5,6 +5,7 @@ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
5
5
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
6
6
  import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
7
7
  import { akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
10
 
10
11
  import { generateColgroup, getResizerMinWidth } from '../pm-plugins/table-resizing/utils/colgroup';
@@ -144,7 +145,9 @@ export const tableNodeSpecWithFixedToDOM = (config: Config): NodeSpec => {
144
145
  '--ak-editor-table-min-width': `${tableMinWidth}px`,
145
146
  minWidth: 'var(--ak-editor-table-min-width)',
146
147
  maxWidth: `min(calc(100cqw - var(--ak-editor-table-gutter-padding)), var(--ak-editor-table-max-width))`,
147
- width: `min(calc(100cqw - var(--ak-editor-table-gutter-padding)), ${node.attrs.width})`,
148
+ width: fg('platform_editor_table_layout_shift_fix')
149
+ ? `min(calc(100cqw - var(--ak-editor-table-gutter-padding)), ${node.attrs.width}px)`
150
+ : `min(calc(100cqw - var(--ak-editor-table-gutter-padding)), ${node.attrs.width})`,
148
151
  }),
149
152
  },
150
153
  [