@atlaskit/editor-plugin-table 5.7.2 → 5.7.4
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 +15 -0
- package/dist/cjs/commands/insert.js +1 -1
- package/dist/cjs/nodeviews/TableComponent.js +4 -1
- package/dist/cjs/plugin.js +2 -1
- package/dist/cjs/pm-plugins/main.js +5 -16
- package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +0 -4
- package/dist/cjs/transforms/column-width.js +3 -105
- package/dist/cjs/transforms/delete-columns.js +2 -5
- package/dist/cjs/types.js +0 -2
- package/dist/cjs/ui/FloatingDragMenu/index.js +5 -2
- package/dist/cjs/ui/FloatingInsertButton/InsertButton.js +3 -3
- package/dist/cjs/ui/FloatingInsertButton/index.js +1 -1
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +39 -8
- package/dist/cjs/ui/TableFloatingColumnControls/index.js +17 -8
- package/dist/cjs/ui/common-styles.js +1 -1
- package/dist/cjs/utils/decoration.js +48 -34
- package/dist/cjs/utils/dom.js +1 -19
- package/dist/cjs/utils/index.js +0 -6
- package/dist/es2019/commands/insert.js +1 -1
- package/dist/es2019/nodeviews/TableComponent.js +5 -2
- package/dist/es2019/plugin.js +2 -1
- package/dist/es2019/pm-plugins/main.js +1 -12
- package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +1 -5
- package/dist/es2019/transforms/column-width.js +4 -102
- package/dist/es2019/transforms/delete-columns.js +2 -5
- package/dist/es2019/types.js +0 -2
- package/dist/es2019/ui/FloatingDragMenu/index.js +6 -3
- package/dist/es2019/ui/FloatingInsertButton/InsertButton.js +3 -3
- package/dist/es2019/ui/FloatingInsertButton/index.js +2 -2
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +34 -4
- package/dist/es2019/ui/TableFloatingColumnControls/index.js +18 -9
- package/dist/es2019/ui/common-styles.js +6 -1
- package/dist/es2019/utils/decoration.js +47 -33
- package/dist/es2019/utils/dom.js +0 -18
- package/dist/es2019/utils/index.js +1 -1
- package/dist/esm/commands/insert.js +1 -1
- package/dist/esm/nodeviews/TableComponent.js +5 -2
- package/dist/esm/plugin.js +2 -1
- package/dist/esm/pm-plugins/main.js +1 -12
- package/dist/esm/pm-plugins/table-resizing/event-handlers.js +1 -5
- package/dist/esm/transforms/column-width.js +4 -106
- package/dist/esm/transforms/delete-columns.js +2 -5
- package/dist/esm/types.js +0 -2
- package/dist/esm/ui/FloatingDragMenu/index.js +6 -3
- package/dist/esm/ui/FloatingInsertButton/InsertButton.js +3 -3
- package/dist/esm/ui/FloatingInsertButton/index.js +2 -2
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +35 -4
- package/dist/esm/ui/TableFloatingColumnControls/index.js +18 -9
- package/dist/esm/ui/common-styles.js +2 -2
- package/dist/esm/utils/decoration.js +48 -34
- package/dist/esm/utils/dom.js +0 -18
- package/dist/esm/utils/index.js +1 -1
- package/dist/types/transforms/column-width.d.ts +1 -14
- package/dist/types/types.d.ts +0 -1
- package/dist/types/ui/FloatingDragMenu/index.d.ts +3 -1
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +3 -1
- package/dist/types/ui/TableFloatingColumnControls/index.d.ts +2 -0
- package/dist/types/utils/dom.d.ts +0 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/transforms/column-width.d.ts +1 -14
- package/dist/types-ts4.5/types.d.ts +0 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +2 -0
- package/dist/types-ts4.5/utils/dom.d.ts +0 -1
- package/dist/types-ts4.5/utils/index.d.ts +1 -1
- package/package.json +6 -9
- package/src/__tests__/unit/commands/insert.ts +7 -0
- package/src/__tests__/unit/transforms/delete-columns.ts +147 -368
- package/src/commands/insert.ts +1 -3
- package/src/nodeviews/TableComponent.tsx +7 -2
- package/src/plugin.tsx +1 -0
- package/src/pm-plugins/main.ts +0 -18
- package/src/pm-plugins/table-resizing/event-handlers.ts +1 -8
- package/src/transforms/column-width.ts +4 -137
- package/src/transforms/delete-columns.ts +3 -9
- package/src/types.ts +0 -2
- package/src/ui/FloatingDragMenu/index.tsx +14 -2
- package/src/ui/FloatingInsertButton/InsertButton.tsx +6 -2
- package/src/ui/FloatingInsertButton/index.tsx +4 -2
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +48 -3
- package/src/ui/TableFloatingColumnControls/index.tsx +23 -11
- package/src/ui/common-styles.ts +6 -0
- package/src/utils/decoration.ts +41 -28
- package/src/utils/dom.ts +0 -23
- package/src/utils/index.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 5.7.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#63287](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63287) [`8b58c452f126`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b58c452f126) - ED-20334 Cleaned reference for feature flag 'platform.editor.table-update-colwidths-after-column-is-deleted'and refactored code for it.
|
|
8
|
+
|
|
9
|
+
## 5.7.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#63290](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63290) [`52ea8e908f57`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/52ea8e908f57) - ED-19613: Cleaned references for feature flag: platform.editor.table-remove-update-resize-handles_djvab.
|
|
14
|
+
- [#63606](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63606) [`196f99e732d6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/196f99e732d6) - [ux] Add support for drag handle for sticky header in table
|
|
15
|
+
- [#61531](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61531) [`4f1e82618f55`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4f1e82618f55) - [ux] fix in danger selection been re-calcuate with merged cells
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 5.7.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -43,7 +43,7 @@ function addColumnAt(getEditorContainerWidth) {
|
|
|
43
43
|
var table = (0, _utils2.findTable)(updatedTr.selection);
|
|
44
44
|
if (table) {
|
|
45
45
|
// [ED-8288] Update colwidths manually to avoid multiple dispatch in TableComponent
|
|
46
|
-
updatedTr = (0, _columnWidth.rescaleColumns)(
|
|
46
|
+
updatedTr = (0, _columnWidth.rescaleColumns)()(table, view)(updatedTr);
|
|
47
47
|
}
|
|
48
48
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.analytics-plugin-moved-event') && view) {
|
|
49
49
|
updatedTr = (0, _commands.updateRowOrColumnMovedTransform)({
|
|
@@ -561,6 +561,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
561
561
|
headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
|
|
562
562
|
stickyHeader: this.state.stickyHeader
|
|
563
563
|
});
|
|
564
|
+
var tableContainerWidth = (0, _nodeWidth.getTableContainerWidth)(node);
|
|
564
565
|
var colControls = isDragAndDropEnabled ? /*#__PURE__*/_react.default.createElement(_TableFloatingColumnControls.default, {
|
|
565
566
|
editorView: view,
|
|
566
567
|
tableRef: tableRef,
|
|
@@ -579,7 +580,9 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
579
580
|
headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
|
|
580
581
|
stickyHeader: this.state.stickyHeader,
|
|
581
582
|
canDrag: canDrag,
|
|
582
|
-
getEditorFeatureFlags: getEditorFeatureFlags
|
|
583
|
+
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
584
|
+
tableContainerWidth: tableContainerWidth,
|
|
585
|
+
isNumberColumnEnabled: node.attrs.isNumberColumnEnabled
|
|
583
586
|
}) : null;
|
|
584
587
|
var shadowPadding = allowControls && tableActive ? -_editorSharedStyles.akEditorTableToolbarSize : _styles.tableMarginSides;
|
|
585
588
|
var shadowStyle = (0, _memoizeOne.default)(function (visible) {
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -359,7 +359,8 @@ var tablesPlugin = function tablesPlugin(_ref) {
|
|
|
359
359
|
isOpen: !!(dragAndDropState !== null && dragAndDropState !== void 0 && dragAndDropState.isDragMenuOpen) && !isResizing,
|
|
360
360
|
canDrag: dragAndDropState === null || dragAndDropState === void 0 ? void 0 : dragAndDropState.canDrag,
|
|
361
361
|
getEditorContainerWidth: defaultGetEditorContainerWidth,
|
|
362
|
-
editorAnalyticsAPI: editorAnalyticsAPI
|
|
362
|
+
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
363
|
+
stickyHeaders: stickyHeader
|
|
363
364
|
}), allowControls && !isDragAndDropEnabled && !isResizing && /*#__PURE__*/_react.default.createElement(_FloatingDeleteButton.default, {
|
|
364
365
|
editorView: editorView,
|
|
365
366
|
selection: editorView.state.selection,
|
|
@@ -12,8 +12,6 @@ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
|
12
12
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
13
13
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
14
14
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
15
|
-
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
15
|
var _commands = require("../commands");
|
|
18
16
|
var _misc = require("../commands/misc");
|
|
19
17
|
var _eventHandlers = require("../event-handlers");
|
|
@@ -23,7 +21,7 @@ var _TableRow = _interopRequireDefault(require("../nodeviews/TableRow"));
|
|
|
23
21
|
var _plugin = require("../pm-plugins/decorations/plugin");
|
|
24
22
|
var _transforms2 = require("../transforms");
|
|
25
23
|
var _types = require("../types");
|
|
26
|
-
var
|
|
24
|
+
var _utils3 = require("../utils");
|
|
27
25
|
var _paste = require("../utils/paste");
|
|
28
26
|
var _defaultTableSelection = require("./default-table-selection");
|
|
29
27
|
var _pluginFactory = require("./plugin-factory");
|
|
@@ -114,24 +112,15 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
|
|
|
114
112
|
var selection = state.selection;
|
|
115
113
|
var pluginState = (0, _pluginFactory.getPluginState)(state);
|
|
116
114
|
var tableRef;
|
|
117
|
-
var tableNode;
|
|
118
115
|
if (pluginState.editorHasFocus) {
|
|
119
116
|
var parent = (0, _utils2.findParentDomRefOfType)(state.schema.nodes.table, domAtPos)(selection);
|
|
120
117
|
if (parent) {
|
|
121
118
|
tableRef = parent.querySelector('table') || undefined;
|
|
122
119
|
}
|
|
123
|
-
tableNode = (0, _utils3.findTable)(state.selection);
|
|
124
120
|
}
|
|
125
121
|
if (pluginState.tableRef !== tableRef) {
|
|
126
122
|
(0, _commands.setTableRef)(tableRef)(state, dispatch);
|
|
127
123
|
}
|
|
128
|
-
|
|
129
|
-
// Removes updateResizeHandles
|
|
130
|
-
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.table-remove-update-resize-handles_djvab')) {} else {
|
|
131
|
-
if (pluginState.tableNode !== tableNode) {
|
|
132
|
-
(0, _utils4.updateResizeHandles)(tableRef);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
124
|
if (pluginState.editorHasFocus && pluginState.tableRef) {
|
|
136
125
|
var _ref = state.selection,
|
|
137
126
|
$cursor = _ref.$cursor;
|
|
@@ -167,7 +156,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
|
|
|
167
156
|
if (!(0, _coreUtils.insideTable)(editorState) && (0, _paste.isHeaderRowRequired)(editorState)) {
|
|
168
157
|
slice = (0, _misc.transformSliceToAddTableHeaders)(slice, schema);
|
|
169
158
|
}
|
|
170
|
-
slice = (0,
|
|
159
|
+
slice = (0, _utils3.transformSliceToFixHardBreakProblemOnCopyFromCell)(slice, schema);
|
|
171
160
|
|
|
172
161
|
// We do this separately, so it also applies to drag/drop events
|
|
173
162
|
// This needs to go before `transformSliceToRemoveOpenExpand`
|
|
@@ -178,11 +167,11 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
|
|
|
178
167
|
slice = (0, _transforms.transformSliceToRemoveOpenExpand)(slice, schema);
|
|
179
168
|
|
|
180
169
|
/** If a partial paste of table, paste only table's content */
|
|
181
|
-
slice = (0,
|
|
170
|
+
slice = (0, _utils3.transformSliceToRemoveOpenTable)(slice, schema);
|
|
182
171
|
|
|
183
172
|
/** If a partial paste of bodied extension, paste only text */
|
|
184
173
|
slice = (0, _transforms.transformSliceToRemoveOpenBodiedExtension)(slice, schema);
|
|
185
|
-
slice = (0,
|
|
174
|
+
slice = (0, _utils3.transformSliceToCorrectEmptyTableCells)(slice, schema);
|
|
186
175
|
if (!pluginConfig.allowColumnResizing) {
|
|
187
176
|
slice = (0, _misc.transformSliceToRemoveColumnsWidths)(slice, schema);
|
|
188
177
|
}
|
|
@@ -198,7 +187,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
|
|
|
198
187
|
var state = _ref2.state,
|
|
199
188
|
dispatch = _ref2.dispatch;
|
|
200
189
|
var decorationSet = _plugin.pluginKey.getState(state);
|
|
201
|
-
if ((0,
|
|
190
|
+
if ((0, _utils3.findControlsHoverDecoration)(decorationSet).length) {
|
|
202
191
|
(0, _commands.clearHoverSelection)()(state, dispatch);
|
|
203
192
|
}
|
|
204
193
|
|
|
@@ -151,10 +151,6 @@ var handleMouseDown = exports.handleMouseDown = function handleMouseDown(view, e
|
|
|
151
151
|
var colIndex = map.colCount($cell.pos - $cell.start(-1)) + $cell.nodeAfter.attrs.colspan - 1;
|
|
152
152
|
(0, _utils3.resizeColumn)(resizeState, colIndex, clientX - dragging.startX, dom);
|
|
153
153
|
(0, _utils3.updateControls)()(state);
|
|
154
|
-
// Remove updateResizeHandles
|
|
155
|
-
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.table-remove-update-resize-handles_djvab')) {} else {
|
|
156
|
-
(0, _utils2.updateResizeHandles)(dom);
|
|
157
|
-
}
|
|
158
154
|
}
|
|
159
155
|
window.addEventListener('mouseup', finish);
|
|
160
156
|
window.addEventListener('mousemove', move);
|
|
@@ -4,16 +4,14 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.updateColumnWidths = exports.
|
|
7
|
+
exports.updateColumnWidths = exports.rescaleColumns = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
10
10
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
11
|
-
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
11
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
13
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _utils = require("../pm-plugins/table-resizing/utils");
|
|
15
14
|
var _colgroup = require("../pm-plugins/table-resizing/utils/colgroup");
|
|
16
|
-
var _misc = require("../pm-plugins/table-resizing/utils/misc");
|
|
17
15
|
var _resizeState = require("../pm-plugins/table-resizing/utils/resize-state");
|
|
18
16
|
var _scaleTable = require("../pm-plugins/table-resizing/utils/scale-table");
|
|
19
17
|
var _commonStyles = require("../ui/common-styles");
|
|
@@ -95,7 +93,7 @@ var updateColumnWidths = exports.updateColumnWidths = function updateColumnWidth
|
|
|
95
93
|
* @param view
|
|
96
94
|
* @returns Updated transaction with rescaled columns for a given table
|
|
97
95
|
*/
|
|
98
|
-
var
|
|
96
|
+
var rescaleColumns = exports.rescaleColumns = function rescaleColumns() {
|
|
99
97
|
return function (table, view) {
|
|
100
98
|
return function (tr) {
|
|
101
99
|
var _tableRef$parentEleme, _tableRef$parentEleme2;
|
|
@@ -115,7 +113,7 @@ var rescaleColumnsNew = exports.rescaleColumnsNew = function rescaleColumnsNew()
|
|
|
115
113
|
// when table is resized the tableRef client width will be 1px larger than colGroup, which is used in calculations
|
|
116
114
|
width: isResized ? tableRef.clientWidth - 1 : tableRef.clientWidth,
|
|
117
115
|
/** the is the width the table can reach before overflowing */
|
|
118
|
-
possibleMaxWidth: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? (tableRef === null || tableRef === void 0 || (_tableRef$parentEleme = tableRef.parentElement) === null || _tableRef$parentEleme === void 0 ? void 0 : _tableRef$parentEleme.clientWidth) || 0 : ((tableRef === null || tableRef === void 0 || (_tableRef$parentEleme2 = tableRef.parentElement) === null || _tableRef$parentEleme2 === void 0 ? void 0 : _tableRef$parentEleme2.clientWidth) || 0) - _commonStyles.insertColumnButtonOffset
|
|
116
|
+
possibleMaxWidth: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') ? (tableRef === null || tableRef === void 0 || (_tableRef$parentEleme = tableRef.parentElement) === null || _tableRef$parentEleme === void 0 ? void 0 : _tableRef$parentEleme.clientWidth) || 0 : ((tableRef === null || tableRef === void 0 || (_tableRef$parentEleme2 = tableRef.parentElement) === null || _tableRef$parentEleme2 === void 0 ? void 0 : _tableRef$parentEleme2.clientWidth) || 0) - _commonStyles.insertColumnButtonOffset,
|
|
119
117
|
isResized: isResized
|
|
120
118
|
};
|
|
121
119
|
|
|
@@ -175,104 +173,4 @@ var rescaleColumnsNew = exports.rescaleColumnsNew = function rescaleColumnsNew()
|
|
|
175
173
|
return updateColumnWidths(resizeState, table.node, table.start)(tr);
|
|
176
174
|
};
|
|
177
175
|
};
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* This function is called when user inserts/deletes a column in a table to;
|
|
182
|
-
* - rescale all columns (if the table did not overflow before the insertion)
|
|
183
|
-
* - and update column widths.
|
|
184
|
-
*
|
|
185
|
-
* This is done manually to avoid a multi-dispatch in TableComponent. See [ED-8288].
|
|
186
|
-
* @param table
|
|
187
|
-
* @param view
|
|
188
|
-
* @returns Updated transaction with rescaled columns for a given table
|
|
189
|
-
*/
|
|
190
|
-
var rescaleColumnsOld = exports.rescaleColumnsOld = function rescaleColumnsOld(getEditorContainerWidth) {
|
|
191
|
-
return function (table, view) {
|
|
192
|
-
return function (tr) {
|
|
193
|
-
var _tableRef$parentEleme3;
|
|
194
|
-
if (!view) {
|
|
195
|
-
return tr;
|
|
196
|
-
}
|
|
197
|
-
var pos = table.pos;
|
|
198
|
-
var newTable = tr.doc.nodeAt(pos);
|
|
199
|
-
var state = view.state;
|
|
200
|
-
var domAtPos = view.domAtPos.bind(view);
|
|
201
|
-
var maybeTable = domAtPos(table.start).node;
|
|
202
|
-
var tableRef = maybeTable.closest('table');
|
|
203
|
-
if (!tableRef || !newTable) {
|
|
204
|
-
return tr;
|
|
205
|
-
}
|
|
206
|
-
var layout = (0, _resizeState.normaliseTableLayout)(tableRef === null || tableRef === void 0 ? void 0 : tableRef.dataset.layout);
|
|
207
|
-
// The is the width the table can reach before overflowing
|
|
208
|
-
var maxSize = (0, _misc.getTableMaxWidth)({
|
|
209
|
-
table: table.node,
|
|
210
|
-
tableStart: table.start,
|
|
211
|
-
state: state,
|
|
212
|
-
layout: layout,
|
|
213
|
-
getEditorContainerWidth: getEditorContainerWidth
|
|
214
|
-
});
|
|
215
|
-
var tableWidth = tableRef.clientWidth || _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
216
|
-
var tableMaxWidth = (tableRef === null || tableRef === void 0 || (_tableRef$parentEleme3 = tableRef.parentElement) === null || _tableRef$parentEleme3 === void 0 ? void 0 : _tableRef$parentEleme3.clientWidth) || 0;
|
|
217
|
-
tableMaxWidth -= _commonStyles.insertColumnButtonOffset;
|
|
218
|
-
var newTableMap = _tableMap.TableMap.get(newTable);
|
|
219
|
-
var noOfColumns = newTableMap.width;
|
|
220
|
-
if (!noOfColumns || noOfColumns <= 0) {
|
|
221
|
-
return tr;
|
|
222
|
-
}
|
|
223
|
-
var columnWidthUnresized = tableWidth / noOfColumns;
|
|
224
|
-
|
|
225
|
-
// If the table has not been resized, and the column width is bigger than the minimum column width
|
|
226
|
-
// we skip updating the size of columns here.
|
|
227
|
-
if (!(0, _utils.hasTableBeenResized)(table.node) && columnWidthUnresized > _styles.tableCellMinWidth) {
|
|
228
|
-
return tr;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// If the table has not been resized, and the column width is smaller than the minimum column width
|
|
232
|
-
// Or if the table has been resized, but each column width is either 48px or null
|
|
233
|
-
// we update the table to have 48px for each column
|
|
234
|
-
if (!(0, _utils.hasTableBeenResized)(table.node) && columnWidthUnresized <= _styles.tableCellMinWidth || (0, _utils.hasTableBeenResized)(table.node) && (0, _colgroup.isMinCellWidthTable)(table.node)) {
|
|
235
|
-
var widths = new Array(noOfColumns).fill(_styles.tableCellMinWidth);
|
|
236
|
-
var cols = widths.map(function (_, index) {
|
|
237
|
-
return {
|
|
238
|
-
width: _styles.tableCellMinWidth,
|
|
239
|
-
minWidth: _styles.tableCellMinWidth,
|
|
240
|
-
index: index
|
|
241
|
-
};
|
|
242
|
-
});
|
|
243
|
-
var overflow = tableWidth > maxSize;
|
|
244
|
-
var minWidthResizeState = {
|
|
245
|
-
cols: cols,
|
|
246
|
-
widths: widths,
|
|
247
|
-
maxSize: maxSize,
|
|
248
|
-
tableWidth: tableWidth,
|
|
249
|
-
overflow: overflow
|
|
250
|
-
};
|
|
251
|
-
return updateColumnWidths(minWidthResizeState, table.node, table.start)(tr);
|
|
252
|
-
}
|
|
253
|
-
var resizeState = (0, _resizeState.getResizeState)({
|
|
254
|
-
minWidth: _styles.tableCellMinWidth,
|
|
255
|
-
table: table.node,
|
|
256
|
-
start: table.start,
|
|
257
|
-
tableRef: tableRef,
|
|
258
|
-
domAtPos: domAtPos,
|
|
259
|
-
maxSize: maxSize
|
|
260
|
-
});
|
|
261
|
-
var previousTableWidth = resizeState.tableWidth - _tableMap.tableNewColumnMinWidth;
|
|
262
|
-
var tableDidntPreviouslyOverflow = previousTableWidth <= Math.max(maxSize, tableMaxWidth);
|
|
263
|
-
|
|
264
|
-
// If the new table width will result in the table going into an overflow state
|
|
265
|
-
// we resize the cells to avoid the overflow occuring
|
|
266
|
-
if (tableDidntPreviouslyOverflow && resizeState.overflow) {
|
|
267
|
-
resizeState = (0, _scaleTable.scaleTableTo)(resizeState, maxSize);
|
|
268
|
-
}
|
|
269
|
-
return updateColumnWidths(resizeState, table.node, table.start)(tr);
|
|
270
|
-
};
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
var rescaleColumns = exports.rescaleColumns = function rescaleColumns(getEditorContainerWidth) {
|
|
274
|
-
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.table-update-colwidths-after-column-is-deleted')) {
|
|
275
|
-
return rescaleColumnsNew();
|
|
276
|
-
}
|
|
277
|
-
return rescaleColumnsOld(getEditorContainerWidth);
|
|
278
176
|
};
|
|
@@ -12,7 +12,6 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
14
14
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _tableAnalytics = require("../pm-plugins/table-analytics");
|
|
17
16
|
var _columnWidth = require("./column-width");
|
|
18
17
|
var _split = require("./split");
|
|
@@ -224,10 +223,8 @@ var deleteColumns = exports.deleteColumns = function deleteColumns(rect, allowCu
|
|
|
224
223
|
updatedTr = deleteColumnsLegacy(rect)(updatedTr);
|
|
225
224
|
}
|
|
226
225
|
var table = (0, _utils.findTable)(updatedTr.selection);
|
|
227
|
-
if (
|
|
228
|
-
|
|
229
|
-
updatedTr = (0, _columnWidth.rescaleColumns)()(table, view)(updatedTr);
|
|
230
|
-
}
|
|
226
|
+
if (table) {
|
|
227
|
+
updatedTr = (0, _columnWidth.rescaleColumns)()(table, view)(updatedTr);
|
|
231
228
|
}
|
|
232
229
|
return updatedTr;
|
|
233
230
|
};
|
package/dist/cjs/types.js
CHANGED
|
@@ -122,8 +122,6 @@ var TableCssClassName = exports.TableCssClassName = _objectSpread(_objectSpread(
|
|
|
122
122
|
RESIZING_PLUGIN: "".concat(_adfSchema.tablePrefixSelector, "-resizing-plugin"),
|
|
123
123
|
RESIZE_CURSOR: "".concat(_adfSchema.tablePrefixSelector, "-resize-cursor"),
|
|
124
124
|
IS_RESIZING: "".concat(_adfSchema.tablePrefixSelector, "-is-resizing"),
|
|
125
|
-
// Resize handle is going to be removed together with updateResizeHandles - table's utility function
|
|
126
|
-
RESIZE_HANDLE: "".concat(_adfSchema.tablePrefixSelector, "-resize-handle"),
|
|
127
125
|
RESIZE_HANDLE_DECORATION: "".concat(_adfSchema.tablePrefixSelector, "-resize-decoration"),
|
|
128
126
|
CONTEXTUAL_SUBMENU: "".concat(_adfSchema.tablePrefixSelector, "-contextual-submenu"),
|
|
129
127
|
CONTEXTUAL_MENU_BUTTON_WRAP: "".concat(_adfSchema.tablePrefixSelector, "-contextual-menu-button-wrap"),
|
|
@@ -23,10 +23,12 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
23
23
|
targetCellPosition = _ref.targetCellPosition,
|
|
24
24
|
getEditorContainerWidth = _ref.getEditorContainerWidth,
|
|
25
25
|
canDrag = _ref.canDrag,
|
|
26
|
-
editorAnalyticsAPI = _ref.editorAnalyticsAPI
|
|
26
|
+
editorAnalyticsAPI = _ref.editorAnalyticsAPI,
|
|
27
|
+
stickyHeaders = _ref.stickyHeaders;
|
|
27
28
|
if (!isOpen || !targetCellPosition || editorView.state.doc.nodeSize <= targetCellPosition) {
|
|
28
29
|
return null;
|
|
29
30
|
}
|
|
31
|
+
var inStickyMode = stickyHeaders === null || stickyHeaders === void 0 ? void 0 : stickyHeaders.sticky;
|
|
30
32
|
var targetHandleRef = direction === 'row' ? document.querySelector('#drag-handle-button-row') : document.querySelector('#drag-handle-button-column');
|
|
31
33
|
if (!targetHandleRef || !(editorView.state.selection instanceof _cellSelection.CellSelection)) {
|
|
32
34
|
return null;
|
|
@@ -44,8 +46,9 @@ var FloatingDragMenu = function FloatingDragMenu(_ref) {
|
|
|
44
46
|
fitWidth: _consts.dragMenuDropdownWidth
|
|
45
47
|
// z-index value below is to ensure that this menu is above other floating menu
|
|
46
48
|
// in table, but below floating dialogs like typeaheads, pickers, etc.
|
|
49
|
+
// In sticky mode, we want to show the menu above the sticky header
|
|
47
50
|
,
|
|
48
|
-
zIndex: _editorSharedStyles.akEditorFloatingOverlapPanelZIndex,
|
|
51
|
+
zIndex: inStickyMode ? _editorSharedStyles.akEditorFloatingDialogZIndex : _editorSharedStyles.akEditorFloatingOverlapPanelZIndex,
|
|
49
52
|
forcePlacement: true,
|
|
50
53
|
offset: offset,
|
|
51
54
|
stick: true
|
|
@@ -19,12 +19,12 @@ var _types = require("../../types");
|
|
|
19
19
|
var _consts = require("../consts");
|
|
20
20
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
21
21
|
|
|
22
|
-
var getInsertLineHeight = function getInsertLineHeight(tableRef, hasStickyHeaders) {
|
|
22
|
+
var getInsertLineHeight = function getInsertLineHeight(tableRef, hasStickyHeaders, isDragAndDropEnabled) {
|
|
23
23
|
// The line gets height 100% from the table,
|
|
24
24
|
// but since we have an overflow on the left,
|
|
25
25
|
// we should add an offset to make up for it.
|
|
26
26
|
var LINE_OFFSET = 3;
|
|
27
|
-
var ADDITIONAL_HEIGHT = hasStickyHeaders ? tableRef.getBoundingClientRect().top - _styles.tableMarginTop * 4 - LINE_OFFSET : _consts.tableToolbarSize + LINE_OFFSET;
|
|
27
|
+
var ADDITIONAL_HEIGHT = hasStickyHeaders ? tableRef.getBoundingClientRect().top - _styles.tableMarginTop * (isDragAndDropEnabled ? 3 : 4) - LINE_OFFSET : _consts.tableToolbarSize + LINE_OFFSET;
|
|
28
28
|
return tableRef.offsetHeight + ADDITIONAL_HEIGHT;
|
|
29
29
|
};
|
|
30
30
|
var getToolbarSize = function getToolbarSize(tableRef) {
|
|
@@ -89,7 +89,7 @@ var InsertButtonForDragAndDrop = exports.InsertButtonForDragAndDrop = function I
|
|
|
89
89
|
width: getInsertLineWidth(tableRef, true),
|
|
90
90
|
left: "var(--ds-space-150, 12px)"
|
|
91
91
|
} : {
|
|
92
|
-
height: getInsertLineHeight(tableRef, hasStickyHeaders) - 8,
|
|
92
|
+
height: getInsertLineHeight(tableRef, hasStickyHeaders, true) - 8,
|
|
93
93
|
top: '-3px'
|
|
94
94
|
}
|
|
95
95
|
})));
|
|
@@ -126,7 +126,7 @@ var FloatingInsertButton = exports.FloatingInsertButton = /*#__PURE__*/function
|
|
|
126
126
|
// By setting the Popup z-index higher than the sticky header z-index ( common-styles.ts tr.sticky)
|
|
127
127
|
// Only when inserting a column, otherwise set to undefined
|
|
128
128
|
// Need to set z-index in the Popup, set z-index in the <InsertButton /> will not work
|
|
129
|
-
var zIndex = type === 'column' ? _editorSharedStyles.
|
|
129
|
+
var zIndex = type === 'column' ? _editorSharedStyles.akEditorTableInsertButtonOnStickyHeaderZIndex : undefined;
|
|
130
130
|
return /*#__PURE__*/_react.default.createElement(_ui.Popup, (0, _extends2.default)({
|
|
131
131
|
target: targetCellRef,
|
|
132
132
|
mountTo: tableContainerWrapper || mountPoint,
|
|
@@ -7,12 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.ColumnControls = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
10
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
11
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
10
12
|
var _editorTables = require("@atlaskit/editor-tables");
|
|
11
|
-
var
|
|
13
|
+
var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
12
14
|
var _commands = require("../../../commands");
|
|
13
15
|
var _commands2 = require("../../../pm-plugins/drag-and-drop/commands");
|
|
14
16
|
var _types = require("../../../types");
|
|
15
|
-
var
|
|
17
|
+
var _utils3 = require("../../../utils");
|
|
16
18
|
var _DragHandle = require("../../DragHandle");
|
|
17
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -20,11 +22,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
20
22
|
|
|
21
23
|
var getSelectedColumns = function getSelectedColumns(selection) {
|
|
22
24
|
if (selection instanceof _editorTables.CellSelection && selection.isColSelection()) {
|
|
23
|
-
var rect = (0,
|
|
25
|
+
var rect = (0, _utils2.getSelectionRect)(selection);
|
|
24
26
|
if (!rect) {
|
|
25
27
|
return [];
|
|
26
28
|
}
|
|
27
|
-
return (0,
|
|
29
|
+
return (0, _utils3.getSelectedColumnIndexes)(rect);
|
|
28
30
|
}
|
|
29
31
|
return [];
|
|
30
32
|
};
|
|
@@ -42,12 +44,19 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
42
44
|
colWidths = _ref.colWidths,
|
|
43
45
|
hasHeaderColumn = _ref.hasHeaderColumn,
|
|
44
46
|
isTableHovered = _ref.isTableHovered,
|
|
45
|
-
canDrag = _ref.canDrag
|
|
47
|
+
canDrag = _ref.canDrag,
|
|
48
|
+
tableContainerWidth = _ref.tableContainerWidth,
|
|
49
|
+
isNumberColumnEnabled = _ref.isNumberColumnEnabled;
|
|
50
|
+
var columnControlsRef = (0, _react.useRef)(null);
|
|
46
51
|
var widths = (_colWidths$map$join = colWidths === null || colWidths === void 0 ? void 0 : colWidths.map(function (width) {
|
|
47
|
-
return
|
|
52
|
+
return (
|
|
53
|
+
// when there is sticky header, a `margin-right: -1px` applied to `tr.sticky th` so it causes colWidths to be 1px wider
|
|
54
|
+
// we need to reduce the width by 1px to avoid misalignment of column controls.
|
|
55
|
+
width ? stickyTop ? "".concat(width - 2, "px") : "".concat(width - 1, "px") : '0px'
|
|
56
|
+
);
|
|
48
57
|
}).join(' ')) !== null && _colWidths$map$join !== void 0 ? _colWidths$map$join : '0px';
|
|
49
58
|
// TODO: reusing getRowsParams here because it's generic enough to work for columns -> rename
|
|
50
|
-
var columnParams = (0,
|
|
59
|
+
var columnParams = (0, _utils3.getRowsParams)(colWidths !== null && colWidths !== void 0 ? colWidths : []);
|
|
51
60
|
var colIndex = hoveredCell === null || hoveredCell === void 0 ? void 0 : hoveredCell.colIndex;
|
|
52
61
|
var selectedColIndexes = getSelectedColumns(editorView.state.selection);
|
|
53
62
|
var firstRow = tableRef.querySelector('tr');
|
|
@@ -104,6 +113,24 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
104
113
|
var colIndexes = (0, _react.useMemo)(function () {
|
|
105
114
|
return [colIndex];
|
|
106
115
|
}, [colIndex]);
|
|
116
|
+
var tableWrapper = (0, _utils.closestElement)(tableRef, ".".concat(_types.TableCssClassName.TABLE_NODE_WRAPPER));
|
|
117
|
+
var handleScroll = (0, _react.useCallback)(function (event) {
|
|
118
|
+
if (stickyTop) {
|
|
119
|
+
if (columnControlsRef && columnControlsRef.current) {
|
|
120
|
+
var _tableWrapper$scrollL;
|
|
121
|
+
columnControlsRef.current.scrollLeft = (_tableWrapper$scrollL = tableWrapper === null || tableWrapper === void 0 ? void 0 : tableWrapper.scrollLeft) !== null && _tableWrapper$scrollL !== void 0 ? _tableWrapper$scrollL : 0;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}, [stickyTop, tableWrapper]);
|
|
125
|
+
(0, _react.useEffect)(function () {
|
|
126
|
+
handleScroll();
|
|
127
|
+
}, [handleScroll]);
|
|
128
|
+
(0, _react.useEffect)(function () {
|
|
129
|
+
tableWrapper === null || tableWrapper === void 0 || tableWrapper.addEventListener('scroll', handleScroll);
|
|
130
|
+
return function () {
|
|
131
|
+
tableWrapper === null || tableWrapper === void 0 || tableWrapper.removeEventListener('scroll', handleScroll);
|
|
132
|
+
};
|
|
133
|
+
}, [tableWrapper, handleScroll]);
|
|
107
134
|
var generateHandleByType = function generateHandleByType(type) {
|
|
108
135
|
var _rowHeights$reduce, _colWidths;
|
|
109
136
|
if (!hoveredCell || !(colWidths !== null && colWidths !== void 0 && colWidths.length)) {
|
|
@@ -166,15 +193,19 @@ var ColumnControls = exports.ColumnControls = function ColumnControls(_ref) {
|
|
|
166
193
|
var sortedHandles = [generateHandleByType('hover'), generateHandleByType('selected')];
|
|
167
194
|
return hoveredCell.colIndex < selectedColIndexes[0] ? sortedHandles : sortedHandles.reverse();
|
|
168
195
|
};
|
|
196
|
+
var containerWidth = isNumberColumnEnabled && tableContainerWidth ? tableContainerWidth - _editorSharedStyles.akEditorTableNumberColumnWidth : tableContainerWidth;
|
|
169
197
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
170
198
|
className: _types.TableCssClassName.DRAG_COLUMN_CONTROLS,
|
|
171
199
|
onMouseMove: handleMouseMove
|
|
172
200
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
201
|
+
ref: columnControlsRef,
|
|
173
202
|
className: _types.TableCssClassName.DRAG_COLUMN_CONTROLS_INNER,
|
|
174
203
|
"data-testid": "table-floating-column-controls",
|
|
175
204
|
style: {
|
|
176
205
|
gridTemplateColumns: widths,
|
|
177
|
-
marginTop: marginTop
|
|
206
|
+
marginTop: marginTop,
|
|
207
|
+
width: stickyTop ? containerWidth : undefined,
|
|
208
|
+
overflowX: stickyTop ? 'hidden' : 'visible'
|
|
178
209
|
}
|
|
179
210
|
}, !isResizing && columnParams.map(function (_ref2, index) {
|
|
180
211
|
var startIndex = _ref2.startIndex,
|
|
@@ -30,7 +30,9 @@ var TableFloatingColumnControls = exports.TableFloatingColumnControls = function
|
|
|
30
30
|
selection = _ref.selection,
|
|
31
31
|
isInDanger = _ref.isInDanger,
|
|
32
32
|
isTableHovered = _ref.isTableHovered,
|
|
33
|
-
canDrag = _ref.canDrag
|
|
33
|
+
canDrag = _ref.canDrag,
|
|
34
|
+
tableContainerWidth = _ref.tableContainerWidth,
|
|
35
|
+
isNumberColumnEnabled = _ref.isNumberColumnEnabled;
|
|
34
36
|
var _useState = (0, _react.useState)({
|
|
35
37
|
width: 0,
|
|
36
38
|
height: 0
|
|
@@ -42,9 +44,11 @@ var TableFloatingColumnControls = exports.TableFloatingColumnControls = function
|
|
|
42
44
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
43
45
|
hasDropTargets = _useState4[0],
|
|
44
46
|
setHasDropTargets = _useState4[1];
|
|
47
|
+
var containerRef = (0, _react.useRef)(null);
|
|
45
48
|
var node = getNode();
|
|
46
49
|
var currentNodeLocalId = node === null || node === void 0 ? void 0 : node.attrs.localId;
|
|
47
50
|
var hasHeaderColumn = (0, _utils.containsHeaderColumn)(node);
|
|
51
|
+
var stickyTop = stickyHeader && stickyHeader.sticky && hasHeaderRow ? stickyHeader.top : undefined;
|
|
48
52
|
(0, _react.useEffect)(function () {
|
|
49
53
|
var _window;
|
|
50
54
|
if (tableRef && (_window = window) !== null && _window !== void 0 && _window.ResizeObserver) {
|
|
@@ -105,14 +109,17 @@ var TableFloatingColumnControls = exports.TableFloatingColumnControls = function
|
|
|
105
109
|
return null;
|
|
106
110
|
}
|
|
107
111
|
var colWidths = (0, _utils.getColumnsWidths)(editorView);
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
if (stickyTop) {
|
|
113
|
+
var _rowHeights$, _containerRef$current;
|
|
114
|
+
var headerRowHeight = hasHeaderRow && stickyTop !== undefined ? (_rowHeights$ = rowHeights === null || rowHeights === void 0 ? void 0 : rowHeights[0]) !== null && _rowHeights$ !== void 0 ? _rowHeights$ : 0 : 0;
|
|
115
|
+
containerRef === null || containerRef === void 0 || (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 || _containerRef$current.style.setProperty('top', "".concat(stickyTop - headerRowHeight + 33, "px") // 33px is padding and margin applied on tr.sticky
|
|
116
|
+
);
|
|
117
|
+
} else {
|
|
118
|
+
var _containerRef$current2;
|
|
119
|
+
containerRef === null || containerRef === void 0 || (_containerRef$current2 = containerRef.current) === null || _containerRef$current2 === void 0 || _containerRef$current2.style.removeProperty('top');
|
|
114
120
|
}
|
|
115
121
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
122
|
+
ref: containerRef,
|
|
116
123
|
className: _types.TableCssClassName.DRAG_COLUMN_CONTROLS_WRAPPER,
|
|
117
124
|
"data-testid": "table-floating-column-controls-wrapper"
|
|
118
125
|
}, /*#__PURE__*/_react.default.createElement(_ColumnControls.ColumnControls, {
|
|
@@ -128,7 +135,9 @@ var TableFloatingColumnControls = exports.TableFloatingColumnControls = function
|
|
|
128
135
|
rowHeights: rowHeights,
|
|
129
136
|
colWidths: colWidths,
|
|
130
137
|
hasHeaderColumn: hasHeaderColumn,
|
|
131
|
-
canDrag: canDrag
|
|
138
|
+
canDrag: canDrag,
|
|
139
|
+
tableContainerWidth: tableContainerWidth,
|
|
140
|
+
isNumberColumnEnabled: isNumberColumnEnabled
|
|
132
141
|
}), hasDropTargets && /*#__PURE__*/_react.default.createElement(_ColumnDropTargets.ColumnDropTargets, {
|
|
133
142
|
tableRef: tableRef,
|
|
134
143
|
stickyTop: tableActive ? stickyTop : undefined,
|