@atlaskit/editor-plugin-table 12.3.0 → 12.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/types/nodeviews/ExternalDropTargets.d.ts +1 -1
  3. package/dist/types/nodeviews/TableComponent.d.ts +21 -21
  4. package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +9 -9
  5. package/dist/types/nodeviews/TableContainer.d.ts +20 -20
  6. package/dist/types/nodeviews/TableResizer.d.ts +16 -16
  7. package/dist/types/nodeviews/TableRow.d.ts +1 -1
  8. package/dist/types/nodeviews/table-node-views.d.ts +4 -4
  9. package/dist/types/nodeviews/table.d.ts +2 -2
  10. package/dist/types/nodeviews/toDOM.d.ts +4 -4
  11. package/dist/types/nodeviews/types.d.ts +12 -12
  12. package/dist/types/pm-plugins/analytics/actions.d.ts +2 -2
  13. package/dist/types/pm-plugins/analytics/types.d.ts +2 -2
  14. package/dist/types/pm-plugins/commands/column-resize.d.ts +6 -6
  15. package/dist/types/pm-plugins/commands/insert.d.ts +7 -7
  16. package/dist/types/pm-plugins/drag-and-drop/actions.d.ts +4 -4
  17. package/dist/types/pm-plugins/drag-and-drop/types.d.ts +3 -3
  18. package/dist/types/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
  19. package/dist/types/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
  20. package/dist/types/pm-plugins/sticky-headers/types.d.ts +2 -2
  21. package/dist/types/pm-plugins/table-resizing/commands.d.ts +3 -3
  22. package/dist/types/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
  23. package/dist/types/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
  24. package/dist/types/pm-plugins/table-resizing/utils/resize-state.d.ts +6 -6
  25. package/dist/types/pm-plugins/table-resizing/utils/scale-table.d.ts +6 -6
  26. package/dist/types/pm-plugins/table-resizing/utils/types.d.ts +8 -8
  27. package/dist/types/pm-plugins/utils/analytics.d.ts +2 -2
  28. package/dist/types/pm-plugins/utils/collapse.d.ts +3 -3
  29. package/dist/types/pm-plugins/utils/column-controls.d.ts +1 -1
  30. package/dist/types/pm-plugins/utils/create.d.ts +8 -8
  31. package/dist/types/pm-plugins/utils/dom.d.ts +2 -2
  32. package/dist/types/pm-plugins/utils/drag-menu.d.ts +1 -1
  33. package/dist/types/pm-plugins/utils/row-controls.d.ts +2 -2
  34. package/dist/types/pm-plugins/utils/snapping.d.ts +1 -1
  35. package/dist/types/pm-plugins/view-mode-sort/index.d.ts +1 -1
  36. package/dist/types/pm-plugins/view-mode-sort/types.d.ts +2 -2
  37. package/dist/types/tablePluginType.d.ts +10 -10
  38. package/dist/types/types/index.d.ts +99 -99
  39. package/dist/types/ui/ColumnResizeWidget/index.d.ts +1 -1
  40. package/dist/types/ui/ContentComponent.d.ts +5 -5
  41. package/dist/types/ui/DragHandle/HandleIconComponent.d.ts +1 -1
  42. package/dist/types/ui/DragHandle/index.d.ts +11 -11
  43. package/dist/types/ui/DragPreview/index.d.ts +1 -1
  44. package/dist/types/ui/FloatingContextualButton/FixedButton.d.ts +2 -2
  45. package/dist/types/ui/FloatingContextualButton/index.d.ts +7 -7
  46. package/dist/types/ui/FloatingContextualMenu/ContextualMenu.d.ts +10 -10
  47. package/dist/types/ui/FloatingContextualMenu/index.d.ts +8 -8
  48. package/dist/types/ui/FloatingDeleteButton/DeleteButton.d.ts +2 -2
  49. package/dist/types/ui/FloatingDeleteButton/getPopUpOptions.d.ts +1 -1
  50. package/dist/types/ui/FloatingDeleteButton/index.d.ts +9 -9
  51. package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +15 -15
  52. package/dist/types/ui/FloatingDragMenu/DropdownMenu.d.ts +14 -14
  53. package/dist/types/ui/FloatingDragMenu/index.d.ts +14 -14
  54. package/dist/types/ui/FloatingInsertButton/InsertButton.d.ts +3 -3
  55. package/dist/types/ui/FloatingInsertButton/index.d.ts +11 -11
  56. package/dist/types/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +4 -4
  57. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +10 -10
  58. package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +2 -2
  59. package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/index.d.ts +4 -4
  60. package/dist/types/ui/TableFloatingColumnControls/index.d.ts +10 -10
  61. package/dist/types/ui/TableFloatingControls/CornerControls/types.d.ts +3 -3
  62. package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +7 -7
  63. package/dist/types/ui/TableFloatingControls/NumberColumn/index.d.ts +7 -7
  64. package/dist/types/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +5 -5
  65. package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +8 -8
  66. package/dist/types/ui/TableFloatingControls/index.d.ts +14 -14
  67. package/dist/types/ui/global-styles.d.ts +1 -1
  68. package/dist/types-ts4.5/nodeviews/ExternalDropTargets.d.ts +1 -1
  69. package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +21 -21
  70. package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +9 -9
  71. package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +20 -20
  72. package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +16 -16
  73. package/dist/types-ts4.5/nodeviews/TableRow.d.ts +1 -1
  74. package/dist/types-ts4.5/nodeviews/table-node-views.d.ts +4 -4
  75. package/dist/types-ts4.5/nodeviews/table.d.ts +2 -2
  76. package/dist/types-ts4.5/nodeviews/toDOM.d.ts +4 -4
  77. package/dist/types-ts4.5/nodeviews/types.d.ts +12 -12
  78. package/dist/types-ts4.5/pm-plugins/analytics/actions.d.ts +2 -2
  79. package/dist/types-ts4.5/pm-plugins/analytics/types.d.ts +2 -2
  80. package/dist/types-ts4.5/pm-plugins/commands/column-resize.d.ts +6 -6
  81. package/dist/types-ts4.5/pm-plugins/commands/insert.d.ts +7 -7
  82. package/dist/types-ts4.5/pm-plugins/drag-and-drop/actions.d.ts +4 -4
  83. package/dist/types-ts4.5/pm-plugins/drag-and-drop/types.d.ts +3 -3
  84. package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
  85. package/dist/types-ts4.5/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +1 -1
  86. package/dist/types-ts4.5/pm-plugins/sticky-headers/types.d.ts +2 -2
  87. package/dist/types-ts4.5/pm-plugins/table-resizing/commands.d.ts +3 -3
  88. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/column-state.d.ts +1 -1
  89. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
  90. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-state.d.ts +6 -6
  91. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/scale-table.d.ts +6 -6
  92. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/types.d.ts +8 -8
  93. package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +2 -2
  94. package/dist/types-ts4.5/pm-plugins/utils/collapse.d.ts +3 -3
  95. package/dist/types-ts4.5/pm-plugins/utils/column-controls.d.ts +1 -1
  96. package/dist/types-ts4.5/pm-plugins/utils/create.d.ts +8 -8
  97. package/dist/types-ts4.5/pm-plugins/utils/dom.d.ts +2 -2
  98. package/dist/types-ts4.5/pm-plugins/utils/drag-menu.d.ts +1 -1
  99. package/dist/types-ts4.5/pm-plugins/utils/row-controls.d.ts +2 -2
  100. package/dist/types-ts4.5/pm-plugins/utils/snapping.d.ts +1 -1
  101. package/dist/types-ts4.5/pm-plugins/view-mode-sort/index.d.ts +1 -1
  102. package/dist/types-ts4.5/pm-plugins/view-mode-sort/types.d.ts +2 -2
  103. package/dist/types-ts4.5/tablePluginType.d.ts +10 -10
  104. package/dist/types-ts4.5/types/index.d.ts +99 -99
  105. package/dist/types-ts4.5/ui/ColumnResizeWidget/index.d.ts +1 -1
  106. package/dist/types-ts4.5/ui/ContentComponent.d.ts +5 -5
  107. package/dist/types-ts4.5/ui/DragHandle/HandleIconComponent.d.ts +1 -1
  108. package/dist/types-ts4.5/ui/DragHandle/index.d.ts +11 -11
  109. package/dist/types-ts4.5/ui/DragPreview/index.d.ts +1 -1
  110. package/dist/types-ts4.5/ui/FloatingContextualButton/FixedButton.d.ts +2 -2
  111. package/dist/types-ts4.5/ui/FloatingContextualButton/index.d.ts +7 -7
  112. package/dist/types-ts4.5/ui/FloatingContextualMenu/ContextualMenu.d.ts +10 -10
  113. package/dist/types-ts4.5/ui/FloatingContextualMenu/index.d.ts +8 -8
  114. package/dist/types-ts4.5/ui/FloatingDeleteButton/DeleteButton.d.ts +2 -2
  115. package/dist/types-ts4.5/ui/FloatingDeleteButton/getPopUpOptions.d.ts +1 -1
  116. package/dist/types-ts4.5/ui/FloatingDeleteButton/index.d.ts +9 -9
  117. package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +15 -15
  118. package/dist/types-ts4.5/ui/FloatingDragMenu/DropdownMenu.d.ts +14 -14
  119. package/dist/types-ts4.5/ui/FloatingDragMenu/index.d.ts +14 -14
  120. package/dist/types-ts4.5/ui/FloatingInsertButton/InsertButton.d.ts +3 -3
  121. package/dist/types-ts4.5/ui/FloatingInsertButton/index.d.ts +11 -11
  122. package/dist/types-ts4.5/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +4 -4
  123. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +10 -10
  124. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +2 -2
  125. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/index.d.ts +4 -4
  126. package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +10 -10
  127. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/types.d.ts +3 -3
  128. package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +7 -7
  129. package/dist/types-ts4.5/ui/TableFloatingControls/NumberColumn/index.d.ts +7 -7
  130. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +5 -5
  131. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +8 -8
  132. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +14 -14
  133. package/dist/types-ts4.5/ui/global-styles.d.ts +1 -1
  134. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 12.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
8
+ Sorted type and interface props to improve Atlaskit docs
9
+ - Updated dependencies
10
+
3
11
  ## 12.3.0
4
12
 
5
13
  ### Minor Changes
@@ -3,7 +3,7 @@ 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, }: {
5
5
  editorView: EditorView;
6
- node?: PMNode;
7
6
  getScrollOffset: () => number;
8
7
  getTableWrapperWidth: () => number;
8
+ node?: PMNode;
9
9
  }) => React.JSX.Element | null;
@@ -10,36 +10,36 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
10
  import type { CellHoverMeta, PluginInjectionAPI } from '../types';
11
11
  import type { TableOptions } from './types';
12
12
  interface ComponentProps {
13
- view: EditorView;
14
- getNode: () => PmNode;
15
13
  allowColumnResizing?: boolean;
16
- eventDispatcher: EventDispatcher;
17
- getPos: () => number | undefined;
18
- options?: TableOptions;
19
- contentDOM: (node: HTMLElement | null) => void;
20
- containerWidth: EditorContainerWidth;
21
14
  allowControls?: boolean;
22
- allowTableResizing?: boolean;
23
15
  allowTableAlignment?: boolean;
24
- isHeaderRowEnabled: boolean;
25
- isHeaderColumnEnabled: boolean;
26
- isMediaFullscreen?: boolean;
27
- isDragAndDropEnabled?: boolean;
28
- isTableScalingEnabled?: boolean;
29
- tableActive: boolean;
30
- ordering?: TableColumnOrdering;
31
- isResizing?: boolean;
32
- getEditorFeatureFlags: GetEditorFeatureFlags;
16
+ allowTableResizing?: boolean;
17
+ containerWidth: EditorContainerWidth;
18
+ contentDOM: (node: HTMLElement | null) => void;
33
19
  dispatchAnalyticsEvent: DispatchAnalyticsEvent;
34
- pluginInjectionApi?: PluginInjectionAPI;
20
+ eventDispatcher: EventDispatcher;
21
+ getEditorFeatureFlags: GetEditorFeatureFlags;
22
+ getNode: () => PmNode;
23
+ getPos: () => number | undefined;
24
+ hoveredCell?: CellHoverMeta;
25
+ hoveredRows?: number[];
35
26
  intl: IntlShape;
27
+ isDragAndDropEnabled?: boolean;
28
+ isHeaderColumnEnabled: boolean;
29
+ isHeaderRowEnabled: boolean;
36
30
  isInDanger?: boolean;
37
- hoveredRows?: number[];
38
- hoveredCell?: CellHoverMeta;
31
+ isMediaFullscreen?: boolean;
32
+ isResizing?: boolean;
39
33
  isTableHovered?: boolean;
34
+ isTableScalingEnabled?: boolean;
40
35
  isWholeTableInDanger?: boolean;
41
- selection?: Selection;
42
36
  limitedMode?: boolean;
37
+ options?: TableOptions;
38
+ ordering?: TableColumnOrdering;
39
+ pluginInjectionApi?: PluginInjectionAPI;
40
+ selection?: Selection;
41
+ tableActive: boolean;
42
+ view: EditorView;
43
43
  }
44
44
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<ComponentProps>> & {
45
45
  WrappedComponent: React.ComponentType<ComponentProps>;
@@ -8,19 +8,19 @@ import type { PluginInjectionAPI } from '../types';
8
8
  import type { TableOptions } from './types';
9
9
  type ForwardRef = (node: HTMLElement | null) => any;
10
10
  type TableComponentWithSharedStateProps = {
11
- view: EditorView;
12
- options?: TableOptions;
13
- getNode: () => PmNode;
14
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
15
- getEditorFeatureFlags: GetEditorFeatureFlags;
16
- api?: PluginInjectionAPI;
17
- eventDispatcher: EventDispatcher;
18
- forwardRef: ForwardRef;
19
- getPos: getPosHandlerNode;
20
11
  allowColumnResizing?: boolean;
21
12
  allowControls?: boolean;
22
13
  allowTableAlignment?: boolean;
23
14
  allowTableResizing?: boolean;
15
+ api?: PluginInjectionAPI;
16
+ dispatchAnalyticsEvent: DispatchAnalyticsEvent;
17
+ eventDispatcher: EventDispatcher;
18
+ forwardRef: ForwardRef;
19
+ getEditorFeatureFlags: GetEditorFeatureFlags;
20
+ getNode: () => PmNode;
21
+ getPos: getPosHandlerNode;
22
+ options?: TableOptions;
23
+ view: EditorView;
24
24
  };
25
25
  /**
26
26
  * Use useSharedPluginState to control re-renders from plugin dependencies
@@ -5,48 +5,48 @@ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
6
  import type { PluginInjectionAPI } from '../types';
7
7
  type ResizableTableContainerProps = {
8
- containerWidth: number;
9
- lineLength: number;
10
- node: PMNode;
11
8
  className: string;
9
+ containerWidth: number;
12
10
  editorView: EditorView;
13
11
  getPos: () => number | undefined;
14
- tableRef: HTMLTableElement;
12
+ isChromelessEditor?: boolean;
13
+ isCommentEditor?: boolean;
15
14
  isResizing?: boolean;
16
- isWindowResized?: boolean;
17
- pluginInjectionApi?: PluginInjectionAPI;
18
- tableWrapperHeight?: number;
19
- isWholeTableInDanger?: boolean;
15
+ isTableAlignmentEnabled?: boolean;
20
16
  isTableScalingEnabled?: boolean;
21
17
  isTableWithFixedColumnWidthsOptionEnabled?: boolean;
22
- isTableAlignmentEnabled?: boolean;
18
+ isWholeTableInDanger?: boolean;
19
+ isWindowResized?: boolean;
20
+ lineLength: number;
21
+ node: PMNode;
22
+ pluginInjectionApi?: PluginInjectionAPI;
23
23
  shouldUseIncreasedScalingPercent?: boolean;
24
- isCommentEditor?: boolean;
25
- isChromelessEditor?: boolean;
24
+ tableRef: HTMLTableElement;
25
+ tableWrapperHeight?: number;
26
26
  };
27
27
  export declare const ResizableTableContainer: React.FC<ResizableTableContainerProps & {
28
28
  children?: React.ReactNode | undefined;
29
29
  }>;
30
30
  type TableContainerProps = {
31
- node: PMNode;
32
31
  className: string;
33
32
  containerWidth: EditorContainerWidth;
34
33
  editorView: EditorView;
35
34
  getPos: () => number | undefined;
36
- tableRef: HTMLTableElement;
35
+ isChromelessEditor?: boolean;
36
+ isCommentEditor?: boolean;
37
37
  isNested: boolean;
38
38
  isResizing?: boolean;
39
- isWindowResized?: boolean;
40
- pluginInjectionApi?: PluginInjectionAPI;
41
- tableWrapperHeight?: number;
42
- isWholeTableInDanger?: boolean;
39
+ isTableAlignmentEnabled?: boolean;
43
40
  isTableResizingEnabled: boolean | undefined;
44
41
  isTableScalingEnabled?: boolean;
45
42
  isTableWithFixedColumnWidthsOptionEnabled?: boolean;
46
- isTableAlignmentEnabled?: boolean;
43
+ isWholeTableInDanger?: boolean;
44
+ isWindowResized?: boolean;
45
+ node: PMNode;
46
+ pluginInjectionApi?: PluginInjectionAPI;
47
47
  shouldUseIncreasedScalingPercent?: boolean;
48
- isCommentEditor?: boolean;
49
- isChromelessEditor?: boolean;
48
+ tableRef: HTMLTableElement;
49
+ tableWrapperHeight?: number;
50
50
  };
51
51
  export declare const TableContainer: ({ children, node, className, containerWidth: { width: editorWidth, lineLength }, editorView, getPos, tableRef, isNested, tableWrapperHeight, isResizing, isWindowResized, pluginInjectionApi, isWholeTableInDanger, isTableResizingEnabled, isTableScalingEnabled, isTableWithFixedColumnWidthsOptionEnabled, isTableAlignmentEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, isChromelessEditor, }: PropsWithChildren<TableContainerProps>) => React.JSX.Element;
52
52
  export {};
@@ -7,29 +7,29 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
7
7
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
8
  import type { PluginInjectionAPI } from '../types';
9
9
  interface TableResizerProps {
10
- width: number;
11
- maxWidth: number | string;
10
+ attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
12
11
  containerWidth: number;
13
- lineLength: number;
14
- updateWidth: (width: number) => void;
12
+ disabled?: boolean;
13
+ displayGapCursor: (toggle: boolean) => boolean;
14
+ displayGuideline: (guideline: GuidelineConfig[]) => boolean;
15
15
  editorView: EditorView;
16
16
  getPos: () => number | undefined;
17
- node: PMNode;
18
- tableRef: HTMLTableElement;
19
- displayGuideline: (guideline: GuidelineConfig[]) => boolean;
20
- attachAnalyticsEvent: (payload: TableEventPayload) => ((tr: Transaction) => boolean) | undefined;
21
- displayGapCursor: (toggle: boolean) => boolean;
22
- pluginInjectionApi?: PluginInjectionAPI;
17
+ isCommentEditor?: boolean;
18
+ isFullWidthModeEnabled?: boolean;
19
+ isTableAlignmentEnabled?: boolean;
23
20
  isTableScalingEnabled?: boolean;
24
21
  isTableWithFixedColumnWidthsOptionEnabled?: boolean;
25
- isTableAlignmentEnabled?: boolean;
26
22
  isWholeTableInDanger?: boolean;
27
- isFullWidthModeEnabled?: boolean;
28
- shouldUseIncreasedScalingPercent?: boolean;
29
- isCommentEditor?: boolean;
30
- onResizeStop?: () => void;
23
+ lineLength: number;
24
+ maxWidth: number | string;
25
+ node: PMNode;
31
26
  onResizeStart?: () => void;
32
- disabled?: boolean;
27
+ onResizeStop?: () => void;
28
+ pluginInjectionApi?: PluginInjectionAPI;
29
+ shouldUseIncreasedScalingPercent?: boolean;
30
+ tableRef: HTMLTableElement;
31
+ updateWidth: (width: number) => void;
32
+ width: number;
33
33
  }
34
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;
35
35
  export {};
@@ -34,8 +34,8 @@ export default class TableRow extends TableNodeView<HTMLTableRowElement> impleme
34
34
  update(node: PMNode, ..._args: any[]): boolean;
35
35
  destroy(): void;
36
36
  ignoreMutation(mutationRecord: MutationRecord | {
37
- type: 'selection';
38
37
  target: Node;
38
+ type: 'selection';
39
39
  }): boolean;
40
40
  /**
41
41
  * Methods
@@ -8,14 +8,14 @@ import type { PluginInjectionAPI } from '../types';
8
8
  import TableCell from './TableCell';
9
9
  import TableRow from './TableRow';
10
10
  type TableViewOptions = {
11
- portalProviderAPI: PortalProviderAPI;
11
+ dispatchAnalyticsEvent: DispatchAnalyticsEvent;
12
12
  eventDispatcher: EventDispatcher;
13
13
  getEditorContainerWidth: GetEditorContainerWidth;
14
14
  getEditorFeatureFlags: GetEditorFeatureFlags;
15
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
16
- pluginInjectionApi?: PluginInjectionAPI;
17
- isCommentEditor?: boolean;
18
15
  isChromelessEditor?: boolean;
16
+ isCommentEditor?: boolean;
17
+ pluginInjectionApi?: PluginInjectionAPI;
18
+ portalProviderAPI: PortalProviderAPI;
19
19
  };
20
20
  export declare const tableView: (options: TableViewOptions) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => import("prosemirror-view").NodeView;
21
21
  type TableCellViewOptions = {
@@ -19,8 +19,8 @@ export default class TableView extends ReactNodeView<Props> {
19
19
  getEditorFeatureFlags: GetEditorFeatureFlags;
20
20
  constructor(props: Props);
21
21
  getContentDOM(): {
22
- dom: HTMLElement;
23
22
  contentDOM?: HTMLElement;
23
+ dom: HTMLElement;
24
24
  };
25
25
  /**
26
26
  * Handles moving the table from ProseMirror's DOM structure into a React-rendered table node.
@@ -36,8 +36,8 @@ export default class TableView extends ReactNodeView<Props> {
36
36
  private hasHoveredRows;
37
37
  viewShouldUpdate(nextNode: PmNode): boolean;
38
38
  ignoreMutation(mutation: MutationRecord | {
39
- type: 'selection';
40
39
  target: Node;
40
+ type: 'selection';
41
41
  }): boolean;
42
42
  destroy(): void;
43
43
  }
@@ -2,14 +2,14 @@ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
2
2
  import type { DOMOutputSpec, NodeSpec, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  type Config = {
4
4
  allowColumnResizing: boolean;
5
- tableResizingEnabled: boolean;
6
5
  getEditorContainerWidth: GetEditorContainerWidth;
6
+ isChromelessEditor?: boolean;
7
+ isCommentEditor?: boolean;
8
+ isNested?: boolean;
7
9
  isNestingSupported?: boolean;
8
10
  isTableScalingEnabled?: boolean;
9
11
  shouldUseIncreasedScalingPercent?: boolean;
10
- isCommentEditor?: boolean;
11
- isChromelessEditor?: boolean;
12
- isNested?: boolean;
12
+ tableResizingEnabled: boolean;
13
13
  };
14
14
  export declare const tableNodeSpecWithFixedToDOM: (config: Config) => NodeSpec & {
15
15
  toDOM: (node: PMNode) => DOMOutputSpec;
@@ -6,28 +6,28 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
6
6
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  import type { PluginInjectionAPI } from '../types';
8
8
  export type TableOptions = {
9
- isFullWidthModeEnabled?: boolean;
10
- wasFullWidthModeEnabled?: boolean;
9
+ isChromelessEditor?: boolean;
10
+ isCommentEditor?: boolean;
11
11
  isDragAndDropEnabled?: boolean;
12
+ isFullWidthModeEnabled?: boolean;
12
13
  isTableScalingEnabled?: boolean;
13
- isCommentEditor?: boolean;
14
- isChromelessEditor?: boolean;
15
14
  shouldUseIncreasedScalingPercent?: boolean;
15
+ wasFullWidthModeEnabled?: boolean;
16
16
  };
17
17
  export interface Props {
18
- node: PmNode;
19
- view: EditorView;
20
18
  allowColumnResizing?: boolean;
21
- allowTableResizing?: boolean;
22
- allowTableAlignment?: boolean;
23
19
  allowControls?: boolean;
20
+ allowTableAlignment?: boolean;
21
+ allowTableResizing?: boolean;
24
22
  cellMinWidth?: number;
25
- portalProviderAPI: PortalProviderAPI;
23
+ dispatchAnalyticsEvent: DispatchAnalyticsEvent;
26
24
  eventDispatcher: EventDispatcher;
27
- getPos: () => number | undefined;
28
- options?: TableOptions;
29
25
  getEditorContainerWidth: GetEditorContainerWidth;
30
26
  getEditorFeatureFlags: GetEditorFeatureFlags;
31
- dispatchAnalyticsEvent: DispatchAnalyticsEvent;
27
+ getPos: () => number | undefined;
28
+ node: PmNode;
29
+ options?: TableOptions;
32
30
  pluginInjectionApi?: PluginInjectionAPI;
31
+ portalProviderAPI: PortalProviderAPI;
32
+ view: EditorView;
33
33
  }
@@ -7,12 +7,12 @@ export declare enum AnalyticPluginTypes {
7
7
  UpdateRowOrColumnMovedAndOverflowTrigger = 4
8
8
  }
9
9
  type UpdateRowOrColumnMovedAction = {
10
- type: AnalyticPluginTypes.UpdateRowOrColumnMovedAction;
11
10
  data: RowOrColumnMovedState;
11
+ type: AnalyticPluginTypes.UpdateRowOrColumnMovedAction;
12
12
  };
13
13
  type RemoveRowOrColumnMovedAction = {
14
- type: AnalyticPluginTypes.RemoveRowOrColumnMovedAction;
15
14
  data: undefined;
15
+ type: AnalyticPluginTypes.RemoveRowOrColumnMovedAction;
16
16
  };
17
17
  export type AnalyticPluginAction = UpdateRowOrColumnMovedAction | RemoveRowOrColumnMovedAction;
18
18
  export {};
@@ -1,9 +1,9 @@
1
1
  export type ActionType = 'none' | 'addRowOrColumn' | 'copyOrCut' | 'pasted';
2
2
  export type RowOrColumnMovedState = {
3
- type?: 'row' | 'column';
3
+ currentActions: Array<ActionType>;
4
4
  /** used to confirm if same number of cells was copied and pasted */
5
5
  numberOfCells?: number;
6
- currentActions: Array<ActionType>;
6
+ type?: 'row' | 'column';
7
7
  };
8
8
  export type AnalyticPluginState = {
9
9
  rowOrColumnMoved: RowOrColumnMovedState;
@@ -11,21 +11,21 @@ export declare const initiateKeyboardColumnResizing: ({ ariaNotify, getIntl, nod
11
11
  nodeViewPortalProviderAPI: PortalProviderAPI;
12
12
  }) => Command;
13
13
  export declare const activateNextResizeArea: ({ direction, ariaNotify, getIntl, nodeViewPortalProviderAPI, }: {
14
- direction: Direction;
15
14
  ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
15
+ direction: Direction;
16
16
  getIntl?: () => IntlShape;
17
17
  nodeViewPortalProviderAPI: PortalProviderAPI;
18
18
  }) => Command;
19
19
  export declare const changeColumnWidthByStep: ({ stepSize, getEditorContainerWidth, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, isCommentEditor, ariaNotify, api, getIntl, }: {
20
- stepSize: number;
21
- getEditorContainerWidth: GetEditorContainerWidth;
22
- isTableScalingEnabled: boolean;
23
- isTableFixedColumnWidthsOptionEnabled: boolean;
24
- isCommentEditor: boolean;
25
20
  api: PluginInjectionAPI | undefined | null;
26
21
  ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
22
+ getEditorContainerWidth: GetEditorContainerWidth;
27
23
  getIntl?: () => IntlShape;
24
+ isCommentEditor: boolean;
25
+ isTableFixedColumnWidthsOptionEnabled: boolean;
26
+ isTableScalingEnabled: boolean;
28
27
  originalTr?: Transaction;
28
+ stepSize: number;
29
29
  }) => Command;
30
30
  export declare const stopKeyboardColumnResizing: ({ ariaNotify, getIntl, originalTr, }: {
31
31
  ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
@@ -5,16 +5,16 @@ 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
7
  type InsertTableWithNestingSupportCommand = (options: {
8
- isTableScalingEnabled?: boolean;
9
- isTableAlignmentEnabled?: boolean;
10
- isFullWidthModeEnabled?: boolean;
11
- isCommentEditor?: boolean;
12
- isChromelessEditor?: boolean;
13
- isTableResizingEnabled?: boolean;
14
8
  createTableProps?: {
15
- rowsCount?: number;
16
9
  colsCount?: number;
10
+ rowsCount?: number;
17
11
  };
12
+ isChromelessEditor?: boolean;
13
+ isCommentEditor?: boolean;
14
+ isFullWidthModeEnabled?: boolean;
15
+ isTableAlignmentEnabled?: boolean;
16
+ isTableResizingEnabled?: boolean;
17
+ isTableScalingEnabled?: boolean;
18
18
  }, api: PluginInjectionAPI | undefined | null, analyticsPayload?: AnalyticsEventPayload) => EditorCommand;
19
19
  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;
20
20
  export declare const addColumnBefore: (api: PluginInjectionAPI | undefined | null, isTableScalingEnabled?: boolean, isTableFixedColumnWidthsOptionEnabled?: boolean, shouldUseIncreasedScalingPercent?: boolean, isCommentEditor?: boolean) => Command;
@@ -2,8 +2,8 @@ import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
2
2
  import type { TableDirection } from '../../types';
3
3
  import type { DropTargetType } from './consts';
4
4
  interface DragAndDropAction<T, D> {
5
- type: T;
6
5
  data: D;
6
+ type: T;
7
7
  }
8
8
  export declare const DragAndDropActionType: {
9
9
  readonly SET_DROP_TARGET: "SET_DROP_TARGET";
@@ -11,17 +11,17 @@ export declare const DragAndDropActionType: {
11
11
  readonly TOGGLE_DRAG_MENU: "TOGGLE_DRAG_MENU";
12
12
  };
13
13
  type DragAndDropSetDropTargetAction = DragAndDropAction<typeof DragAndDropActionType.SET_DROP_TARGET, {
14
- type: DropTargetType;
15
- index: number;
16
14
  decorationSet: DecorationSet;
15
+ index: number;
16
+ type: DropTargetType;
17
17
  }>;
18
18
  type DragAndDropClearDropTargetAction = DragAndDropAction<typeof DragAndDropActionType.CLEAR_DROP_TARGET, {
19
19
  decorationSet: DecorationSet;
20
20
  }>;
21
21
  type DragAndDropToggleDragMenuAction = DragAndDropAction<typeof DragAndDropActionType.TOGGLE_DRAG_MENU, {
22
- isDragMenuOpen: boolean;
23
22
  direction: TableDirection;
24
23
  index: number;
24
+ isDragMenuOpen: boolean;
25
25
  isKeyboardModeActive: boolean;
26
26
  }>;
27
27
  export type DragAndDropPluginAction = DragAndDropSetDropTargetAction | DragAndDropClearDropTargetAction | DragAndDropToggleDragMenuAction;
@@ -3,12 +3,12 @@ import type { TableDirection } from '../../types';
3
3
  import type { DropTargetType } from './consts';
4
4
  export interface DragAndDropPluginState {
5
5
  decorationSet: DecorationSet;
6
- dropTargetType: DropTargetType;
7
- dropTargetIndex: number;
8
- isDragMenuOpen: boolean;
9
6
  dragMenuDirection?: TableDirection;
10
7
  dragMenuIndex: number;
8
+ dropTargetIndex: number;
9
+ dropTargetType: DropTargetType;
11
10
  isDragging: boolean;
11
+ isDragMenuOpen: boolean;
12
12
  isKeyboardModeActive: boolean;
13
13
  }
14
14
  export type TriggerType = 'mouse' | 'keyboard';
@@ -1,7 +1,7 @@
1
1
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
2
2
  type AutoScrollerFactory = {
3
- tableWrapper: HTMLElement;
4
3
  getNode: () => PmNode;
4
+ tableWrapper: HTMLElement;
5
5
  };
6
6
  export declare const autoScrollerFactory: ({ tableWrapper, getNode }: AutoScrollerFactory) => import("@atlaskit/pragmatic-drag-and-drop/types").CleanupFn[];
7
7
  export {};
@@ -6,8 +6,8 @@
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
7
7
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
8
  interface SafariDeleteCompositionTextIssueWorkaroundPluginState {
9
- renderSpan: boolean;
10
9
  decorations: DecorationSet;
10
+ renderSpan: boolean;
11
11
  }
12
12
  export declare const createPlugin: () => SafePlugin<SafariDeleteCompositionTextIssueWorkaroundPluginState>;
13
13
  export {};
@@ -1,8 +1,8 @@
1
1
  export type RowStickyState = {
2
- pos: number;
3
- top: number;
4
2
  padding: number;
3
+ pos: number;
5
4
  sticky: boolean;
5
+ top: number;
6
6
  };
7
7
  export type StickyPluginState = RowStickyState[];
8
8
  type UpdateSticky = {
@@ -6,15 +6,15 @@ import type { PluginInjectionAPI } from '../../types';
6
6
  import type { ResizeState } from './utils/types';
7
7
  export declare const evenColumns: ({ resizeState, table, start, event, api, }: {
8
8
  api: PluginInjectionAPI | undefined | null;
9
+ event: MouseEvent;
9
10
  resizeState: ResizeState;
10
- table: PMNode;
11
11
  start: number;
12
- event: MouseEvent;
12
+ table: PMNode;
13
13
  }) => Command;
14
14
  export declare const distributeColumnsWidths: (newResizeState: ResizeState, table: ContentNodeWithPos, api: PluginInjectionAPI | undefined | null) => Command;
15
15
  export declare const setResizeHandlePos: (resizeHandlePos: number | null) => Command;
16
16
  export declare const stopResizing: (tr?: Transaction) => Command;
17
17
  export declare const setDragging: (dragging: {
18
- startX: number;
19
18
  startWidth: number;
19
+ startX: number;
20
20
  } | null, tr?: Transaction) => Command;
@@ -1,8 +1,8 @@
1
1
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
2
  export interface ColumnState {
3
3
  index: number;
4
- width: number;
5
4
  minWidth: number;
5
+ width: number;
6
6
  }
7
7
  export declare const getColumnStateFromDOM: (cells: HTMLElement[], index: number, minWidth: number) => ColumnState;
8
8
  export declare const getFreeSpace: (state: ColumnState) => number;
@@ -8,11 +8,11 @@ export declare function getLayoutSize(tableLayout: 'default' | 'wide' | 'full-wi
8
8
  export declare function pointsAtCell($pos: ResolvedPos): false | PMNode | null;
9
9
  export declare function currentColWidth(view: EditorView, cellPos: number, { colspan, colwidth }: CellAttributes): number;
10
10
  interface getTableMaxWidthProps {
11
+ getEditorContainerWidth: GetEditorContainerWidth;
12
+ layout: 'default' | 'wide' | 'full-width';
13
+ state: EditorState;
11
14
  table: PMNode;
12
15
  tableStart: number;
13
- state: EditorState;
14
- layout: 'default' | 'wide' | 'full-width';
15
- getEditorContainerWidth: GetEditorContainerWidth;
16
16
  }
17
17
  export declare const getTableMaxWidth: ({ table, tableStart, state, layout, getEditorContainerWidth, }: getTableMaxWidthProps) => number;
18
18
  /**
@@ -4,18 +4,18 @@ 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
6
  export declare const getResizeState: ({ minWidth, maxSize, table, tableRef, start, domAtPos, isTableScalingEnabled, shouldUseIncreasedScalingPercent, isCommentEditor, }: {
7
- minWidth: number;
8
- maxSize: number;
9
- table: PMNode;
10
- tableRef: HTMLTableElement | null;
11
- start: number;
12
7
  domAtPos: (pos: number) => {
13
8
  node: Node;
14
9
  offset: number;
15
10
  };
11
+ isCommentEditor: boolean;
16
12
  isTableScalingEnabled: boolean;
13
+ maxSize: number;
14
+ minWidth: number;
17
15
  shouldUseIncreasedScalingPercent: boolean;
18
- isCommentEditor: boolean;
16
+ start: number;
17
+ table: PMNode;
18
+ tableRef: HTMLTableElement | null;
19
19
  }) => ResizeState;
20
20
  export declare const updateColgroup: (state: ResizeState, tableRef: HTMLElement | null, tableNode?: PMNode, isTableScalingEnabled?: boolean, scalePercent?: number) => void;
21
21
  export declare const getTotalWidth: ({ cols }: ResizeState) => number;
@@ -4,15 +4,15 @@ import type { DomAtPos } from '@atlaskit/editor-prosemirror/utils';
4
4
  import type { PluginInjectionAPI } from '../../../types';
5
5
  import type { ResizeState } from '../utils/types';
6
6
  interface ScaleOptions {
7
- node: PMNode;
8
- prevNode: PMNode;
9
- start: number;
10
7
  containerWidth?: number;
11
- previousContainerWidth?: number;
12
- parentWidth?: number;
13
- layoutChanged?: boolean;
14
8
  isFullWidthModeEnabled?: boolean;
15
9
  isTableResizingEnabled?: boolean;
10
+ layoutChanged?: boolean;
11
+ node: PMNode;
12
+ parentWidth?: number;
13
+ previousContainerWidth?: number;
14
+ prevNode: PMNode;
15
+ start: number;
16
16
  }
17
17
  export declare function scaleTableTo(state: ResizeState, maxSize: number): ResizeState;
18
18
  export declare const previewScaleTable: (tableRef: HTMLTableElement | null | undefined, options: ScaleOptions, domAtPos: DomAtPos, isTableScalingEnabled?: boolean, isTableWithFixedColumnWidthsOptionEnabled?: boolean, isCommentEditor?: boolean) => void;
@@ -2,22 +2,22 @@ import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
2
2
  import type { ColumnState } from './column-state';
3
3
  export interface ResizeState {
4
4
  cols: ColumnState[];
5
- widths: number[];
5
+ isScaled?: boolean;
6
6
  maxSize: number;
7
7
  overflow: boolean;
8
8
  tableWidth: number;
9
- isScaled?: boolean;
9
+ widths: number[];
10
10
  }
11
11
  export interface ResizeStateWithAnalytics {
12
- resizeState: ResizeState;
13
- table: ContentNodeWithPos;
14
- changed: boolean;
15
12
  attributes: {
16
- position: number;
17
13
  count: number;
18
- totalRowCount: number;
14
+ position: number;
19
15
  totalColumnCount: number;
20
- widthsBefore: number[];
16
+ totalRowCount: number;
21
17
  widthsAfter: number[];
18
+ widthsBefore: number[];
22
19
  };
20
+ changed: boolean;
21
+ resizeState: ResizeState;
22
+ table: ContentNodeWithPos;
23
23
  }
@@ -5,10 +5,10 @@ import type { Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { TableMap } from '@atlaskit/editor-tables/table-map';
6
6
  import { findTable } from '@atlaskit/editor-tables/utils';
7
7
  export declare function getSelectedTableInfo(selection: Selection): {
8
- table: ReturnType<typeof findTable> | undefined;
9
8
  map: TableMap | undefined;
10
- totalRowCount: number;
9
+ table: ReturnType<typeof findTable> | undefined;
11
10
  totalColumnCount: number;
11
+ totalRowCount: number;
12
12
  };
13
13
  export declare function getSelectedCellInfo(selection: Selection): {
14
14
  totalRowCount: number;