@atlaskit/editor-plugin-table 2.12.1 → 2.12.3

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 (49) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/plugins/table/pm-plugins/table-width.js +2 -1
  3. package/dist/es2019/plugins/table/pm-plugins/table-width.js +3 -2
  4. package/dist/esm/plugins/table/pm-plugins/table-width.js +3 -2
  5. package/dist/types/plugins/table/pm-plugins/table-width.d.ts +1 -1
  6. package/dist/types-ts4.5/plugins/table/pm-plugins/table-width.d.ts +1 -1
  7. package/package.json +3 -3
  8. package/src/__tests__/integration/__snapshots__/change-date-inside-table.ts.snap +1 -1
  9. package/src/__tests__/unit/analytics.ts +5 -5
  10. package/src/__tests__/unit/collab.ts +4 -4
  11. package/src/__tests__/unit/commands/go-to-next-cell.ts +1 -1
  12. package/src/__tests__/unit/commands/insert.ts +1 -1
  13. package/src/__tests__/unit/commands/misc.ts +1 -1
  14. package/src/__tests__/unit/commands/sort.ts +2 -2
  15. package/src/__tests__/unit/commands.ts +4 -4
  16. package/src/__tests__/unit/copy-paste.ts +1 -1
  17. package/src/__tests__/unit/event-handlers/index.ts +1 -1
  18. package/src/__tests__/unit/event-handlers.ts +3 -3
  19. package/src/__tests__/unit/fix-tables.ts +4 -4
  20. package/src/__tests__/unit/get-toolbar-config.ts +4 -4
  21. package/src/__tests__/unit/handlers.ts +1 -1
  22. package/src/__tests__/unit/hover-selection.ts +1 -1
  23. package/src/__tests__/unit/index.ts +5 -5
  24. package/src/__tests__/unit/layout.ts +1 -1
  25. package/src/__tests__/unit/nodeviews/cell.ts +4 -4
  26. package/src/__tests__/unit/nodeviews/table.ts +6 -6
  27. package/src/__tests__/unit/pm-plugins/decorations/column-resizing.ts +1 -1
  28. package/src/__tests__/unit/pm-plugins/decorations/plugin.ts +3 -3
  29. package/src/__tests__/unit/pm-plugins/main.ts +5 -5
  30. package/src/__tests__/unit/pm-plugins/safari-delete-composition-text-issue-workaround.ts +3 -3
  31. package/src/__tests__/unit/pm-plugins/sticky-headers/tableRow.tsx +7 -6
  32. package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +7 -6
  33. package/src/__tests__/unit/sort-column.ts +1 -1
  34. package/src/__tests__/unit/toolbar.ts +6 -3
  35. package/src/__tests__/unit/transforms/delete-columns.ts +1 -1
  36. package/src/__tests__/unit/transforms/delete-rows.ts +1 -1
  37. package/src/__tests__/unit/transforms/merging.ts +1 -1
  38. package/src/__tests__/unit/ui/ContextualMenu.tsx +3 -3
  39. package/src/__tests__/unit/ui/CornerControls.tsx +3 -3
  40. package/src/__tests__/unit/ui/FloatingContextualButton.tsx +7 -8
  41. package/src/__tests__/unit/ui/FloatingContextualMenu.tsx +1 -1
  42. package/src/__tests__/unit/ui/RowControls.tsx +3 -3
  43. package/src/__tests__/unit/ui/TableFloatingControls.tsx +1 -1
  44. package/src/__tests__/unit/undo-redo.ts +4 -4
  45. package/src/__tests__/unit/utils/collapse.ts +3 -3
  46. package/src/__tests__/unit/utils/nodes.ts +3 -3
  47. package/src/__tests__/unit/utils/row-controls.ts +3 -3
  48. package/src/__tests__/unit/utils.ts +1 -1
  49. package/src/plugins/table/pm-plugins/table-width.ts +4 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 2.12.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`35242fb367a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/35242fb367a) - Add custom-table-width feature flag and add width to table node when inserted
8
+
9
+ ## 2.12.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`6acf9830b36`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6acf9830b36) - Update feature flags plugin
14
+ (@atlaskit/editor-plugin-feature-flags) to use a named export
15
+ rather than default export to match other plugins.
16
+
17
+ ```ts
18
+ // Before
19
+ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
20
+
21
+ // After
22
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
23
+ ```
24
+
3
25
  ## 2.12.1
4
26
 
5
27
  ### Patch Changes
@@ -86,9 +86,10 @@ var createPlugin = function createPlugin(dispatch, fullWidthEnabled) {
86
86
  case 'full-width':
87
87
  tableWidthCal = _editorSharedStyles.akEditorFullWidthLayoutWidth;
88
88
  break;
89
- // when in fix-width apprearance, no need to assign value to table width attr
89
+ // when in fix-width appearance, no need to assign value to table width attr
90
90
  // as when table is created, width attr is null by default, table rendered using layout attr
91
91
  default:
92
+ tableWidthCal = _editorSharedStyles.akEditorDefaultLayoutWidth;
92
93
  break;
93
94
  }
94
95
  }
@@ -8,7 +8,7 @@ import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
8
8
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
9
9
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
10
10
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
11
- import { akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
11
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
12
12
  export const pluginKey = new PluginKey('tableWidthPlugin');
13
13
  const createPlugin = (dispatch, fullWidthEnabled) => new SafePlugin({
14
14
  key: pluginKey,
@@ -75,9 +75,10 @@ const createPlugin = (dispatch, fullWidthEnabled) => new SafePlugin({
75
75
  case 'full-width':
76
76
  tableWidthCal = akEditorFullWidthLayoutWidth;
77
77
  break;
78
- // when in fix-width apprearance, no need to assign value to table width attr
78
+ // when in fix-width appearance, no need to assign value to table width attr
79
79
  // as when table is created, width attr is null by default, table rendered using layout attr
80
80
  default:
81
+ tableWidthCal = akEditorDefaultLayoutWidth;
81
82
  break;
82
83
  }
83
84
  }
@@ -13,7 +13,7 @@ import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
13
13
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
14
14
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
15
15
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
16
- import { akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
16
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth } from '@atlaskit/editor-shared-styles';
17
17
  export var pluginKey = new PluginKey('tableWidthPlugin');
18
18
  var createPlugin = function createPlugin(dispatch, fullWidthEnabled) {
19
19
  return new SafePlugin({
@@ -79,9 +79,10 @@ var createPlugin = function createPlugin(dispatch, fullWidthEnabled) {
79
79
  case 'full-width':
80
80
  tableWidthCal = akEditorFullWidthLayoutWidth;
81
81
  break;
82
- // when in fix-width apprearance, no need to assign value to table width attr
82
+ // when in fix-width appearance, no need to assign value to table width attr
83
83
  // as when table is created, width attr is null by default, table rendered using layout attr
84
84
  default:
85
+ tableWidthCal = akEditorDefaultLayoutWidth;
85
86
  break;
86
87
  }
87
88
  }
@@ -3,7 +3,7 @@
3
3
  * Has login to scan the document, add width value to table's width attribute when necessary
4
4
  * Also holds resizing state to hide / show table controls
5
5
  */
6
- import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
6
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
7
7
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
8
8
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
9
9
  type TableWidthPluginState = {
@@ -3,7 +3,7 @@
3
3
  * Has login to scan the document, add width value to table's width attribute when necessary
4
4
  * Also holds resizing state to hide / show table controls
5
5
  */
6
- import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
6
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
7
7
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
8
8
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
9
9
  type TableWidthPluginState = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.12.1",
3
+ "version": "2.12.3",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@atlaskit/adf-schema": "28.1.2",
31
- "@atlaskit/editor-common": "^74.55.0",
31
+ "@atlaskit/editor-common": "^74.56.0",
32
32
  "@atlaskit/editor-palette": "1.5.1",
33
33
  "@atlaskit/editor-plugin-analytics": "^0.2.0",
34
34
  "@atlaskit/editor-plugin-content-insertion": "^0.1.0",
@@ -56,7 +56,7 @@
56
56
  "devDependencies": {
57
57
  "@atlaskit/analytics-next": "^9.1.0",
58
58
  "@atlaskit/editor-plugin-decorations": "^0.2.0",
59
- "@atlaskit/editor-plugin-feature-flags": "^0.2.0",
59
+ "@atlaskit/editor-plugin-feature-flags": "^1.0.0",
60
60
  "@atlaskit/editor-plugin-grid": "^0.2.0",
61
61
  "@atlaskit/editor-plugin-guideline": "^0.5.0",
62
62
  "@atlaskit/editor-plugin-hyperlink": "^0.4.0",
@@ -25,7 +25,7 @@ Object {
25
25
  "content": Array [
26
26
  Object {
27
27
  "attrs": Object {
28
- "timestamp": "1502928000000",
28
+ "timestamp": "1502841600000",
29
29
  },
30
30
  "type": "date",
31
31
  },
@@ -2,18 +2,18 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
3
3
  import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
5
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
5
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
6
6
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
7
7
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
8
- import { Rect } from '@atlaskit/editor-tables/table-map';
8
+ import type { Rect } from '@atlaskit/editor-tables/table-map';
9
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
9
10
  import {
10
11
  createProsemirrorEditorFactory,
11
- LightEditorPlugin,
12
12
  Preset,
13
13
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
14
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
14
15
  import {
15
16
  doc,
16
- DocBuilder,
17
17
  p,
18
18
  table,
19
19
  td,
@@ -45,7 +45,7 @@ import {
45
45
  import { handleCut } from '../../plugins/table/event-handlers';
46
46
  import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
47
47
  import { replaceSelectedTable } from '../../plugins/table/transforms';
48
- import { PluginConfig } from '../../plugins/table/types';
48
+ import type { PluginConfig } from '../../plugins/table/types';
49
49
 
50
50
  const defaultTableDoc = doc(
51
51
  table()(
@@ -1,17 +1,17 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import { removeColumnAt } from '@atlaskit/editor-tables/utils';
7
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
7
8
  import {
8
9
  createProsemirrorEditorFactory,
9
- LightEditorPlugin,
10
10
  Preset,
11
11
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
12
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
12
13
  import {
13
14
  doc,
14
- DocBuilder,
15
15
  p,
16
16
  table,
17
17
  td,
@@ -22,7 +22,7 @@ import {
22
22
  import tablePlugin from '../../plugins/table-plugin';
23
23
  import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
24
24
  import { setResizeHandlePos } from '../../plugins/table/pm-plugins/table-resizing/commands';
25
- import { PluginConfig } from '../../plugins/table/types';
25
+ import type { PluginConfig } from '../../plugins/table/types';
26
26
 
27
27
  const TABLE_LOCAL_ID = 'test-table-local-id';
28
28
 
@@ -1,7 +1,7 @@
1
1
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
2
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
4
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
6
6
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
7
7
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -1,7 +1,7 @@
1
1
  import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
2
2
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
4
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
6
6
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
7
7
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -1,7 +1,7 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
3
  import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
6
6
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
7
7
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -2,12 +2,12 @@ import { uuid } from '@atlaskit/adf-schema';
2
2
  import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
3
3
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
5
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
5
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
6
6
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
7
7
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
8
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
8
9
  import {
9
10
  createProsemirrorEditorFactory,
10
- LightEditorPlugin,
11
11
  Preset,
12
12
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
13
13
  import {
@@ -4,24 +4,24 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
4
4
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
5
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
6
6
  import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
7
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
7
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
8
  import { gridPlugin } from '@atlaskit/editor-plugin-grid';
9
9
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
10
10
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
11
11
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
12
12
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
14
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
14
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
15
15
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
16
16
  import { isRowSelected } from '@atlaskit/editor-tables/utils';
17
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
17
18
  import {
18
19
  createProsemirrorEditorFactory,
19
- LightEditorPlugin,
20
20
  Preset,
21
21
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
22
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
22
23
  import {
23
24
  doc,
24
- DocBuilder,
25
25
  p,
26
26
  panelNote,
27
27
  table,
@@ -4,7 +4,7 @@ import { uuid } from '@atlaskit/adf-schema';
4
4
  import { transformSliceToRemoveOpenExpand } from '@atlaskit/editor-common/transforms';
5
5
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
6
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
7
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
7
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
8
8
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
9
9
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
10
10
  import type {
@@ -1,6 +1,6 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -1,19 +1,19 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
3
  import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
4
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import { gridPlugin } from '@atlaskit/editor-plugin-grid';
6
6
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
7
7
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
8
8
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
9
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
9
10
  import {
10
11
  createProsemirrorEditorFactory,
11
- LightEditorPlugin,
12
12
  Preset,
13
13
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
14
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
14
15
  import {
15
16
  doc,
16
- DocBuilder,
17
17
  p,
18
18
  table,
19
19
  td,
@@ -1,16 +1,16 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
6
7
  import {
7
8
  createProsemirrorEditorFactory,
8
- LightEditorPlugin,
9
9
  Preset,
10
10
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
11
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
11
12
  import {
12
13
  doc,
13
- DocBuilder,
14
14
  p,
15
15
  table,
16
16
  td,
@@ -20,7 +20,7 @@ import {
20
20
 
21
21
  import tablePlugin from '../../plugins/table-plugin';
22
22
  import { pluginKey as tablePluginKey } from '../../plugins/table/pm-plugins/plugin-key';
23
- import { PluginConfig } from '../../plugins/table/types';
23
+ import type { PluginConfig } from '../../plugins/table/types';
24
24
 
25
25
  const TABLE_LOCAL_ID = 'test-table-local-id';
26
26
 
@@ -7,18 +7,18 @@ import type {
7
7
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
8
8
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
9
9
  import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
10
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
10
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
11
11
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
12
12
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
13
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
13
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
14
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
14
15
  import {
15
16
  createProsemirrorEditorFactory,
16
- LightEditorPlugin,
17
17
  Preset,
18
18
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
19
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
19
20
  import {
20
21
  doc,
21
- DocBuilder,
22
22
  p,
23
23
  table,
24
24
  tdCursor,
@@ -1,6 +1,6 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -1,6 +1,6 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -3,27 +3,27 @@ import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types';
3
3
  import { setNodeSelection } from '@atlaskit/editor-common/utils';
4
4
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
5
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
6
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
6
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
7
7
  import { gridPlugin } from '@atlaskit/editor-plugin-grid';
8
8
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
9
9
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
10
10
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
11
11
  import { uuid as tablesUuid } from '@atlaskit/editor-tables';
12
- import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
12
+ import type { CellSelection } from '@atlaskit/editor-tables/cell-selection';
13
13
  import { TableMap } from '@atlaskit/editor-tables/table-map';
14
14
  import {
15
15
  selectColumn,
16
16
  selectRow,
17
17
  selectTable,
18
18
  } from '@atlaskit/editor-tables/utils';
19
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
19
20
  import {
20
21
  createProsemirrorEditorFactory,
21
- LightEditorPlugin,
22
22
  Preset,
23
23
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
24
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
24
25
  import {
25
26
  doc,
26
- DocBuilder,
27
27
  media,
28
28
  mediaGroup,
29
29
  p,
@@ -49,7 +49,7 @@ import {
49
49
  } from '../../plugins/table/commands';
50
50
  import { getPluginState } from '../../plugins/table/pm-plugins/plugin-factory';
51
51
  import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
52
- import { PluginConfig } from '../../plugins/table/types';
52
+ import type { PluginConfig } from '../../plugins/table/types';
53
53
  import {
54
54
  checkIfHeaderColumnEnabled,
55
55
  checkIfHeaderRowEnabled,
@@ -2,7 +2,7 @@ import type { TableLayout } from '@atlaskit/adf-schema';
2
2
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
4
4
  import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
5
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
5
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
6
6
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
7
7
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
8
8
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -5,21 +5,21 @@ import {
5
5
  } from '@atlaskit/adf-schema';
6
6
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
7
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
8
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
9
9
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
10
10
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
11
11
  import {
12
12
  findCellClosestToPos,
13
13
  setCellAttrs,
14
14
  } from '@atlaskit/editor-tables/utils';
15
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
15
16
  import {
16
17
  createProsemirrorEditorFactory,
17
- LightEditorPlugin,
18
18
  Preset,
19
19
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
20
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
20
21
  import {
21
22
  doc,
22
- DocBuilder,
23
23
  p,
24
24
  table,
25
25
  td,
@@ -30,7 +30,7 @@ import {
30
30
  import tablePlugin from '../../../plugins/table-plugin';
31
31
  import TableCellViews from '../../../plugins/table/nodeviews/tableCell';
32
32
  import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
33
- import { PluginConfig } from '../../../plugins/table/types';
33
+ import type { PluginConfig } from '../../../plugins/table/types';
34
34
 
35
35
  jest.mock('@atlaskit/editor-common/utils', () => ({
36
36
  ...jest.requireActual<Object>('@atlaskit/editor-common/utils'),
@@ -1,19 +1,19 @@
1
- import { TableAttributes } from '@atlaskit/adf-schema';
1
+ import type { TableAttributes } from '@atlaskit/adf-schema';
2
2
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
4
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
6
6
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
7
- import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
8
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
7
+ import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
8
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
9
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
9
10
  import {
10
11
  createProsemirrorEditorFactory,
11
- LightEditorPlugin,
12
12
  Preset,
13
13
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
14
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
14
15
  import {
15
16
  doc,
16
- DocBuilder,
17
17
  p,
18
18
  table,
19
19
  td,
@@ -1,6 +1,6 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -1,19 +1,19 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import { Selection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
8
8
  import { addColumnAt } from '@atlaskit/editor-tables/utils';
9
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
9
10
  import {
10
11
  createProsemirrorEditorFactory,
11
- LightEditorPlugin,
12
12
  Preset,
13
13
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
14
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
14
15
  import {
15
16
  doc,
16
- DocBuilder,
17
17
  table,
18
18
  tdCursor,
19
19
  tdEmpty,
@@ -1,20 +1,20 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import { undo } from '@atlaskit/editor-prosemirror/history';
7
- import { NodeType } from '@atlaskit/editor-prosemirror/model';
8
- import { Selection } from '@atlaskit/editor-prosemirror/state';
7
+ import type { NodeType } from '@atlaskit/editor-prosemirror/model';
8
+ import type { Selection } from '@atlaskit/editor-prosemirror/state';
9
9
  import * as pmUtils from '@atlaskit/editor-prosemirror/utils';
10
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
10
11
  import {
11
12
  createProsemirrorEditorFactory,
12
- LightEditorPlugin,
13
13
  Preset,
14
14
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
15
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
15
16
  import {
16
17
  doc,
17
- DocBuilder,
18
18
  p,
19
19
  table,
20
20
  tdCursor,
@@ -1,16 +1,16 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
6
7
  import {
7
8
  createProsemirrorEditorFactory,
8
- LightEditorPlugin,
9
9
  Preset,
10
10
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
11
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
11
12
  import {
12
13
  doc,
13
- DocBuilder,
14
14
  p,
15
15
  table,
16
16
  td,
@@ -1,25 +1,26 @@
1
1
  import React from 'react';
2
2
 
3
3
  import { render, screen } from '@testing-library/react';
4
- import createStub, { Stub } from 'raf-stub';
4
+ import type { Stub } from 'raf-stub';
5
+ import createStub from 'raf-stub';
5
6
 
6
7
  import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
7
8
  import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
8
9
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
9
10
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
10
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
11
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
11
12
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
12
13
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
13
- import { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
14
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
14
+ import type { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
15
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
16
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
15
17
  import {
16
18
  createProsemirrorEditorFactory,
17
- LightEditorPlugin,
18
19
  Preset,
19
20
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
21
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
20
22
  import {
21
23
  doc,
22
- DocBuilder,
23
24
  table,
24
25
  tdEmpty,
25
26
  thEmpty,
@@ -3,26 +3,27 @@ import {
3
3
  EVENT_TYPE,
4
4
  TABLE_ACTION,
5
5
  } from '@atlaskit/editor-common/analytics';
6
- import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
6
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
7
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
8
8
  import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
9
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
9
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
10
10
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
11
11
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
12
- import { EditorState, TextSelection } from '@atlaskit/editor-prosemirror/state';
13
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
12
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
13
+ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
14
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
14
15
  import {
15
16
  akEditorDefaultLayoutWidth,
16
17
  akEditorFullPageMaxWidth,
17
18
  } from '@atlaskit/editor-shared-styles/consts';
19
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
18
20
  import {
19
21
  createProsemirrorEditorFactory,
20
- LightEditorPlugin,
21
22
  Preset,
22
23
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
24
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
23
25
  import {
24
26
  doc,
25
- DocBuilder,
26
27
  p,
27
28
  table,
28
29
  td,
@@ -2,7 +2,7 @@ import { uuid } from '@atlaskit/adf-schema';
2
2
  import { TableSortOrder as SortOrder } from '@atlaskit/adf-schema/steps';
3
3
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
5
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
5
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
6
6
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
7
7
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
8
8
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -5,14 +5,14 @@ import type {
5
5
  } from '@atlaskit/editor-common/types';
6
6
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
7
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
8
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
9
9
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
10
10
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
11
11
  import { Rect } from '@atlaskit/editor-tables/table-map';
12
12
  import { splitCell } from '@atlaskit/editor-tables/utils';
13
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
13
14
  import {
14
15
  createProsemirrorEditorFactory,
15
- LightEditorPlugin,
16
16
  Preset,
17
17
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
18
18
  import {
@@ -35,7 +35,10 @@ import {
35
35
  getToolbarMenuConfig,
36
36
  } from '../../plugins/table/toolbar';
37
37
  import { canMergeCells } from '../../plugins/table/transforms';
38
- import { ToolbarMenuConfig, ToolbarMenuState } from '../../plugins/table/types';
38
+ import type {
39
+ ToolbarMenuConfig,
40
+ ToolbarMenuState,
41
+ } from '../../plugins/table/types';
39
42
  import { getMergedCellsPositions } from '../../plugins/table/utils';
40
43
 
41
44
  jest.mock('@atlaskit/editor-tables/utils');
@@ -1,7 +1,7 @@
1
1
  import { uuid } from '@atlaskit/adf-schema';
2
2
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
4
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
6
6
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
7
7
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -1,7 +1,7 @@
1
1
  import { uuid } from '@atlaskit/adf-schema';
2
2
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
4
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
6
6
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
7
7
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -1,7 +1,7 @@
1
1
  import { uuid } from '@atlaskit/adf-schema';
2
2
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
4
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
6
6
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
7
7
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -5,13 +5,13 @@ import { createIntl } from 'react-intl-next';
5
5
 
6
6
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
7
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
8
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
9
9
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
10
10
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
11
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
11
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
12
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
12
13
  import {
13
14
  createProsemirrorEditorFactory,
14
- LightEditorPlugin,
15
15
  Preset,
16
16
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
17
17
  import {
@@ -5,18 +5,18 @@ import { IntlProvider } from 'react-intl-next';
5
5
 
6
6
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
7
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
8
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
9
9
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
10
10
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
11
11
  import { isTableSelected } from '@atlaskit/editor-tables/utils';
12
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
12
13
  import {
13
14
  createProsemirrorEditorFactory,
14
- LightEditorPlugin,
15
15
  Preset,
16
16
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
17
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
17
18
  import {
18
19
  doc,
19
- DocBuilder,
20
20
  table,
21
21
  thEmpty,
22
22
  tr,
@@ -3,23 +3,23 @@ import React from 'react';
3
3
  import { render, screen } from '@testing-library/react';
4
4
  import { IntlProvider } from 'react-intl-next';
5
5
 
6
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
6
+ import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
7
7
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
8
8
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
9
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
9
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
10
10
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
11
11
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
12
12
  import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
13
13
  import * as prosemirrorUtils from '@atlaskit/editor-prosemirror/utils';
14
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
14
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
15
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
15
16
  import {
16
17
  createProsemirrorEditorFactory,
17
- LightEditorPlugin,
18
18
  Preset,
19
19
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
20
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
20
21
  import {
21
22
  doc,
22
- DocBuilder,
23
23
  table,
24
24
  tdCursor,
25
25
  tdEmpty,
@@ -28,9 +28,8 @@ import {
28
28
  } from '@atlaskit/editor-test-helpers/doc-builder';
29
29
 
30
30
  import tablePlugin from '../../../plugins/table-plugin';
31
- import FloatingContextualButton, {
32
- Props as FloatingContextualButtonProps,
33
- } from '../../../plugins/table/ui/FloatingContextualButton';
31
+ import type { Props as FloatingContextualButtonProps } from '../../../plugins/table/ui/FloatingContextualButton';
32
+ import FloatingContextualButton from '../../../plugins/table/ui/FloatingContextualButton';
34
33
 
35
34
  jest.mock('@atlaskit/editor-prosemirror/utils', () => {
36
35
  // Unblock prosemirror bump:
@@ -5,7 +5,7 @@ import { IntlProvider } from 'react-intl-next';
5
5
 
6
6
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
7
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
8
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
9
9
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
10
10
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
11
11
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
@@ -6,18 +6,18 @@ import { IntlProvider } from 'react-intl-next';
6
6
  import { setTextSelection } from '@atlaskit/editor-common/utils';
7
7
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
8
8
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
9
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
9
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
10
10
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
11
11
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
12
12
  import { getSelectionRect, selectRow } from '@atlaskit/editor-tables/utils';
13
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
13
14
  import {
14
15
  createProsemirrorEditorFactory,
15
- LightEditorPlugin,
16
16
  Preset,
17
17
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
18
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
18
19
  import {
19
20
  doc,
20
- DocBuilder,
21
21
  p,
22
22
  table,
23
23
  td,
@@ -5,7 +5,7 @@ import { IntlProvider } from 'react-intl-next';
5
5
 
6
6
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
7
7
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
8
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
8
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
9
9
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
10
10
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
11
11
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -2,19 +2,19 @@ import clone from 'lodash/clone';
2
2
 
3
3
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
4
4
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
5
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
5
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
6
6
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
7
7
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
8
8
  import { redo, undo } from '@atlaskit/editor-prosemirror/history';
9
- import { EditorView } from '@atlaskit/editor-prosemirror/view';
9
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
10
11
  import {
11
12
  createProsemirrorEditorFactory,
12
- LightEditorPlugin,
13
13
  Preset,
14
14
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
15
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
15
16
  import {
16
17
  doc,
17
- DocBuilder,
18
18
  p,
19
19
  table,
20
20
  td,
@@ -1,16 +1,16 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
6
7
  import {
7
8
  createProsemirrorEditorFactory,
8
- LightEditorPlugin,
9
9
  Preset,
10
10
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
11
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
11
12
  import {
12
13
  doc,
13
- DocBuilder,
14
14
  table,
15
15
  tdEmpty,
16
16
  tr,
@@ -1,17 +1,17 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import { findTable } from '@atlaskit/editor-tables/utils';
7
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
7
8
  import {
8
9
  createProsemirrorEditorFactory,
9
- LightEditorPlugin,
10
10
  Preset,
11
11
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
12
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
12
13
  import {
13
14
  doc,
14
- DocBuilder,
15
15
  p,
16
16
  table,
17
17
  tdCursor,
@@ -1,19 +1,19 @@
1
1
  import { uuid } from '@atlaskit/adf-schema';
2
2
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
3
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
4
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
4
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
5
5
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
6
6
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
7
7
  import { TableMap } from '@atlaskit/editor-tables/table-map';
8
8
  import { findTable } from '@atlaskit/editor-tables/utils';
9
+ import type { LightEditorPlugin } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
9
10
  import {
10
11
  createProsemirrorEditorFactory,
11
- LightEditorPlugin,
12
12
  Preset,
13
13
  } from '@atlaskit/editor-test-helpers/create-prosemirror-editor';
14
+ import type { DocBuilder } from '@atlaskit/editor-test-helpers/doc-builder';
14
15
  import {
15
16
  doc,
16
- DocBuilder,
17
17
  p,
18
18
  tr as row,
19
19
  table,
@@ -1,6 +1,6 @@
1
1
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
2
2
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
3
- import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
3
+ import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
4
4
  import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
5
5
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
6
6
  import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -5,11 +5,12 @@
5
5
  */
6
6
 
7
7
  import { SetAttrsStep } from '@atlaskit/adf-schema/steps';
8
- import { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
8
+ import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
9
9
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
10
10
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
11
11
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
12
12
  import {
13
+ akEditorDefaultLayoutWidth,
13
14
  akEditorFullWidthLayoutWidth,
14
15
  akEditorWideLayoutWidth,
15
16
  } from '@atlaskit/editor-shared-styles';
@@ -106,9 +107,10 @@ const createPlugin = (dispatch: Dispatch, fullWidthEnabled: boolean) =>
106
107
  case 'full-width':
107
108
  tableWidthCal = akEditorFullWidthLayoutWidth;
108
109
  break;
109
- // when in fix-width apprearance, no need to assign value to table width attr
110
+ // when in fix-width appearance, no need to assign value to table width attr
110
111
  // as when table is created, width attr is null by default, table rendered using layout attr
111
112
  default:
113
+ tableWidthCal = akEditorDefaultLayoutWidth;
112
114
  break;
113
115
  }
114
116
  }