@atlaskit/editor-plugin-table 31.0.6 → 31.0.8
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 +16 -0
- package/dist/cjs/pm-plugins/utils/row-controls.js +39 -2
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +4 -1
- package/dist/es2019/pm-plugins/utils/row-controls.js +34 -1
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +20 -15
- package/dist/esm/pm-plugins/utils/row-controls.js +38 -1
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +5 -2
- package/dist/types/pm-plugins/utils/row-controls.d.ts +6 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 31.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 31.0.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`6bbecbd2ad0eb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6bbecbd2ad0eb) -
|
|
14
|
+
EDITOR-9120 Fix numbered table columns in `platform_editor_ai_show_diff_patch_2` so replacement
|
|
15
|
+
widgets share an existing row number, added and removed rows remain independently numbered, and
|
|
16
|
+
anchor widgets do not create phantom entries.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 31.0.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -4,12 +4,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.getRowsParams = exports.getRowIndexByMousePosition = exports.getRowHeights = exports.getRowDeleteButtonParams = exports.getRowClassNames = exports.copyPreviousRow = void 0;
|
|
7
|
+
exports.getRowsParams = exports.getRowIndexByMousePosition = exports.getRowHeights = exports.getRowDeleteButtonParams = exports.getRowClassNames = exports.getRenderedRowNumberLabels = exports.copyPreviousRow = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
10
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
11
11
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
12
12
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
13
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
14
|
var _types = require("../../types");
|
|
14
15
|
var _consts = require("../../ui/consts");
|
|
15
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -18,8 +19,12 @@ var getRowHeights = exports.getRowHeights = function getRowHeights(tableRef) {
|
|
|
18
19
|
var heights = [];
|
|
19
20
|
var tableBody = tableRef.querySelector('tbody');
|
|
20
21
|
if (tableBody) {
|
|
21
|
-
|
|
22
|
+
// filter out widget children (e.g. anchor widgets) of table body
|
|
23
|
+
var rows = (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? Array.from(tableBody.childNodes).filter(function (node) {
|
|
24
|
+
return node instanceof HTMLTableRowElement;
|
|
25
|
+
}) : tableBody.childNodes;
|
|
22
26
|
for (var i = 0, count = rows.length; i < count; i++) {
|
|
27
|
+
// remove as cast when cleaning up platform_editor_ai_show_diff_patch_2
|
|
23
28
|
var row = rows[i];
|
|
24
29
|
heights[i] = row.getBoundingClientRect().height + 1;
|
|
25
30
|
|
|
@@ -33,6 +38,38 @@ var getRowHeights = exports.getRowHeights = function getRowHeights(tableRef) {
|
|
|
33
38
|
}
|
|
34
39
|
return heights;
|
|
35
40
|
};
|
|
41
|
+
var getRowNumberLabel = function getRowNumberLabel(rowIndex, hasHeaderRow) {
|
|
42
|
+
if (!hasHeaderRow) {
|
|
43
|
+
return rowIndex + 1;
|
|
44
|
+
}
|
|
45
|
+
return rowIndex > 0 ? rowIndex : null;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Replacement diff widgets are inserted immediately before their document-row counterpart. Give
|
|
50
|
+
* the widget the next row number without consuming it, so the counterpart receives the same
|
|
51
|
+
* label. Other rows consume a number normally.
|
|
52
|
+
*/
|
|
53
|
+
var getRenderedRowNumberLabels = exports.getRenderedRowNumberLabels = function getRenderedRowNumberLabels(tableRef, hasHeaderRow) {
|
|
54
|
+
var rowNumberLabels = [];
|
|
55
|
+
var tableBody = tableRef.querySelector('tbody');
|
|
56
|
+
if (tableBody) {
|
|
57
|
+
var nextRowIndex = 0;
|
|
58
|
+
var rows = Array.from(tableBody.childNodes).filter(function (node) {
|
|
59
|
+
return node instanceof HTMLTableRowElement;
|
|
60
|
+
});
|
|
61
|
+
for (var i = 0, count = rows.length; i < count; i++) {
|
|
62
|
+
var row = rows[i];
|
|
63
|
+
if (row.hasAttribute('data-show-diff-table-row-replacement')) {
|
|
64
|
+
rowNumberLabels.push(getRowNumberLabel(nextRowIndex, hasHeaderRow));
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
var rowIndex = nextRowIndex++;
|
|
68
|
+
rowNumberLabels.push(getRowNumberLabel(rowIndex, hasHeaderRow));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return rowNumberLabels;
|
|
72
|
+
};
|
|
36
73
|
var getRowDeleteButtonParams = exports.getRowDeleteButtonParams = function getRowDeleteButtonParams(rowsHeights, selection) {
|
|
37
74
|
var offsetTop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
38
75
|
var rect = (0, _utils3.getSelectionRect)(selection);
|
|
@@ -16,6 +16,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
16
16
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
17
17
|
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
18
18
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
19
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
19
20
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
20
21
|
var _rowControls = require("../../../pm-plugins/utils/row-controls");
|
|
21
22
|
var _types = require("../../../types");
|
|
@@ -73,6 +74,7 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
73
74
|
tableActive = _this$props3.tableActive,
|
|
74
75
|
updateCellHoverLocation = _this$props3.updateCellHoverLocation;
|
|
75
76
|
var rowHeights = (0, _rowControls.getRowHeights)(tableRef);
|
|
77
|
+
var renderedRowNumberLabels = (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? (0, _rowControls.getRenderedRowNumberLabels)(tableRef, hasHeaderRow) : undefined;
|
|
76
78
|
var getMarginTop = function getMarginTop() {
|
|
77
79
|
if (!hasHeaderRow || _this2.props.stickyTop === undefined) {
|
|
78
80
|
return undefined;
|
|
@@ -109,6 +111,7 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
109
111
|
},
|
|
110
112
|
contentEditable: false
|
|
111
113
|
}, rowHeights.map(function (rowHeight, index) {
|
|
114
|
+
var rowNumberLabel = (0, _fg.fg)('platform_editor_ai_show_diff_patch_2') ? renderedRowNumberLabels === null || renderedRowNumberLabels === void 0 ? void 0 : renderedRowNumberLabels[index] : hasHeaderRow ? index > 0 ? index : null : index + 1;
|
|
112
115
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
113
116
|
// Ignored via go/ees005
|
|
114
117
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -126,7 +129,7 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
126
129
|
onMouseOver: function onMouseOver() {
|
|
127
130
|
return updateCellHoverLocation(index);
|
|
128
131
|
}
|
|
129
|
-
},
|
|
132
|
+
}, rowNumberLabel);
|
|
130
133
|
}));
|
|
131
134
|
}
|
|
132
135
|
}]);
|
|
@@ -2,14 +2,17 @@ import { parsePx } from '@atlaskit/editor-common/utils';
|
|
|
2
2
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
3
3
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
4
4
|
import { findTable, getSelectionRect, isRowSelected } from '@atlaskit/editor-tables/utils';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
6
|
import { TableCssClassName as ClassName } from '../../types';
|
|
6
7
|
import { tableDeleteButtonSize } from '../../ui/consts';
|
|
7
8
|
export const getRowHeights = tableRef => {
|
|
8
9
|
const heights = [];
|
|
9
10
|
const tableBody = tableRef.querySelector('tbody');
|
|
10
11
|
if (tableBody) {
|
|
11
|
-
|
|
12
|
+
// filter out widget children (e.g. anchor widgets) of table body
|
|
13
|
+
const rows = fg('platform_editor_ai_show_diff_patch_2') ? Array.from(tableBody.childNodes).filter(node => node instanceof HTMLTableRowElement) : tableBody.childNodes;
|
|
12
14
|
for (let i = 0, count = rows.length; i < count; i++) {
|
|
15
|
+
// remove as cast when cleaning up platform_editor_ai_show_diff_patch_2
|
|
13
16
|
const row = rows[i];
|
|
14
17
|
heights[i] = row.getBoundingClientRect().height + 1;
|
|
15
18
|
|
|
@@ -23,6 +26,36 @@ export const getRowHeights = tableRef => {
|
|
|
23
26
|
}
|
|
24
27
|
return heights;
|
|
25
28
|
};
|
|
29
|
+
const getRowNumberLabel = (rowIndex, hasHeaderRow) => {
|
|
30
|
+
if (!hasHeaderRow) {
|
|
31
|
+
return rowIndex + 1;
|
|
32
|
+
}
|
|
33
|
+
return rowIndex > 0 ? rowIndex : null;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Replacement diff widgets are inserted immediately before their document-row counterpart. Give
|
|
38
|
+
* the widget the next row number without consuming it, so the counterpart receives the same
|
|
39
|
+
* label. Other rows consume a number normally.
|
|
40
|
+
*/
|
|
41
|
+
export const getRenderedRowNumberLabels = (tableRef, hasHeaderRow) => {
|
|
42
|
+
const rowNumberLabels = [];
|
|
43
|
+
const tableBody = tableRef.querySelector('tbody');
|
|
44
|
+
if (tableBody) {
|
|
45
|
+
let nextRowIndex = 0;
|
|
46
|
+
const rows = Array.from(tableBody.childNodes).filter(node => node instanceof HTMLTableRowElement);
|
|
47
|
+
for (let i = 0, count = rows.length; i < count; i++) {
|
|
48
|
+
const row = rows[i];
|
|
49
|
+
if (row.hasAttribute('data-show-diff-table-row-replacement')) {
|
|
50
|
+
rowNumberLabels.push(getRowNumberLabel(nextRowIndex, hasHeaderRow));
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
const rowIndex = nextRowIndex++;
|
|
54
|
+
rowNumberLabels.push(getRowNumberLabel(rowIndex, hasHeaderRow));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return rowNumberLabels;
|
|
58
|
+
};
|
|
26
59
|
export const getRowDeleteButtonParams = (rowsHeights, selection, offsetTop = 0) => {
|
|
27
60
|
const rect = getSelectionRect(selection);
|
|
28
61
|
if (!rect) {
|
|
@@ -3,8 +3,9 @@ import React, { Component } from 'react';
|
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
5
5
|
import { isRowSelected } from '@atlaskit/editor-tables/utils';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
|
-
import { getRowHeights } from '../../../pm-plugins/utils/row-controls';
|
|
8
|
+
import { getRenderedRowNumberLabels, getRowHeights } from '../../../pm-plugins/utils/row-controls';
|
|
8
9
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
9
10
|
import { tableBorderColor } from '../../consts';
|
|
10
11
|
// Ignored via go/ees005
|
|
@@ -53,6 +54,7 @@ export default class NumberColumn extends Component {
|
|
|
53
54
|
updateCellHoverLocation
|
|
54
55
|
} = this.props;
|
|
55
56
|
const rowHeights = getRowHeights(tableRef);
|
|
57
|
+
const renderedRowNumberLabels = fg('platform_editor_ai_show_diff_patch_2') ? getRenderedRowNumberLabels(tableRef, hasHeaderRow) : undefined;
|
|
56
58
|
const getMarginTop = () => {
|
|
57
59
|
if (!hasHeaderRow || this.props.stickyTop === undefined) {
|
|
58
60
|
return undefined;
|
|
@@ -90,19 +92,22 @@ export default class NumberColumn extends Component {
|
|
|
90
92
|
visibility: 'visible'
|
|
91
93
|
},
|
|
92
94
|
contentEditable: false
|
|
93
|
-
}, rowHeights.map((rowHeight, index) =>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
95
|
+
}, rowHeights.map((rowHeight, index) => {
|
|
96
|
+
const rowNumberLabel = fg('platform_editor_ai_show_diff_patch_2') ? renderedRowNumberLabels === null || renderedRowNumberLabels === void 0 ? void 0 : renderedRowNumberLabels[index] : hasHeaderRow ? index > 0 ? index : null : index + 1;
|
|
97
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
98
|
+
// Ignored via go/ees005
|
|
99
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
100
|
+
key: `wrapper-${index}`
|
|
101
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
102
|
+
,
|
|
103
|
+
className: this.getClassNames(index, true),
|
|
104
|
+
"data-index": index
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
106
|
+
,
|
|
107
|
+
style: this.getCellStyles(index, rowHeight),
|
|
108
|
+
onFocus: () => updateCellHoverLocation(index),
|
|
109
|
+
onMouseOver: () => updateCellHoverLocation(index)
|
|
110
|
+
}, rowNumberLabel);
|
|
111
|
+
}));
|
|
107
112
|
}
|
|
108
113
|
}
|
|
@@ -5,14 +5,19 @@ import { parsePx } from '@atlaskit/editor-common/utils';
|
|
|
5
5
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { TableMap } from '@atlaskit/editor-tables/table-map';
|
|
7
7
|
import { findTable, getSelectionRect, isRowSelected } from '@atlaskit/editor-tables/utils';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
9
|
import { TableCssClassName as ClassName } from '../../types';
|
|
9
10
|
import { tableDeleteButtonSize } from '../../ui/consts';
|
|
10
11
|
export var getRowHeights = function getRowHeights(tableRef) {
|
|
11
12
|
var heights = [];
|
|
12
13
|
var tableBody = tableRef.querySelector('tbody');
|
|
13
14
|
if (tableBody) {
|
|
14
|
-
|
|
15
|
+
// filter out widget children (e.g. anchor widgets) of table body
|
|
16
|
+
var rows = fg('platform_editor_ai_show_diff_patch_2') ? Array.from(tableBody.childNodes).filter(function (node) {
|
|
17
|
+
return node instanceof HTMLTableRowElement;
|
|
18
|
+
}) : tableBody.childNodes;
|
|
15
19
|
for (var i = 0, count = rows.length; i < count; i++) {
|
|
20
|
+
// remove as cast when cleaning up platform_editor_ai_show_diff_patch_2
|
|
16
21
|
var row = rows[i];
|
|
17
22
|
heights[i] = row.getBoundingClientRect().height + 1;
|
|
18
23
|
|
|
@@ -26,6 +31,38 @@ export var getRowHeights = function getRowHeights(tableRef) {
|
|
|
26
31
|
}
|
|
27
32
|
return heights;
|
|
28
33
|
};
|
|
34
|
+
var getRowNumberLabel = function getRowNumberLabel(rowIndex, hasHeaderRow) {
|
|
35
|
+
if (!hasHeaderRow) {
|
|
36
|
+
return rowIndex + 1;
|
|
37
|
+
}
|
|
38
|
+
return rowIndex > 0 ? rowIndex : null;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Replacement diff widgets are inserted immediately before their document-row counterpart. Give
|
|
43
|
+
* the widget the next row number without consuming it, so the counterpart receives the same
|
|
44
|
+
* label. Other rows consume a number normally.
|
|
45
|
+
*/
|
|
46
|
+
export var getRenderedRowNumberLabels = function getRenderedRowNumberLabels(tableRef, hasHeaderRow) {
|
|
47
|
+
var rowNumberLabels = [];
|
|
48
|
+
var tableBody = tableRef.querySelector('tbody');
|
|
49
|
+
if (tableBody) {
|
|
50
|
+
var nextRowIndex = 0;
|
|
51
|
+
var rows = Array.from(tableBody.childNodes).filter(function (node) {
|
|
52
|
+
return node instanceof HTMLTableRowElement;
|
|
53
|
+
});
|
|
54
|
+
for (var i = 0, count = rows.length; i < count; i++) {
|
|
55
|
+
var row = rows[i];
|
|
56
|
+
if (row.hasAttribute('data-show-diff-table-row-replacement')) {
|
|
57
|
+
rowNumberLabels.push(getRowNumberLabel(nextRowIndex, hasHeaderRow));
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
var rowIndex = nextRowIndex++;
|
|
61
|
+
rowNumberLabels.push(getRowNumberLabel(rowIndex, hasHeaderRow));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return rowNumberLabels;
|
|
65
|
+
};
|
|
29
66
|
export var getRowDeleteButtonParams = function getRowDeleteButtonParams(rowsHeights, selection) {
|
|
30
67
|
var offsetTop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
31
68
|
var rect = getSelectionRect(selection);
|
|
@@ -10,8 +10,9 @@ import React, { Component } from 'react';
|
|
|
10
10
|
import classnames from 'classnames';
|
|
11
11
|
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
12
12
|
import { isRowSelected } from '@atlaskit/editor-tables/utils';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
13
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
|
-
import { getRowHeights } from '../../../pm-plugins/utils/row-controls';
|
|
15
|
+
import { getRenderedRowNumberLabels, getRowHeights } from '../../../pm-plugins/utils/row-controls';
|
|
15
16
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
16
17
|
import { tableBorderColor } from '../../consts';
|
|
17
18
|
// Ignored via go/ees005
|
|
@@ -64,6 +65,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
64
65
|
tableActive = _this$props3.tableActive,
|
|
65
66
|
updateCellHoverLocation = _this$props3.updateCellHoverLocation;
|
|
66
67
|
var rowHeights = getRowHeights(tableRef);
|
|
68
|
+
var renderedRowNumberLabels = fg('platform_editor_ai_show_diff_patch_2') ? getRenderedRowNumberLabels(tableRef, hasHeaderRow) : undefined;
|
|
67
69
|
var getMarginTop = function getMarginTop() {
|
|
68
70
|
if (!hasHeaderRow || _this2.props.stickyTop === undefined) {
|
|
69
71
|
return undefined;
|
|
@@ -100,6 +102,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
100
102
|
},
|
|
101
103
|
contentEditable: false
|
|
102
104
|
}, rowHeights.map(function (rowHeight, index) {
|
|
105
|
+
var rowNumberLabel = fg('platform_editor_ai_show_diff_patch_2') ? renderedRowNumberLabels === null || renderedRowNumberLabels === void 0 ? void 0 : renderedRowNumberLabels[index] : hasHeaderRow ? index > 0 ? index : null : index + 1;
|
|
103
106
|
return /*#__PURE__*/React.createElement("div", {
|
|
104
107
|
// Ignored via go/ees005
|
|
105
108
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -117,7 +120,7 @@ var NumberColumn = /*#__PURE__*/function (_Component) {
|
|
|
117
120
|
onMouseOver: function onMouseOver() {
|
|
118
121
|
return updateCellHoverLocation(index);
|
|
119
122
|
}
|
|
120
|
-
},
|
|
123
|
+
}, rowNumberLabel);
|
|
121
124
|
}));
|
|
122
125
|
}
|
|
123
126
|
}]);
|
|
@@ -6,6 +6,12 @@ export interface RowParams {
|
|
|
6
6
|
startIndex: number;
|
|
7
7
|
}
|
|
8
8
|
export declare const getRowHeights: (tableRef: HTMLTableElement) => number[];
|
|
9
|
+
/**
|
|
10
|
+
* Replacement diff widgets are inserted immediately before their document-row counterpart. Give
|
|
11
|
+
* the widget the next row number without consuming it, so the counterpart receives the same
|
|
12
|
+
* label. Other rows consume a number normally.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getRenderedRowNumberLabels: (tableRef: HTMLTableElement, hasHeaderRow?: boolean) => Array<number | null>;
|
|
9
15
|
export declare const getRowDeleteButtonParams: (rowsHeights: Array<number | undefined>, selection: Selection, offsetTop?: number) => {
|
|
10
16
|
indexes: number[];
|
|
11
17
|
top: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "31.0.
|
|
3
|
+
"version": "31.0.8",
|
|
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": "^19.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-content-insertion": "^19.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-editor-viewmode": "^21.0.0",
|
|
32
|
-
"@atlaskit/editor-plugin-extension": "22.0.
|
|
32
|
+
"@atlaskit/editor-plugin-extension": "22.0.8",
|
|
33
33
|
"@atlaskit/editor-plugin-guideline": "^19.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-interaction": "^33.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-limited-mode": "^16.0.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": "^203.0.0",
|
|
57
57
|
"@atlaskit/toggle": "^17.3.0",
|
|
58
58
|
"@atlaskit/tokens": "^19.0.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": "^123.
|
|
71
|
+
"@atlaskit/editor-common": "^123.8.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"
|
|
@@ -99,6 +99,9 @@
|
|
|
99
99
|
"platform_editor_ai_table_ai_streaming_pos_fix": {
|
|
100
100
|
"type": "boolean"
|
|
101
101
|
},
|
|
102
|
+
"platform_editor_ai_show_diff_patch_2": {
|
|
103
|
+
"type": "boolean"
|
|
104
|
+
},
|
|
102
105
|
"platform_editor_table_menu_updates_patch_1": {
|
|
103
106
|
"type": "boolean"
|
|
104
107
|
},
|