@atlaskit/editor-plugin-table 10.9.18 → 10.9.20

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 10.9.20
4
+
5
+ ### Patch Changes
6
+
7
+ - [#153256](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/153256)
8
+ [`3644fbe36073d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3644fbe36073d) -
9
+ [ux] When ViewAll dropdown closes via ESC key press or submenus close via ESC or Enter, the focus
10
+ is set on ViewAll button.
11
+ - Updated dependencies
12
+
13
+ ## 10.9.19
14
+
15
+ ### Patch Changes
16
+
17
+ - [#149969](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149969)
18
+ [`42c3f35e57188`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/42c3f35e57188) -
19
+ ED-27882: Get rid of parent offset check in \_handleRef in the react node view. Add metadata to
20
+ these calls in the \_handleRef and \_handleTableRef.
21
+ - Updated dependencies
22
+
3
23
  ## 10.9.18
4
24
 
5
25
  ### Patch Changes
@@ -187,7 +187,13 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
187
187
  var resolvedSelection = selectionBookmark.resolve(_this2.view.state.tr.doc);
188
188
  // Don't set the selection if it's the same as the current selection.
189
189
  if (!resolvedSelection.eq(_this2.view.state.selection)) {
190
- _this2.view.dispatch(_this2.view.state.tr.setSelection(resolvedSelection));
190
+ if ((0, _platformFeatureFlags.fg)('platform_editor_r18_fix_selection_resync')) {
191
+ var tr = _this2.view.state.tr.setSelection(resolvedSelection);
192
+ tr.setMeta('source', 'TableNodeView:_handleTableRef:selection-resync');
193
+ _this2.view.dispatch(tr);
194
+ } else {
195
+ _this2.view.dispatch(_this2.view.state.tr.setSelection(resolvedSelection));
196
+ }
191
197
  }
192
198
  }
193
199
  });
@@ -495,6 +495,10 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
495
495
  };
496
496
  };
497
497
  var shouldGroupWithoutSeparators = (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_6');
498
+
499
+ // testId is required to show focus on trigger button on ESC key press
500
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
501
+ var overflowDropdownTestId = (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_8') ? 'table-overflow-dropdown-trigger' : undefined;
498
502
  return {
499
503
  title: toolbarTitle,
500
504
  getDomRef: getDomRef,
@@ -515,6 +519,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(getE
515
519
  fullHeight: true
516
520
  }, {
517
521
  type: 'overflow-dropdown',
522
+ testId: overflowDropdownTestId,
518
523
  dropdownWidth: 220,
519
524
  options: [{
520
525
  type: 'custom',
@@ -158,7 +158,13 @@ export default class TableView extends ReactNodeView {
158
158
  const resolvedSelection = selectionBookmark.resolve(this.view.state.tr.doc);
159
159
  // Don't set the selection if it's the same as the current selection.
160
160
  if (!resolvedSelection.eq(this.view.state.selection)) {
161
- this.view.dispatch(this.view.state.tr.setSelection(resolvedSelection));
161
+ if (fg('platform_editor_r18_fix_selection_resync')) {
162
+ const tr = this.view.state.tr.setSelection(resolvedSelection);
163
+ tr.setMeta('source', 'TableNodeView:_handleTableRef:selection-resync');
164
+ this.view.dispatch(tr);
165
+ } else {
166
+ this.view.dispatch(this.view.state.tr.setSelection(resolvedSelection));
167
+ }
162
168
  }
163
169
  }
164
170
  });
@@ -464,6 +464,10 @@ export const getToolbarConfig = (getEditorContainerWidth, api, editorAnalyticsAP
464
464
  onBlur: clearHoverSelection()
465
465
  });
466
466
  const shouldGroupWithoutSeparators = editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6');
467
+
468
+ // testId is required to show focus on trigger button on ESC key press
469
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
470
+ const overflowDropdownTestId = fg('platform_editor_controls_patch_8') ? 'table-overflow-dropdown-trigger' : undefined;
467
471
  return {
468
472
  title: toolbarTitle,
469
473
  getDomRef,
@@ -484,6 +488,7 @@ export const getToolbarConfig = (getEditorContainerWidth, api, editorAnalyticsAP
484
488
  fullHeight: true
485
489
  }, {
486
490
  type: 'overflow-dropdown',
491
+ testId: overflowDropdownTestId,
487
492
  dropdownWidth: 220,
488
493
  options: [{
489
494
  type: 'custom',
@@ -180,7 +180,13 @@ var TableView = /*#__PURE__*/function (_ReactNodeView) {
180
180
  var resolvedSelection = selectionBookmark.resolve(_this2.view.state.tr.doc);
181
181
  // Don't set the selection if it's the same as the current selection.
182
182
  if (!resolvedSelection.eq(_this2.view.state.selection)) {
183
- _this2.view.dispatch(_this2.view.state.tr.setSelection(resolvedSelection));
183
+ if (fg('platform_editor_r18_fix_selection_resync')) {
184
+ var tr = _this2.view.state.tr.setSelection(resolvedSelection);
185
+ tr.setMeta('source', 'TableNodeView:_handleTableRef:selection-resync');
186
+ _this2.view.dispatch(tr);
187
+ } else {
188
+ _this2.view.dispatch(_this2.view.state.tr.setSelection(resolvedSelection));
189
+ }
184
190
  }
185
191
  }
186
192
  });
@@ -487,6 +487,10 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
487
487
  };
488
488
  };
489
489
  var shouldGroupWithoutSeparators = editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_6');
490
+
491
+ // testId is required to show focus on trigger button on ESC key press
492
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
493
+ var overflowDropdownTestId = fg('platform_editor_controls_patch_8') ? 'table-overflow-dropdown-trigger' : undefined;
490
494
  return {
491
495
  title: toolbarTitle,
492
496
  getDomRef: getDomRef,
@@ -507,6 +511,7 @@ export var getToolbarConfig = function getToolbarConfig(getEditorContainerWidth,
507
511
  fullHeight: true
508
512
  }, {
509
513
  type: 'overflow-dropdown',
514
+ testId: overflowDropdownTestId,
510
515
  dropdownWidth: 220,
511
516
  options: [{
512
517
  type: 'custom',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "10.9.18",
3
+ "version": "10.9.20",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,14 +32,14 @@
32
32
  "@atlaskit/adf-schema": "^47.6.0",
33
33
  "@atlaskit/button": "^23.0.0",
34
34
  "@atlaskit/custom-steps": "^0.11.0",
35
- "@atlaskit/editor-common": "^104.1.0",
35
+ "@atlaskit/editor-common": "^105.0.0",
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
38
38
  "@atlaskit/editor-plugin-analytics": "^2.2.0",
39
39
  "@atlaskit/editor-plugin-batch-attribute-updates": "^2.1.0",
40
40
  "@atlaskit/editor-plugin-content-insertion": "^2.1.0",
41
41
  "@atlaskit/editor-plugin-editor-viewmode": "^3.1.0",
42
- "@atlaskit/editor-plugin-extension": "5.3.6",
42
+ "@atlaskit/editor-plugin-extension": "5.3.7",
43
43
  "@atlaskit/editor-plugin-guideline": "^2.0.0",
44
44
  "@atlaskit/editor-plugin-selection": "^2.2.0",
45
45
  "@atlaskit/editor-plugin-width": "^3.0.0",
@@ -206,6 +206,12 @@
206
206
  },
207
207
  "platform_editor_table_last_col_drag_handle_fix": {
208
208
  "type": "boolean"
209
+ },
210
+ "platform_editor_r18_fix_selection_resync": {
211
+ "type": "boolean"
212
+ },
213
+ "platform_editor_controls_patch_8": {
214
+ "type": "boolean"
209
215
  }
210
216
  }
211
217
  }
@@ -225,7 +225,13 @@ export default class TableView extends ReactNodeView<Props> {
225
225
  const resolvedSelection = selectionBookmark.resolve(this.view.state.tr.doc);
226
226
  // Don't set the selection if it's the same as the current selection.
227
227
  if (!resolvedSelection.eq(this.view.state.selection)) {
228
- this.view.dispatch(this.view.state.tr.setSelection(resolvedSelection));
228
+ if (fg('platform_editor_r18_fix_selection_resync')) {
229
+ const tr = this.view.state.tr.setSelection(resolvedSelection);
230
+ tr.setMeta('source', 'TableNodeView:_handleTableRef:selection-resync');
231
+ this.view.dispatch(tr);
232
+ } else {
233
+ this.view.dispatch(this.view.state.tr.setSelection(resolvedSelection));
234
+ }
229
235
  }
230
236
  }
231
237
  });
@@ -676,6 +676,12 @@ export const getToolbarConfig =
676
676
  editorExperiment('platform_editor_controls', 'variant1') &&
677
677
  fg('platform_editor_controls_patch_6');
678
678
 
679
+ // testId is required to show focus on trigger button on ESC key press
680
+ // see hideOnEsc in platform/packages/editor/editor-plugin-floating-toolbar/src/ui/Dropdown.tsx
681
+ const overflowDropdownTestId = fg('platform_editor_controls_patch_8')
682
+ ? 'table-overflow-dropdown-trigger'
683
+ : undefined;
684
+
679
685
  return {
680
686
  title: toolbarTitle,
681
687
  getDomRef,
@@ -705,6 +711,7 @@ export const getToolbarConfig =
705
711
  shouldGroupWithoutSeparators && { type: 'separator', fullHeight: true },
706
712
  {
707
713
  type: 'overflow-dropdown',
714
+ testId: overflowDropdownTestId,
708
715
  dropdownWidth: 220,
709
716
  options: [
710
717
  {