@atlaskit/editor-plugin-table 4.0.1 → 4.0.2

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 (64) hide show
  1. package/CHANGELOG.md +140 -133
  2. package/README.md +1 -1
  3. package/dist/cjs/plugins/table/commands/insert.js +2 -2
  4. package/dist/cjs/plugins/table/commands/sort.js +3 -3
  5. package/dist/cjs/plugins/table/handlers.js +2 -2
  6. package/dist/cjs/plugins/table/toolbar.js +3 -3
  7. package/dist/cjs/plugins/table/transforms/delete-columns.js +2 -2
  8. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +3 -3
  9. package/dist/es2019/plugins/table/commands/insert.js +1 -1
  10. package/dist/es2019/plugins/table/commands/sort.js +1 -1
  11. package/dist/es2019/plugins/table/handlers.js +1 -1
  12. package/dist/es2019/plugins/table/toolbar.js +1 -1
  13. package/dist/es2019/plugins/table/transforms/delete-columns.js +1 -1
  14. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
  15. package/dist/esm/plugins/table/commands/insert.js +1 -1
  16. package/dist/esm/plugins/table/commands/sort.js +1 -1
  17. package/dist/esm/plugins/table/handlers.js +1 -1
  18. package/dist/esm/plugins/table/toolbar.js +1 -1
  19. package/dist/esm/plugins/table/transforms/delete-columns.js +1 -1
  20. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +1 -1
  21. package/dist/types/plugins/table/commands/sort.d.ts +2 -2
  22. package/dist/types/plugins/table/commands-with-analytics.d.ts +4 -4
  23. package/dist/types/plugins/table/handlers.d.ts +2 -2
  24. package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +1 -1
  25. package/dist/types/plugins/table/types.d.ts +1 -1
  26. package/dist/types/plugins/table/ui/TableFloatingControls/index.d.ts +4 -4
  27. package/dist/types-ts4.5/plugins/table/commands/sort.d.ts +2 -2
  28. package/dist/types-ts4.5/plugins/table/commands-with-analytics.d.ts +4 -4
  29. package/dist/types-ts4.5/plugins/table/handlers.d.ts +2 -2
  30. package/dist/types-ts4.5/plugins/table/nodeviews/TableComponent.d.ts +1 -1
  31. package/dist/types-ts4.5/plugins/table/types.d.ts +1 -1
  32. package/dist/types-ts4.5/plugins/table/ui/TableFloatingControls/index.d.ts +4 -4
  33. package/docs/0-intro.tsx +1 -1
  34. package/package.json +5 -4
  35. package/src/__tests__/integration/__snapshots__/auto-size.ts.snap +3 -0
  36. package/src/__tests__/integration/__snapshots__/copy-button.ts.snap +2 -0
  37. package/src/__tests__/integration/__snapshots__/delete-columns.ts.snap +2 -0
  38. package/src/__tests__/integration/__snapshots__/delete-last-column-in-full-width.ts.snap +1 -0
  39. package/src/__tests__/integration/__snapshots__/delete-last-column-with-empty-action.ts.snap +1 -0
  40. package/src/__tests__/integration/__snapshots__/delete-last-row-with-empty-action.ts.snap +2 -0
  41. package/src/__tests__/integration/__snapshots__/delete-rows.ts.snap +3 -0
  42. package/src/__tests__/integration/__snapshots__/deleting-empty-paragraph-under-table.ts.snap +3 -0
  43. package/src/__tests__/integration/__snapshots__/even-columns.ts.snap +2 -0
  44. package/src/__tests__/integration/__snapshots__/insert-cell-header-with-strong-mark.ts.snap +1 -0
  45. package/src/__tests__/integration/__snapshots__/insert-row-inside-layout.ts.snap +1 -0
  46. package/src/__tests__/integration/__snapshots__/layout.ts.snap +9 -0
  47. package/src/__tests__/integration/__snapshots__/resize.ts.snap +11 -0
  48. package/src/__tests__/integration/__snapshots__/scale.ts.snap +2 -0
  49. package/src/__tests__/unit/commands/sort.ts +1 -1
  50. package/src/__tests__/unit/pm-plugins/table-width.ts +190 -1
  51. package/src/__tests__/unit/sort-column.ts +1 -1
  52. package/src/plugins/table/commands/insert.ts +1 -1
  53. package/src/plugins/table/commands/sort.ts +7 -7
  54. package/src/plugins/table/commands-with-analytics.ts +11 -6
  55. package/src/plugins/table/handlers.ts +7 -8
  56. package/src/plugins/table/nodeviews/TableComponent.tsx +1 -1
  57. package/src/plugins/table/nodeviews/table.tsx +1 -1
  58. package/src/plugins/table/toolbar.tsx +1 -1
  59. package/src/plugins/table/transforms/delete-columns.ts +1 -1
  60. package/src/plugins/table/types.ts +1 -1
  61. package/src/plugins/table/ui/FloatingContextualMenu/ContextualMenu.tsx +1 -1
  62. package/src/plugins/table/ui/TableFloatingControls/index.tsx +4 -4
  63. package/tsconfig.app.json +3 -0
  64. package/tsconfig.dev.json +3 -0
package/README.md CHANGED
@@ -27,4 +27,4 @@ Please see [Atlaskit - Editor plugin table](https://atlaskit.atlassian.com/packa
27
27
  For internal Atlassian, visit the slack channel [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit [go/editor-help](https://go/editor-help) to submit a bug.
28
28
  ## License
29
29
  ---
30
- Please see [Atlassian Frontend - License](https://developer.atlassian.com/cloud/framework/atlassian-frontend/#license) for more licensing information.
30
+ Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.addColumnAfter = void 0;
7
7
  exports.addColumnAt = addColumnAt;
8
8
  exports.insertRow = exports.insertColumn = exports.createTable = exports.addColumnBefore = void 0;
9
- var _steps = require("@atlaskit/adf-schema/steps");
9
+ var _customSteps = require("@atlaskit/custom-steps");
10
10
  var _analytics = require("@atlaskit/editor-common/analytics");
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
12
  var _utils = require("@atlaskit/editor-prosemirror/utils");
@@ -24,7 +24,7 @@ function addColumnAtCustomStep(column) {
24
24
  return function (tr) {
25
25
  var table = (0, _utils2.findTable)(tr.selection);
26
26
  if (table) {
27
- return tr.step(_steps.AddColumnStep.create(tr.doc, table.pos, column));
27
+ return tr.step(_customSteps.AddColumnStep.create(tr.doc, table.pos, column));
28
28
  }
29
29
  return tr;
30
30
  };
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.sortByColumn = void 0;
7
- var _steps = require("@atlaskit/adf-schema/steps");
7
+ var _customSteps = require("@atlaskit/custom-steps");
8
8
  var _utils = require("@atlaskit/editor-common/utils");
9
9
  var _state = require("@atlaskit/editor-prosemirror/state");
10
10
  var _tableMap = require("@atlaskit/editor-tables/table-map");
@@ -21,7 +21,7 @@ var createGetInlineCardTextFromStore = function createGetInlineCardTextFromStore
21
21
  return cardUrl;
22
22
  };
23
23
  var sortByColumn = function sortByColumn(columnIndex) {
24
- var order = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _steps.TableSortOrder.DESC;
24
+ var order = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _customSteps.TableSortOrder.DESC;
25
25
  return (0, _pluginFactory.createCommand)(function () {
26
26
  return {
27
27
  type: 'SORT_TABLE',
@@ -64,7 +64,7 @@ var sortByColumn = function sortByColumn(columnIndex) {
64
64
  columnIndex: columnIndex,
65
65
  order: order
66
66
  };
67
- tr.step(new _steps.TableSortStep(table.pos, prev, next));
67
+ tr.step(new _customSteps.TableSortStep(table.pos, prev, next));
68
68
  return tr.setSelection(_state.Selection.near(tr.doc.resolve(table.start + pos)));
69
69
  });
70
70
  };
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.handleDocOrSelectionChanged = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _steps = require("@atlaskit/adf-schema/steps");
9
+ var _customSteps = require("@atlaskit/custom-steps");
10
10
  var _utils = require("@atlaskit/editor-common/utils");
11
11
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
12
12
  var _utils3 = require("@atlaskit/editor-tables/utils");
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
20
20
  var nextTableSorting = function nextTableSorting(tr, table) {
21
21
  var tableSortStep = tr.steps.find(function (step) {
22
- return step instanceof _steps.TableSortStep;
22
+ return step instanceof _customSteps.TableSortStep;
23
23
  });
24
24
  return tableSortStep && table && table.pos === tableSortStep.pos ? tableSortStep.next : undefined;
25
25
  };
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.messages = exports.getToolbarMenuConfig = exports.getToolbarConfig = exports.getToolbarCellOptionsConfig = void 0;
8
8
  var _react = require("@emotion/react");
9
9
  var _reactIntlNext = require("react-intl-next");
10
- var _steps = require("@atlaskit/adf-schema/steps");
10
+ var _customSteps = require("@atlaskit/custom-steps");
11
11
  var _analytics = require("@atlaskit/editor-common/analytics");
12
12
  var _keymaps = require("@atlaskit/editor-common/keymaps");
13
13
  var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
@@ -235,7 +235,7 @@ var getToolbarCellOptionsConfig = function getToolbarCellOptionsConfig(editorSta
235
235
  return true;
236
236
  },
237
237
  onClick: function onClick(state, dispatch) {
238
- (0, _commandsWithAnalytics.sortColumnWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.FLOATING_TB, initialSelectionRect.left, _steps.TableSortOrder.ASC)(state, dispatch);
238
+ (0, _commandsWithAnalytics.sortColumnWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.FLOATING_TB, initialSelectionRect.left, _customSteps.TableSortOrder.ASC)(state, dispatch);
239
239
  return true;
240
240
  },
241
241
  selected: false,
@@ -257,7 +257,7 @@ var getToolbarCellOptionsConfig = function getToolbarCellOptionsConfig(editorSta
257
257
  return true;
258
258
  },
259
259
  onClick: function onClick(state, dispatch) {
260
- (0, _commandsWithAnalytics.sortColumnWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.FLOATING_TB, initialSelectionRect.left, _steps.TableSortOrder.DESC)(state, dispatch);
260
+ (0, _commandsWithAnalytics.sortColumnWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.FLOATING_TB, initialSelectionRect.left, _customSteps.TableSortOrder.DESC)(state, dispatch);
261
261
  return true;
262
262
  },
263
263
  selected: false,
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.deleteColumns = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _steps = require("@atlaskit/adf-schema/steps");
10
+ var _customSteps = require("@atlaskit/custom-steps");
11
11
  var _analytics = require("@atlaskit/editor-common/analytics");
12
12
  var _state = require("@atlaskit/editor-prosemirror/state");
13
13
  var _tableMap = require("@atlaskit/editor-tables/table-map");
@@ -33,7 +33,7 @@ var deleteColumnsCustomStep = function deleteColumnsCustomStep(rect) {
33
33
  var originalDoc = tr.doc;
34
34
  var deletedColumns = [];
35
35
  for (var i = rect.left; i < rect.right; i++) {
36
- var step = _steps.AddColumnStep.create(originalDoc, table.pos, i, true);
36
+ var step = _customSteps.AddColumnStep.create(originalDoc, table.pos, i, true);
37
37
  deletedColumns.push(i);
38
38
  tr.step(step.map(tr.mapping.slice(mapStart)));
39
39
  }
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
  var _react = require("react");
16
16
  var _react2 = require("@emotion/react");
17
17
  var _reactIntlNext = require("react-intl-next");
18
- var _steps = require("@atlaskit/adf-schema/steps");
18
+ var _customSteps = require("@atlaskit/custom-steps");
19
19
  var _analytics = require("@atlaskit/editor-common/analytics");
20
20
  var _keymaps = require("@atlaskit/editor-common/keymaps");
21
21
  var _styles = require("@atlaskit/editor-common/styles");
@@ -267,11 +267,11 @@ var ContextualMenu = /*#__PURE__*/function (_Component) {
267
267
  targetCellPosition = _getPluginState2.targetCellPosition;
268
268
  switch (item.value.name) {
269
269
  case 'sort_column_desc':
270
- (0, _commandsWithAnalytics.sortColumnWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.CONTEXT_MENU, selectionRect.left, _steps.TableSortOrder.DESC)(state, dispatch);
270
+ (0, _commandsWithAnalytics.sortColumnWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.CONTEXT_MENU, selectionRect.left, _customSteps.TableSortOrder.DESC)(state, dispatch);
271
271
  _this.toggleOpen();
272
272
  break;
273
273
  case 'sort_column_asc':
274
- (0, _commandsWithAnalytics.sortColumnWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.CONTEXT_MENU, selectionRect.left, _steps.TableSortOrder.ASC)(state, dispatch);
274
+ (0, _commandsWithAnalytics.sortColumnWithAnalytics)(editorAnalyticsAPI)(_analytics.INPUT_METHOD.CONTEXT_MENU, selectionRect.left, _customSteps.TableSortOrder.ASC)(state, dispatch);
275
275
  _this.toggleOpen();
276
276
  break;
277
277
  case 'merge':
@@ -1,5 +1,5 @@
1
1
  // #region Imports
2
- import { AddColumnStep } from '@atlaskit/adf-schema/steps';
2
+ import { AddColumnStep } from '@atlaskit/custom-steps';
3
3
  import { TABLE_OVERFLOW_CHANGE_TRIGGER } from '@atlaskit/editor-common/analytics';
4
4
  import { Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
@@ -1,4 +1,4 @@
1
- import { TableSortOrder as SortOrder, TableSortStep } from '@atlaskit/adf-schema/steps';
1
+ import { TableSortOrder as SortOrder, TableSortStep } from '@atlaskit/custom-steps';
2
2
  import { createCompareNodes } from '@atlaskit/editor-common/utils';
3
3
  import { Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { TableMap } from '@atlaskit/editor-tables/table-map';
@@ -1,5 +1,5 @@
1
1
  // #region Imports
2
- import { TableSortStep } from '@atlaskit/adf-schema/steps';
2
+ import { TableSortStep } from '@atlaskit/custom-steps';
3
3
  import { isTextInput } from '@atlaskit/editor-common/utils';
4
4
 
5
5
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { defineMessages } from 'react-intl-next';
4
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
4
+ import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
5
5
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
6
  import { addColumnAfter, addRowAfter, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
7
7
  import commonMessages from '@atlaskit/editor-common/messages';
@@ -1,4 +1,4 @@
1
- import { AddColumnStep } from '@atlaskit/adf-schema/steps';
1
+ import { AddColumnStep } from '@atlaskit/custom-steps';
2
2
  import { TABLE_OVERFLOW_CHANGE_TRIGGER } from '@atlaskit/editor-common/analytics';
3
3
  import { Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { TableMap } from '@atlaskit/editor-tables/table-map';
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import { Component } from 'react';
4
4
  import { jsx } from '@emotion/react';
5
5
  import { defineMessages, injectIntl } from 'react-intl-next';
6
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
6
+ import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
7
7
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
8
8
  import { addColumnAfter, addRowAfter, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
9
9
  import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
@@ -1,5 +1,5 @@
1
1
  // #region Imports
2
- import { AddColumnStep } from '@atlaskit/adf-schema/steps';
2
+ import { AddColumnStep } from '@atlaskit/custom-steps';
3
3
  import { TABLE_OVERFLOW_CHANGE_TRIGGER } from '@atlaskit/editor-common/analytics';
4
4
  import { Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
@@ -1,4 +1,4 @@
1
- import { TableSortOrder as SortOrder, TableSortStep } from '@atlaskit/adf-schema/steps';
1
+ import { TableSortOrder as SortOrder, TableSortStep } from '@atlaskit/custom-steps';
2
2
  import { createCompareNodes } from '@atlaskit/editor-common/utils';
3
3
  import { Selection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { TableMap } from '@atlaskit/editor-tables/table-map';
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  // #region Imports
5
- import { TableSortStep } from '@atlaskit/adf-schema/steps';
5
+ import { TableSortStep } from '@atlaskit/custom-steps';
6
6
  import { isTextInput } from '@atlaskit/editor-common/utils';
7
7
 
8
8
  // @ts-ignore -- ReadonlyTransaction is a local declaration and will cause a TS2305 error in CCFE typecheck
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/react';
3
3
  import { defineMessages } from 'react-intl-next';
4
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
4
+ import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
5
5
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
6
  import { addColumnAfter, addRowAfter, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
7
7
  import commonMessages from '@atlaskit/editor-common/messages';
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
- import { AddColumnStep } from '@atlaskit/adf-schema/steps';
5
+ import { AddColumnStep } from '@atlaskit/custom-steps';
6
6
  import { TABLE_OVERFLOW_CHANGE_TRIGGER } from '@atlaskit/editor-common/analytics';
7
7
  import { Selection } from '@atlaskit/editor-prosemirror/state';
8
8
  import { TableMap } from '@atlaskit/editor-tables/table-map';
@@ -13,7 +13,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
13
13
  import { Component } from 'react';
14
14
  import { jsx } from '@emotion/react';
15
15
  import { defineMessages, injectIntl } from 'react-intl-next';
16
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
16
+ import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
17
17
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
18
18
  import { addColumnAfter, addRowAfter, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
19
19
  import { DropdownMenuSharedCssClassName } from '@atlaskit/editor-common/styles';
@@ -1,3 +1,3 @@
1
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
2
- import { Command } from '@atlaskit/editor-common/types';
1
+ import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
3
  export declare const sortByColumn: (columnIndex: number, order?: SortOrder) => Command;
@@ -1,10 +1,10 @@
1
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
1
+ import type { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
2
2
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
3
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
4
  import type { Command, GetEditorContainerWidth } from '@atlaskit/editor-common/types';
5
- import { Rect } from '@atlaskit/editor-tables/table-map';
6
- import { ResizeStateWithAnalytics } from './pm-plugins/table-resizing/utils';
7
- import { InsertRowMethods, InsertRowOptions, RowInsertPosition } from './types';
5
+ import type { Rect } from '@atlaskit/editor-tables/table-map';
6
+ import type { ResizeStateWithAnalytics } from './pm-plugins/table-resizing/utils';
7
+ import type { InsertRowMethods, InsertRowOptions, RowInsertPosition } from './types';
8
8
  export declare const emptyMultipleCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FLOATING_TB, targetCellPosition?: number) => Command;
9
9
  export declare const mergeCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) => Command;
10
10
  export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) => Command;
@@ -1,3 +1,3 @@
1
- import { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import { TablePluginState } from './types';
1
+ import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { TablePluginState } from './types';
3
3
  export declare const handleDocOrSelectionChanged: (tr: Transaction | ReadonlyTransaction, pluginState: TablePluginState) => TablePluginState;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
2
+ import type { TableColumnOrdering } from '@atlaskit/custom-steps';
3
3
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
4
  import type { EditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
@@ -1,6 +1,6 @@
1
1
  import type { IntlShape } from 'react-intl-next';
2
2
  import type { TableLayout } from '@atlaskit/adf-schema';
3
- import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
3
+ import type { TableColumnOrdering } from '@atlaskit/custom-steps';
4
4
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
5
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
6
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
@@ -1,9 +1,9 @@
1
1
  import { Component } from 'react';
2
- import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
2
+ import type { TableColumnOrdering } from '@atlaskit/custom-steps';
3
3
  import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
4
- import { Selection } from '@atlaskit/editor-prosemirror/state';
5
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import { RowStickyState } from '../../pm-plugins/sticky-headers';
4
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
5
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
+ import type { RowStickyState } from '../../pm-plugins/sticky-headers';
7
7
  export interface Props {
8
8
  editorView: EditorView;
9
9
  getEditorFeatureFlags: GetEditorFeatureFlags;
@@ -1,3 +1,3 @@
1
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
2
- import { Command } from '@atlaskit/editor-common/types';
1
+ import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
2
+ import type { Command } from '@atlaskit/editor-common/types';
3
3
  export declare const sortByColumn: (columnIndex: number, order?: SortOrder) => Command;
@@ -1,10 +1,10 @@
1
- import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
1
+ import type { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
2
2
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
3
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
4
  import type { Command, GetEditorContainerWidth } from '@atlaskit/editor-common/types';
5
- import { Rect } from '@atlaskit/editor-tables/table-map';
6
- import { ResizeStateWithAnalytics } from './pm-plugins/table-resizing/utils';
7
- import { InsertRowMethods, InsertRowOptions, RowInsertPosition } from './types';
5
+ import type { Rect } from '@atlaskit/editor-tables/table-map';
6
+ import type { ResizeStateWithAnalytics } from './pm-plugins/table-resizing/utils';
7
+ import type { InsertRowMethods, InsertRowOptions, RowInsertPosition } from './types';
8
8
  export declare const emptyMultipleCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FLOATING_TB, targetCellPosition?: number) => Command;
9
9
  export declare const mergeCellsWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | null | undefined) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) => Command;
10
10
  export declare const splitCellWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.CONTEXT_MENU | INPUT_METHOD.FLOATING_TB) => Command;
@@ -1,3 +1,3 @@
1
- import { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
2
- import { TablePluginState } from './types';
1
+ import type { ReadonlyTransaction, Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { TablePluginState } from './types';
3
3
  export declare const handleDocOrSelectionChanged: (tr: Transaction | ReadonlyTransaction, pluginState: TablePluginState) => TablePluginState;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
2
+ import type { TableColumnOrdering } from '@atlaskit/custom-steps';
3
3
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
4
4
  import type { EditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
5
5
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
@@ -1,6 +1,6 @@
1
1
  import type { IntlShape } from 'react-intl-next';
2
2
  import type { TableLayout } from '@atlaskit/adf-schema';
3
- import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
3
+ import type { TableColumnOrdering } from '@atlaskit/custom-steps';
4
4
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
5
5
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
6
6
  import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
@@ -1,9 +1,9 @@
1
1
  import { Component } from 'react';
2
- import type { TableColumnOrdering } from '@atlaskit/adf-schema/steps';
2
+ import type { TableColumnOrdering } from '@atlaskit/custom-steps';
3
3
  import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
4
- import { Selection } from '@atlaskit/editor-prosemirror/state';
5
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
6
- import { RowStickyState } from '../../pm-plugins/sticky-headers';
4
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
5
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
6
+ import type { RowStickyState } from '../../pm-plugins/sticky-headers';
7
7
  export interface Props {
8
8
  editorView: EditorView;
9
9
  getEditorFeatureFlags: GetEditorFeatureFlags;
package/docs/0-intro.tsx CHANGED
@@ -49,5 +49,5 @@ type TablePlugin = NextEditorPlugin<
49
49
  For internal Atlassian, visit the slack channel [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit [go/editor-help](https://go/editor-help) to submit a bug.
50
50
  ## License
51
51
  ---
52
- Please see [Atlassian Frontend - License](https://developer.atlassian.com/cloud/framework/atlassian-frontend/#license) for more licensing information.
52
+ Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.
53
53
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,8 +27,9 @@
27
27
  "releaseModel": "continuous"
28
28
  },
29
29
  "dependencies": {
30
- "@atlaskit/adf-schema": "^29.1.0",
31
- "@atlaskit/editor-common": "^76.0.0",
30
+ "@atlaskit/adf-schema": "^32.0.0",
31
+ "@atlaskit/custom-steps": "^0.0.2",
32
+ "@atlaskit/editor-common": "^76.1.0",
32
33
  "@atlaskit/editor-palette": "1.5.1",
33
34
  "@atlaskit/editor-plugin-analytics": "^0.2.0",
34
35
  "@atlaskit/editor-plugin-content-insertion": "^0.1.0",
@@ -57,7 +58,7 @@
57
58
  "@atlaskit/analytics-next": "^9.1.0",
58
59
  "@atlaskit/editor-plugin-decorations": "^0.2.0",
59
60
  "@atlaskit/editor-plugin-feature-flags": "^1.0.0",
60
- "@atlaskit/editor-plugin-grid": "^0.2.0",
61
+ "@atlaskit/editor-plugin-grid": "^0.3.0",
61
62
  "@atlaskit/editor-plugin-guideline": "^0.5.0",
62
63
  "@atlaskit/editor-plugin-hyperlink": "^0.5.0",
63
64
  "@atlaskit/editor-plugin-width": "^0.2.0",
@@ -9,6 +9,7 @@ Object {
9
9
  "isNumberColumnEnabled": false,
10
10
  "layout": "default",
11
11
  "localId": "abc-123",
12
+ "width": null,
12
13
  },
13
14
  "content": Array [
14
15
  Object {
@@ -215,6 +216,7 @@ Object {
215
216
  "isNumberColumnEnabled": false,
216
217
  "layout": "full-width",
217
218
  "localId": "abc-123",
219
+ "width": null,
218
220
  },
219
221
  "content": Array [
220
222
  Object {
@@ -411,6 +413,7 @@ Object {
411
413
  "isNumberColumnEnabled": false,
412
414
  "layout": "wide",
413
415
  "localId": "abc-123",
416
+ "width": null,
414
417
  },
415
418
  "content": Array [
416
419
  Object {
@@ -9,6 +9,7 @@ Object {
9
9
  "isNumberColumnEnabled": false,
10
10
  "layout": "default",
11
11
  "localId": "abc-123",
12
+ "width": null,
12
13
  },
13
14
  "content": Array [
14
15
  Object {
@@ -215,6 +216,7 @@ Object {
215
216
  "isNumberColumnEnabled": false,
216
217
  "layout": "default",
217
218
  "localId": "abc-123",
219
+ "width": null,
218
220
  },
219
221
  "content": Array [
220
222
  Object {
@@ -9,6 +9,7 @@ Object {
9
9
  "isNumberColumnEnabled": false,
10
10
  "layout": "default",
11
11
  "localId": "abc-123",
12
+ "width": null,
12
13
  },
13
14
  "content": Array [
14
15
  Object {
@@ -457,6 +458,7 @@ Object {
457
458
  "isNumberColumnEnabled": false,
458
459
  "layout": "default",
459
460
  "localId": "abc-123",
461
+ "width": null,
460
462
  },
461
463
  "content": Array [
462
464
  Object {
@@ -9,6 +9,7 @@ Object {
9
9
  "isNumberColumnEnabled": false,
10
10
  "layout": "full-width",
11
11
  "localId": "abc-123",
12
+ "width": null,
12
13
  },
13
14
  "content": Array [
14
15
  Object {
@@ -9,6 +9,7 @@ Object {
9
9
  "isNumberColumnEnabled": false,
10
10
  "layout": "default",
11
11
  "localId": "abc-123",
12
+ "width": null,
12
13
  },
13
14
  "content": Array [
14
15
  Object {
@@ -9,6 +9,7 @@ Object {
9
9
  "isNumberColumnEnabled": false,
10
10
  "layout": "default",
11
11
  "localId": "abc-123",
12
+ "width": null,
12
13
  },
13
14
  "content": Array [
14
15
  Object {
@@ -122,6 +123,7 @@ Object {
122
123
  "isNumberColumnEnabled": false,
123
124
  "layout": "default",
124
125
  "localId": "abc-123",
126
+ "width": null,
125
127
  },
126
128
  "content": Array [
127
129
  Object {
@@ -31,6 +31,7 @@ Object {
31
31
  "isNumberColumnEnabled": false,
32
32
  "layout": "default",
33
33
  "localId": "abc-123",
34
+ "width": null,
34
35
  },
35
36
  "content": Array [
36
37
  Object {
@@ -159,6 +160,7 @@ Object {
159
160
  "isNumberColumnEnabled": false,
160
161
  "layout": "default",
161
162
  "localId": "abc-123",
163
+ "width": null,
162
164
  },
163
165
  "content": Array [
164
166
  Object {
@@ -602,6 +604,7 @@ Object {
602
604
  "isNumberColumnEnabled": false,
603
605
  "layout": "default",
604
606
  "localId": "abc-123",
607
+ "width": null,
605
608
  },
606
609
  "content": Array [
607
610
  Object {
@@ -10,6 +10,7 @@ Object {
10
10
  "isNumberColumnEnabled": false,
11
11
  "layout": "default",
12
12
  "localId": "abc-123",
13
+ "width": null,
13
14
  },
14
15
  "content": Array [
15
16
  Object {
@@ -174,6 +175,7 @@ Object {
174
175
  "isNumberColumnEnabled": false,
175
176
  "layout": "default",
176
177
  "localId": "abc-123",
178
+ "width": null,
177
179
  },
178
180
  "content": Array [
179
181
  Object {
@@ -338,6 +340,7 @@ Object {
338
340
  "isNumberColumnEnabled": false,
339
341
  "layout": "default",
340
342
  "localId": "abc-123",
343
+ "width": null,
341
344
  },
342
345
  "content": Array [
343
346
  Object {
@@ -9,6 +9,7 @@ Object {
9
9
  "isNumberColumnEnabled": false,
10
10
  "layout": "default",
11
11
  "localId": "abc-123",
12
+ "width": null,
12
13
  },
13
14
  "content": Array [
14
15
  Object {
@@ -379,6 +380,7 @@ Object {
379
380
  "isNumberColumnEnabled": false,
380
381
  "layout": "default",
381
382
  "localId": "abc-123",
383
+ "width": null,
382
384
  },
383
385
  "content": Array [
384
386
  Object {
@@ -9,6 +9,7 @@ Object {
9
9
  "isNumberColumnEnabled": false,
10
10
  "layout": "default",
11
11
  "localId": "abc-123",
12
+ "width": null,
12
13
  },
13
14
  "content": Array [
14
15
  Object {
@@ -27,6 +27,7 @@ Object {
27
27
  "isNumberColumnEnabled": false,
28
28
  "layout": "default",
29
29
  "localId": "abc-123",
30
+ "width": null,
30
31
  },
31
32
  "content": Array [
32
33
  Object {