@atlaskit/editor-plugin-table 0.0.6 → 0.0.8

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 (90) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/plugins/table/event-handlers.js +7 -6
  3. package/dist/cjs/plugins/table/nodeviews/table.js +4 -2
  4. package/dist/cjs/plugins/table/nodeviews/tableCell.js +4 -4
  5. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  6. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +8 -3
  7. package/dist/cjs/plugins/table/toolbar.js +0 -1
  8. package/dist/cjs/plugins/table/ui/TableFloatingControls/CornerControls/index.js +23 -10
  9. package/dist/cjs/plugins/table/ui/TableFloatingControls/RowControls/index.js +23 -10
  10. package/dist/cjs/plugins/table/ui/TableFloatingControls/index.js +4 -4
  11. package/dist/cjs/plugins/table/utils/column-controls.js +1 -1
  12. package/dist/cjs/version.json +1 -1
  13. package/dist/es2019/plugins/table/event-handlers.js +8 -7
  14. package/dist/es2019/plugins/table/nodeviews/table.js +4 -2
  15. package/dist/es2019/plugins/table/nodeviews/tableCell.js +3 -4
  16. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  17. package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +8 -3
  18. package/dist/es2019/plugins/table/toolbar.js +1 -2
  19. package/dist/es2019/plugins/table/ui/TableFloatingControls/CornerControls/index.js +18 -3
  20. package/dist/es2019/plugins/table/ui/TableFloatingControls/RowControls/index.js +18 -3
  21. package/dist/es2019/plugins/table/ui/TableFloatingControls/index.js +2 -2
  22. package/dist/es2019/plugins/table/utils/column-controls.js +1 -1
  23. package/dist/es2019/version.json +1 -1
  24. package/dist/esm/plugins/table/event-handlers.js +8 -7
  25. package/dist/esm/plugins/table/nodeviews/table.js +4 -2
  26. package/dist/esm/plugins/table/nodeviews/tableCell.js +3 -4
  27. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/column-state.js +1 -1
  28. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +8 -3
  29. package/dist/esm/plugins/table/toolbar.js +1 -2
  30. package/dist/esm/plugins/table/ui/TableFloatingControls/CornerControls/index.js +19 -9
  31. package/dist/esm/plugins/table/ui/TableFloatingControls/RowControls/index.js +19 -9
  32. package/dist/esm/plugins/table/ui/TableFloatingControls/index.js +2 -2
  33. package/dist/esm/plugins/table/utils/column-controls.js +1 -1
  34. package/dist/esm/version.json +1 -1
  35. package/dist/types/plugins/table/nodeviews/types.d.ts +1 -0
  36. package/dist/types/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +5 -8
  37. package/dist/types/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +5 -5
  38. package/dist/types-ts4.0/plugins/table/nodeviews/types.d.ts +1 -0
  39. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/CornerControls/index.d.ts +5 -8
  40. package/dist/types-ts4.0/plugins/table/ui/TableFloatingControls/RowControls/index.d.ts +5 -5
  41. package/package.json +10 -3
  42. package/src/__tests__/unit/analytics.ts +737 -0
  43. package/src/__tests__/unit/collab.ts +76 -0
  44. package/src/__tests__/unit/commands/sort.ts +230 -0
  45. package/src/__tests__/unit/copy-paste.ts +686 -0
  46. package/src/__tests__/unit/event-handlers/index.ts +106 -0
  47. package/src/__tests__/unit/event-handlers.ts +202 -0
  48. package/src/__tests__/unit/fix-tables.ts +156 -0
  49. package/src/__tests__/unit/floating-toolbar.ts +95 -0
  50. package/src/__tests__/unit/handlers.ts +81 -0
  51. package/src/__tests__/unit/hover-selection.ts +277 -0
  52. package/src/__tests__/unit/index-with-fake-timers.ts +107 -0
  53. package/src/__tests__/unit/index.ts +986 -0
  54. package/src/__tests__/unit/keymap.ts +602 -0
  55. package/src/__tests__/unit/layout.ts +196 -0
  56. package/src/__tests__/unit/nodeviews/cell.ts +167 -0
  57. package/src/__tests__/unit/pm-plugins/table-resizing/utils/resize-state.ts +33 -0
  58. package/src/__tests__/unit/sort-column.ts +512 -0
  59. package/src/__tests__/unit/transforms/delete-columns.ts +499 -0
  60. package/src/__tests__/unit/transforms/delete-rows.ts +557 -0
  61. package/src/__tests__/unit/transforms/merging.ts +374 -0
  62. package/src/__tests__/unit/ui/CornerControls.tsx +80 -0
  63. package/src/__tests__/unit/ui/FloatingContextualButton.tsx +95 -0
  64. package/src/__tests__/unit/ui/FloatingDeleteButton.tsx +175 -0
  65. package/src/__tests__/unit/ui/FloatingInsertButton.tsx +266 -0
  66. package/src/__tests__/unit/ui/RowControls.tsx +301 -0
  67. package/src/__tests__/unit/ui/TableFloatingControls.tsx +93 -0
  68. package/src/__tests__/unit/undo-redo.ts +202 -0
  69. package/src/__tests__/unit/utils/dom.ts +286 -0
  70. package/src/__tests__/unit/utils/nodes.ts +59 -0
  71. package/src/__tests__/unit/utils/row-controls.ts +176 -0
  72. package/src/__tests__/unit/utils/table.ts +93 -0
  73. package/src/__tests__/unit/utils.ts +652 -0
  74. package/src/plugins/table/__tests__/unit/commands/insert.ts +2 -2
  75. package/src/plugins/table/__tests__/unit/commands.ts +2 -2
  76. package/src/plugins/table/__tests__/unit/nodeviews/TableComponent.tsx +2 -2
  77. package/src/plugins/table/__tests__/unit/nodeviews/table.ts +1 -0
  78. package/src/plugins/table/event-handlers.ts +5 -6
  79. package/src/plugins/table/nodeviews/table.tsx +7 -0
  80. package/src/plugins/table/nodeviews/tableCell.tsx +5 -4
  81. package/src/plugins/table/nodeviews/types.ts +1 -0
  82. package/src/plugins/table/pm-plugins/table-resizing/utils/column-state.ts +1 -1
  83. package/src/plugins/table/pm-plugins/table-resizing/utils/resize-logic.ts +6 -2
  84. package/src/plugins/table/toolbar.ts +0 -1
  85. package/src/plugins/table/ui/FloatingContextualMenu/__tests__/ContextualMenu.tsx +1 -1
  86. package/src/plugins/table/ui/FloatingContextualMenu/__tests__/FloatingContextualMenu.tsx +1 -1
  87. package/src/plugins/table/ui/TableFloatingControls/CornerControls/index.tsx +19 -1
  88. package/src/plugins/table/ui/TableFloatingControls/RowControls/index.tsx +16 -1
  89. package/src/plugins/table/ui/TableFloatingControls/index.tsx +2 -2
  90. package/src/plugins/table/utils/column-controls.ts +1 -1
@@ -54,7 +54,7 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
54
54
 
55
55
  _classCallCheck(this, TableView);
56
56
 
57
- _this = _super.call(this, props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props);
57
+ _this = _super.call(this, props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props, undefined, undefined, undefined, props.hasIntlContext);
58
58
 
59
59
  _defineProperty(_assertThisInitialized(_this), "getNode", function () {
60
60
  return _this.node;
@@ -226,6 +226,7 @@ export var createTableView = function createTableView(node, view, getPos, portal
226
226
  var _getEditorFeatureFlag = getEditorFeatureFlags(),
227
227
  tableRenderOptimization = _getEditorFeatureFlag.tableRenderOptimization;
228
228
 
229
+ var hasIntlContext = true;
229
230
  return new TableView({
230
231
  node: node,
231
232
  view: view,
@@ -236,6 +237,7 @@ export var createTableView = function createTableView(node, view, getPos, portal
236
237
  options: options,
237
238
  tableRenderOptimization: tableRenderOptimization,
238
239
  getEditorContainerWidth: getEditorContainerWidth,
239
- getEditorFeatureFlags: getEditorFeatureFlags
240
+ getEditorFeatureFlags: getEditorFeatureFlags,
241
+ hasIntlContext: hasIntlContext
240
242
  }).init();
241
243
  };
@@ -4,6 +4,8 @@ import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import uuid from 'uuid';
5
5
  import { DOMSerializer } from 'prosemirror-model';
6
6
  import { getCellDomAttrs, getCellAttrs } from '@atlaskit/adf-schema';
7
+ var DEFAULT_COL_SPAN = 1;
8
+ var DEFAULT_ROW_SPAN = 1;
7
9
 
8
10
  var TableCellNodeView = /*#__PURE__*/function () {
9
11
  function TableCellNodeView(node, view, getPos, getEditorFeatureFlags, observer) {
@@ -49,10 +51,7 @@ var TableCellNodeView = /*#__PURE__*/function () {
49
51
  // this can happen when undoing merge cells
50
52
 
51
53
 
52
- var defaultColspan = 1,
53
- defaultRowspan = 1;
54
-
55
- if (colspan !== (node.attrs.colspan || defaultColspan) || rowspan !== (node.attrs.rowspan || defaultRowspan)) {
54
+ if (colspan !== (node.attrs.colspan || DEFAULT_COL_SPAN) || rowspan !== (node.attrs.rowspan || DEFAULT_ROW_SPAN)) {
56
55
  return false;
57
56
  } // added + changed attributes
58
57
 
@@ -35,7 +35,7 @@ export var getCellsRefsInColumn = function getCellsRefsInColumn(columnIndex, tab
35
35
  }
36
36
  });
37
37
  return cells;
38
- }; // calculates column withs based on `cells` DOM refs
38
+ }; // calculates column widths based on `cells` DOM refs
39
39
 
40
40
  export var calculateColumnWidth = function calculateColumnWidth(cells, calculateColumnWidthCb) {
41
41
  var maxColWidth = 0;
@@ -9,8 +9,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
9
9
  import { getFreeSpace } from './column-state';
10
10
  import { bulkColumnsResize, getTotalWidth } from './resize-state';
11
11
  export var growColumn = function growColumn(state, colIndex, amount, selectedColumns) {
12
- // can't grow the last column
13
- if (!state.cols[colIndex + 1]) {
12
+ // can't grow if columns don't exist or it's the last column
13
+ if (!state.cols[colIndex] || !state.cols[colIndex + 1]) {
14
14
  return state;
15
15
  }
16
16
 
@@ -29,7 +29,12 @@ export var growColumn = function growColumn(state, colIndex, amount, selectedCol
29
29
  return newState;
30
30
  };
31
31
  export var shrinkColumn = function shrinkColumn(state, colIndex, amount, selectedColumns) {
32
- // try to shrink dragging column by giving from the column to the right first
32
+ // can't shrink if columns don't exist
33
+ if (!state.cols[colIndex] || !state.cols[colIndex + 1]) {
34
+ return state;
35
+ } // try to shrink dragging column by giving from the column to the right first
36
+
37
+
33
38
  var res = moveSpaceFrom(state, colIndex, colIndex + 1, -amount);
34
39
  var newState = res.state;
35
40
  var isOverflownTable = getTotalWidth(newState) > newState.maxSize;
@@ -15,8 +15,7 @@ import { splitCell } from '@atlaskit/editor-tables/utils';
15
15
  import tableMessages from './ui/messages';
16
16
  import { messages as ContextualMenuMessages } from './ui/FloatingContextualMenu/ContextualMenu';
17
17
  import { findParentDomRefOfType } from 'prosemirror-utils';
18
- import { closestElement } from '@atlaskit/editor-common/utils'; // TODO: ED-14403 investigate why these translations don't work
19
-
18
+ import { closestElement } from '@atlaskit/editor-common/utils';
20
19
  export var messages = defineMessages({
21
20
  tableOptions: {
22
21
  id: 'fabric.editor.tableOptions',
@@ -11,21 +11,29 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
12
 
13
13
  import React, { Component } from 'react';
14
+ import { defineMessages, injectIntl } from 'react-intl-next';
14
15
  import classnames from 'classnames';
15
16
  import { TableMap } from '@atlaskit/editor-tables/table-map';
16
17
  import { findTable, isTableSelected, selectTable } from '@atlaskit/editor-tables/utils';
17
18
  import { clearHoverSelection, hoverTable } from '../../../commands';
18
19
  import { TableCssClassName as ClassName } from '../../../types';
20
+ var messages = defineMessages({
21
+ cornerControl: {
22
+ id: 'fabric.editor.cornerControl',
23
+ defaultMessage: 'Highlight table',
24
+ description: 'A button on the upper left corner of the table that shows up when the table is in focus. Clicking on it will select the entire table.'
25
+ }
26
+ });
19
27
 
20
- var CornerControls = /*#__PURE__*/function (_Component) {
21
- _inherits(CornerControls, _Component);
28
+ var CornerControlComponent = /*#__PURE__*/function (_Component) {
29
+ _inherits(CornerControlComponent, _Component);
22
30
 
23
- var _super = _createSuper(CornerControls);
31
+ var _super = _createSuper(CornerControlComponent);
24
32
 
25
- function CornerControls() {
33
+ function CornerControlComponent() {
26
34
  var _this;
27
35
 
28
- _classCallCheck(this, CornerControls);
36
+ _classCallCheck(this, CornerControlComponent);
29
37
 
30
38
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
31
39
  args[_key] = arguments[_key];
@@ -72,14 +80,15 @@ var CornerControls = /*#__PURE__*/function (_Component) {
72
80
  return _this;
73
81
  }
74
82
 
75
- _createClass(CornerControls, [{
83
+ _createClass(CornerControlComponent, [{
76
84
  key: "render",
77
85
  value: function render() {
78
86
  var _this$props2 = this.props,
79
87
  isInDanger = _this$props2.isInDanger,
80
88
  tableRef = _this$props2.tableRef,
81
89
  isHeaderColumnEnabled = _this$props2.isHeaderColumnEnabled,
82
- isHeaderRowEnabled = _this$props2.isHeaderRowEnabled;
90
+ isHeaderRowEnabled = _this$props2.isHeaderRowEnabled,
91
+ formatMessage = _this$props2.intl.formatMessage;
83
92
 
84
93
  if (!tableRef) {
85
94
  return null;
@@ -95,6 +104,7 @@ var CornerControls = /*#__PURE__*/function (_Component) {
95
104
  top: this.props.stickyTop !== undefined ? "".concat(this.props.stickyTop, "px") : undefined
96
105
  }
97
106
  }, /*#__PURE__*/React.createElement("button", {
107
+ "aria-label": formatMessage(messages.cornerControl),
98
108
  type: "button",
99
109
  className: classnames(ClassName.CONTROLS_CORNER_BUTTON, {
100
110
  danger: isActive && isInDanger
@@ -114,7 +124,7 @@ var CornerControls = /*#__PURE__*/function (_Component) {
114
124
  }
115
125
  }]);
116
126
 
117
- return CornerControls;
127
+ return CornerControlComponent;
118
128
  }(Component);
119
129
 
120
- export { CornerControls as default };
130
+ export var CornerControls = injectIntl(CornerControlComponent);
@@ -11,20 +11,28 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
12
 
13
13
  import React, { Component } from 'react';
14
+ import { defineMessages, injectIntl } from 'react-intl-next';
14
15
  import { clearHoverSelection } from '../../../commands';
15
16
  import { TableCssClassName as ClassName } from '../../../types';
16
17
  import { getRowClassNames, getRowHeights, getRowsParams } from '../../../utils';
17
18
  import { tableControlsSpacing, tableToolbarSize } from '../../consts';
19
+ var messages = defineMessages({
20
+ rowControl: {
21
+ id: 'fabric.editor.rowControl',
22
+ defaultMessage: 'Highlight row',
23
+ description: 'A button on the left of each row that shows up when the table is in focus. Clicking on it will select the entire row.'
24
+ }
25
+ });
18
26
 
19
- var RowControls = /*#__PURE__*/function (_Component) {
20
- _inherits(RowControls, _Component);
27
+ var RowControlsComponent = /*#__PURE__*/function (_Component) {
28
+ _inherits(RowControlsComponent, _Component);
21
29
 
22
- var _super = _createSuper(RowControls);
30
+ var _super = _createSuper(RowControlsComponent);
23
31
 
24
- function RowControls() {
32
+ function RowControlsComponent() {
25
33
  var _this;
26
34
 
27
- _classCallCheck(this, RowControls);
35
+ _classCallCheck(this, RowControlsComponent);
28
36
 
29
37
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
30
38
  args[_key] = arguments[_key];
@@ -42,7 +50,7 @@ var RowControls = /*#__PURE__*/function (_Component) {
42
50
  return _this;
43
51
  }
44
52
 
45
- _createClass(RowControls, [{
53
+ _createClass(RowControlsComponent, [{
46
54
  key: "render",
47
55
  value: function render() {
48
56
  var _this2 = this;
@@ -52,7 +60,8 @@ var RowControls = /*#__PURE__*/function (_Component) {
52
60
  tableRef = _this$props.tableRef,
53
61
  hoveredRows = _this$props.hoveredRows,
54
62
  isInDanger = _this$props.isInDanger,
55
- isResizing = _this$props.isResizing;
63
+ isResizing = _this$props.isResizing,
64
+ formatMessage = _this$props.intl.formatMessage;
56
65
 
57
66
  if (!tableRef) {
58
67
  return null;
@@ -89,6 +98,7 @@ var RowControls = /*#__PURE__*/function (_Component) {
89
98
  paddingTop: thisRowSticky ? "".concat(tableControlsSpacing, "px") : undefined
90
99
  }
91
100
  }, /*#__PURE__*/React.createElement("button", {
101
+ "aria-label": formatMessage(messages.rowControl),
92
102
  type: "button",
93
103
  className: "".concat(ClassName.ROW_CONTROLS_BUTTON, "\n ").concat(ClassName.CONTROLS_BUTTON, "\n "),
94
104
  onClick: function onClick(event) {
@@ -107,7 +117,7 @@ var RowControls = /*#__PURE__*/function (_Component) {
107
117
  }
108
118
  }]);
109
119
 
110
- return RowControls;
120
+ return RowControlsComponent;
111
121
  }(Component);
112
122
 
113
- export { RowControls as default };
123
+ export var RowControls = injectIntl(RowControlsComponent);
@@ -20,9 +20,9 @@ import React, { Component } from 'react';
20
20
  import { browser } from '@atlaskit/editor-common/utils';
21
21
  import { hoverRows, selectRow } from '../../commands';
22
22
  import { isSelectionUpdated } from '../../utils';
23
- import CornerControls from './CornerControls';
23
+ import { CornerControls } from './CornerControls';
24
24
  import NumberColumn from './NumberColumn';
25
- import RowControls from './RowControls';
25
+ import { RowControls } from './RowControls';
26
26
 
27
27
  var TableFloatingControls = /*#__PURE__*/function (_Component) {
28
28
  _inherits(TableFloatingControls, _Component);
@@ -119,7 +119,7 @@ var getRelativeDomCellWidths = function getRelativeDomCellWidths(_ref) {
119
119
  // for cells in a table with unchanged column widths,
120
120
  // these are identified by the lack of colwidth data attribute,
121
121
  // return equally partitioned total cell width in DOM for each cell.
122
- if (colspan <= 1 || !colwidth) {
122
+ if (colspan === 1 || !colwidth) {
123
123
  return new Array(colspan).fill(width / colspan);
124
124
  } // For cells that have colSpan > 1 and
125
125
  // are part of a table with resized columns
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "0.0.6"
3
+ "version": "0.0.8"
4
4
  }
@@ -20,4 +20,5 @@ export interface Props {
20
20
  tableRenderOptimization?: boolean;
21
21
  getEditorContainerWidth: GetEditorContainerWidth;
22
22
  getEditorFeatureFlags: GetEditorFeatureFlags;
23
+ hasIntlContext: boolean;
23
24
  }
@@ -1,4 +1,5 @@
1
- import { Component } from 'react';
1
+ import React from 'react';
2
+ import type { WrappedComponentProps } from 'react-intl-next';
2
3
  import { EditorView } from 'prosemirror-view';
3
4
  export interface Props {
4
5
  editorView: EditorView;
@@ -10,10 +11,6 @@ export interface Props {
10
11
  isHeaderRowEnabled?: boolean;
11
12
  stickyTop?: number;
12
13
  }
13
- export default class CornerControls extends Component<Props, any> {
14
- render(): JSX.Element | null;
15
- private isActive;
16
- private clearHoverSelection;
17
- private selectTable;
18
- private hoverTable;
19
- }
14
+ export declare const CornerControls: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
15
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
16
+ };
@@ -1,5 +1,6 @@
1
- import { Component } from 'react';
1
+ import React from 'react';
2
2
  import { EditorView } from 'prosemirror-view';
3
+ import type { WrappedComponentProps } from 'react-intl-next';
3
4
  export interface Props {
4
5
  editorView: EditorView;
5
6
  tableRef: HTMLTableElement;
@@ -11,7 +12,6 @@ export interface Props {
11
12
  insertRowButtonIndex?: number;
12
13
  stickyTop?: number;
13
14
  }
14
- export default class RowControls extends Component<Props> {
15
- render(): JSX.Element | null;
16
- private clearHoverSelection;
17
- }
15
+ export declare const RowControls: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
16
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
17
+ };
@@ -20,4 +20,5 @@ export interface Props {
20
20
  tableRenderOptimization?: boolean;
21
21
  getEditorContainerWidth: GetEditorContainerWidth;
22
22
  getEditorFeatureFlags: GetEditorFeatureFlags;
23
+ hasIntlContext: boolean;
23
24
  }
@@ -1,4 +1,5 @@
1
- import { Component } from 'react';
1
+ import React from 'react';
2
+ import type { WrappedComponentProps } from 'react-intl-next';
2
3
  import { EditorView } from 'prosemirror-view';
3
4
  export interface Props {
4
5
  editorView: EditorView;
@@ -10,10 +11,6 @@ export interface Props {
10
11
  isHeaderRowEnabled?: boolean;
11
12
  stickyTop?: number;
12
13
  }
13
- export default class CornerControls extends Component<Props, any> {
14
- render(): JSX.Element | null;
15
- private isActive;
16
- private clearHoverSelection;
17
- private selectTable;
18
- private hoverTable;
19
- }
14
+ export declare const CornerControls: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
15
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
16
+ };
@@ -1,5 +1,6 @@
1
- import { Component } from 'react';
1
+ import React from 'react';
2
2
  import { EditorView } from 'prosemirror-view';
3
+ import type { WrappedComponentProps } from 'react-intl-next';
3
4
  export interface Props {
4
5
  editorView: EditorView;
5
6
  tableRef: HTMLTableElement;
@@ -11,7 +12,6 @@ export interface Props {
11
12
  insertRowButtonIndex?: number;
12
13
  stickyTop?: number;
13
14
  }
14
- export default class RowControls extends Component<Props> {
15
- render(): JSX.Element | null;
16
- private clearHoverSelection;
17
- }
15
+ export declare const RowControls: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
16
+ WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
17
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@atlaskit/adf-schema": "^24.0.0",
28
- "@atlaskit/editor-common": "^70.0.0",
28
+ "@atlaskit/editor-common": "^70.1.0",
29
29
  "@atlaskit/editor-shared-styles": "^2.2.0",
30
30
  "@atlaskit/editor-tables": "^2.2.0",
31
31
  "@atlaskit/icon": "^21.11.0",
@@ -56,6 +56,7 @@
56
56
  "styled-components": "^3.2.6"
57
57
  },
58
58
  "devDependencies": {
59
+ "@atlaskit/analytics-next": "^8.3.3",
59
60
  "@atlaskit/button": "^16.3.0",
60
61
  "@atlaskit/editor-core": "^173.0.0",
61
62
  "@atlaskit/editor-test-helpers": "^17.2.0",
@@ -63,9 +64,11 @@
63
64
  "@atlaskit/logo": "^13.10.0",
64
65
  "@atlaskit/media-integration-test-helpers": "^2.6.0",
65
66
  "@atlaskit/synchrony-test-helpers": "^2.3.0",
67
+ "@atlaskit/util-data-test": "^17.5.5",
66
68
  "@atlaskit/visual-regression": "*",
67
69
  "@atlaskit/webdriver-runner": "*",
68
70
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
71
+ "@testing-library/react": "^12.1.5",
69
72
  "@types/prosemirror-history": "^1.0.1",
70
73
  "enzyme": "^3.10.0",
71
74
  "prosemirror-history": "^1.1.3",
@@ -79,7 +82,11 @@
79
82
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
80
83
  "techstack": {
81
84
  "@repo/internal": {
82
- "theming": "tokens"
85
+ "theming": "tokens",
86
+ "deprecation": "no-deprecated-imports",
87
+ "styling": [
88
+ "emotion"
89
+ ]
83
90
  }
84
91
  }
85
92
  }