@atlaskit/editor-plugin-table 7.12.0 → 7.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 7.12.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#96641](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96641)
8
+ [`8a6aa9754ed4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8a6aa9754ed4) -
9
+ [ux] Lock button is not shown on the floating toolbar when the table is nested.
10
+ - [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
11
+ [`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
12
+ [HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
13
+ language triggering composition on an empty line.This was fixed in a patch bump of
14
+ prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
15
+ - Updated dependencies
16
+
17
+ ## 7.12.1
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 7.12.0
4
24
 
5
25
  ### Minor Changes
@@ -514,7 +514,8 @@ var getColumnSettingItems = function getColumnSettingItems(editorState, editorVi
514
514
  var newResizeStateWithAnalytics = (0, _resizeState.getNewResizeStateFromSelectedColumns)(selectionOrTableRect, editorState, editorView.domAtPos.bind(editorView), getEditorContainerWidth, isTableScalingEnabled);
515
515
  var wouldChange = (_newResizeStateWithAn2 = newResizeStateWithAnalytics === null || newResizeStateWithAnalytics === void 0 ? void 0 : newResizeStateWithAnalytics.changed) !== null && _newResizeStateWithAn2 !== void 0 ? _newResizeStateWithAn2 : false;
516
516
  var items = [];
517
- var isTableScalingLockBtnEnabled = isTableScalingEnabled && (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.preserve-widths-with-lock-button');
517
+ var isNested = pluginState.tablePos && (0, _utils4.isTableNested)(editorState, pluginState.tablePos);
518
+ var isTableScalingLockBtnEnabled = !isNested && isTableScalingEnabled && (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.preserve-widths-with-lock-button');
518
519
  if (isTableScalingLockBtnEnabled) {
519
520
  var _pluginState$tableNod;
520
521
  var areColumnWidthsLocked = (pluginState === null || pluginState === void 0 || (_pluginState$tableNod = pluginState.tableNode) === null || _pluginState$tableNod === void 0 ? void 0 : _pluginState$tableNod.attrs.displayMode) === 'fixed';
@@ -26,7 +26,7 @@ import { canMergeCells } from './transforms';
26
26
  import { TableCssClassName } from './types';
27
27
  import { DisplayModeIcon } from './ui/icons';
28
28
  import { FullWidthDisplay } from './ui/TableFullWidthLabel';
29
- import { getMergedCellsPositions, getSelectedColumnIndexes, getSelectedRowIndexes } from './utils';
29
+ import { getMergedCellsPositions, getSelectedColumnIndexes, getSelectedRowIndexes, isTableNested } from './utils';
30
30
  export const getToolbarMenuConfig = (config, state, {
31
31
  formatMessage
32
32
  }, editorAnalyticsAPI) => {
@@ -492,7 +492,8 @@ const getColumnSettingItems = (editorState, editorView, {
492
492
  const newResizeStateWithAnalytics = getNewResizeStateFromSelectedColumns(selectionOrTableRect, editorState, editorView.domAtPos.bind(editorView), getEditorContainerWidth, isTableScalingEnabled);
493
493
  const wouldChange = (_newResizeStateWithAn2 = newResizeStateWithAnalytics === null || newResizeStateWithAnalytics === void 0 ? void 0 : newResizeStateWithAnalytics.changed) !== null && _newResizeStateWithAn2 !== void 0 ? _newResizeStateWithAn2 : false;
494
494
  const items = [];
495
- const isTableScalingLockBtnEnabled = isTableScalingEnabled && getBooleanFF('platform.editor.table.preserve-widths-with-lock-button');
495
+ const isNested = pluginState.tablePos && isTableNested(editorState, pluginState.tablePos);
496
+ const isTableScalingLockBtnEnabled = !isNested && isTableScalingEnabled && getBooleanFF('platform.editor.table.preserve-widths-with-lock-button');
496
497
  if (isTableScalingLockBtnEnabled) {
497
498
  var _pluginState$tableNod;
498
499
  const areColumnWidthsLocked = (pluginState === null || pluginState === void 0 ? void 0 : (_pluginState$tableNod = pluginState.tableNode) === null || _pluginState$tableNod === void 0 ? void 0 : _pluginState$tableNod.attrs.displayMode) === 'fixed';
@@ -27,7 +27,7 @@ import { canMergeCells } from './transforms';
27
27
  import { TableCssClassName } from './types';
28
28
  import { DisplayModeIcon } from './ui/icons';
29
29
  import { FullWidthDisplay } from './ui/TableFullWidthLabel';
30
- import { getMergedCellsPositions, getSelectedColumnIndexes, getSelectedRowIndexes } from './utils';
30
+ import { getMergedCellsPositions, getSelectedColumnIndexes, getSelectedRowIndexes, isTableNested } from './utils';
31
31
  export var getToolbarMenuConfig = function getToolbarMenuConfig(config, state, _ref, editorAnalyticsAPI) {
32
32
  var formatMessage = _ref.formatMessage;
33
33
  var optionItem = getBooleanFF('platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33') ? 'item-checkbox' : 'item';
@@ -503,7 +503,8 @@ var getColumnSettingItems = function getColumnSettingItems(editorState, editorVi
503
503
  var newResizeStateWithAnalytics = getNewResizeStateFromSelectedColumns(selectionOrTableRect, editorState, editorView.domAtPos.bind(editorView), getEditorContainerWidth, isTableScalingEnabled);
504
504
  var wouldChange = (_newResizeStateWithAn2 = newResizeStateWithAnalytics === null || newResizeStateWithAnalytics === void 0 ? void 0 : newResizeStateWithAnalytics.changed) !== null && _newResizeStateWithAn2 !== void 0 ? _newResizeStateWithAn2 : false;
505
505
  var items = [];
506
- var isTableScalingLockBtnEnabled = isTableScalingEnabled && getBooleanFF('platform.editor.table.preserve-widths-with-lock-button');
506
+ var isNested = pluginState.tablePos && isTableNested(editorState, pluginState.tablePos);
507
+ var isTableScalingLockBtnEnabled = !isNested && isTableScalingEnabled && getBooleanFF('platform.editor.table.preserve-widths-with-lock-button');
507
508
  if (isTableScalingLockBtnEnabled) {
508
509
  var _pluginState$tableNod;
509
510
  var areColumnWidthsLocked = (pluginState === null || pluginState === void 0 || (_pluginState$tableNod = pluginState.tableNode) === null || _pluginState$tableNod === void 0 ? void 0 : _pluginState$tableNod.attrs.displayMode) === 'fixed';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "7.12.0",
3
+ "version": "7.12.2",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@atlaskit/adf-schema": "^35.12.2",
32
32
  "@atlaskit/custom-steps": "^0.1.0",
33
- "@atlaskit/editor-common": "^79.0.0",
33
+ "@atlaskit/editor-common": "^79.1.0",
34
34
  "@atlaskit/editor-palette": "1.6.0",
35
35
  "@atlaskit/editor-plugin-accessibility-utils": "^1.1.0",
36
36
  "@atlaskit/editor-plugin-analytics": "^1.1.0",
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/editor-plugin-guideline": "^1.1.0",
40
40
  "@atlaskit/editor-plugin-selection": "^1.2.0",
41
41
  "@atlaskit/editor-plugin-width": "^1.1.0",
42
- "@atlaskit/editor-prosemirror": "4.0.0",
42
+ "@atlaskit/editor-prosemirror": "4.0.1",
43
43
  "@atlaskit/editor-shared-styles": "^2.10.0",
44
44
  "@atlaskit/editor-tables": "^2.7.0",
45
45
  "@atlaskit/icon": "^22.1.0",
@@ -48,9 +48,9 @@
48
48
  "@atlaskit/pragmatic-drag-and-drop": "^1.1.0",
49
49
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^1.3.0",
50
50
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
51
- "@atlaskit/primitives": "^5.7.0",
51
+ "@atlaskit/primitives": "^6.1.0",
52
52
  "@atlaskit/theme": "^12.7.0",
53
- "@atlaskit/toggle": "^13.0.0",
53
+ "@atlaskit/toggle": "^13.1.0",
54
54
  "@atlaskit/tokens": "^1.45.0",
55
55
  "@atlaskit/tooltip": "^18.3.0",
56
56
  "@babel/runtime": "^7.0.0",
package/src/toolbar.tsx CHANGED
@@ -100,6 +100,7 @@ import {
100
100
  getMergedCellsPositions,
101
101
  getSelectedColumnIndexes,
102
102
  getSelectedRowIndexes,
103
+ isTableNested,
103
104
  } from './utils';
104
105
 
105
106
  export const getToolbarMenuConfig = (
@@ -758,7 +759,11 @@ const getColumnSettingItems = (
758
759
 
759
760
  const items: Array<FloatingToolbarItem<Command>> = [];
760
761
 
762
+ const isNested =
763
+ pluginState.tablePos && isTableNested(editorState, pluginState.tablePos);
764
+
761
765
  const isTableScalingLockBtnEnabled =
766
+ !isNested &&
762
767
  isTableScalingEnabled &&
763
768
  getBooleanFF('platform.editor.table.preserve-widths-with-lock-button');
764
769