@atlaskit/editor-plugin-table 12.1.13 → 12.1.15

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 (98) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-dev-agents/tsconfig.json +3 -0
  4. package/afm-jira/tsconfig.json +3 -0
  5. package/afm-passionfruit/tsconfig.json +117 -0
  6. package/afm-post-office/tsconfig.json +3 -0
  7. package/afm-rovo-extension/tsconfig.json +3 -0
  8. package/afm-townsquare/tsconfig.json +3 -0
  9. package/afm-volt/tsconfig.json +13 -4
  10. package/dist/cjs/nodeviews/TableComponent.js +4 -4
  11. package/dist/cjs/nodeviews/TableRow.js +24 -1
  12. package/dist/cjs/nodeviews/table-node-views.js +1 -1
  13. package/dist/cjs/nodeviews/table.js +10 -5
  14. package/dist/cjs/pm-plugins/main.js +2 -1
  15. package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +2 -7
  16. package/dist/es2019/nodeviews/TableComponent.js +4 -4
  17. package/dist/es2019/nodeviews/TableRow.js +24 -1
  18. package/dist/es2019/nodeviews/table-node-views.js +1 -1
  19. package/dist/es2019/nodeviews/table.js +9 -4
  20. package/dist/es2019/pm-plugins/main.js +2 -1
  21. package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +5 -14
  22. package/dist/esm/nodeviews/TableComponent.js +4 -4
  23. package/dist/esm/nodeviews/TableRow.js +24 -1
  24. package/dist/esm/nodeviews/table-node-views.js +1 -1
  25. package/dist/esm/nodeviews/table.js +10 -5
  26. package/dist/esm/pm-plugins/main.js +2 -1
  27. package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +1 -6
  28. package/dist/types/nodeviews/ExternalDropTargets.d.ts +1 -1
  29. package/dist/types/nodeviews/TableComponent.d.ts +1 -0
  30. package/dist/types/nodeviews/TableRow.d.ts +3 -1
  31. package/dist/types/nodeviews/table.d.ts +1 -1
  32. package/dist/types/pm-plugins/analytics/commands.d.ts +2 -2
  33. package/dist/types/pm-plugins/analytics/plugin-factory.d.ts +1 -1
  34. package/dist/types/pm-plugins/analytics/utils/moved-event.d.ts +1 -1
  35. package/dist/types/pm-plugins/commands/column-resize.d.ts +10 -10
  36. package/dist/types/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
  37. package/dist/types/pm-plugins/commands/go-to-next-cell.d.ts +1 -1
  38. package/dist/types/pm-plugins/commands/misc.d.ts +2 -2
  39. package/dist/types/pm-plugins/commands/selection.d.ts +6 -6
  40. package/dist/types/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +3 -3
  41. package/dist/types/pm-plugins/drag-and-drop/commands.d.ts +1 -1
  42. package/dist/types/pm-plugins/drag-and-drop/plugin-factory.d.ts +1 -1
  43. package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
  44. package/dist/types/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
  45. package/dist/types/pm-plugins/table-resizing/plugin-factory.d.ts +1 -1
  46. package/dist/types/pm-plugins/utils/create.d.ts +10 -10
  47. package/dist/types/pm-plugins/utils/decoration.d.ts +3 -3
  48. package/dist/types/pm-plugins/utils/dom.d.ts +2 -2
  49. package/dist/types/pm-plugins/utils/drag-menu.d.ts +3 -3
  50. package/dist/types/pm-plugins/utils/merged-cells.d.ts +3 -2
  51. package/dist/types/tablePluginType.d.ts +2 -0
  52. package/dist/types/ui/DragHandle/index.d.ts +4 -14
  53. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -7
  54. package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -14
  55. package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
  56. package/dist/types/ui/TableFloatingControls/index.d.ts +1 -7
  57. package/dist/types/ui/global-styles.d.ts +2 -8
  58. package/dist/types/ui/hooks/useInternalTablePluginStateSelector.d.ts +1 -1
  59. package/dist/types-ts4.5/nodeviews/ExternalDropTargets.d.ts +1 -1
  60. package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +1 -0
  61. package/dist/types-ts4.5/nodeviews/TableRow.d.ts +3 -1
  62. package/dist/types-ts4.5/nodeviews/table.d.ts +1 -1
  63. package/dist/types-ts4.5/pm-plugins/analytics/commands.d.ts +2 -2
  64. package/dist/types-ts4.5/pm-plugins/analytics/plugin-factory.d.ts +1 -1
  65. package/dist/types-ts4.5/pm-plugins/analytics/utils/moved-event.d.ts +1 -1
  66. package/dist/types-ts4.5/pm-plugins/commands/column-resize.d.ts +10 -10
  67. package/dist/types-ts4.5/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
  68. package/dist/types-ts4.5/pm-plugins/commands/go-to-next-cell.d.ts +1 -1
  69. package/dist/types-ts4.5/pm-plugins/commands/misc.d.ts +2 -2
  70. package/dist/types-ts4.5/pm-plugins/commands/selection.d.ts +6 -6
  71. package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +3 -3
  72. package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands.d.ts +1 -1
  73. package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin-factory.d.ts +1 -1
  74. package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +1 -1
  75. package/dist/types-ts4.5/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
  76. package/dist/types-ts4.5/pm-plugins/table-resizing/plugin-factory.d.ts +1 -1
  77. package/dist/types-ts4.5/pm-plugins/utils/create.d.ts +10 -10
  78. package/dist/types-ts4.5/pm-plugins/utils/decoration.d.ts +3 -3
  79. package/dist/types-ts4.5/pm-plugins/utils/dom.d.ts +2 -2
  80. package/dist/types-ts4.5/pm-plugins/utils/drag-menu.d.ts +3 -3
  81. package/dist/types-ts4.5/pm-plugins/utils/merged-cells.d.ts +3 -2
  82. package/dist/types-ts4.5/tablePluginType.d.ts +2 -0
  83. package/dist/types-ts4.5/ui/DragHandle/index.d.ts +4 -14
  84. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -7
  85. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -14
  86. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
  87. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +1 -7
  88. package/dist/types-ts4.5/ui/global-styles.d.ts +2 -8
  89. package/dist/types-ts4.5/ui/hooks/useInternalTablePluginStateSelector.d.ts +1 -1
  90. package/package.json +8 -10
  91. package/src/nodeviews/TableComponent.tsx +8 -4
  92. package/src/nodeviews/TableRow.ts +38 -1
  93. package/src/nodeviews/table-node-views.ts +1 -1
  94. package/src/nodeviews/table.tsx +9 -0
  95. package/src/pm-plugins/main.ts +1 -1
  96. package/src/tablePluginType.ts +2 -0
  97. package/src/ui/TableFloatingControls/NumberColumn/index.tsx +5 -14
  98. package/tsconfig.app.json +3 -0
@@ -934,7 +934,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
934
934
  ,
935
935
  selection: view.state.selection,
936
936
  headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
937
- stickyHeader: this.state.stickyHeader,
937
+ stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
938
938
  tableWrapperWidth: this.state.tableWrapperWidth,
939
939
  api: pluginInjectionApi,
940
940
  isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor
@@ -956,7 +956,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
956
956
  ,
957
957
  selection: view.state.selection,
958
958
  headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
959
- stickyHeader: this.state.stickyHeader,
959
+ stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
960
960
  getEditorFeatureFlags: getEditorFeatureFlags,
961
961
  tableContainerWidth: tableContainerWidth,
962
962
  isNumberColumnEnabled: node.attrs.isNumberColumnEnabled,
@@ -989,7 +989,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
989
989
  var isNested = isTableNested(view.state, tablePos);
990
990
  var topShadowPadding = isDragAndDropEnabled ? 0 : shadowPadding;
991
991
  var topOffset = 0;
992
- var topStickyShadowPosition = this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
992
+ var topStickyShadowPosition = !this.props.limitedMode && this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
993
993
  var _getEditorFeatureFlag7 = getEditorFeatureFlags(),
994
994
  _getEditorFeatureFlag8 = _getEditorFeatureFlag7.tableWithFixedColumnWidthsOption,
995
995
  tableWithFixedColumnWidthsOption = _getEditorFeatureFlag8 === void 0 ? false : _getEditorFeatureFlag8;
@@ -997,7 +997,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
997
997
  return /*#__PURE__*/React.createElement(TableContainer
998
998
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
999
999
  , {
1000
- className: classnames(ClassName.TABLE_CONTAINER, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ClassName.WITH_CONTROLS, allowControls && tableActive), ClassName.TABLE_STICKY, this.state.stickyHeader && hasHeaderRow), ClassName.HOVERED_DELETE_BUTTON, isInDanger), ClassName.TABLE_SELECTED, isTableSelected(selection !== null && selection !== void 0 ? selection : view.state.selection)), ClassName.NESTED_TABLE_WITH_CONTROLS, tableActive && allowControls && this.isNestedInTable)),
1000
+ className: classnames(ClassName.TABLE_CONTAINER, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ClassName.WITH_CONTROLS, allowControls && tableActive), ClassName.TABLE_STICKY, !this.props.limitedMode && this.state.stickyHeader && hasHeaderRow), ClassName.HOVERED_DELETE_BUTTON, isInDanger), ClassName.TABLE_SELECTED, isTableSelected(selection !== null && selection !== void 0 ? selection : view.state.selection)), ClassName.NESTED_TABLE_WITH_CONTROLS, tableActive && allowControls && this.isNestedInTable)),
1001
1001
  editorView: view,
1002
1002
  getPos: getPos,
1003
1003
  node: node
@@ -28,10 +28,25 @@ var HEADER_ROW_SCROLL_THROTTLE_TIMEOUT = 200;
28
28
  // if too short it would trigger too many dom updates.
29
29
  var HEADER_ROW_SCROLL_RESET_DEBOUNCE_TIMEOUT = 400;
30
30
  var TableRow = /*#__PURE__*/function (_TableNodeView) {
31
- function TableRow(node, view, getPos, eventDispatcher) {
31
+ function TableRow(node, view, getPos, eventDispatcher, api) {
32
+ var _api$limitedMode;
32
33
  var _this;
33
34
  _classCallCheck(this, TableRow);
34
35
  _this = _callSuper(this, TableRow, [node, view, getPos, eventDispatcher]);
36
+ _defineProperty(_this, "cleanup", function () {
37
+ if (_this.isStickyHeaderEnabled) {
38
+ _this.unsubscribe();
39
+ _this.nodeVisibilityObserverCleanupFn && _this.nodeVisibilityObserverCleanupFn();
40
+ var tree = getTree(_this.dom);
41
+ if (tree) {
42
+ _this.makeRowHeaderNotSticky(tree.table, true);
43
+ }
44
+ _this.emitOff(false);
45
+ }
46
+ if (_this.tableContainerObserver) {
47
+ _this.tableContainerObserver.disconnect();
48
+ }
49
+ });
35
50
  _defineProperty(_this, "colControlsOffset", 0);
36
51
  _defineProperty(_this, "focused", false);
37
52
  _defineProperty(_this, "topPosEditorElement", 0);
@@ -71,6 +86,11 @@ var TableRow = /*#__PURE__*/function (_TableNodeView) {
71
86
  var _getPluginState = getPluginState(view.state),
72
87
  pluginConfig = _getPluginState.pluginConfig;
73
88
  _this.isStickyHeaderEnabled = !!pluginConfig.stickyHeaders;
89
+ if (api !== null && api !== void 0 && (_api$limitedMode = api.limitedMode) !== null && _api$limitedMode !== void 0 && (_api$limitedMode = _api$limitedMode.sharedState.currentState()) !== null && _api$limitedMode !== void 0 && (_api$limitedMode = _api$limitedMode.limitedModePluginKey.getState(view.state)) !== null && _api$limitedMode !== void 0 && _api$limitedMode.documentSizeBreachesThreshold) {
90
+ _this.isStickyHeaderEnabled = false;
91
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
92
+ document.addEventListener('limited-mode-activated', _this.cleanup);
93
+ }
74
94
  var pos = _this.getPos();
75
95
  _this.isInNestedTable = false;
76
96
  if (pos) {
@@ -153,6 +173,9 @@ var TableRow = /*#__PURE__*/function (_TableNodeView) {
153
173
  }
154
174
  this.emitOff(true);
155
175
  }
176
+
177
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
178
+ document.removeEventListener('limited-mode-activated', this.cleanup);
156
179
  if (this.tableContainerObserver) {
157
180
  this.tableContainerObserver.disconnect();
158
181
  }
@@ -21,6 +21,6 @@ export var tableHeaderView = function tableHeaderView(options) {
21
21
  };
22
22
  export var tableRowView = function tableRowView(options) {
23
23
  return function (node, view, getPos) {
24
- return new TableRow(node, view, getPos, options.eventDispatcher);
24
+ return new TableRow(node, view, getPos, options.eventDispatcher, options.pluginInjectionApi);
25
25
  };
26
26
  };
@@ -62,7 +62,9 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
62
62
  function TableView(props) {
63
63
  var _this;
64
64
  _classCallCheck(this, TableView);
65
- _this = _callSuper(this, TableView, [props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props]);
65
+ _this = _callSuper(this, TableView, [props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props, undefined, undefined,
66
+ // @portal-render-immediately
67
+ true]);
66
68
  _defineProperty(_this, "getNode", function () {
67
69
  return _this.node;
68
70
  });
@@ -197,7 +199,8 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
197
199
  }, {
198
200
  key: "render",
199
201
  value: function render(props, forwardRef) {
200
- var _this4 = this;
202
+ var _props$pluginInjectio,
203
+ _this4 = this;
201
204
  if (fg('platform_editor_table_use_shared_state_hook_fg')) {
202
205
  return /*#__PURE__*/React.createElement(TableComponentWithSharedState, {
203
206
  forwardRef: forwardRef,
@@ -243,11 +246,12 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
243
246
  tableWidthPluginState: tableWidthPluginKey,
244
247
  widthPlugin: fakePluginKey,
245
248
  mediaState: fakeMediaPluginKey,
246
- tableDragAndDropState: tableDragAndDropPluginKey
249
+ tableDragAndDropState: tableDragAndDropPluginKey,
250
+ limitedModePlugin: (_props$pluginInjectio = props.pluginInjectionApi) === null || _props$pluginInjectio === void 0 || (_props$pluginInjectio = _props$pluginInjectio.limitedMode) === null || _props$pluginInjectio === void 0 || (_props$pluginInjectio = _props$pluginInjectio.sharedState.currentState()) === null || _props$pluginInjectio === void 0 ? void 0 : _props$pluginInjectio.limitedModePluginKey
247
251
  },
248
252
  editorView: props.view,
249
253
  render: function render(pluginStates) {
250
- var _props$options;
254
+ var _props$options, _pluginStates$limited, _pluginStates$limited2;
251
255
  var tableResizingPluginState = pluginStates.tableResizingPluginState,
252
256
  tableWidthPluginState = pluginStates.tableWidthPluginState,
253
257
  pluginState = pluginStates.pluginState,
@@ -314,7 +318,8 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
314
318
  contentDOM: forwardRef,
315
319
  getEditorFeatureFlags: props.getEditorFeatureFlags,
316
320
  dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
317
- pluginInjectionApi: props.pluginInjectionApi
321
+ pluginInjectionApi: props.pluginInjectionApi,
322
+ limitedMode: (_pluginStates$limited = (_pluginStates$limited2 = pluginStates.limitedModePlugin) === null || _pluginStates$limited2 === void 0 ? void 0 : _pluginStates$limited2.documentSizeBreachesThreshold) !== null && _pluginStates$limited !== void 0 ? _pluginStates$limited : false
318
323
  });
319
324
  }
320
325
  });
@@ -64,7 +64,8 @@ export var createPlugin = function createPlugin(dispatchAnalyticsEvent, dispatch
64
64
  isChromelessEditor: isChromelessEditor
65
65
  }),
66
66
  tableRow: tableRowView({
67
- eventDispatcher: eventDispatcher
67
+ eventDispatcher: eventDispatcher,
68
+ pluginInjectionApi: pluginInjectionApi
68
69
  }),
69
70
  tableCell: tableCellView({
70
71
  eventDispatcher: eventDispatcher,
@@ -10,7 +10,6 @@ import React, { Component } from 'react';
10
10
  import classnames from 'classnames';
11
11
  import { Selection } from '@atlaskit/editor-prosemirror/state';
12
12
  import { isRowSelected } from '@atlaskit/editor-tables/utils';
13
- import { fg } from '@atlaskit/platform-feature-flags';
14
13
  import { clearHoverSelection } from '../../../pm-plugins/commands';
15
14
  import { getRowHeights } from '../../../pm-plugins/utils/row-controls';
16
15
  import { TableCssClassName as ClassName } from '../../../types';
@@ -85,11 +84,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
85
84
  isResizing = _this$props4.isResizing,
86
85
  tableActive = _this$props4.tableActive;
87
86
  var isActive = isRowSelected(index)(editorView.state.selection) || (hoveredRows || []).indexOf(index) !== -1 && !isResizing;
88
- if (fg('platform_editor_nested_tables_number_column_fixes')) {
89
- return classnames(ClassName.NUMBERED_COLUMN_BUTTON, _defineProperty(_defineProperty(_defineProperty({}, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, isButtonDisabled), ClassName.HOVERED_CELL_IN_DANGER, tableActive && isActive && isInDanger), ClassName.HOVERED_CELL_ACTIVE, tableActive && isActive));
90
- } else {
91
- return classnames(ClassName.NUMBERED_COLUMN_BUTTON, _defineProperty(_defineProperty(_defineProperty({}, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, isButtonDisabled), ClassName.HOVERED_CELL_IN_DANGER, isActive && isInDanger), ClassName.HOVERED_CELL_ACTIVE, isActive));
92
- }
87
+ return classnames(ClassName.NUMBERED_COLUMN_BUTTON, _defineProperty(_defineProperty(_defineProperty({}, ClassName.NUMBERED_COLUMN_BUTTON_DISABLED, isButtonDisabled), ClassName.HOVERED_CELL_IN_DANGER, tableActive && isActive && isInDanger), ClassName.HOVERED_CELL_ACTIVE, tableActive && isActive));
93
88
  });
94
89
  return _this;
95
90
  }
@@ -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 | undefined;
6
+ node?: PMNode;
7
7
  getScrollOffset: () => number;
8
8
  getTableWrapperWidth: () => number;
9
9
  }) => React.JSX.Element | null;
@@ -39,6 +39,7 @@ interface ComponentProps {
39
39
  isTableHovered?: boolean;
40
40
  isWholeTableInDanger?: boolean;
41
41
  selection?: Selection;
42
+ limitedMode?: boolean;
42
43
  }
43
44
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<ComponentProps>> & {
44
45
  WrappedComponent: React.ComponentType<ComponentProps>;
@@ -1,10 +1,12 @@
1
1
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
2
2
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
4
+ import { type PluginInjectionAPI } from '../types';
4
5
  import TableNodeView from './TableNodeViewBase';
5
6
  export default class TableRow extends TableNodeView<HTMLTableRowElement> implements NodeView {
6
7
  private nodeVisibilityObserverCleanupFn?;
7
- constructor(node: PMNode, view: EditorView, getPos: () => number | undefined, eventDispatcher: EventDispatcher);
8
+ cleanup: () => void;
9
+ constructor(node: PMNode, view: EditorView, getPos: () => number | undefined, eventDispatcher: EventDispatcher, api?: PluginInjectionAPI);
8
10
  subscribeWhenRowVisible(): void;
9
11
  /**
10
12
  * Variables
@@ -20,7 +20,7 @@ export default class TableView extends ReactNodeView<Props> {
20
20
  constructor(props: Props);
21
21
  getContentDOM(): {
22
22
  dom: HTMLElement;
23
- contentDOM?: HTMLElement | undefined;
23
+ contentDOM?: HTMLElement;
24
24
  };
25
25
  /**
26
26
  * Handles moving the table from ProseMirror's DOM structure into a React-rendered table node.
@@ -1,5 +1,5 @@
1
1
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
2
2
  import type { ActionType, RowOrColumnMovedState } from './types';
3
- export declare const updateRowOrColumnMoved: (nextState: Omit<RowOrColumnMovedState, 'currentActions'>, nextAction: ActionType) => import("@atlaskit/editor-common/types").Command;
3
+ export declare const updateRowOrColumnMoved: (nextState: Omit<RowOrColumnMovedState, "currentActions">, nextAction: ActionType) => import("@atlaskit/editor-common/types").Command;
4
4
  export declare const resetRowOrColumnMovedTransform: () => (tr: Transaction) => Transaction;
5
- export declare const updateRowOrColumnMovedTransform: (nextState: Omit<RowOrColumnMovedState, 'currentActions'>, nextAction: ActionType) => (state: EditorState, tr: Transaction) => Transaction;
5
+ export declare const updateRowOrColumnMovedTransform: (nextState: Omit<RowOrColumnMovedState, "currentActions">, nextAction: ActionType) => (state: EditorState, tr: Transaction) => Transaction;
@@ -1 +1 @@
1
- export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("./types").AnalyticPluginState | ((state: import("prosemirror-state").EditorState) => import("./types").AnalyticPluginState)) => import("prosemirror-state").SafeStateField<import("./types").AnalyticPluginState>, createCommand: <A = import("./actions").AnalyticPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").AnalyticPluginState;
1
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("./types").AnalyticPluginState | ((state: import("prosemirror-state").EditorState) => import("./types").AnalyticPluginState)) => import("prosemirror-state").SafeStateField<import("./types").AnalyticPluginState>, createCommand: <A = import("./actions").AnalyticPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").AnalyticPluginState;
@@ -1,5 +1,5 @@
1
1
  import type { ActionType, RowOrColumnMovedState } from '../types';
2
- export declare const getMovedPayload: (nextState: Omit<RowOrColumnMovedState, 'currentActions'>, nextAction: ActionType, prevState: RowOrColumnMovedState) => RowOrColumnMovedState | {
2
+ export declare const getMovedPayload: (nextState: Omit<RowOrColumnMovedState, "currentActions">, nextAction: ActionType, prevState: RowOrColumnMovedState) => RowOrColumnMovedState | {
3
3
  currentActions: string[];
4
4
  numberOfCells: number | undefined;
5
5
  type: "row" | "column" | undefined;
@@ -6,14 +6,14 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
6
6
  import type { Direction } from '@atlaskit/editor-tables/types';
7
7
  import type { PluginInjectionAPI } from '../../types';
8
8
  export declare const initiateKeyboardColumnResizing: ({ ariaNotify, getIntl, nodeViewPortalProviderAPI, }: {
9
- ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined;
10
- getIntl?: (() => IntlShape) | undefined;
9
+ ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
10
+ getIntl?: () => IntlShape;
11
11
  nodeViewPortalProviderAPI: PortalProviderAPI;
12
12
  }) => Command;
13
13
  export declare const activateNextResizeArea: ({ direction, ariaNotify, getIntl, nodeViewPortalProviderAPI, }: {
14
14
  direction: Direction;
15
- ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined;
16
- getIntl?: (() => IntlShape) | undefined;
15
+ ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
16
+ getIntl?: () => IntlShape;
17
17
  nodeViewPortalProviderAPI: PortalProviderAPI;
18
18
  }) => Command;
19
19
  export declare const changeColumnWidthByStep: ({ stepSize, getEditorContainerWidth, isTableScalingEnabled, isTableFixedColumnWidthsOptionEnabled, isCommentEditor, ariaNotify, api, getIntl, }: {
@@ -23,12 +23,12 @@ export declare const changeColumnWidthByStep: ({ stepSize, getEditorContainerWid
23
23
  isTableFixedColumnWidthsOptionEnabled: boolean;
24
24
  isCommentEditor: boolean;
25
25
  api: PluginInjectionAPI | undefined | null;
26
- ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined;
27
- getIntl?: (() => IntlShape) | undefined;
28
- originalTr?: Transaction | undefined;
26
+ ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
27
+ getIntl?: () => IntlShape;
28
+ originalTr?: Transaction;
29
29
  }) => Command;
30
30
  export declare const stopKeyboardColumnResizing: ({ ariaNotify, getIntl, originalTr, }: {
31
- ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined;
32
- getIntl?: (() => IntlShape) | undefined;
33
- originalTr?: Transaction | undefined;
31
+ ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void;
32
+ getIntl?: () => IntlShape;
33
+ originalTr?: Transaction;
34
34
  }) => Command;
@@ -15,7 +15,7 @@ export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalytic
15
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;
16
16
  export declare const addRowAroundSelection: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (side: RowInsertPosition) => Command;
17
17
  export declare const insertRowWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: InsertRowMethods, options: InsertRowOptions) => Command;
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;
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, getIntl?: () => IntlShape) => Command;
19
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;
20
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;
21
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;
@@ -2,7 +2,7 @@ import type { IntlShape } from 'react-intl-next/src/types';
2
2
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { Command } from '@atlaskit/editor-common/types';
4
4
  import type { Direction } from '@atlaskit/editor-tables/types';
5
- export declare const goToNextCell: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: ((message: string) => void) | undefined, getIntl?: () => IntlShape) => (direction: Direction) => Command;
5
+ export declare const goToNextCell: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (message: string) => void, getIntl?: () => IntlShape) => (direction: Direction) => Command;
6
6
  /**
7
7
  * Moves the cursor vertically from a NodeSelection within a table cell.
8
8
  * - If content exists above/below within the cell, lets ProseMirror handle it.
@@ -13,10 +13,10 @@ export declare const triggerUnlessTableHeader: (command: Command) => Command;
13
13
  export declare const transformSliceRemoveCellBackgroundColor: (slice: Slice, schema: Schema) => Slice;
14
14
  export declare const transformSliceToAddTableHeaders: (slice: Slice, schema: Schema) => Slice;
15
15
  export declare const transformSliceToRemoveColumnsWidths: (slice: Slice, schema: Schema) => Slice;
16
- export declare const countCellsInSlice: (slice: Slice, schema: Schema, type?: 'row' | 'column') => number;
16
+ export declare const countCellsInSlice: (slice: Slice, schema: Schema, type?: "row" | "column") => number;
17
17
  export declare const getTableSelectionType: (selection: Selection) => "row" | "column" | undefined;
18
18
  export declare const getTableElementMoveTypeBySlice: (slice: Slice, state: EditorState) => "row" | "column" | undefined;
19
- export declare const isInsideFirstCellOfRowOrColumn: (selection: Selection, type?: 'row' | 'column') => boolean;
19
+ export declare const isInsideFirstCellOfRowOrColumn: (selection: Selection, type?: "row" | "column") => boolean;
20
20
  export declare const deleteTable: Command;
21
21
  export declare const deleteTableIfSelected: Command;
22
22
  export declare const convertFirstRowToHeader: (schema: Schema) => (tr: Transaction) => Transaction;
@@ -2,9 +2,9 @@ import { type IntlShape } from 'react-intl-next/src/types';
2
2
  import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import type { AriaLiveElementAttributes } from '@atlaskit/editor-plugin-accessibility-utils';
4
4
  import type tablePlugin from '../../tablePlugin';
5
- export declare const arrowLeftFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined) => () => Command;
6
- export declare const arrowRightFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined) => () => Command;
7
- export declare const selectColumns: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined, ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined, getIntl?: () => IntlShape) => (triggeredByKeyboard?: boolean) => Command;
8
- export declare const selectRows: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined, ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined, getIntl?: () => IntlShape) => (triggeredByKeyboard?: boolean) => Command;
9
- export declare const shiftArrowUpFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined) => () => Command;
10
- export declare const modASelectTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined) => () => Command;
5
+ export declare const arrowLeftFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined) => () => Command;
6
+ export declare const arrowRightFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined) => () => Command;
7
+ export declare const selectColumns: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (triggeredByKeyboard?: boolean) => Command;
8
+ export declare const selectRows: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (triggeredByKeyboard?: boolean) => Command;
9
+ export declare const shiftArrowUpFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined) => () => Command;
10
+ export declare const modASelectTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>["selection"] | undefined) => () => Command;
@@ -6,6 +6,6 @@ import type { AriaLiveElementAttributes } from '@atlaskit/editor-plugin-accessib
6
6
  import type { Transaction } from '@atlaskit/editor-prosemirror/state';
7
7
  import type { DraggableData, DraggableType } from '../../types';
8
8
  export declare const clearDropTargetWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP, sourceType: DraggableType, sourceIndexes: number[] | undefined, status: TABLE_STATUS.CANCELLED | TABLE_STATUS.INVALID, tr?: Transaction) => Command;
9
- export declare const moveSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined, getIntl?: () => IntlShape) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, tr?: Transaction) => Command;
10
- export declare const moveSourceWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: ((message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void) | undefined, getIntl?: () => IntlShape) => (sourceType: DraggableType, direction: DraggableData['direction']) => Command;
11
- export declare const cloneSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection: 'start' | 'end', tr?: Transaction) => Command;
9
+ export declare const moveSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, tr?: Transaction) => Command;
10
+ export declare const moveSourceWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (sourceType: DraggableType, direction: DraggableData["direction"]) => Command;
11
+ export declare const cloneSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection: "start" | "end", tr?: Transaction) => Command;
@@ -6,4 +6,4 @@ export declare const setDropTarget: (type: DropTargetType, index: number, hasMer
6
6
  export declare const clearDropTarget: (tr?: Transaction) => import("@atlaskit/editor-common/types").Command;
7
7
  export declare const moveSource: (sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, tr?: Transaction) => import("@atlaskit/editor-common/types").Command;
8
8
  export declare const toggleDragMenu: (isDragMenuOpen: boolean | undefined, direction?: TableDirection, index?: number, trigger?: TriggerType) => import("@atlaskit/editor-common/types").Command;
9
- export declare const cloneSource: (sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection: 'start' | 'end', tr?: Transaction) => import("@atlaskit/editor-common/types").Command;
9
+ export declare const cloneSource: (sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection: "start" | "end", tr?: Transaction) => import("@atlaskit/editor-common/types").Command;
@@ -1 +1 @@
1
- export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("./types").DragAndDropPluginState | ((state: import("prosemirror-state").EditorState) => import("./types").DragAndDropPluginState)) => import("prosemirror-state").SafeStateField<import("./types").DragAndDropPluginState>, createCommand: <A = import("./actions").DragAndDropPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").DragAndDropPluginState;
1
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("./types").DragAndDropPluginState | ((state: import("prosemirror-state").EditorState) => import("./types").DragAndDropPluginState)) => import("prosemirror-state").SafeStateField<import("./types").DragAndDropPluginState>, createCommand: <A = import("./actions").DragAndDropPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").DragAndDropPluginState;
@@ -1 +1 @@
1
- export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("../types").TablePluginState | ((state: import("prosemirror-state").EditorState) => import("../types").TablePluginState)) => import("prosemirror-state").SafeStateField<import("../types").TablePluginState>, createCommand: <A = import("../types").TablePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("../types").TablePluginState;
1
+ export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: import("../types").TablePluginState | ((state: import("prosemirror-state").EditorState) => import("../types").TablePluginState)) => import("prosemirror-state").SafeStateField<import("../types").TablePluginState>, createCommand: <A = import("../types").TablePluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("../types").TablePluginState;
@@ -1,3 +1,3 @@
1
1
  import type { StickyPluginAction, StickyPluginState } from './types';
2
- declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: StickyPluginState | ((state: import("prosemirror-state").EditorState) => StickyPluginState)) => import("prosemirror-state").SafeStateField<StickyPluginState>, createCommand: <A = StickyPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command;
2
+ declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: StickyPluginState | ((state: import("prosemirror-state").EditorState) => StickyPluginState)) => import("prosemirror-state").SafeStateField<StickyPluginState>, createCommand: <A = StickyPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command;
3
3
  export { createPluginState, createCommand };
@@ -1,4 +1,4 @@
1
1
  import type { ColumnResizingPluginState } from '../../types';
2
- export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command;
2
+ export declare const createCommand: <A = import("../../types").ColumnResizingPluginAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: (tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) => import("@atlaskit/editor-common/types").Command;
3
3
  export declare const createPluginState: (dispatch: import("@atlaskit/editor-common/event-dispatcher").Dispatch, initialState: ColumnResizingPluginState | ((state: import("prosemirror-state").EditorState) => ColumnResizingPluginState)) => import("prosemirror-state").SafeStateField<ColumnResizingPluginState>;
4
4
  export declare const getPluginState: (state: import("prosemirror-state").EditorState) => ColumnResizingPluginState;
@@ -1,14 +1,14 @@
1
1
  import type { Schema } from '@atlaskit/editor-prosemirror/model';
2
2
  export declare const createTableWithWidth: ({ isTableScalingEnabled, isTableAlignmentEnabled, isFullWidthModeEnabled, isCommentEditor, isChromelessEditor, isTableResizingEnabled, isNestedTable, createTableProps, }: {
3
- isTableScalingEnabled?: boolean | undefined;
4
- isTableAlignmentEnabled?: boolean | undefined;
5
- isFullWidthModeEnabled?: boolean | undefined;
6
- isCommentEditor?: boolean | undefined;
7
- isChromelessEditor?: boolean | undefined;
8
- isTableResizingEnabled?: boolean | undefined;
9
- isNestedTable?: boolean | undefined;
3
+ isTableScalingEnabled?: boolean;
4
+ isTableAlignmentEnabled?: boolean;
5
+ isFullWidthModeEnabled?: boolean;
6
+ isCommentEditor?: boolean;
7
+ isChromelessEditor?: boolean;
8
+ isTableResizingEnabled?: boolean;
9
+ isNestedTable?: boolean;
10
10
  createTableProps?: {
11
- rowsCount?: number | undefined;
12
- colsCount?: number | undefined;
13
- } | undefined;
11
+ rowsCount?: number;
12
+ colsCount?: number;
13
+ };
14
14
  }) => (schema: Schema) => import("prosemirror-model").Node;
@@ -9,11 +9,11 @@ import { TableDecorations } from '../../types';
9
9
  export declare const findColumnControlSelectedDecoration: (decorationSet: DecorationSet) => Decoration[];
10
10
  export declare const findControlsHoverDecoration: (decorationSet: DecorationSet) => Decoration[];
11
11
  export declare const createCellHoverDecoration: (cells: Cell[]) => Decoration[];
12
- export declare const createControlsHoverDecoration: (cells: Cell[], type: 'row' | 'column' | 'table', tr: Transaction | ReadonlyTransaction, isDragAndDropEnable: boolean | undefined, hoveredIndexes: number[], danger?: boolean, selected?: boolean) => Decoration[];
12
+ export declare const createControlsHoverDecoration: (cells: Cell[], type: "row" | "column" | "table", tr: Transaction | ReadonlyTransaction, isDragAndDropEnable: boolean | undefined, hoveredIndexes: number[], danger?: boolean, selected?: boolean) => Decoration[];
13
13
  export declare const createColumnSelectedDecoration: (tr: Transaction | ReadonlyTransaction) => Decoration[];
14
14
  export declare const createColumnControlsDecoration: (selection: Selection) => Decoration[];
15
15
  export declare const updateDecorations: (node: PmNode, decorationSet: DecorationSet, decorations: Decoration[], key: TableDecorations) => DecorationSet;
16
- export declare const createResizeHandleDecoration: (tr: Transaction | ReadonlyTransaction, rowIndexTarget: number, columnEndIndexTarget: Omit<CellColumnPositioning, 'left'>, includeTooltip: boolean | undefined, getIntl: () => IntlShape, nodeViewPortalProviderAPI: PortalProviderAPI) => [Decoration[], Decoration[]];
17
- export declare const createColumnLineResize: (selection: Selection, cellColumnPositioning: Omit<CellColumnPositioning, 'left'>, isDragAndDropEnabled?: boolean) => Decoration[];
16
+ export declare const createResizeHandleDecoration: (tr: Transaction | ReadonlyTransaction, rowIndexTarget: number, columnEndIndexTarget: Omit<CellColumnPositioning, "left">, includeTooltip: boolean | undefined, getIntl: () => IntlShape, nodeViewPortalProviderAPI: PortalProviderAPI) => [Decoration[], Decoration[]];
17
+ export declare const createColumnLineResize: (selection: Selection, cellColumnPositioning: Omit<CellColumnPositioning, "left">, isDragAndDropEnabled?: boolean) => Decoration[];
18
18
  export declare const createColumnInsertLine: (columnIndex: number, selection: Selection, hasMergedCells: boolean) => Decoration[];
19
19
  export declare const createRowInsertLine: (rowIndex: number, selection: Selection, hasMergedCells: boolean) => Decoration[];
@@ -20,8 +20,8 @@ export declare const isDragCornerButton: (node: HTMLElement | null) => boolean;
20
20
  * @param gapInPixels
21
21
  * @returns
22
22
  */
23
- export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, offsetX: number, gapInPixels?: number) => 'left' | 'right' | null;
24
- export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) => 'top' | 'bottom' | null;
23
+ export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, offsetX: number, gapInPixels?: number) => "left" | "right" | null;
24
+ export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) => "top" | "bottom" | null;
25
25
  export declare const hasResizeHandler: ({ columnEndIndexTarget, target, }: {
26
26
  columnEndIndexTarget: number;
27
27
  target: HTMLElement;
@@ -7,8 +7,8 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
7
7
  import type { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
8
8
  import type { NewIconProps } from '@atlaskit/icon/types';
9
9
  import type { DraggableData, DraggableType, PluginInjectionAPI, TableDirection } from '../../types';
10
- export declare const getTargetIndex: (selectedIndexes: number[], direction: DraggableData['direction']) => number;
11
- export declare const canMove: (sourceType: DraggableType, direction: DraggableData['direction'], totalItemsOfSourceTypeCount: number, selection: Selection, selectionRect?: Rect) => boolean;
10
+ export declare const getTargetIndex: (selectedIndexes: number[], direction: DraggableData["direction"]) => number;
11
+ export declare const canMove: (sourceType: DraggableType, direction: DraggableData["direction"], totalItemsOfSourceTypeCount: number, selection: Selection, selectionRect?: Rect) => boolean;
12
12
  export type DragMenuOptionIdType = 'add_row_above' | 'add_row_below' | 'add_column_left' | 'add_column_right' | 'distribute_columns' | 'clear_cells' | 'delete_row' | 'delete_column' | 'move_column_left' | 'move_column_right' | 'move_row_up' | 'move_row_down' | 'sort_column_asc' | 'sort_column_desc';
13
13
  export interface DragMenuConfig extends Omit<DropdownOptionT<Command>, 'icon'> {
14
14
  id: DragMenuOptionIdType;
@@ -16,4 +16,4 @@ export interface DragMenuConfig extends Omit<DropdownOptionT<Command>, 'icon'> {
16
16
  iconFallback?: React.ComponentType<React.PropsWithChildren<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, 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, isCommentEditor?: boolean) => DragMenuConfig[];
@@ -3,7 +3,8 @@ import { TableMap } from '@atlaskit/editor-tables';
3
3
  type MergeType = 'row' | 'column';
4
4
  export declare const hasMergedCellsInBetween: (indexes: number[], type: MergeType) => (selection: Selection) => boolean;
5
5
  export declare const hasMergedCellsWithColumnNextToColumnIndex: (colIndex: number, selection: Selection) => boolean;
6
- export declare const hasMergedCellsWithRowNextToRowIndex: (rowIndex: number, selection: Selection) => boolean;
6
+ export declare const hasMergedCellsWithRowNextToRowIndex: (rowIndex: number, // logical row index in the table. It starts at 0 and goes up to tableMap.height - 1.
7
+ selection: Selection) => boolean;
7
8
  export declare const hasMergedCellsInSelection: (indexes: number[], type: MergeType) => (selection: Selection) => boolean;
8
9
  /**
9
10
  * this check the selection has merged cells with previous/next col or row.
@@ -13,7 +14,7 @@ export declare const hasMergedCellsInSelection: (indexes: number[], type: MergeT
13
14
  * @param direction - check selection is selected by row or column
14
15
  * @returns boolean
15
16
  */
16
- export declare const checkEdgeHasMergedCells: (indexes: number[], tableMap: TableMap, direction: 'row' | 'column') => boolean;
17
+ export declare const checkEdgeHasMergedCells: (indexes: number[], tableMap: TableMap, direction: "row" | "column") => boolean;
17
18
  /**
18
19
  * this function will find the duplicate position in the array(table map position array).
19
20
  *
@@ -9,6 +9,7 @@ import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
9
9
  import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
10
10
  import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
11
11
  import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
12
+ import type { LimitedModePlugin } from '@atlaskit/editor-plugin-limited-mode';
12
13
  import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
13
14
  import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
14
15
  import type { PluginConfig, TableSharedState } from './types';
@@ -42,6 +43,7 @@ export type TablePluginDependencies = [
42
43
  ContentInsertionPlugin,
43
44
  WidthPlugin,
44
45
  SelectionPlugin,
46
+ OptionalPlugin<LimitedModePlugin>,
45
47
  OptionalPlugin<GuidelinePlugin>,
46
48
  OptionalPlugin<BatchAttributeUpdatesPlugin>,
47
49
  OptionalPlugin<AccessibilityUtilsPlugin>,
@@ -1,8 +1,10 @@
1
1
  import type { MouseEventHandler } from 'react';
2
2
  import React from 'react';
3
3
  import type { WrappedComponentProps } from 'react-intl-next';
4
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
6
  import type { TriggerType } from '../../pm-plugins/drag-and-drop/types';
7
+ import type { TablePlugin } from '../../tablePluginType';
6
8
  import type { CellHoverMeta, TableDirection } from '../../types';
7
9
  export type DragHandleAppearance = 'default' | 'selected' | 'disabled' | 'danger' | 'placeholder';
8
10
  type DragHandleProps = {
@@ -27,22 +29,10 @@ export declare const DragHandle: React.FC<import("react-intl-next").WithIntlProp
27
29
  WrappedComponent: React.ComponentType<DragHandleProps & WrappedComponentProps>;
28
30
  };
29
31
  export declare const DragHandleWithSharedState: React.FC<import("react-intl-next").WithIntlProps<DragHandleProps & {
30
- api?: import("@atlaskit/editor-common/types").EditorInjectionAPI<"table", {
31
- pluginConfiguration: import("../../tablePluginType").TablePluginOptions | undefined;
32
- actions: import("../../tablePluginType").TablePluginActions;
33
- sharedState?: import("../../types").TableSharedState | undefined;
34
- commands: import("../../tablePluginType").TablePluginCommands;
35
- dependencies: import("../../tablePluginType").TablePluginDependencies;
36
- }> | undefined;
32
+ api?: ExtractInjectionAPI<TablePlugin>;
37
33
  } & WrappedComponentProps>> & {
38
34
  WrappedComponent: React.ComponentType<DragHandleProps & {
39
- api?: import("@atlaskit/editor-common/types").EditorInjectionAPI<"table", {
40
- pluginConfiguration: import("../../tablePluginType").TablePluginOptions | undefined;
41
- actions: import("../../tablePluginType").TablePluginActions;
42
- sharedState?: import("../../types").TableSharedState | undefined;
43
- commands: import("../../tablePluginType").TablePluginCommands;
44
- dependencies: import("../../tablePluginType").TablePluginDependencies;
45
- }> | undefined;
35
+ api?: ExtractInjectionAPI<TablePlugin>;
46
36
  } & WrappedComponentProps>;
47
37
  };
48
38
  export {};
@@ -21,12 +21,6 @@ interface ColumnControlsProps {
21
21
  getScrollOffset?: () => number;
22
22
  }
23
23
  export declare const ColumnControls: ({ editorView, tableActive, tableRef, hoveredCell, stickyTop, localId, isInDanger, rowHeights, colWidths, isTableHovered, tableContainerWidth, isNumberColumnEnabled, isDragging, getScrollOffset, api, }: ColumnControlsProps & {
24
- api?: import("@atlaskit/editor-common/types").EditorInjectionAPI<"table", {
25
- pluginConfiguration: import("../../../tablePluginType").TablePluginOptions | undefined;
26
- actions: import("../../../tablePluginType").TablePluginActions;
27
- sharedState?: import("../../../types").TableSharedState | undefined;
28
- commands: import("../../../tablePluginType").TablePluginCommands;
29
- dependencies: import("../../../tablePluginType").TablePluginDependencies;
30
- }> | undefined;
24
+ api?: ExtractInjectionAPI<TablePlugin>;
31
25
  }) => React.JSX.Element;
32
26
  export {};
@@ -1,23 +1,13 @@
1
1
  import React from 'react';
2
2
  import type { WrappedComponentProps } from 'react-intl-next';
3
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
+ import type { TablePlugin } from '../../../tablePluginType';
3
5
  import type { CornerControlProps } from './types';
4
6
  export declare const DragCornerControlsWithSelection: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps & {
5
- api?: import("@atlaskit/editor-common/types").EditorInjectionAPI<"table", {
6
- pluginConfiguration: import("../../../tablePluginType").TablePluginOptions | undefined;
7
- actions: import("../../../tablePluginType").TablePluginActions;
8
- sharedState?: import("../../../types").TableSharedState | undefined;
9
- commands: import("../../../tablePluginType").TablePluginCommands;
10
- dependencies: import("../../../tablePluginType").TablePluginDependencies;
11
- }> | undefined;
7
+ api?: ExtractInjectionAPI<TablePlugin>;
12
8
  }>> & {
13
9
  WrappedComponent: React.ComponentType<CornerControlProps & WrappedComponentProps & {
14
- api?: import("@atlaskit/editor-common/types").EditorInjectionAPI<"table", {
15
- pluginConfiguration: import("../../../tablePluginType").TablePluginOptions | undefined;
16
- actions: import("../../../tablePluginType").TablePluginActions;
17
- sharedState?: import("../../../types").TableSharedState | undefined;
18
- commands: import("../../../tablePluginType").TablePluginCommands;
19
- dependencies: import("../../../tablePluginType").TablePluginDependencies;
20
- }> | undefined;
10
+ api?: ExtractInjectionAPI<TablePlugin>;
21
11
  }>;
22
12
  };
23
13
  export declare const DragCornerControls: React.FC<import("react-intl-next").WithIntlProps<CornerControlProps & WrappedComponentProps>> & {