@atlaskit/editor-plugin-table 7.6.6 → 7.6.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 (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/dist/cjs/commands/column-resize.js +6 -6
  4. package/dist/cjs/nodeviews/TableComponent.js +4 -3
  5. package/dist/cjs/nodeviews/TableResizer.js +15 -46
  6. package/dist/cjs/pm-plugins/table-selection-keymap.js +2 -4
  7. package/dist/cjs/ui/ui-styles.js +1 -1
  8. package/dist/es2019/commands/column-resize.js +6 -6
  9. package/dist/es2019/nodeviews/TableComponent.js +4 -3
  10. package/dist/es2019/nodeviews/TableResizer.js +15 -43
  11. package/dist/es2019/pm-plugins/table-selection-keymap.js +2 -4
  12. package/dist/es2019/ui/ui-styles.js +5 -7
  13. package/dist/esm/commands/column-resize.js +6 -6
  14. package/dist/esm/nodeviews/TableComponent.js +4 -3
  15. package/dist/esm/nodeviews/TableResizer.js +15 -46
  16. package/dist/esm/pm-plugins/table-selection-keymap.js +2 -4
  17. package/dist/esm/ui/ui-styles.js +2 -2
  18. package/dist/types/plugin.d.ts +2 -0
  19. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +18 -2
  20. package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +36 -4
  21. package/dist/types/ui/TableFloatingControls/index.d.ts +18 -2
  22. package/dist/types-ts4.5/plugin.d.ts +2 -0
  23. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +20 -0
  24. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +40 -0
  25. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +20 -0
  26. package/package.json +5 -10
  27. package/src/commands/column-resize.ts +11 -10
  28. package/src/nodeviews/TableComponent.tsx +3 -6
  29. package/src/nodeviews/TableResizer.tsx +18 -60
  30. package/src/plugin.tsx +2 -0
  31. package/src/pm-plugins/table-selection-keymap.ts +10 -12
  32. package/src/ui/ui-styles.ts +5 -28
  33. package/tsconfig.app.json +3 -0
@@ -30,7 +30,15 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
30
30
  commands: {
31
31
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
32
32
  };
33
- dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
33
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
34
+ dependencies: [];
35
+ actions: {
36
+ ariaNotify: (message: string) => void;
37
+ };
38
+ sharedState: {
39
+ message: string;
40
+ };
41
+ }, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
34
42
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
35
43
  sharedState: {
36
44
  createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
@@ -80,7 +88,15 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
80
88
  sharedState: any;
81
89
  actions: any;
82
90
  }, any>>];
83
- }, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
91
+ }, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
92
+ dependencies: [];
93
+ actions: {
94
+ ariaNotify: (message: string) => void;
95
+ };
96
+ sharedState: {
97
+ message: string;
98
+ };
99
+ }, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
84
100
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
85
101
  sharedState: {
86
102
  createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
@@ -11,7 +11,15 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
11
11
  commands: {
12
12
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
13
13
  };
14
- dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
14
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
15
+ dependencies: [];
16
+ actions: {
17
+ ariaNotify: (message: string) => void;
18
+ };
19
+ sharedState: {
20
+ message: string;
21
+ };
22
+ }, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
15
23
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
16
24
  sharedState: {
17
25
  createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
@@ -61,7 +69,15 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
61
69
  sharedState: any;
62
70
  actions: any;
63
71
  }, any>>];
64
- }, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
72
+ }, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
73
+ dependencies: [];
74
+ actions: {
75
+ ariaNotify: (message: string) => void;
76
+ };
77
+ sharedState: {
78
+ message: string;
79
+ };
80
+ }, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
65
81
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
66
82
  sharedState: {
67
83
  createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
@@ -122,7 +138,15 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
122
138
  commands: {
123
139
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
124
140
  };
125
- dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
141
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
142
+ dependencies: [];
143
+ actions: {
144
+ ariaNotify: (message: string) => void;
145
+ };
146
+ sharedState: {
147
+ message: string;
148
+ };
149
+ }, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
126
150
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
127
151
  sharedState: {
128
152
  createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
@@ -172,7 +196,15 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
172
196
  sharedState: any;
173
197
  actions: any;
174
198
  }, any>>];
175
- }, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
199
+ }, import("../../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
200
+ dependencies: [];
201
+ actions: {
202
+ ariaNotify: (message: string) => void;
203
+ };
204
+ sharedState: {
205
+ message: string;
206
+ };
207
+ }, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
176
208
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
177
209
  sharedState: {
178
210
  createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
@@ -39,7 +39,15 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
39
39
  commands: {
40
40
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
41
41
  };
42
- dependencies: [import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
42
+ dependencies: [import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
43
+ dependencies: [];
44
+ actions: {
45
+ ariaNotify: (message: string) => void;
46
+ };
47
+ sharedState: {
48
+ message: string;
49
+ };
50
+ }, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
43
51
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
44
52
  sharedState: {
45
53
  createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
@@ -89,7 +97,15 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
89
97
  sharedState: any;
90
98
  actions: any;
91
99
  }, any>>];
92
- }, import("../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
100
+ }, import("../../plugin").TablePluginOptions | undefined>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
101
+ dependencies: [];
102
+ actions: {
103
+ ariaNotify: (message: string) => void;
104
+ };
105
+ sharedState: {
106
+ message: string;
107
+ };
108
+ }, undefined>>, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
93
109
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
94
110
  sharedState: {
95
111
  createAnalyticsEvent: import("@atlaskit/analytics-next").CreateUIAnalyticsEvent | null;
@@ -1,6 +1,7 @@
1
1
  import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
2
2
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
3
  import type { Command, EditorCommand, GetEditorFeatureFlags, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
4
+ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibility-utils';
4
5
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
5
6
  import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
6
7
  import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
@@ -35,6 +36,7 @@ export type TablePlugin = NextEditorPlugin<'table', {
35
36
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: INPUT_METHOD.PICKER) => EditorCommand;
36
37
  };
37
38
  dependencies: [
39
+ OptionalPlugin<AccessibilityUtilsPlugin>,
38
40
  AnalyticsPlugin,
39
41
  ContentInsertionPlugin,
40
42
  WidthPlugin,
@@ -32,6 +32,16 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
32
32
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
33
33
  };
34
34
  dependencies: [
35
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
36
+ dependencies: [
37
+ ];
38
+ actions: {
39
+ ariaNotify: (message: string) => void;
40
+ };
41
+ sharedState: {
42
+ message: string;
43
+ };
44
+ }, undefined>>,
35
45
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
36
46
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
37
47
  sharedState: {
@@ -97,6 +107,16 @@ export declare const ColumnControls: ({ editorView, tableActive, tableRef, hover
97
107
  }, any>>
98
108
  ];
99
109
  }, import("../../../plugin").TablePluginOptions | undefined>,
110
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
111
+ dependencies: [
112
+ ];
113
+ actions: {
114
+ ariaNotify: (message: string) => void;
115
+ };
116
+ sharedState: {
117
+ message: string;
118
+ };
119
+ }, undefined>>,
100
120
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
101
121
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
102
122
  sharedState: {
@@ -13,6 +13,16 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
13
13
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
14
14
  };
15
15
  dependencies: [
16
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
17
+ dependencies: [
18
+ ];
19
+ actions: {
20
+ ariaNotify: (message: string) => void;
21
+ };
22
+ sharedState: {
23
+ message: string;
24
+ };
25
+ }, undefined>>,
16
26
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
17
27
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
18
28
  sharedState: {
@@ -78,6 +88,16 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
78
88
  }, any>>
79
89
  ];
80
90
  }, import("../../../plugin").TablePluginOptions | undefined>,
91
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
92
+ dependencies: [
93
+ ];
94
+ actions: {
95
+ ariaNotify: (message: string) => void;
96
+ };
97
+ sharedState: {
98
+ message: string;
99
+ };
100
+ }, undefined>>,
81
101
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
82
102
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
83
103
  sharedState: {
@@ -155,6 +175,16 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
155
175
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
156
176
  };
157
177
  dependencies: [
178
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
179
+ dependencies: [
180
+ ];
181
+ actions: {
182
+ ariaNotify: (message: string) => void;
183
+ };
184
+ sharedState: {
185
+ message: string;
186
+ };
187
+ }, undefined>>,
158
188
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
159
189
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
160
190
  sharedState: {
@@ -220,6 +250,16 @@ export declare const DragCornerControlsWithSelection: React.FC<import("react-int
220
250
  }, any>>
221
251
  ];
222
252
  }, import("../../../plugin").TablePluginOptions | undefined>,
253
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
254
+ dependencies: [
255
+ ];
256
+ actions: {
257
+ ariaNotify: (message: string) => void;
258
+ };
259
+ sharedState: {
260
+ message: string;
261
+ };
262
+ }, undefined>>,
223
263
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
224
264
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
225
265
  sharedState: {
@@ -41,6 +41,16 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
41
41
  insertTableWithSize: (rowsCount: number, colsCount: number, inputMethod?: import("@atlaskit/editor-common/analytics").INPUT_METHOD.PICKER | undefined) => import("@atlaskit/editor-common/types").EditorCommand;
42
42
  };
43
43
  dependencies: [
44
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
45
+ dependencies: [
46
+ ];
47
+ actions: {
48
+ ariaNotify: (message: string) => void;
49
+ };
50
+ sharedState: {
51
+ message: string;
52
+ };
53
+ }, undefined>>,
44
54
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
45
55
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
46
56
  sharedState: {
@@ -106,6 +116,16 @@ export declare const TableFloatingControls: ({ editorView, tableRef, tableNode,
106
116
  }, any>>
107
117
  ];
108
118
  }, import("../../plugin").TablePluginOptions | undefined>,
119
+ import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"accessibilityUtils", {
120
+ dependencies: [
121
+ ];
122
+ actions: {
123
+ ariaNotify: (message: string) => void;
124
+ };
125
+ sharedState: {
126
+ message: string;
127
+ };
128
+ }, undefined>>,
109
129
  import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"analytics", {
110
130
  pluginConfiguration: import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions;
111
131
  sharedState: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "7.6.6",
3
+ "version": "7.6.8",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,8 +30,9 @@
30
30
  "dependencies": {
31
31
  "@atlaskit/adf-schema": "^35.8.0",
32
32
  "@atlaskit/custom-steps": "^0.0.17",
33
- "@atlaskit/editor-common": "^78.22.0",
33
+ "@atlaskit/editor-common": "^78.23.0",
34
34
  "@atlaskit/editor-palette": "1.5.3",
35
+ "@atlaskit/editor-plugin-accessibility-utils": "^1.0.0",
35
36
  "@atlaskit/editor-plugin-analytics": "^1.0.0",
36
37
  "@atlaskit/editor-plugin-content-insertion": "^1.0.0",
37
38
  "@atlaskit/editor-plugin-guideline": "^1.0.0",
@@ -46,10 +47,10 @@
46
47
  "@atlaskit/pragmatic-drag-and-drop": "^1.1.0",
47
48
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.0.0",
48
49
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
49
- "@atlaskit/primitives": "^5.2.0",
50
+ "@atlaskit/primitives": "^5.5.0",
50
51
  "@atlaskit/theme": "^12.7.0",
51
52
  "@atlaskit/toggle": "^13.0.0",
52
- "@atlaskit/tokens": "^1.42.0",
53
+ "@atlaskit/tokens": "^1.43.0",
53
54
  "@atlaskit/tooltip": "^18.1.0",
54
55
  "@babel/runtime": "^7.0.0",
55
56
  "@emotion/react": "^11.7.1",
@@ -116,9 +117,6 @@
116
117
  "platform.editor.resizing-table-height-improvement": {
117
118
  "type": "boolean"
118
119
  },
119
- "platform.editor.table.increase-shadow-visibility_lh89r": {
120
- "type": "boolean"
121
- },
122
120
  "platform.editor.table.shift-arrowup-fix": {
123
121
  "type": "boolean"
124
122
  },
@@ -128,9 +126,6 @@
128
126
  "platform.editor.a11y-table-resizing_uapcv": {
129
127
  "type": "boolean"
130
128
  },
131
- "platform.editor.a11y.table-selection_9uv33": {
132
- "type": "boolean"
133
- },
134
129
  "platform.editor.menu.group-items": {
135
130
  "type": "boolean"
136
131
  },
@@ -203,22 +203,23 @@ export const activateNextResizeArea =
203
203
  );
204
204
 
205
205
  const $nextCell = nextCell($currentCell, 'horiz', direction);
206
- if (ariaNotify && getIntl) {
207
- let columnDirection = '';
208
206
 
207
+ if (ariaNotify && getIntl) {
209
208
  if (direction === 1) {
210
- columnDirection = getIntl().formatMessage(messages.columnRightResize);
209
+ ariaNotify(
210
+ getIntl().formatMessage(messages.focusedOtherResize, {
211
+ direction: 'right',
212
+ }),
213
+ );
211
214
  }
212
215
 
213
216
  if (direction === -1) {
214
- columnDirection = getIntl().formatMessage(messages.columnLeftResize);
217
+ ariaNotify(
218
+ getIntl().formatMessage(messages.focusedOtherResize, {
219
+ direction: 'left',
220
+ }),
221
+ );
215
222
  }
216
-
217
- ariaNotify(
218
- getIntl().formatMessage(messages.focusedOtherResize, {
219
- direction: columnDirection,
220
- }),
221
- );
222
223
  }
223
224
 
224
225
  if ($nextCell) {
@@ -797,13 +797,10 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
797
797
  position: 'absolute',
798
798
  right: getBooleanFF('platform.editor.custom-table-width')
799
799
  ? `${
800
- getBooleanFF(
801
- 'platform.editor.table.increase-shadow-visibility_lh89r',
802
- )
803
- ? token('space.400', '32px') // tableOverflowShadowWidthWide
804
- : token('space.100', '8px') // tableOverflowShadowWidth
800
+ token('space.400', '32px') // tableOverflowShadowWidthWide
805
801
  }`
806
- : token('space.negative.025', '-2px'),
802
+ : // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
803
+ '22px',
807
804
  }}
808
805
  >
809
806
  <div
@@ -8,7 +8,6 @@ import React, {
8
8
  useState,
9
9
  } from 'react';
10
10
 
11
- import debounce from 'lodash/debounce';
12
11
  import rafSchd from 'raf-schd';
13
12
  import { useIntl } from 'react-intl-next';
14
13
 
@@ -90,9 +89,6 @@ export interface TableResizerImprovementProps extends TableResizerProps {
90
89
 
91
90
  type ResizerNextHandler = React.ElementRef<typeof ResizerNext>;
92
91
 
93
- type ResizeAction = 'increase' | 'decrease' | 'none';
94
-
95
- const DEBOUNCE_TIME_FOR_SCREEN_READER_ANNOUNCER = 1000;
96
92
  const RESIZE_STEP_VALUE = 10;
97
93
 
98
94
  const handles = { right: true };
@@ -189,26 +185,7 @@ export const TableResizer = ({
189
185
  const updateTooltip = React.useRef<() => void>();
190
186
  const [snappingEnabled, setSnappingEnabled] = useState(false);
191
187
 
192
- // we don't want to update aria-live region on each width change, it might provide bad experience for screen reader users
193
- const [screenReaderResizeInformation, setScreenReaderResizeInformation] =
194
- useState<{
195
- type: ResizeAction;
196
- width: number;
197
- }>({
198
- type: 'none',
199
- width,
200
- });
201
-
202
188
  const { formatMessage } = useIntl();
203
- const screenReaderResizeAnnouncerMessages = {
204
- increase: formatMessage(messages.tableSizeIncreaseScreenReaderInformation, {
205
- newWidth: screenReaderResizeInformation.width,
206
- }),
207
- decrease: formatMessage(messages.tableSizeDecreaseScreenReaderInformation, {
208
- newWidth: screenReaderResizeInformation.width,
209
- }),
210
- none: '',
211
- };
212
189
 
213
190
  const isTableSelected =
214
191
  findTable(editorView.state?.selection)?.pos === getPos();
@@ -453,6 +430,22 @@ export const TableResizer = ({
453
430
  displayGapCursor(true);
454
431
  dispatch(tr);
455
432
 
433
+ if (getBooleanFF('platform.editor.a11y-table-resizing_uapcv')) {
434
+ if (delta.width < 0) {
435
+ pluginInjectionApi?.accessibilityUtils?.actions.ariaNotify(
436
+ formatMessage(messages.tableSizeDecreaseScreenReaderInformation, {
437
+ newWidth: newWidth,
438
+ }),
439
+ );
440
+ } else if (delta.width > 0) {
441
+ pluginInjectionApi?.accessibilityUtils?.actions.ariaNotify(
442
+ formatMessage(messages.tableSizeIncreaseScreenReaderInformation, {
443
+ newWidth: newWidth,
444
+ }),
445
+ );
446
+ }
447
+ }
448
+
456
449
  // Hide guidelines when resizing stops
457
450
  displayGuideline([]);
458
451
  updateWidth(newWidth);
@@ -481,6 +474,8 @@ export const TableResizer = ({
481
474
  onResizeStop,
482
475
  isTableScalingEnabled,
483
476
  widthToWidest,
477
+ formatMessage,
478
+ pluginInjectionApi,
484
479
  ],
485
480
  );
486
481
 
@@ -599,34 +594,6 @@ export const TableResizer = ({
599
594
  }
600
595
  }, [width]);
601
596
 
602
- useEffect(() => {
603
- if (getBooleanFF('platform.editor.a11y-table-resizing_uapcv')) {
604
- const debouncedSetWidth = debounce(
605
- setScreenReaderResizeInformation,
606
- DEBOUNCE_TIME_FOR_SCREEN_READER_ANNOUNCER,
607
- );
608
- debouncedSetWidth((prevState) => {
609
- let type: ResizeAction = 'none';
610
- if (prevState.width > width) {
611
- type = 'decrease';
612
- }
613
-
614
- if (prevState.width < width) {
615
- type = 'increase';
616
- }
617
-
618
- return {
619
- type,
620
- width,
621
- };
622
- });
623
-
624
- return () => {
625
- debouncedSetWidth.cancel();
626
- };
627
- }
628
- }, [width]);
629
-
630
597
  return (
631
598
  <>
632
599
  <ResizerNext
@@ -667,15 +634,6 @@ export const TableResizer = ({
667
634
  >
668
635
  {children}
669
636
  </ResizerNext>
670
- {getBooleanFF('platform.editor.a11y-table-resizing_uapcv') && (
671
- <div className="assistive" role="status">
672
- {
673
- screenReaderResizeAnnouncerMessages[
674
- screenReaderResizeInformation.type
675
- ]
676
- }
677
- </div>
678
- )}
679
637
  </>
680
638
  );
681
639
  };
package/src/plugin.tsx CHANGED
@@ -32,6 +32,7 @@ import type {
32
32
  } from '@atlaskit/editor-common/types';
33
33
  import { browser } from '@atlaskit/editor-common/utils';
34
34
  import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
35
+ import type { AccessibilityUtilsPlugin } from '@atlaskit/editor-plugin-accessibility-utils';
35
36
  import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
36
37
  import type { ContentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
37
38
  import type { GuidelinePlugin } from '@atlaskit/editor-plugin-guideline';
@@ -133,6 +134,7 @@ export type TablePlugin = NextEditorPlugin<
133
134
  ) => EditorCommand;
134
135
  };
135
136
  dependencies: [
137
+ OptionalPlugin<AccessibilityUtilsPlugin>,
136
138
  AnalyticsPlugin,
137
139
  ContentInsertionPlugin,
138
140
  WidthPlugin,
@@ -42,19 +42,17 @@ export function tableSelectionKeymapPlugin(
42
42
  list,
43
43
  );
44
44
 
45
- if (getBooleanFF('platform.editor.a11y.table-selection_9uv33')) {
46
- bindKeymapArrayWithCommand(
47
- selectColumn,
48
- selectColumns(editorSelectionAPI)(true),
49
- list,
50
- );
45
+ bindKeymapArrayWithCommand(
46
+ selectColumn,
47
+ selectColumns(editorSelectionAPI)(true),
48
+ list,
49
+ );
51
50
 
52
- bindKeymapArrayWithCommand(
53
- selectRow,
54
- selectRows(editorSelectionAPI)(true),
55
- list,
56
- );
57
- }
51
+ bindKeymapArrayWithCommand(
52
+ selectRow,
53
+ selectRows(editorSelectionAPI)(true),
54
+ list,
55
+ );
58
56
 
59
57
  if (getBooleanFF('platform.editor.table.shift-arrowup-fix')) {
60
58
  bindKeymapWithCommand(
@@ -38,7 +38,6 @@ import {
38
38
  tableDeleteButtonSize,
39
39
  tableHeaderCellBackgroundColor,
40
40
  tableInsertColumnButtonSize,
41
- tableOverflowShadowWidth,
42
41
  tableOverflowShadowWidthWide,
43
42
  tableToolbarDeleteColor,
44
43
  tableToolbarSelectedColor,
@@ -346,22 +345,13 @@ export const OverflowShadow = (
346
345
  pointer-events: none;
347
346
  top: ${tableMarginTop}px;
348
347
  z-index: ${akEditorShadowZIndex};
349
- width: ${getBooleanFF(
350
- 'platform.editor.table.increase-shadow-visibility_lh89r',
351
- )
352
- ? tableOverflowShadowWidthWide
353
- : tableOverflowShadowWidth}px;
348
+ width: ${tableOverflowShadowWidthWide}px;
354
349
  }
355
350
  .${ClassName.TABLE_LEFT_SHADOW} {
356
351
  background: linear-gradient(
357
352
  to left,
358
353
  transparent 0,
359
- ${token('elevation.shadow.overflow.spread', N40A)}
360
- ${getBooleanFF(
361
- 'platform.editor.table.increase-shadow-visibility_lh89r',
362
- )
363
- ? 140
364
- : 100}%
354
+ ${token('elevation.shadow.overflow.spread', N40A)} 140%
365
355
  ),
366
356
  linear-gradient(
367
357
  to right,
@@ -377,12 +367,7 @@ export const OverflowShadow = (
377
367
  background: linear-gradient(
378
368
  to right,
379
369
  transparent 0,
380
- ${token('elevation.shadow.overflow.spread', N40A)}
381
- ${getBooleanFF(
382
- 'platform.editor.table.increase-shadow-visibility_lh89r',
383
- )
384
- ? 140
385
- : 100}%
370
+ ${token('elevation.shadow.overflow.spread', N40A)} 140%
386
371
  ),
387
372
  linear-gradient(
388
373
  to left,
@@ -390,16 +375,8 @@ export const OverflowShadow = (
390
375
  transparent 1px
391
376
  );
392
377
  left: ${getBooleanFF('platform.editor.custom-table-width')
393
- ? `calc(100% - ${
394
- getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r')
395
- ? tableOverflowShadowWidthWide
396
- : tableOverflowShadowWidth
397
- }px)`
398
- : `calc(100% - ${
399
- getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r')
400
- ? tableOverflowShadowWidthWide - 10
401
- : -2
402
- }px)`};
378
+ ? `calc(100% - ${tableOverflowShadowWidthWide}px)`
379
+ : `calc(100% - ${tableOverflowShadowWidthWide - 10}px)`};
403
380
  }
404
381
  .${ClassName.WITH_CONTROLS} {
405
382
  ${overflowShadowWidhoutDnD(isDragAndDropEnabled)}
package/tsconfig.app.json CHANGED
@@ -42,6 +42,9 @@
42
42
  {
43
43
  "path": "../editor-palette/tsconfig.app.json"
44
44
  },
45
+ {
46
+ "path": "../editor-plugin-accessibility-utils/tsconfig.app.json"
47
+ },
45
48
  {
46
49
  "path": "../editor-plugin-analytics/tsconfig.app.json"
47
50
  },