@atlaskit/editor-plugin-table 29.1.5 → 29.1.7
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 +17 -0
- package/dist/cjs/nodeviews/TableContainer.js +2 -3
- package/dist/cjs/pm-plugins/commands/misc.js +40 -10
- package/dist/cjs/pm-plugins/utils/selection.js +37 -2
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +23 -10
- package/dist/cjs/ui/TableMenu/column/items/SortDecreasingItem.js +1 -1
- package/dist/cjs/ui/TableMenu/column/items/SortIncreasingItem.js +1 -1
- package/dist/cjs/ui/TableMenu/shared/items/BackgroundColorItem.js +1 -1
- package/dist/es2019/nodeviews/TableContainer.js +2 -3
- package/dist/es2019/pm-plugins/commands/misc.js +33 -2
- package/dist/es2019/pm-plugins/utils/selection.js +36 -1
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +24 -11
- package/dist/es2019/ui/TableMenu/column/items/SortDecreasingItem.js +1 -1
- package/dist/es2019/ui/TableMenu/column/items/SortIncreasingItem.js +1 -1
- package/dist/es2019/ui/TableMenu/shared/items/BackgroundColorItem.js +1 -1
- package/dist/esm/nodeviews/TableContainer.js +2 -3
- package/dist/esm/pm-plugins/commands/misc.js +40 -10
- package/dist/esm/pm-plugins/utils/selection.js +36 -1
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +24 -11
- package/dist/esm/ui/TableMenu/column/items/SortDecreasingItem.js +1 -1
- package/dist/esm/ui/TableMenu/column/items/SortIncreasingItem.js +1 -1
- package/dist/esm/ui/TableMenu/shared/items/BackgroundColorItem.js +1 -1
- package/dist/types/pm-plugins/utils/selection.d.ts +6 -0
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 29.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f4930ad3105bb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f4930ad3105bb) -
|
|
8
|
+
Fix column menu targeting for tables with merged final rows behind
|
|
9
|
+
`platform_editor_table_menu_updates_patch_5`.
|
|
10
|
+
- [`37382f7ca3e93`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/37382f7ca3e93) -
|
|
11
|
+
Clean up feature gate `platform_editor_max_width_default_width`
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 29.1.6
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 29.1.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -15,7 +15,6 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
15
15
|
var _nodeWidth = require("@atlaskit/editor-common/node-width");
|
|
16
16
|
var _resizer = require("@atlaskit/editor-common/styles/resizer");
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
|
-
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
18
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
19
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
21
20
|
var _commandsWithAnalytics = require("../pm-plugins/commands/commands-with-analytics");
|
|
@@ -163,7 +162,7 @@ var ResizableTableContainer = exports.ResizableTableContainer = /*#__PURE__*/_re
|
|
|
163
162
|
var mode = editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
|
|
164
163
|
|
|
165
164
|
// If the editor is in max width mode and the table has no width, use the max width value rather than the default table value
|
|
166
|
-
var tableWidth = isMaxWidthModeEnabled && !node.attrs.width
|
|
165
|
+
var tableWidth = isMaxWidthModeEnabled && !node.attrs.width ? _consts.TABLE_MAX_WIDTH : (0, _nodeWidth.getTableContainerWidth)(node);
|
|
167
166
|
var updateContainerHeight = (0, _react.useCallback)(function (height) {
|
|
168
167
|
var _containerRef$current;
|
|
169
168
|
// current StickyHeader State is not stable to be fetch.
|
|
@@ -225,7 +224,7 @@ var ResizableTableContainer = exports.ResizableTableContainer = /*#__PURE__*/_re
|
|
|
225
224
|
// issues when viwport width is less than full/max width Editor's width. To detect avoid them
|
|
226
225
|
// we need to use lineLength to defined responsiveWidth instead of containerWidth
|
|
227
226
|
// (which does not get updated when Mac setting changes) in Full-width/Max-width editor.
|
|
228
|
-
if (isFullWidthModeEnabled || isMaxWidthModeEnabled
|
|
227
|
+
if (isFullWidthModeEnabled || isMaxWidthModeEnabled) {
|
|
229
228
|
// When: Show scroll bars -> containerWidth = akEditorGutterPadding * 2 + lineLength;
|
|
230
229
|
// When: Always -> containerWidth = akEditorGutterPadding * 2 + lineLength + scrollbarWidth;
|
|
231
230
|
// scrollbarWidth can vary. Values can be 14, 15, 16 and up to 20px;
|
|
@@ -14,6 +14,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
14
14
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
15
15
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
16
16
|
var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
17
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
17
18
|
var _types = require("../../types");
|
|
18
19
|
var _plugin = require("../decorations/plugin");
|
|
19
20
|
var _columnResizing = require("../decorations/utils/column-resizing");
|
|
@@ -26,6 +27,23 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
26
27
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
28
|
var DARK_MODE_CELL_COLOR = '#1f1f21';
|
|
28
29
|
var DARK_MODE_HEADER_COLOR = '#303134';
|
|
30
|
+
var selectColumnWithMergedEdgeRows = function selectColumnWithMergedEdgeRows(tr, column, expand) {
|
|
31
|
+
var _getCellsInColumn;
|
|
32
|
+
var transformedTr = (0, _utils2.selectColumn)(column, expand)(tr);
|
|
33
|
+
if (expand) {
|
|
34
|
+
return transformedTr;
|
|
35
|
+
}
|
|
36
|
+
var selectableCells = (_getCellsInColumn = (0, _utils2.getCellsInColumn)(column)(tr.selection)) === null || _getCellsInColumn === void 0 ? void 0 : _getCellsInColumn.filter(function (_ref) {
|
|
37
|
+
var node = _ref.node;
|
|
38
|
+
return node.attrs.colspan === 1;
|
|
39
|
+
});
|
|
40
|
+
var firstCell = selectableCells === null || selectableCells === void 0 ? void 0 : selectableCells[0];
|
|
41
|
+
var lastCell = selectableCells === null || selectableCells === void 0 ? void 0 : selectableCells[selectableCells.length - 1];
|
|
42
|
+
if (!firstCell || !lastCell) {
|
|
43
|
+
return transformedTr;
|
|
44
|
+
}
|
|
45
|
+
return transformedTr.setSelection(new _cellSelection.CellSelection(transformedTr.doc.resolve(lastCell.pos), transformedTr.doc.resolve(firstCell.pos)));
|
|
46
|
+
};
|
|
29
47
|
var setEditorFocus = exports.setEditorFocus = function setEditorFocus(editorHasFocus) {
|
|
30
48
|
return (0, _pluginFactory.createCommand)({
|
|
31
49
|
type: 'SET_EDITOR_FOCUS',
|
|
@@ -270,8 +288,8 @@ var convertFirstRowToHeader = exports.convertFirstRowToHeader = function convert
|
|
|
270
288
|
};
|
|
271
289
|
};
|
|
272
290
|
var moveCursorBackward = exports.moveCursorBackward = function moveCursorBackward(state, dispatch) {
|
|
273
|
-
var
|
|
274
|
-
$cursor =
|
|
291
|
+
var _ref2 = state.selection,
|
|
292
|
+
$cursor = _ref2.$cursor;
|
|
275
293
|
// if cursor is in the middle of a text node, do nothing
|
|
276
294
|
if (!$cursor || $cursor.parentOffset > 0) {
|
|
277
295
|
return false;
|
|
@@ -370,8 +388,8 @@ var setMultipleCellAttrs = exports.setMultipleCellAttrs = function setMultipleCe
|
|
|
370
388
|
* EditorCommand variant of `setMultipleCellAttrs`.
|
|
371
389
|
*/
|
|
372
390
|
var setMultipleCellAttrsEditorCommand = exports.setMultipleCellAttrsEditorCommand = function setMultipleCellAttrsEditorCommand(attrs, targetCellPosition) {
|
|
373
|
-
return function (
|
|
374
|
-
var tr =
|
|
391
|
+
return function (_ref3) {
|
|
392
|
+
var tr = _ref3.tr;
|
|
375
393
|
var cursorPos;
|
|
376
394
|
if ((0, _utils2.isSelectionType)(tr.selection, 'cell')) {
|
|
377
395
|
// Ignored via go/ees005
|
|
@@ -404,7 +422,13 @@ var selectColumn = exports.selectColumn = function selectColumn(column, expand)
|
|
|
404
422
|
if (!cells || !cells.length || typeof cells[0].pos !== 'number') {
|
|
405
423
|
return false;
|
|
406
424
|
}
|
|
407
|
-
var
|
|
425
|
+
var selectionTransaction;
|
|
426
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_menu_updates_patch_5')) {
|
|
427
|
+
selectionTransaction = selectColumnWithMergedEdgeRows(state.tr, column, expand);
|
|
428
|
+
} else {
|
|
429
|
+
selectionTransaction = (0, _utils2.selectColumn)(column, expand)(state.tr);
|
|
430
|
+
}
|
|
431
|
+
var decorations = (0, _decoration.createColumnSelectedDecoration)(selectionTransaction);
|
|
408
432
|
var decorationSet = (0, _updatePluginStateDecorations.updatePluginStateDecorations)(state, decorations, _types.TableDecorations.COLUMN_SELECTED);
|
|
409
433
|
var targetCellPosition = cells[0].pos;
|
|
410
434
|
return {
|
|
@@ -415,7 +439,13 @@ var selectColumn = exports.selectColumn = function selectColumn(column, expand)
|
|
|
415
439
|
}
|
|
416
440
|
};
|
|
417
441
|
}, function (tr) {
|
|
418
|
-
|
|
442
|
+
var selectionTransaction;
|
|
443
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_menu_updates_patch_5')) {
|
|
444
|
+
selectionTransaction = selectColumnWithMergedEdgeRows(tr, column, expand);
|
|
445
|
+
} else {
|
|
446
|
+
selectionTransaction = (0, _utils2.selectColumn)(column, expand)(tr);
|
|
447
|
+
}
|
|
448
|
+
return selectionTransaction.setMeta('addToHistory', false).setMeta('selectedColumnViaKeyboard', triggeredByKeyboard);
|
|
419
449
|
});
|
|
420
450
|
};
|
|
421
451
|
var selectColumns = exports.selectColumns = function selectColumns(columnIndexes) {
|
|
@@ -648,8 +678,8 @@ var updateWidthToWidest = exports.updateWidthToWidest = function updateWidthToWi
|
|
|
648
678
|
});
|
|
649
679
|
};
|
|
650
680
|
var setTableAlignment = exports.setTableAlignment = function setTableAlignment(newAlignment, isCommentEditor) {
|
|
651
|
-
return function (
|
|
652
|
-
var tr =
|
|
681
|
+
return function (_ref4) {
|
|
682
|
+
var tr = _ref4.tr;
|
|
653
683
|
var tableObject = (0, _utils2.findTable)(tr.selection);
|
|
654
684
|
if (!tableObject) {
|
|
655
685
|
return null;
|
|
@@ -671,8 +701,8 @@ var setTableAlignment = exports.setTableAlignment = function setTableAlignment(n
|
|
|
671
701
|
};
|
|
672
702
|
};
|
|
673
703
|
var setTableAlignmentWithTableContentWithPos = exports.setTableAlignmentWithTableContentWithPos = function setTableAlignmentWithTableContentWithPos(newAlignment, tableNodeWithPos) {
|
|
674
|
-
return function (
|
|
675
|
-
var tr =
|
|
704
|
+
return function (_ref5) {
|
|
705
|
+
var tr = _ref5.tr;
|
|
676
706
|
var table = tableNodeWithPos.node;
|
|
677
707
|
var nextTableAttrs = _objectSpread(_objectSpread({}, table.attrs), {}, {
|
|
678
708
|
layout: newAlignment
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isRowSelectionWithMergedFirstColumn = exports.isFullRowOrColumnSelected = exports.isColumnSelectionWithMergedFirstRow = exports.getSelectedRowIndexes = exports.getSelectedColumnIndexes = void 0;
|
|
6
|
+
exports.isRowSelectionWithMergedFirstColumn = exports.isFullRowOrColumnSelected = exports.isColumnSelectionWithMergedLastRow = exports.isColumnSelectionWithMergedFirstRow = exports.getSelectedRowIndexes = exports.getSelectedColumnIndexes = void 0;
|
|
7
7
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
8
8
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
9
9
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
10
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
10
11
|
var getSelectedColumnIndexes = exports.getSelectedColumnIndexes = function getSelectedColumnIndexes(selectionRect) {
|
|
11
12
|
var columnIndexes = [];
|
|
12
13
|
for (var i = selectionRect.left; i < selectionRect.right; i++) {
|
|
@@ -51,6 +52,35 @@ var isColumnSelectionWithMergedFirstRow = exports.isColumnSelectionWithMergedFir
|
|
|
51
52
|
return true;
|
|
52
53
|
};
|
|
53
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Treats a column as fully selected when its last-row area is covered by a horizontal merge and
|
|
57
|
+
* the explicit `CellSelection` ends above that merged cell. Using that merged cell as an endpoint
|
|
58
|
+
* would expand the selection to the full width of the cell.
|
|
59
|
+
*/
|
|
60
|
+
var isColumnSelectionWithMergedLastRow = exports.isColumnSelectionWithMergedLastRow = function isColumnSelectionWithMergedLastRow(selection) {
|
|
61
|
+
var rect = (0, _utils.getSelectionRect)(selection);
|
|
62
|
+
if (!rect) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
var table = (0, _utils.findTableClosestToPos)(selection.$anchorCell);
|
|
66
|
+
if (!table) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
var map = _tableMap.TableMap.get(table.node);
|
|
70
|
+
if (rect.top !== 0 || rect.bottom === map.height) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
for (var col = rect.left; col < rect.right; col++) {
|
|
74
|
+
var bottomCellRect = map.findCell(map.map[(map.height - 1) * map.width + col]);
|
|
75
|
+
var isHorizontallyMerged = bottomCellRect.right - bottomCellRect.left > 1;
|
|
76
|
+
var bridgesGapBelowSelection = bottomCellRect.top <= rect.bottom;
|
|
77
|
+
if (!isHorizontallyMerged || !bridgesGapBelowSelection) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return true;
|
|
82
|
+
};
|
|
83
|
+
|
|
54
84
|
/**
|
|
55
85
|
* Treats a row as fully selected when its first-column area is covered by a vertical merge and the
|
|
56
86
|
* explicit `CellSelection` starts to the right of that merged cell. `CellSelection.isRowSelection()`
|
|
@@ -89,5 +119,10 @@ var isFullRowOrColumnSelected = exports.isFullRowOrColumnSelected = function isF
|
|
|
89
119
|
if (!(selection instanceof _cellSelection.CellSelection)) {
|
|
90
120
|
return false;
|
|
91
121
|
}
|
|
92
|
-
|
|
122
|
+
var isExistingFullRowOrColumnSelection = selection.isRowSelection() || selection.isColSelection() || isRowSelectionWithMergedFirstColumn(selection) || isColumnSelectionWithMergedFirstRow(selection);
|
|
123
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_menu_updates_patch_5')) {
|
|
124
|
+
return isExistingFullRowOrColumnSelection || isColumnSelectionWithMergedLastRow(selection);
|
|
125
|
+
} else {
|
|
126
|
+
return isExistingFullRowOrColumnSelection;
|
|
127
|
+
}
|
|
93
128
|
};
|
|
@@ -12,6 +12,7 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
12
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
13
|
var _editorTables = require("@atlaskit/editor-tables");
|
|
14
14
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
15
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
15
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
17
|
var _commands = require("../../../pm-plugins/commands");
|
|
17
18
|
var _commandsWithAnalytics = require("../../../pm-plugins/drag-and-drop/commands-with-analytics");
|
|
@@ -28,9 +29,13 @@ var getSelectedColumns = function getSelectedColumns(selection) {
|
|
|
28
29
|
return [];
|
|
29
30
|
}
|
|
30
31
|
if ((0, _expValEquals.expValEquals)('platform_editor_table_menu_updates', 'isEnabled', true)) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
var isColumnSelection;
|
|
33
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_menu_updates_patch_5')) {
|
|
34
|
+
isColumnSelection = selection.isColSelection() || (0, _selection.isColumnSelectionWithMergedFirstRow)(selection) || (0, _selection.isColumnSelectionWithMergedLastRow)(selection);
|
|
35
|
+
} else {
|
|
36
|
+
isColumnSelection = selection.isColSelection() || (0, _selection.isColumnSelectionWithMergedFirstRow)(selection);
|
|
37
|
+
}
|
|
38
|
+
if (!isColumnSelection) {
|
|
34
39
|
return [];
|
|
35
40
|
}
|
|
36
41
|
var rect = (0, _utils.getSelectionRect)(selection);
|
|
@@ -65,12 +70,14 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
65
70
|
getScrollOffset = _ref.getScrollOffset,
|
|
66
71
|
api = _ref.api;
|
|
67
72
|
var columnControlsRef = (0, _react.useRef)(null);
|
|
68
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['selection'], function (states) {
|
|
69
|
-
var _states$selectionStat;
|
|
73
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['selection', 'table'], function (states) {
|
|
74
|
+
var _states$tableState, _states$selectionStat;
|
|
70
75
|
return {
|
|
76
|
+
activeTableMenu: (_states$tableState = states.tableState) === null || _states$tableState === void 0 ? void 0 : _states$tableState.activeTableMenu,
|
|
71
77
|
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection
|
|
72
78
|
};
|
|
73
79
|
}),
|
|
80
|
+
activeTableMenu = _useSharedPluginState.activeTableMenu,
|
|
74
81
|
selection = _useSharedPluginState.selection;
|
|
75
82
|
var widths = (_colWidths$map$join = colWidths === null || colWidths === void 0 ? void 0 : colWidths.map(function (width) {
|
|
76
83
|
return (
|
|
@@ -83,6 +90,12 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
83
90
|
var columnParams = (0, _rowControls.getRowsParams)(colWidths !== null && colWidths !== void 0 ? colWidths : []);
|
|
84
91
|
var colIndex = hoveredCell === null || hoveredCell === void 0 ? void 0 : hoveredCell.colIndex;
|
|
85
92
|
var selectedColIndexes = getSelectedColumns(selection || editorView.state.selection);
|
|
93
|
+
var renderedSelectedColIndexes;
|
|
94
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_menu_updates_patch_5')) {
|
|
95
|
+
renderedSelectedColIndexes = (activeTableMenu === null || activeTableMenu === void 0 ? void 0 : activeTableMenu.type) === 'column' ? [activeTableMenu.index] : selectedColIndexes;
|
|
96
|
+
} else {
|
|
97
|
+
renderedSelectedColIndexes = selectedColIndexes;
|
|
98
|
+
}
|
|
86
99
|
var firstRow = tableRef.querySelector('tr');
|
|
87
100
|
var hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
88
101
|
var rowControlStickyTop = 45;
|
|
@@ -227,7 +240,7 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
227
240
|
position: 'relative',
|
|
228
241
|
pointerEvents: isPlaceholder ? 'none' : undefined
|
|
229
242
|
},
|
|
230
|
-
"data-testid": "table-floating-column-".concat(isHover ? colIndex : isPlaceholder ? appearance :
|
|
243
|
+
"data-testid": "table-floating-column-".concat(isHover ? colIndex : isPlaceholder ? appearance : renderedSelectedColIndexes[0], "-drag-handle")
|
|
231
244
|
}, /*#__PURE__*/_react.default.createElement(_DragHandle.DragHandle, {
|
|
232
245
|
api: api,
|
|
233
246
|
isDragMenuTarget: !isHover,
|
|
@@ -250,8 +263,8 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
250
263
|
};
|
|
251
264
|
var columnHandles = function columnHandles() {
|
|
252
265
|
var handles = [];
|
|
253
|
-
var isColumnSelected =
|
|
254
|
-
var isEntireTableSelected = (colWidths || []).length >
|
|
266
|
+
var isColumnSelected = renderedSelectedColIndexes.length > 0;
|
|
267
|
+
var isEntireTableSelected = (colWidths || []).length > renderedSelectedColIndexes.length;
|
|
255
268
|
if (!tableActive) {
|
|
256
269
|
return null;
|
|
257
270
|
}
|
|
@@ -261,8 +274,8 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
261
274
|
// so it can be focused via keyboard shortcuts
|
|
262
275
|
handles.push(generateHandleByType('selected', selectedAppearance,
|
|
263
276
|
// always position placeholder in first column to avoid overflow issues
|
|
264
|
-
selectedAppearance === 'placeholder' ? '1 / span 1' : "".concat(
|
|
265
|
-
if (hoveredCell && isTableHovered && colIndex !== undefined && !
|
|
277
|
+
selectedAppearance === 'placeholder' ? '1 / span 1' : "".concat(renderedSelectedColIndexes[0] + 1, " / span ").concat(renderedSelectedColIndexes.length), renderedSelectedColIndexes));
|
|
278
|
+
if (hoveredCell && isTableHovered && colIndex !== undefined && !renderedSelectedColIndexes.includes(colIndex)) {
|
|
266
279
|
handles.push(
|
|
267
280
|
// Ignored via go/ees005
|
|
268
281
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -6,7 +6,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
6
6
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
7
7
|
import { resizerHoverZoneClassName, resizerItemClassName } from '@atlaskit/editor-common/styles/resizer';
|
|
8
8
|
import { akEditorDefaultLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
10
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
12
11
|
import { setTableAlignmentWithTableContentWithPosWithAnalytics } from '../pm-plugins/commands/commands-with-analytics';
|
|
@@ -156,7 +155,7 @@ export const ResizableTableContainer = /*#__PURE__*/React.memo(({
|
|
|
156
155
|
const mode = editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
|
|
157
156
|
|
|
158
157
|
// If the editor is in max width mode and the table has no width, use the max width value rather than the default table value
|
|
159
|
-
const tableWidth = isMaxWidthModeEnabled && !node.attrs.width
|
|
158
|
+
const tableWidth = isMaxWidthModeEnabled && !node.attrs.width ? TABLE_MAX_WIDTH : getTableContainerWidth(node);
|
|
160
159
|
const updateContainerHeight = useCallback(height => {
|
|
161
160
|
var _containerRef$current;
|
|
162
161
|
// current StickyHeader State is not stable to be fetch.
|
|
@@ -221,7 +220,7 @@ export const ResizableTableContainer = /*#__PURE__*/React.memo(({
|
|
|
221
220
|
// issues when viwport width is less than full/max width Editor's width. To detect avoid them
|
|
222
221
|
// we need to use lineLength to defined responsiveWidth instead of containerWidth
|
|
223
222
|
// (which does not get updated when Mac setting changes) in Full-width/Max-width editor.
|
|
224
|
-
if (isFullWidthModeEnabled || isMaxWidthModeEnabled
|
|
223
|
+
if (isFullWidthModeEnabled || isMaxWidthModeEnabled) {
|
|
225
224
|
// When: Show scroll bars -> containerWidth = akEditorGutterPadding * 2 + lineLength;
|
|
226
225
|
// When: Always -> containerWidth = akEditorGutterPadding * 2 + lineLength + scrollbarWidth;
|
|
227
226
|
// scrollbarWidth can vary. Values can be 14, 15, 16 and up to 20px;
|
|
@@ -5,6 +5,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
5
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
6
6
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
7
7
|
import { findCellClosestToPos, findTable, getCellsInColumn, getCellsInRow, getSelectionRect, isSelectionType, isTableSelected, removeTable, selectColumns as selectColumnsTransform, selectColumn as selectColumnTransform, selectionCell, selectRows as selectRowsTransform, selectRow as selectRowTransform, setCellAttrs } from '@atlaskit/editor-tables/utils';
|
|
8
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
8
9
|
import { TableCssClassName as ClassName, TableDecorations } from '../../types';
|
|
9
10
|
import { getDecorations } from '../decorations/plugin';
|
|
10
11
|
import { buildColumnResizingDecorations, clearColumnResizingDecorations } from '../decorations/utils/column-resizing';
|
|
@@ -15,6 +16,22 @@ import { checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColum
|
|
|
15
16
|
import { updatePluginStateDecorations } from '../utils/update-plugin-state-decorations';
|
|
16
17
|
const DARK_MODE_CELL_COLOR = '#1f1f21';
|
|
17
18
|
const DARK_MODE_HEADER_COLOR = '#303134';
|
|
19
|
+
const selectColumnWithMergedEdgeRows = (tr, column, expand) => {
|
|
20
|
+
var _getCellsInColumn;
|
|
21
|
+
const transformedTr = selectColumnTransform(column, expand)(tr);
|
|
22
|
+
if (expand) {
|
|
23
|
+
return transformedTr;
|
|
24
|
+
}
|
|
25
|
+
const selectableCells = (_getCellsInColumn = getCellsInColumn(column)(tr.selection)) === null || _getCellsInColumn === void 0 ? void 0 : _getCellsInColumn.filter(({
|
|
26
|
+
node
|
|
27
|
+
}) => node.attrs.colspan === 1);
|
|
28
|
+
const firstCell = selectableCells === null || selectableCells === void 0 ? void 0 : selectableCells[0];
|
|
29
|
+
const lastCell = selectableCells === null || selectableCells === void 0 ? void 0 : selectableCells[selectableCells.length - 1];
|
|
30
|
+
if (!firstCell || !lastCell) {
|
|
31
|
+
return transformedTr;
|
|
32
|
+
}
|
|
33
|
+
return transformedTr.setSelection(new CellSelection(transformedTr.doc.resolve(lastCell.pos), transformedTr.doc.resolve(firstCell.pos)));
|
|
34
|
+
};
|
|
18
35
|
export const setEditorFocus = editorHasFocus => createCommand({
|
|
19
36
|
type: 'SET_EDITOR_FOCUS',
|
|
20
37
|
data: {
|
|
@@ -411,7 +428,13 @@ export const selectColumn = (column, expand, triggeredByKeyboard = false) => cre
|
|
|
411
428
|
if (!cells || !cells.length || typeof cells[0].pos !== 'number') {
|
|
412
429
|
return false;
|
|
413
430
|
}
|
|
414
|
-
|
|
431
|
+
let selectionTransaction;
|
|
432
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
433
|
+
selectionTransaction = selectColumnWithMergedEdgeRows(state.tr, column, expand);
|
|
434
|
+
} else {
|
|
435
|
+
selectionTransaction = selectColumnTransform(column, expand)(state.tr);
|
|
436
|
+
}
|
|
437
|
+
const decorations = createColumnSelectedDecoration(selectionTransaction);
|
|
415
438
|
const decorationSet = updatePluginStateDecorations(state, decorations, TableDecorations.COLUMN_SELECTED);
|
|
416
439
|
const targetCellPosition = cells[0].pos;
|
|
417
440
|
return {
|
|
@@ -421,7 +444,15 @@ export const selectColumn = (column, expand, triggeredByKeyboard = false) => cre
|
|
|
421
444
|
decorationSet
|
|
422
445
|
}
|
|
423
446
|
};
|
|
424
|
-
}, tr =>
|
|
447
|
+
}, tr => {
|
|
448
|
+
let selectionTransaction;
|
|
449
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
450
|
+
selectionTransaction = selectColumnWithMergedEdgeRows(tr, column, expand);
|
|
451
|
+
} else {
|
|
452
|
+
selectionTransaction = selectColumnTransform(column, expand)(tr);
|
|
453
|
+
}
|
|
454
|
+
return selectionTransaction.setMeta('addToHistory', false).setMeta('selectedColumnViaKeyboard', triggeredByKeyboard);
|
|
455
|
+
});
|
|
425
456
|
export const selectColumns = columnIndexes => createCommand(state => {
|
|
426
457
|
if (!columnIndexes) {
|
|
427
458
|
return false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
2
2
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
3
3
|
import { findTableClosestToPos, getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
4
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
5
|
export const getSelectedColumnIndexes = selectionRect => {
|
|
5
6
|
const columnIndexes = [];
|
|
6
7
|
for (let i = selectionRect.left; i < selectionRect.right; i++) {
|
|
@@ -45,6 +46,35 @@ export const isColumnSelectionWithMergedFirstRow = selection => {
|
|
|
45
46
|
return true;
|
|
46
47
|
};
|
|
47
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Treats a column as fully selected when its last-row area is covered by a horizontal merge and
|
|
51
|
+
* the explicit `CellSelection` ends above that merged cell. Using that merged cell as an endpoint
|
|
52
|
+
* would expand the selection to the full width of the cell.
|
|
53
|
+
*/
|
|
54
|
+
export const isColumnSelectionWithMergedLastRow = selection => {
|
|
55
|
+
const rect = getSelectionRect(selection);
|
|
56
|
+
if (!rect) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
const table = findTableClosestToPos(selection.$anchorCell);
|
|
60
|
+
if (!table) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const map = TableMap.get(table.node);
|
|
64
|
+
if (rect.top !== 0 || rect.bottom === map.height) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
for (let col = rect.left; col < rect.right; col++) {
|
|
68
|
+
const bottomCellRect = map.findCell(map.map[(map.height - 1) * map.width + col]);
|
|
69
|
+
const isHorizontallyMerged = bottomCellRect.right - bottomCellRect.left > 1;
|
|
70
|
+
const bridgesGapBelowSelection = bottomCellRect.top <= rect.bottom;
|
|
71
|
+
if (!isHorizontallyMerged || !bridgesGapBelowSelection) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return true;
|
|
76
|
+
};
|
|
77
|
+
|
|
48
78
|
/**
|
|
49
79
|
* Treats a row as fully selected when its first-column area is covered by a vertical merge and the
|
|
50
80
|
* explicit `CellSelection` starts to the right of that merged cell. `CellSelection.isRowSelection()`
|
|
@@ -83,5 +113,10 @@ export const isFullRowOrColumnSelected = selection => {
|
|
|
83
113
|
if (!(selection instanceof CellSelection)) {
|
|
84
114
|
return false;
|
|
85
115
|
}
|
|
86
|
-
|
|
116
|
+
const isExistingFullRowOrColumnSelection = selection.isRowSelection() || selection.isColSelection() || isRowSelectionWithMergedFirstColumn(selection) || isColumnSelectionWithMergedFirstRow(selection);
|
|
117
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
118
|
+
return isExistingFullRowOrColumnSelection || isColumnSelectionWithMergedLastRow(selection);
|
|
119
|
+
} else {
|
|
120
|
+
return isExistingFullRowOrColumnSelection;
|
|
121
|
+
}
|
|
87
122
|
};
|
|
@@ -7,12 +7,13 @@ import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
|
7
7
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { CellSelection } from '@atlaskit/editor-tables';
|
|
9
9
|
import { getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
10
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
12
|
import { clearHoverSelection, hoverCell, hoverColumns, selectColumn, selectColumns, toggleActiveTableMenu } from '../../../pm-plugins/commands';
|
|
12
13
|
import { toggleDragMenuWithAnalytics } from '../../../pm-plugins/drag-and-drop/commands-with-analytics';
|
|
13
14
|
import { getPluginState as getTablePluginState } from '../../../pm-plugins/plugin-factory';
|
|
14
15
|
import { getRowsParams } from '../../../pm-plugins/utils/row-controls';
|
|
15
|
-
import { getSelectedColumnIndexes, isColumnSelectionWithMergedFirstRow } from '../../../pm-plugins/utils/selection';
|
|
16
|
+
import { getSelectedColumnIndexes, isColumnSelectionWithMergedFirstRow, isColumnSelectionWithMergedLastRow } from '../../../pm-plugins/utils/selection';
|
|
16
17
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
17
18
|
import { DragHandle } from '../../DragHandle';
|
|
18
19
|
const getSelectedColumns = selection => {
|
|
@@ -20,9 +21,13 @@ const getSelectedColumns = selection => {
|
|
|
20
21
|
return [];
|
|
21
22
|
}
|
|
22
23
|
if (expValEquals('platform_editor_table_menu_updates', 'isEnabled', true)) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
let isColumnSelection;
|
|
25
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
26
|
+
isColumnSelection = selection.isColSelection() || isColumnSelectionWithMergedFirstRow(selection) || isColumnSelectionWithMergedLastRow(selection);
|
|
27
|
+
} else {
|
|
28
|
+
isColumnSelection = selection.isColSelection() || isColumnSelectionWithMergedFirstRow(selection);
|
|
29
|
+
}
|
|
30
|
+
if (!isColumnSelection) {
|
|
26
31
|
return [];
|
|
27
32
|
}
|
|
28
33
|
const rect = getSelectionRect(selection);
|
|
@@ -59,10 +64,12 @@ export const ColumnControls = ({
|
|
|
59
64
|
var _colWidths$map$join;
|
|
60
65
|
const columnControlsRef = useRef(null);
|
|
61
66
|
const {
|
|
67
|
+
activeTableMenu,
|
|
62
68
|
selection
|
|
63
|
-
} = useSharedPluginStateWithSelector(api, ['selection'], states => {
|
|
64
|
-
var _states$selectionStat;
|
|
69
|
+
} = useSharedPluginStateWithSelector(api, ['selection', 'table'], states => {
|
|
70
|
+
var _states$tableState, _states$selectionStat;
|
|
65
71
|
return {
|
|
72
|
+
activeTableMenu: (_states$tableState = states.tableState) === null || _states$tableState === void 0 ? void 0 : _states$tableState.activeTableMenu,
|
|
66
73
|
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection
|
|
67
74
|
};
|
|
68
75
|
});
|
|
@@ -74,6 +81,12 @@ export const ColumnControls = ({
|
|
|
74
81
|
const columnParams = getRowsParams(colWidths !== null && colWidths !== void 0 ? colWidths : []);
|
|
75
82
|
const colIndex = hoveredCell === null || hoveredCell === void 0 ? void 0 : hoveredCell.colIndex;
|
|
76
83
|
const selectedColIndexes = getSelectedColumns(selection || editorView.state.selection);
|
|
84
|
+
let renderedSelectedColIndexes;
|
|
85
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
86
|
+
renderedSelectedColIndexes = (activeTableMenu === null || activeTableMenu === void 0 ? void 0 : activeTableMenu.type) === 'column' ? [activeTableMenu.index] : selectedColIndexes;
|
|
87
|
+
} else {
|
|
88
|
+
renderedSelectedColIndexes = selectedColIndexes;
|
|
89
|
+
}
|
|
77
90
|
const firstRow = tableRef.querySelector('tr');
|
|
78
91
|
const hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
79
92
|
const rowControlStickyTop = 45;
|
|
@@ -226,7 +239,7 @@ export const ColumnControls = ({
|
|
|
226
239
|
position: 'relative',
|
|
227
240
|
pointerEvents: isPlaceholder ? 'none' : undefined
|
|
228
241
|
},
|
|
229
|
-
"data-testid": `table-floating-column-${isHover ? colIndex : isPlaceholder ? appearance :
|
|
242
|
+
"data-testid": `table-floating-column-${isHover ? colIndex : isPlaceholder ? appearance : renderedSelectedColIndexes[0]}-drag-handle`
|
|
230
243
|
}, /*#__PURE__*/React.createElement(DragHandle, {
|
|
231
244
|
api: api,
|
|
232
245
|
isDragMenuTarget: !isHover,
|
|
@@ -249,8 +262,8 @@ export const ColumnControls = ({
|
|
|
249
262
|
};
|
|
250
263
|
const columnHandles = () => {
|
|
251
264
|
const handles = [];
|
|
252
|
-
const isColumnSelected =
|
|
253
|
-
const isEntireTableSelected = (colWidths || []).length >
|
|
265
|
+
const isColumnSelected = renderedSelectedColIndexes.length > 0;
|
|
266
|
+
const isEntireTableSelected = (colWidths || []).length > renderedSelectedColIndexes.length;
|
|
254
267
|
if (!tableActive) {
|
|
255
268
|
return null;
|
|
256
269
|
}
|
|
@@ -260,8 +273,8 @@ export const ColumnControls = ({
|
|
|
260
273
|
// so it can be focused via keyboard shortcuts
|
|
261
274
|
handles.push(generateHandleByType('selected', selectedAppearance,
|
|
262
275
|
// always position placeholder in first column to avoid overflow issues
|
|
263
|
-
selectedAppearance === 'placeholder' ? '1 / span 1' : `${
|
|
264
|
-
if (hoveredCell && isTableHovered && colIndex !== undefined && !
|
|
276
|
+
selectedAppearance === 'placeholder' ? '1 / span 1' : `${renderedSelectedColIndexes[0] + 1} / span ${renderedSelectedColIndexes.length}`, renderedSelectedColIndexes));
|
|
277
|
+
if (hoveredCell && isTableHovered && colIndex !== undefined && !renderedSelectedColIndexes.includes(colIndex)) {
|
|
265
278
|
handles.push(
|
|
266
279
|
// Ignored via go/ees005
|
|
267
280
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* SortDecreasingItem.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* SortDecreasingItem.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./SortDecreasingItem.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* SortIncreasingItem.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* SortIncreasingItem.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./SortIncreasingItem.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* BackgroundColorItem.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* BackgroundColorItem.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import "./BackgroundColorItem.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useMemo } from 'react';
|
|
@@ -7,7 +7,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
7
7
|
import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
|
|
8
8
|
import { resizerHoverZoneClassName, resizerItemClassName } from '@atlaskit/editor-common/styles/resizer';
|
|
9
9
|
import { akEditorDefaultLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
13
12
|
import { setTableAlignmentWithTableContentWithPosWithAnalytics } from '../pm-plugins/commands/commands-with-analytics';
|
|
@@ -154,7 +153,7 @@ export var ResizableTableContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
154
153
|
var mode = editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
|
|
155
154
|
|
|
156
155
|
// If the editor is in max width mode and the table has no width, use the max width value rather than the default table value
|
|
157
|
-
var tableWidth = isMaxWidthModeEnabled && !node.attrs.width
|
|
156
|
+
var tableWidth = isMaxWidthModeEnabled && !node.attrs.width ? TABLE_MAX_WIDTH : getTableContainerWidth(node);
|
|
158
157
|
var updateContainerHeight = useCallback(function (height) {
|
|
159
158
|
var _containerRef$current;
|
|
160
159
|
// current StickyHeader State is not stable to be fetch.
|
|
@@ -216,7 +215,7 @@ export var ResizableTableContainer = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
216
215
|
// issues when viwport width is less than full/max width Editor's width. To detect avoid them
|
|
217
216
|
// we need to use lineLength to defined responsiveWidth instead of containerWidth
|
|
218
217
|
// (which does not get updated when Mac setting changes) in Full-width/Max-width editor.
|
|
219
|
-
if (isFullWidthModeEnabled || isMaxWidthModeEnabled
|
|
218
|
+
if (isFullWidthModeEnabled || isMaxWidthModeEnabled) {
|
|
220
219
|
// When: Show scroll bars -> containerWidth = akEditorGutterPadding * 2 + lineLength;
|
|
221
220
|
// When: Always -> containerWidth = akEditorGutterPadding * 2 + lineLength + scrollbarWidth;
|
|
222
221
|
// scrollbarWidth can vary. Values can be 14, 15, 16 and up to 20px;
|
|
@@ -9,6 +9,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
9
9
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
10
10
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
11
11
|
import { findCellClosestToPos, findTable, getCellsInColumn, getCellsInRow, getSelectionRect, isSelectionType, isTableSelected, removeTable, selectColumns as selectColumnsTransform, selectColumn as selectColumnTransform, selectionCell, selectRows as selectRowsTransform, selectRow as selectRowTransform, setCellAttrs } from '@atlaskit/editor-tables/utils';
|
|
12
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
13
|
import { TableCssClassName as ClassName, TableDecorations } from '../../types';
|
|
13
14
|
import { getDecorations } from '../decorations/plugin';
|
|
14
15
|
import { buildColumnResizingDecorations, clearColumnResizingDecorations } from '../decorations/utils/column-resizing';
|
|
@@ -19,6 +20,23 @@ import { checkIfHeaderColumnEnabled, checkIfHeaderRowEnabled, checkIfNumberColum
|
|
|
19
20
|
import { updatePluginStateDecorations } from '../utils/update-plugin-state-decorations';
|
|
20
21
|
var DARK_MODE_CELL_COLOR = '#1f1f21';
|
|
21
22
|
var DARK_MODE_HEADER_COLOR = '#303134';
|
|
23
|
+
var selectColumnWithMergedEdgeRows = function selectColumnWithMergedEdgeRows(tr, column, expand) {
|
|
24
|
+
var _getCellsInColumn;
|
|
25
|
+
var transformedTr = selectColumnTransform(column, expand)(tr);
|
|
26
|
+
if (expand) {
|
|
27
|
+
return transformedTr;
|
|
28
|
+
}
|
|
29
|
+
var selectableCells = (_getCellsInColumn = getCellsInColumn(column)(tr.selection)) === null || _getCellsInColumn === void 0 ? void 0 : _getCellsInColumn.filter(function (_ref) {
|
|
30
|
+
var node = _ref.node;
|
|
31
|
+
return node.attrs.colspan === 1;
|
|
32
|
+
});
|
|
33
|
+
var firstCell = selectableCells === null || selectableCells === void 0 ? void 0 : selectableCells[0];
|
|
34
|
+
var lastCell = selectableCells === null || selectableCells === void 0 ? void 0 : selectableCells[selectableCells.length - 1];
|
|
35
|
+
if (!firstCell || !lastCell) {
|
|
36
|
+
return transformedTr;
|
|
37
|
+
}
|
|
38
|
+
return transformedTr.setSelection(new CellSelection(transformedTr.doc.resolve(lastCell.pos), transformedTr.doc.resolve(firstCell.pos)));
|
|
39
|
+
};
|
|
22
40
|
export var setEditorFocus = function setEditorFocus(editorHasFocus) {
|
|
23
41
|
return createCommand({
|
|
24
42
|
type: 'SET_EDITOR_FOCUS',
|
|
@@ -263,8 +281,8 @@ export var convertFirstRowToHeader = function convertFirstRowToHeader(schema) {
|
|
|
263
281
|
};
|
|
264
282
|
};
|
|
265
283
|
export var moveCursorBackward = function moveCursorBackward(state, dispatch) {
|
|
266
|
-
var
|
|
267
|
-
$cursor =
|
|
284
|
+
var _ref2 = state.selection,
|
|
285
|
+
$cursor = _ref2.$cursor;
|
|
268
286
|
// if cursor is in the middle of a text node, do nothing
|
|
269
287
|
if (!$cursor || $cursor.parentOffset > 0) {
|
|
270
288
|
return false;
|
|
@@ -363,8 +381,8 @@ export var setMultipleCellAttrs = function setMultipleCellAttrs(attrs, editorVie
|
|
|
363
381
|
* EditorCommand variant of `setMultipleCellAttrs`.
|
|
364
382
|
*/
|
|
365
383
|
export var setMultipleCellAttrsEditorCommand = function setMultipleCellAttrsEditorCommand(attrs, targetCellPosition) {
|
|
366
|
-
return function (
|
|
367
|
-
var tr =
|
|
384
|
+
return function (_ref3) {
|
|
385
|
+
var tr = _ref3.tr;
|
|
368
386
|
var cursorPos;
|
|
369
387
|
if (isSelectionType(tr.selection, 'cell')) {
|
|
370
388
|
// Ignored via go/ees005
|
|
@@ -397,7 +415,13 @@ export var selectColumn = function selectColumn(column, expand) {
|
|
|
397
415
|
if (!cells || !cells.length || typeof cells[0].pos !== 'number') {
|
|
398
416
|
return false;
|
|
399
417
|
}
|
|
400
|
-
var
|
|
418
|
+
var selectionTransaction;
|
|
419
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
420
|
+
selectionTransaction = selectColumnWithMergedEdgeRows(state.tr, column, expand);
|
|
421
|
+
} else {
|
|
422
|
+
selectionTransaction = selectColumnTransform(column, expand)(state.tr);
|
|
423
|
+
}
|
|
424
|
+
var decorations = createColumnSelectedDecoration(selectionTransaction);
|
|
401
425
|
var decorationSet = updatePluginStateDecorations(state, decorations, TableDecorations.COLUMN_SELECTED);
|
|
402
426
|
var targetCellPosition = cells[0].pos;
|
|
403
427
|
return {
|
|
@@ -408,7 +432,13 @@ export var selectColumn = function selectColumn(column, expand) {
|
|
|
408
432
|
}
|
|
409
433
|
};
|
|
410
434
|
}, function (tr) {
|
|
411
|
-
|
|
435
|
+
var selectionTransaction;
|
|
436
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
437
|
+
selectionTransaction = selectColumnWithMergedEdgeRows(tr, column, expand);
|
|
438
|
+
} else {
|
|
439
|
+
selectionTransaction = selectColumnTransform(column, expand)(tr);
|
|
440
|
+
}
|
|
441
|
+
return selectionTransaction.setMeta('addToHistory', false).setMeta('selectedColumnViaKeyboard', triggeredByKeyboard);
|
|
412
442
|
});
|
|
413
443
|
};
|
|
414
444
|
export var selectColumns = function selectColumns(columnIndexes) {
|
|
@@ -641,8 +671,8 @@ export var updateWidthToWidest = function updateWidthToWidest(widthToWidest) {
|
|
|
641
671
|
});
|
|
642
672
|
};
|
|
643
673
|
export var setTableAlignment = function setTableAlignment(newAlignment, isCommentEditor) {
|
|
644
|
-
return function (
|
|
645
|
-
var tr =
|
|
674
|
+
return function (_ref4) {
|
|
675
|
+
var tr = _ref4.tr;
|
|
646
676
|
var tableObject = findTable(tr.selection);
|
|
647
677
|
if (!tableObject) {
|
|
648
678
|
return null;
|
|
@@ -664,8 +694,8 @@ export var setTableAlignment = function setTableAlignment(newAlignment, isCommen
|
|
|
664
694
|
};
|
|
665
695
|
};
|
|
666
696
|
export var setTableAlignmentWithTableContentWithPos = function setTableAlignmentWithTableContentWithPos(newAlignment, tableNodeWithPos) {
|
|
667
|
-
return function (
|
|
668
|
-
var tr =
|
|
697
|
+
return function (_ref5) {
|
|
698
|
+
var tr = _ref5.tr;
|
|
669
699
|
var table = tableNodeWithPos.node;
|
|
670
700
|
var nextTableAttrs = _objectSpread(_objectSpread({}, table.attrs), {}, {
|
|
671
701
|
layout: newAlignment
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
2
2
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
3
3
|
import { findTableClosestToPos, getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
4
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
5
|
export var getSelectedColumnIndexes = function getSelectedColumnIndexes(selectionRect) {
|
|
5
6
|
var columnIndexes = [];
|
|
6
7
|
for (var i = selectionRect.left; i < selectionRect.right; i++) {
|
|
@@ -45,6 +46,35 @@ export var isColumnSelectionWithMergedFirstRow = function isColumnSelectionWithM
|
|
|
45
46
|
return true;
|
|
46
47
|
};
|
|
47
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Treats a column as fully selected when its last-row area is covered by a horizontal merge and
|
|
51
|
+
* the explicit `CellSelection` ends above that merged cell. Using that merged cell as an endpoint
|
|
52
|
+
* would expand the selection to the full width of the cell.
|
|
53
|
+
*/
|
|
54
|
+
export var isColumnSelectionWithMergedLastRow = function isColumnSelectionWithMergedLastRow(selection) {
|
|
55
|
+
var rect = getSelectionRect(selection);
|
|
56
|
+
if (!rect) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
var table = findTableClosestToPos(selection.$anchorCell);
|
|
60
|
+
if (!table) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
var map = TableMap.get(table.node);
|
|
64
|
+
if (rect.top !== 0 || rect.bottom === map.height) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
for (var col = rect.left; col < rect.right; col++) {
|
|
68
|
+
var bottomCellRect = map.findCell(map.map[(map.height - 1) * map.width + col]);
|
|
69
|
+
var isHorizontallyMerged = bottomCellRect.right - bottomCellRect.left > 1;
|
|
70
|
+
var bridgesGapBelowSelection = bottomCellRect.top <= rect.bottom;
|
|
71
|
+
if (!isHorizontallyMerged || !bridgesGapBelowSelection) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return true;
|
|
76
|
+
};
|
|
77
|
+
|
|
48
78
|
/**
|
|
49
79
|
* Treats a row as fully selected when its first-column area is covered by a vertical merge and the
|
|
50
80
|
* explicit `CellSelection` starts to the right of that merged cell. `CellSelection.isRowSelection()`
|
|
@@ -83,5 +113,10 @@ export var isFullRowOrColumnSelected = function isFullRowOrColumnSelected(select
|
|
|
83
113
|
if (!(selection instanceof CellSelection)) {
|
|
84
114
|
return false;
|
|
85
115
|
}
|
|
86
|
-
|
|
116
|
+
var isExistingFullRowOrColumnSelection = selection.isRowSelection() || selection.isColSelection() || isRowSelectionWithMergedFirstColumn(selection) || isColumnSelectionWithMergedFirstRow(selection);
|
|
117
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
118
|
+
return isExistingFullRowOrColumnSelection || isColumnSelectionWithMergedLastRow(selection);
|
|
119
|
+
} else {
|
|
120
|
+
return isExistingFullRowOrColumnSelection;
|
|
121
|
+
}
|
|
87
122
|
};
|
|
@@ -7,12 +7,13 @@ import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
|
7
7
|
import { akEditorTableNumberColumnWidth } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { CellSelection } from '@atlaskit/editor-tables';
|
|
9
9
|
import { getSelectionRect } from '@atlaskit/editor-tables/utils';
|
|
10
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
12
|
import { clearHoverSelection, hoverCell, hoverColumns, selectColumn, selectColumns, toggleActiveTableMenu } from '../../../pm-plugins/commands';
|
|
12
13
|
import { toggleDragMenuWithAnalytics } from '../../../pm-plugins/drag-and-drop/commands-with-analytics';
|
|
13
14
|
import { getPluginState as getTablePluginState } from '../../../pm-plugins/plugin-factory';
|
|
14
15
|
import { getRowsParams } from '../../../pm-plugins/utils/row-controls';
|
|
15
|
-
import { getSelectedColumnIndexes, isColumnSelectionWithMergedFirstRow } from '../../../pm-plugins/utils/selection';
|
|
16
|
+
import { getSelectedColumnIndexes, isColumnSelectionWithMergedFirstRow, isColumnSelectionWithMergedLastRow } from '../../../pm-plugins/utils/selection';
|
|
16
17
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
17
18
|
import { DragHandle } from '../../DragHandle';
|
|
18
19
|
var getSelectedColumns = function getSelectedColumns(selection) {
|
|
@@ -20,9 +21,13 @@ var getSelectedColumns = function getSelectedColumns(selection) {
|
|
|
20
21
|
return [];
|
|
21
22
|
}
|
|
22
23
|
if (expValEquals('platform_editor_table_menu_updates', 'isEnabled', true)) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
var isColumnSelection;
|
|
25
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
26
|
+
isColumnSelection = selection.isColSelection() || isColumnSelectionWithMergedFirstRow(selection) || isColumnSelectionWithMergedLastRow(selection);
|
|
27
|
+
} else {
|
|
28
|
+
isColumnSelection = selection.isColSelection() || isColumnSelectionWithMergedFirstRow(selection);
|
|
29
|
+
}
|
|
30
|
+
if (!isColumnSelection) {
|
|
26
31
|
return [];
|
|
27
32
|
}
|
|
28
33
|
var rect = getSelectionRect(selection);
|
|
@@ -57,12 +62,14 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
57
62
|
getScrollOffset = _ref.getScrollOffset,
|
|
58
63
|
api = _ref.api;
|
|
59
64
|
var columnControlsRef = useRef(null);
|
|
60
|
-
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['selection'], function (states) {
|
|
61
|
-
var _states$selectionStat;
|
|
65
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['selection', 'table'], function (states) {
|
|
66
|
+
var _states$tableState, _states$selectionStat;
|
|
62
67
|
return {
|
|
68
|
+
activeTableMenu: (_states$tableState = states.tableState) === null || _states$tableState === void 0 ? void 0 : _states$tableState.activeTableMenu,
|
|
63
69
|
selection: (_states$selectionStat = states.selectionState) === null || _states$selectionStat === void 0 ? void 0 : _states$selectionStat.selection
|
|
64
70
|
};
|
|
65
71
|
}),
|
|
72
|
+
activeTableMenu = _useSharedPluginState.activeTableMenu,
|
|
66
73
|
selection = _useSharedPluginState.selection;
|
|
67
74
|
var widths = (_colWidths$map$join = colWidths === null || colWidths === void 0 ? void 0 : colWidths.map(function (width) {
|
|
68
75
|
return (
|
|
@@ -75,6 +82,12 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
75
82
|
var columnParams = getRowsParams(colWidths !== null && colWidths !== void 0 ? colWidths : []);
|
|
76
83
|
var colIndex = hoveredCell === null || hoveredCell === void 0 ? void 0 : hoveredCell.colIndex;
|
|
77
84
|
var selectedColIndexes = getSelectedColumns(selection || editorView.state.selection);
|
|
85
|
+
var renderedSelectedColIndexes;
|
|
86
|
+
if (isExperimentEnabled('platform_editor_table_menu_updates_patch_5')) {
|
|
87
|
+
renderedSelectedColIndexes = (activeTableMenu === null || activeTableMenu === void 0 ? void 0 : activeTableMenu.type) === 'column' ? [activeTableMenu.index] : selectedColIndexes;
|
|
88
|
+
} else {
|
|
89
|
+
renderedSelectedColIndexes = selectedColIndexes;
|
|
90
|
+
}
|
|
78
91
|
var firstRow = tableRef.querySelector('tr');
|
|
79
92
|
var hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
80
93
|
var rowControlStickyTop = 45;
|
|
@@ -219,7 +232,7 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
219
232
|
position: 'relative',
|
|
220
233
|
pointerEvents: isPlaceholder ? 'none' : undefined
|
|
221
234
|
},
|
|
222
|
-
"data-testid": "table-floating-column-".concat(isHover ? colIndex : isPlaceholder ? appearance :
|
|
235
|
+
"data-testid": "table-floating-column-".concat(isHover ? colIndex : isPlaceholder ? appearance : renderedSelectedColIndexes[0], "-drag-handle")
|
|
223
236
|
}, /*#__PURE__*/React.createElement(DragHandle, {
|
|
224
237
|
api: api,
|
|
225
238
|
isDragMenuTarget: !isHover,
|
|
@@ -242,8 +255,8 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
242
255
|
};
|
|
243
256
|
var columnHandles = function columnHandles() {
|
|
244
257
|
var handles = [];
|
|
245
|
-
var isColumnSelected =
|
|
246
|
-
var isEntireTableSelected = (colWidths || []).length >
|
|
258
|
+
var isColumnSelected = renderedSelectedColIndexes.length > 0;
|
|
259
|
+
var isEntireTableSelected = (colWidths || []).length > renderedSelectedColIndexes.length;
|
|
247
260
|
if (!tableActive) {
|
|
248
261
|
return null;
|
|
249
262
|
}
|
|
@@ -253,8 +266,8 @@ export var ColumnControls = function ColumnControls(_ref) {
|
|
|
253
266
|
// so it can be focused via keyboard shortcuts
|
|
254
267
|
handles.push(generateHandleByType('selected', selectedAppearance,
|
|
255
268
|
// always position placeholder in first column to avoid overflow issues
|
|
256
|
-
selectedAppearance === 'placeholder' ? '1 / span 1' : "".concat(
|
|
257
|
-
if (hoveredCell && isTableHovered && colIndex !== undefined && !
|
|
269
|
+
selectedAppearance === 'placeholder' ? '1 / span 1' : "".concat(renderedSelectedColIndexes[0] + 1, " / span ").concat(renderedSelectedColIndexes.length), renderedSelectedColIndexes));
|
|
270
|
+
if (hoveredCell && isTableHovered && colIndex !== undefined && !renderedSelectedColIndexes.includes(colIndex)) {
|
|
258
271
|
handles.push(
|
|
259
272
|
// Ignored via go/ees005
|
|
260
273
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* SortDecreasingItem.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* SortDecreasingItem.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./SortDecreasingItem.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* SortIncreasingItem.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* SortIncreasingItem.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./SortIncreasingItem.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* BackgroundColorItem.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* BackgroundColorItem.tsx generated by @compiled/babel-plugin v3.0.1 */
|
|
2
2
|
import "./BackgroundColorItem.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useMemo } from 'react';
|
|
@@ -9,6 +9,12 @@ export declare const getSelectedRowIndexes: (selectionRect: Rect) => number[];
|
|
|
9
9
|
* returns `false` in this case because the selection does not include the merged first-row cell.
|
|
10
10
|
*/
|
|
11
11
|
export declare const isColumnSelectionWithMergedFirstRow: (selection: CellSelection) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Treats a column as fully selected when its last-row area is covered by a horizontal merge and
|
|
14
|
+
* the explicit `CellSelection` ends above that merged cell. Using that merged cell as an endpoint
|
|
15
|
+
* would expand the selection to the full width of the cell.
|
|
16
|
+
*/
|
|
17
|
+
export declare const isColumnSelectionWithMergedLastRow: (selection: CellSelection) => boolean;
|
|
12
18
|
/**
|
|
13
19
|
* Treats a row as fully selected when its first-column area is covered by a vertical merge and the
|
|
14
20
|
* explicit `CellSelection` starts to the right of that merged cell. `CellSelection.isRowSelection()`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "29.1.
|
|
3
|
+
"version": "29.1.7",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^17.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-content-insertion": "^17.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-editor-viewmode": "^19.0.0",
|
|
32
|
-
"@atlaskit/editor-plugin-extension": "20.0.
|
|
32
|
+
"@atlaskit/editor-plugin-extension": "20.0.7",
|
|
33
33
|
"@atlaskit/editor-plugin-guideline": "^17.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-interaction": "^28.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-limited-mode": "^14.1.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.2.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^2.2.0",
|
|
55
55
|
"@atlaskit/primitives": "^22.5.0",
|
|
56
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
56
|
+
"@atlaskit/tmp-editor-statsig": "^185.0.0",
|
|
57
57
|
"@atlaskit/toggle": "^17.3.0",
|
|
58
58
|
"@atlaskit/tokens": "^16.11.0",
|
|
59
59
|
"@atlaskit/tooltip": "^24.3.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"uuid": "^11.1.1"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@atlaskit/editor-common": "^121.
|
|
71
|
+
"@atlaskit/editor-common": "^121.3.0",
|
|
72
72
|
"react": "^18.2.0 || ^19.2.0",
|
|
73
73
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
74
74
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -92,9 +92,6 @@
|
|
|
92
92
|
"platform_editor_table_height_analytics": {
|
|
93
93
|
"type": "boolean"
|
|
94
94
|
},
|
|
95
|
-
"platform_editor_max_width_default_width": {
|
|
96
|
-
"type": "boolean"
|
|
97
|
-
},
|
|
98
95
|
"platform_editor_ai_table_ai_streaming_pos_fix": {
|
|
99
96
|
"type": "boolean"
|
|
100
97
|
},
|