@atlaskit/editor-plugin-table 7.7.1 → 7.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +0 -2
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-column.js +3 -1
- package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +0 -2
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-column.js +3 -1
- package/dist/esm/pm-plugins/table-resizing/event-handlers.js +0 -2
- package/dist/esm/pm-plugins/table-resizing/utils/resize-column.js +3 -1
- package/package.json +2 -2
- package/src/pm-plugins/table-resizing/event-handlers.ts +0 -1
- package/src/pm-plugins/table-resizing/utils/resize-column.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 7.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#92335](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92335) [`8bdb6ebbad6c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8bdb6ebbad6c) - fix column resize issue when table preserve width enabled.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 7.7.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -141,8 +141,6 @@ var handleMouseDown = exports.handleMouseDown = function handleMouseDown(view, e
|
|
|
141
141
|
var newResizeState = (0, _utils3.resizeColumn)(resizeState, colIndex, clientX - startX, dom, originalTable, resizingSelectedColumns ? selectedColumns : undefined, _shouldScale);
|
|
142
142
|
var resizedDelta = clientX - startX;
|
|
143
143
|
tr = (0, _transforms.updateColumnWidths)(newResizeState, table, start)(tr);
|
|
144
|
-
|
|
145
|
-
// console.log('debug newResizeState=', newResizeState);
|
|
146
144
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.colum-resizing-improvements')) {
|
|
147
145
|
tr.setNodeAttribute(tablePos, 'width', newResizeState.tableWidth);
|
|
148
146
|
}
|
|
@@ -17,7 +17,9 @@ var resizeColumn = exports.resizeColumn = function resizeColumn(resizeState, col
|
|
|
17
17
|
var isTableScalingEnabled = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
18
18
|
var scalePercent = 1;
|
|
19
19
|
var resizeAmount = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.colum-resizing-improvements') ? amount * 2 : amount;
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
// This need to be clean up if clean up the FF, we will not need this scale logic because now full table width changed/updated in resizeColumn
|
|
22
|
+
if (isTableScalingEnabled && !(0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.colum-resizing-improvements')) {
|
|
21
23
|
scalePercent = (0, _misc.getTableScalingPercent)(tableNode, tableRef);
|
|
22
24
|
resizeAmount = amount / scalePercent;
|
|
23
25
|
}
|
|
@@ -148,8 +148,6 @@ export const handleMouseDown = (view, event, localResizeHandlePos, getEditorCont
|
|
|
148
148
|
const newResizeState = resizeColumn(resizeState, colIndex, clientX - startX, dom, originalTable, resizingSelectedColumns ? selectedColumns : undefined, shouldScale);
|
|
149
149
|
const resizedDelta = clientX - startX;
|
|
150
150
|
tr = updateColumnWidths(newResizeState, table, start)(tr);
|
|
151
|
-
|
|
152
|
-
// console.log('debug newResizeState=', newResizeState);
|
|
153
151
|
if (getBooleanFF('platform.editor.table.colum-resizing-improvements')) {
|
|
154
152
|
tr.setNodeAttribute(tablePos, 'width', newResizeState.tableWidth);
|
|
155
153
|
}
|
|
@@ -8,7 +8,9 @@ import { updateColgroup } from './resize-state';
|
|
|
8
8
|
export const resizeColumn = (resizeState, colIndex, amount, tableRef, tableNode, selectedColumns, isTableScalingEnabled = false) => {
|
|
9
9
|
let scalePercent = 1;
|
|
10
10
|
let resizeAmount = getBooleanFF('platform.editor.table.colum-resizing-improvements') ? amount * 2 : amount;
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
// This need to be clean up if clean up the FF, we will not need this scale logic because now full table width changed/updated in resizeColumn
|
|
13
|
+
if (isTableScalingEnabled && !getBooleanFF('platform.editor.table.colum-resizing-improvements')) {
|
|
12
14
|
scalePercent = getTableScalingPercent(tableNode, tableRef);
|
|
13
15
|
resizeAmount = amount / scalePercent;
|
|
14
16
|
}
|
|
@@ -135,8 +135,6 @@ export var handleMouseDown = function handleMouseDown(view, event, localResizeHa
|
|
|
135
135
|
var newResizeState = resizeColumn(resizeState, colIndex, clientX - startX, dom, originalTable, resizingSelectedColumns ? selectedColumns : undefined, _shouldScale);
|
|
136
136
|
var resizedDelta = clientX - startX;
|
|
137
137
|
tr = updateColumnWidths(newResizeState, table, start)(tr);
|
|
138
|
-
|
|
139
|
-
// console.log('debug newResizeState=', newResizeState);
|
|
140
138
|
if (getBooleanFF('platform.editor.table.colum-resizing-improvements')) {
|
|
141
139
|
tr.setNodeAttribute(tablePos, 'width', newResizeState.tableWidth);
|
|
142
140
|
}
|
|
@@ -12,7 +12,9 @@ export var resizeColumn = function resizeColumn(resizeState, colIndex, amount, t
|
|
|
12
12
|
var isTableScalingEnabled = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
13
13
|
var scalePercent = 1;
|
|
14
14
|
var resizeAmount = getBooleanFF('platform.editor.table.colum-resizing-improvements') ? amount * 2 : amount;
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
// This need to be clean up if clean up the FF, we will not need this scale logic because now full table width changed/updated in resizeColumn
|
|
17
|
+
if (isTableScalingEnabled && !getBooleanFF('platform.editor.table.colum-resizing-improvements')) {
|
|
16
18
|
scalePercent = getTableScalingPercent(tableNode, tableRef);
|
|
17
19
|
resizeAmount = amount / scalePercent;
|
|
18
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "7.7.
|
|
3
|
+
"version": "7.7.2",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/adf-schema": "^35.9.0",
|
|
32
32
|
"@atlaskit/custom-steps": "^0.0.18",
|
|
33
|
-
"@atlaskit/editor-common": "^78.
|
|
33
|
+
"@atlaskit/editor-common": "^78.30.0",
|
|
34
34
|
"@atlaskit/editor-palette": "1.5.3",
|
|
35
35
|
"@atlaskit/editor-plugin-accessibility-utils": "^1.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
@@ -196,7 +196,6 @@ export const handleMouseDown = (
|
|
|
196
196
|
|
|
197
197
|
tr = updateColumnWidths(newResizeState, table, start)(tr);
|
|
198
198
|
|
|
199
|
-
// console.log('debug newResizeState=', newResizeState);
|
|
200
199
|
if (getBooleanFF('platform.editor.table.colum-resizing-improvements')) {
|
|
201
200
|
tr.setNodeAttribute(tablePos, 'width', newResizeState.tableWidth);
|
|
202
201
|
}
|
|
@@ -25,7 +25,11 @@ export const resizeColumn = (
|
|
|
25
25
|
? amount * 2
|
|
26
26
|
: amount;
|
|
27
27
|
|
|
28
|
-
if
|
|
28
|
+
// This need to be clean up if clean up the FF, we will not need this scale logic because now full table width changed/updated in resizeColumn
|
|
29
|
+
if (
|
|
30
|
+
isTableScalingEnabled &&
|
|
31
|
+
!getBooleanFF('platform.editor.table.colum-resizing-improvements')
|
|
32
|
+
) {
|
|
29
33
|
scalePercent = getTableScalingPercent(tableNode, tableRef);
|
|
30
34
|
resizeAmount = amount / scalePercent;
|
|
31
35
|
}
|