@atlaskit/editor-plugin-table 24.4.22 → 24.4.24
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 +18 -0
- package/dist/cjs/nodeviews/TableRow.js +7 -1
- package/dist/cjs/nodeviews/TableRowNativeStickyWithFallback.js +9 -2
- package/dist/cjs/pm-plugins/utils/nodes.js +13 -1
- package/dist/es2019/nodeviews/TableRow.js +8 -2
- package/dist/es2019/nodeviews/TableRowNativeStickyWithFallback.js +10 -3
- package/dist/es2019/pm-plugins/utils/nodes.js +12 -0
- package/dist/esm/nodeviews/TableRow.js +8 -2
- package/dist/esm/nodeviews/TableRowNativeStickyWithFallback.js +10 -3
- package/dist/esm/pm-plugins/utils/nodes.js +12 -0
- package/dist/types/pm-plugins/analytics/commands.d.ts +2 -2
- package/dist/types/pm-plugins/analytics/utils/moved-event.d.ts +2 -2
- package/dist/types/pm-plugins/commands/active-table-menu.d.ts +1 -1
- package/dist/types/pm-plugins/commands/misc.d.ts +4 -4
- package/dist/types/pm-plugins/commands/selection.d.ts +6 -6
- package/dist/types/pm-plugins/commands/toggle.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/actions.d.ts +3 -3
- package/dist/types/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +2 -2
- package/dist/types/pm-plugins/drag-and-drop/commands.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/consts.d.ts +3 -3
- package/dist/types/pm-plugins/drag-and-drop/reducer.d.ts +1 -1
- package/dist/types/pm-plugins/reducer.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/reducer.d.ts +1 -1
- package/dist/types/pm-plugins/utils/decoration.d.ts +3 -3
- package/dist/types/pm-plugins/utils/dom.d.ts +2 -2
- package/dist/types/pm-plugins/utils/drag-menu.d.ts +2 -2
- package/dist/types/pm-plugins/utils/merged-cells.d.ts +1 -1
- package/dist/types/pm-plugins/utils/nodes.d.ts +3 -0
- package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 24.4.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b91c14d4dbad7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b91c14d4dbad7) -
|
|
8
|
+
Editor; Ensure only the first table row can become a sticky header when the rounded table patch is
|
|
9
|
+
enabled
|
|
10
|
+
|
|
11
|
+
Renderer; Patch table body elements to have rounded corners when overridden by consumers
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 24.4.23
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 24.4.22
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -111,13 +111,16 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
|
111
111
|
var $pos = view.state.doc.resolve(pos);
|
|
112
112
|
_this.isInNestedTable = (0, _nesting.getParentOfTypeCount)(view.state.schema.nodes.table)($pos) > 1;
|
|
113
113
|
// Resolve rowIndex only when the flag is on — otherwise it's unused
|
|
114
|
-
if ((0, _expValEquals.expValEquals)('platform_editor_fix_sticky_header_row', 'isEnabled', true)) {
|
|
114
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_fix_sticky_header_row', 'isEnabled', true) && !(0, _expValEquals.expValEquals)('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
115
115
|
rowIndex = $pos.index();
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
} catch (_unused) {
|
|
119
119
|
// Intentionally swallowed — getPos can return stale positions during AI streaming
|
|
120
120
|
}
|
|
121
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
122
|
+
rowIndex = (0, _nodes.getTableRowIndex)(view, getPos);
|
|
123
|
+
}
|
|
121
124
|
_this.isHeaderRow = (0, _nodes.supportedHeaderRow)(node, rowIndex);
|
|
122
125
|
if (_this.isHeaderRow) {
|
|
123
126
|
_this.dom.setAttribute('data-vc-nvs', 'true');
|
|
@@ -175,6 +178,9 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
|
175
178
|
// Intentionally swallowed — getPos can return stale positions during AI streaming
|
|
176
179
|
}
|
|
177
180
|
}
|
|
181
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
182
|
+
rowIndex = (0, _nodes.getTableRowIndex)(this.view, this.getPos);
|
|
183
|
+
}
|
|
178
184
|
var newNodeIsHeaderRow = (0, _nodes.supportedHeaderRow)(node, rowIndex);
|
|
179
185
|
if (this.isHeaderRow !== newNodeIsHeaderRow) {
|
|
180
186
|
return false; // re-create nodeview
|
|
@@ -109,7 +109,12 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
|
|
|
109
109
|
_this.disableNativeSticky = false;
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
|
-
|
|
112
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
113
|
+
var rowIndex = (0, _nodes.getTableRowIndex)(view, getPos);
|
|
114
|
+
_this.isHeaderRow = (0, _nodes.supportedHeaderRow)(node, rowIndex);
|
|
115
|
+
} else {
|
|
116
|
+
_this.isHeaderRow = (0, _nodes.supportedHeaderRow)(node);
|
|
117
|
+
}
|
|
113
118
|
if (_this.isHeaderRow && (0, _expValEquals.expValEquals)('platform_editor_table_q4_patch_4', 'isEnabled', true)) {
|
|
114
119
|
_this.isSingleRowTable = _this.checkIsSingleRowTable();
|
|
115
120
|
}
|
|
@@ -203,7 +208,9 @@ var TableRowNativeStickyWithFallback = exports.default = /*#__PURE__*/function (
|
|
|
203
208
|
// see if we're changing into a header row or
|
|
204
209
|
// changing away from one
|
|
205
210
|
var rowIndex = 0;
|
|
206
|
-
if ((0, _expValEquals.expValEquals)('
|
|
211
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
212
|
+
rowIndex = (0, _nodes.getTableRowIndex)(this.view, this.getPos);
|
|
213
|
+
} else if ((0, _expValEquals.expValEquals)('platform_editor_fix_sticky_header_row', 'isEnabled', true)) {
|
|
207
214
|
try {
|
|
208
215
|
var pos = this.getPos();
|
|
209
216
|
if (pos) {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.tablesHaveDifferentNoOfRows = exports.tablesHaveDifferentNoOfColumns = exports.tablesHaveDifferentColumnWidths = exports.supportedHeaderRow = exports.isTableNestedUnderBodiedSyncBlock = exports.isTableNestedInMoreThanOneNode = exports.isTableNested = exports.isIsolating = exports.getTableWidth = exports.containsHeaderRow = exports.containsHeaderColumn = exports.checkIfNumberColumnEnabled = exports.checkIfHeaderRowEnabled = exports.checkIfHeaderColumnEnabled = void 0;
|
|
7
|
+
exports.tablesHaveDifferentNoOfRows = exports.tablesHaveDifferentNoOfColumns = exports.tablesHaveDifferentColumnWidths = exports.supportedHeaderRow = exports.isTableNestedUnderBodiedSyncBlock = exports.isTableNestedInMoreThanOneNode = exports.isTableNested = exports.isIsolating = exports.getTableWidth = exports.getTableRowIndex = exports.containsHeaderRow = exports.containsHeaderColumn = exports.checkIfNumberColumnEnabled = exports.checkIfHeaderRowEnabled = exports.checkIfHeaderColumnEnabled = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
10
10
|
var _tableMap = require("@atlaskit/editor-tables/table-map");
|
|
@@ -142,9 +142,18 @@ var anyChildCellMergedAcrossColumn = function anyChildCellMergedAcrossColumn(nod
|
|
|
142
142
|
return colspan > 1;
|
|
143
143
|
});
|
|
144
144
|
};
|
|
145
|
+
var getTableRowIndex = exports.getTableRowIndex = function getTableRowIndex(view, getPos) {
|
|
146
|
+
try {
|
|
147
|
+
var pos = getPos();
|
|
148
|
+
return pos === undefined ? 0 : view.state.doc.resolve(pos).index();
|
|
149
|
+
} catch (_unused2) {
|
|
150
|
+
return 0;
|
|
151
|
+
}
|
|
152
|
+
};
|
|
145
153
|
|
|
146
154
|
/**
|
|
147
155
|
* Check if a given node is a header row with this definition:
|
|
156
|
+
* - the row is the first row when platform_editor_table_q4_patch_5 is enabled
|
|
148
157
|
* - all children are tableHeader cells
|
|
149
158
|
* - no table cells have been merged with other table row cells (rowspan > 1)
|
|
150
159
|
* - no table cells have been merged with other table column cells (colspan > 1),
|
|
@@ -158,6 +167,9 @@ var anyChildCellMergedAcrossColumn = function anyChildCellMergedAcrossColumn(nod
|
|
|
158
167
|
*/
|
|
159
168
|
var supportedHeaderRow = exports.supportedHeaderRow = function supportedHeaderRow(node) {
|
|
160
169
|
var rowIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
170
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_table_q4_patch_5', 'isEnabled', true) && rowIndex !== 0) {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
161
173
|
var allHeaders = (0, _utils.mapChildren)(node, function (child) {
|
|
162
174
|
return child.type.name === 'tableHeader';
|
|
163
175
|
}).every(Boolean);
|
|
@@ -12,7 +12,7 @@ import { pluginKey as tablePluginKey } from '../pm-plugins/plugin-key';
|
|
|
12
12
|
import { updateStickyState } from '../pm-plugins/sticky-headers/commands';
|
|
13
13
|
import { clearStickyCornerMaskPositions, syncStickyRowToTable, updateStickyMargins as updateTableMargin } from '../pm-plugins/table-resizing/utils/dom';
|
|
14
14
|
import { getTop, getTree } from '../pm-plugins/utils/dom';
|
|
15
|
-
import { supportedHeaderRow } from '../pm-plugins/utils/nodes';
|
|
15
|
+
import { getTableRowIndex, supportedHeaderRow } from '../pm-plugins/utils/nodes';
|
|
16
16
|
import { TableCssClassName as ClassName, TableCssClassName } from '../types';
|
|
17
17
|
import { stickyHeaderBorderBottomWidth, stickyRowOffsetTop, tableControlsSpacing, tableScrollbarOffset } from '../ui/consts';
|
|
18
18
|
import TableNodeView from './TableNodeViewBase';
|
|
@@ -96,13 +96,16 @@ export default class TableRow extends TableNodeView {
|
|
|
96
96
|
const $pos = view.state.doc.resolve(pos);
|
|
97
97
|
this.isInNestedTable = getParentOfTypeCount(view.state.schema.nodes.table)($pos) > 1;
|
|
98
98
|
// Resolve rowIndex only when the flag is on — otherwise it's unused
|
|
99
|
-
if (expValEquals('platform_editor_fix_sticky_header_row', 'isEnabled', true)) {
|
|
99
|
+
if (expValEquals('platform_editor_fix_sticky_header_row', 'isEnabled', true) && !expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
100
100
|
rowIndex = $pos.index();
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
} catch {
|
|
104
104
|
// Intentionally swallowed — getPos can return stale positions during AI streaming
|
|
105
105
|
}
|
|
106
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
107
|
+
rowIndex = getTableRowIndex(view, getPos);
|
|
108
|
+
}
|
|
106
109
|
this.isHeaderRow = supportedHeaderRow(node, rowIndex);
|
|
107
110
|
if (this.isHeaderRow) {
|
|
108
111
|
this.dom.setAttribute('data-vc-nvs', 'true');
|
|
@@ -155,6 +158,9 @@ export default class TableRow extends TableNodeView {
|
|
|
155
158
|
// Intentionally swallowed — getPos can return stale positions during AI streaming
|
|
156
159
|
}
|
|
157
160
|
}
|
|
161
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
162
|
+
rowIndex = getTableRowIndex(this.view, this.getPos);
|
|
163
|
+
}
|
|
158
164
|
const newNodeIsHeaderRow = supportedHeaderRow(node, rowIndex);
|
|
159
165
|
if (this.isHeaderRow !== newNodeIsHeaderRow) {
|
|
160
166
|
return false; // re-create nodeview
|
|
@@ -15,7 +15,7 @@ import { pluginKey as tablePluginKey } from '../pm-plugins/plugin-key';
|
|
|
15
15
|
import { updateStickyState } from '../pm-plugins/sticky-headers/commands';
|
|
16
16
|
import { clearStickyCornerMaskPositions, syncStickyRowToTable, updateStickyMargins as updateTableMargin } from '../pm-plugins/table-resizing/utils/dom';
|
|
17
17
|
import { areAllRectsZero, getTop, getTree } from '../pm-plugins/utils/dom';
|
|
18
|
-
import { supportedHeaderRow } from '../pm-plugins/utils/nodes';
|
|
18
|
+
import { getTableRowIndex, supportedHeaderRow } from '../pm-plugins/utils/nodes';
|
|
19
19
|
import { TableCssClassName as ClassName, TableCssClassName } from '../types';
|
|
20
20
|
import { stickyHeaderBorderBottomWidth, stickyRowOffsetTop, tableControlsSpacing, tableScrollbarOffset } from '../ui/consts';
|
|
21
21
|
import TableNodeView from './TableNodeViewBase';
|
|
@@ -93,7 +93,12 @@ export default class TableRowNativeStickyWithFallback extends TableNodeView {
|
|
|
93
93
|
this.disableNativeSticky = false;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
|
-
|
|
96
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
97
|
+
const rowIndex = getTableRowIndex(view, getPos);
|
|
98
|
+
this.isHeaderRow = supportedHeaderRow(node, rowIndex);
|
|
99
|
+
} else {
|
|
100
|
+
this.isHeaderRow = supportedHeaderRow(node);
|
|
101
|
+
}
|
|
97
102
|
if (this.isHeaderRow && expValEquals('platform_editor_table_q4_patch_4', 'isEnabled', true)) {
|
|
98
103
|
this.isSingleRowTable = this.checkIsSingleRowTable();
|
|
99
104
|
}
|
|
@@ -184,7 +189,9 @@ export default class TableRowNativeStickyWithFallback extends TableNodeView {
|
|
|
184
189
|
// see if we're changing into a header row or
|
|
185
190
|
// changing away from one
|
|
186
191
|
let rowIndex = 0;
|
|
187
|
-
if (expValEquals('
|
|
192
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
193
|
+
rowIndex = getTableRowIndex(this.view, this.getPos);
|
|
194
|
+
} else if (expValEquals('platform_editor_fix_sticky_header_row', 'isEnabled', true)) {
|
|
188
195
|
try {
|
|
189
196
|
const pos = this.getPos();
|
|
190
197
|
if (pos) {
|
|
@@ -110,9 +110,18 @@ export const isTableNestedUnderBodiedSyncBlock = (state, tablePos) => {
|
|
|
110
110
|
};
|
|
111
111
|
const anyChildCellMergedAcrossRow = node => mapChildren(node, child => child.attrs.rowspan || 0).some(rowspan => rowspan > 1);
|
|
112
112
|
const anyChildCellMergedAcrossColumn = node => mapChildren(node, child => child.attrs.colspan || 0).some(colspan => colspan > 1);
|
|
113
|
+
export const getTableRowIndex = (view, getPos) => {
|
|
114
|
+
try {
|
|
115
|
+
const pos = getPos();
|
|
116
|
+
return pos === undefined ? 0 : view.state.doc.resolve(pos).index();
|
|
117
|
+
} catch {
|
|
118
|
+
return 0;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
113
121
|
|
|
114
122
|
/**
|
|
115
123
|
* Check if a given node is a header row with this definition:
|
|
124
|
+
* - the row is the first row when platform_editor_table_q4_patch_5 is enabled
|
|
116
125
|
* - all children are tableHeader cells
|
|
117
126
|
* - no table cells have been merged with other table row cells (rowspan > 1)
|
|
118
127
|
* - no table cells have been merged with other table column cells (colspan > 1),
|
|
@@ -125,6 +134,9 @@ const anyChildCellMergedAcrossColumn = node => mapChildren(node, child => child.
|
|
|
125
134
|
* @returns boolean if it meets definition
|
|
126
135
|
*/
|
|
127
136
|
export const supportedHeaderRow = (node, rowIndex = 0) => {
|
|
137
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true) && rowIndex !== 0) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
128
140
|
const allHeaders = mapChildren(node, child => child.type.name === 'tableHeader').every(Boolean);
|
|
129
141
|
if (expValEquals('platform_editor_fix_sticky_header_malfunction', 'isEnabled', true)) {
|
|
130
142
|
const someMergedAcrossRow = anyChildCellMergedAcrossRow(node);
|
|
@@ -19,7 +19,7 @@ import { pluginKey as tablePluginKey } from '../pm-plugins/plugin-key';
|
|
|
19
19
|
import { updateStickyState } from '../pm-plugins/sticky-headers/commands';
|
|
20
20
|
import { clearStickyCornerMaskPositions, syncStickyRowToTable, updateStickyMargins as updateTableMargin } from '../pm-plugins/table-resizing/utils/dom';
|
|
21
21
|
import { getTop, getTree } from '../pm-plugins/utils/dom';
|
|
22
|
-
import { supportedHeaderRow } from '../pm-plugins/utils/nodes';
|
|
22
|
+
import { getTableRowIndex, supportedHeaderRow } from '../pm-plugins/utils/nodes';
|
|
23
23
|
import { TableCssClassName as ClassName, TableCssClassName } from '../types';
|
|
24
24
|
import { stickyHeaderBorderBottomWidth, stickyRowOffsetTop, tableControlsSpacing, tableScrollbarOffset } from '../ui/consts';
|
|
25
25
|
import TableNodeView from './TableNodeViewBase';
|
|
@@ -104,13 +104,16 @@ var TableRow = /*#__PURE__*/function (_TableNodeView) {
|
|
|
104
104
|
var $pos = view.state.doc.resolve(pos);
|
|
105
105
|
_this.isInNestedTable = getParentOfTypeCount(view.state.schema.nodes.table)($pos) > 1;
|
|
106
106
|
// Resolve rowIndex only when the flag is on — otherwise it's unused
|
|
107
|
-
if (expValEquals('platform_editor_fix_sticky_header_row', 'isEnabled', true)) {
|
|
107
|
+
if (expValEquals('platform_editor_fix_sticky_header_row', 'isEnabled', true) && !expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
108
108
|
rowIndex = $pos.index();
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
} catch (_unused) {
|
|
112
112
|
// Intentionally swallowed — getPos can return stale positions during AI streaming
|
|
113
113
|
}
|
|
114
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
115
|
+
rowIndex = getTableRowIndex(view, getPos);
|
|
116
|
+
}
|
|
114
117
|
_this.isHeaderRow = supportedHeaderRow(node, rowIndex);
|
|
115
118
|
if (_this.isHeaderRow) {
|
|
116
119
|
_this.dom.setAttribute('data-vc-nvs', 'true');
|
|
@@ -168,6 +171,9 @@ var TableRow = /*#__PURE__*/function (_TableNodeView) {
|
|
|
168
171
|
// Intentionally swallowed — getPos can return stale positions during AI streaming
|
|
169
172
|
}
|
|
170
173
|
}
|
|
174
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
175
|
+
rowIndex = getTableRowIndex(this.view, this.getPos);
|
|
176
|
+
}
|
|
171
177
|
var newNodeIsHeaderRow = supportedHeaderRow(node, rowIndex);
|
|
172
178
|
if (this.isHeaderRow !== newNodeIsHeaderRow) {
|
|
173
179
|
return false; // re-create nodeview
|
|
@@ -22,7 +22,7 @@ import { pluginKey as tablePluginKey } from '../pm-plugins/plugin-key';
|
|
|
22
22
|
import { updateStickyState } from '../pm-plugins/sticky-headers/commands';
|
|
23
23
|
import { clearStickyCornerMaskPositions, syncStickyRowToTable, updateStickyMargins as updateTableMargin } from '../pm-plugins/table-resizing/utils/dom';
|
|
24
24
|
import { areAllRectsZero, getTop, getTree } from '../pm-plugins/utils/dom';
|
|
25
|
-
import { supportedHeaderRow } from '../pm-plugins/utils/nodes';
|
|
25
|
+
import { getTableRowIndex, supportedHeaderRow } from '../pm-plugins/utils/nodes';
|
|
26
26
|
import { TableCssClassName as ClassName, TableCssClassName } from '../types';
|
|
27
27
|
import { stickyHeaderBorderBottomWidth, stickyRowOffsetTop, tableControlsSpacing, tableScrollbarOffset } from '../ui/consts';
|
|
28
28
|
import TableNodeView from './TableNodeViewBase';
|
|
@@ -102,7 +102,12 @@ var TableRowNativeStickyWithFallback = /*#__PURE__*/function (_TableNodeView) {
|
|
|
102
102
|
_this.disableNativeSticky = false;
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
|
-
|
|
105
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
106
|
+
var rowIndex = getTableRowIndex(view, getPos);
|
|
107
|
+
_this.isHeaderRow = supportedHeaderRow(node, rowIndex);
|
|
108
|
+
} else {
|
|
109
|
+
_this.isHeaderRow = supportedHeaderRow(node);
|
|
110
|
+
}
|
|
106
111
|
if (_this.isHeaderRow && expValEquals('platform_editor_table_q4_patch_4', 'isEnabled', true)) {
|
|
107
112
|
_this.isSingleRowTable = _this.checkIsSingleRowTable();
|
|
108
113
|
}
|
|
@@ -196,7 +201,9 @@ var TableRowNativeStickyWithFallback = /*#__PURE__*/function (_TableNodeView) {
|
|
|
196
201
|
// see if we're changing into a header row or
|
|
197
202
|
// changing away from one
|
|
198
203
|
var rowIndex = 0;
|
|
199
|
-
if (expValEquals('
|
|
204
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true)) {
|
|
205
|
+
rowIndex = getTableRowIndex(this.view, this.getPos);
|
|
206
|
+
} else if (expValEquals('platform_editor_fix_sticky_header_row', 'isEnabled', true)) {
|
|
200
207
|
try {
|
|
201
208
|
var pos = this.getPos();
|
|
202
209
|
if (pos) {
|
|
@@ -135,9 +135,18 @@ var anyChildCellMergedAcrossColumn = function anyChildCellMergedAcrossColumn(nod
|
|
|
135
135
|
return colspan > 1;
|
|
136
136
|
});
|
|
137
137
|
};
|
|
138
|
+
export var getTableRowIndex = function getTableRowIndex(view, getPos) {
|
|
139
|
+
try {
|
|
140
|
+
var pos = getPos();
|
|
141
|
+
return pos === undefined ? 0 : view.state.doc.resolve(pos).index();
|
|
142
|
+
} catch (_unused2) {
|
|
143
|
+
return 0;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
138
146
|
|
|
139
147
|
/**
|
|
140
148
|
* Check if a given node is a header row with this definition:
|
|
149
|
+
* - the row is the first row when platform_editor_table_q4_patch_5 is enabled
|
|
141
150
|
* - all children are tableHeader cells
|
|
142
151
|
* - no table cells have been merged with other table row cells (rowspan > 1)
|
|
143
152
|
* - no table cells have been merged with other table column cells (colspan > 1),
|
|
@@ -151,6 +160,9 @@ var anyChildCellMergedAcrossColumn = function anyChildCellMergedAcrossColumn(nod
|
|
|
151
160
|
*/
|
|
152
161
|
export var supportedHeaderRow = function supportedHeaderRow(node) {
|
|
153
162
|
var rowIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
163
|
+
if (expValEquals('platform_editor_table_q4_patch_5', 'isEnabled', true) && rowIndex !== 0) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
154
166
|
var allHeaders = mapChildren(node, function (child) {
|
|
155
167
|
return child.type.name === 'tableHeader';
|
|
156
168
|
}).every(Boolean);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { ActionType, RowOrColumnMovedState } from './types';
|
|
3
3
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare const updateRowOrColumnMoved: (nextState: Omit<RowOrColumnMovedState,
|
|
4
|
+
export declare const updateRowOrColumnMoved: (nextState: Omit<RowOrColumnMovedState, 'currentActions'>, nextAction: ActionType) => Command;
|
|
5
5
|
export declare const resetRowOrColumnMovedTransform: () => (tr: Transaction) => Transaction;
|
|
6
|
-
export declare const updateRowOrColumnMovedTransform: (nextState: Omit<RowOrColumnMovedState,
|
|
6
|
+
export declare const updateRowOrColumnMovedTransform: (nextState: Omit<RowOrColumnMovedState, 'currentActions'>, nextAction: ActionType) => (state: EditorState, tr: Transaction) => Transaction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ActionType, RowOrColumnMovedState } from '../types';
|
|
2
|
-
export declare const getMovedPayload: (nextState: Omit<RowOrColumnMovedState,
|
|
2
|
+
export declare const getMovedPayload: (nextState: Omit<RowOrColumnMovedState, 'currentActions'>, nextAction: ActionType, prevState: RowOrColumnMovedState) => RowOrColumnMovedState | {
|
|
3
3
|
currentActions: string[];
|
|
4
4
|
numberOfCells: number | undefined;
|
|
5
|
-
type:
|
|
5
|
+
type: 'row' | 'column' | undefined;
|
|
6
6
|
};
|
|
@@ -4,5 +4,5 @@ export declare const closeActiveTableMenu: (api?: PluginInjectionAPI | null, opt
|
|
|
4
4
|
skipUserIntent?: boolean;
|
|
5
5
|
}) => EditorCommand;
|
|
6
6
|
export declare const toggleActiveTableMenu: (activeTableMenu: Exclude<ActiveTableMenu, {
|
|
7
|
-
type:
|
|
7
|
+
type: 'none';
|
|
8
8
|
}>, currentActiveTableMenu: ActiveTableMenu | undefined, api?: PluginInjectionAPI | null) => EditorCommand;
|
|
@@ -14,10 +14,10 @@ export declare const transformSliceRemoveCellBackgroundColor: (slice: Slice, sch
|
|
|
14
14
|
export declare const transformSliceToFixDarkModeDefaultBackgroundColor: (slice: Slice, schema: Schema) => Slice;
|
|
15
15
|
export declare const transformSliceToAddTableHeaders: (slice: Slice, schema: Schema) => Slice;
|
|
16
16
|
export declare const transformSliceToRemoveColumnsWidths: (slice: Slice, schema: Schema) => Slice;
|
|
17
|
-
export declare const countCellsInSlice: (slice: Slice, schema: Schema, type?:
|
|
18
|
-
export declare const getTableSelectionType: (selection: Selection) =>
|
|
19
|
-
export declare const getTableElementMoveTypeBySlice: (slice: Slice, state: EditorState) =>
|
|
20
|
-
export declare const isInsideFirstCellOfRowOrColumn: (selection: Selection, type?:
|
|
17
|
+
export declare const countCellsInSlice: (slice: Slice, schema: Schema, type?: 'row' | 'column') => number;
|
|
18
|
+
export declare const getTableSelectionType: (selection: Selection) => 'row' | 'column' | undefined;
|
|
19
|
+
export declare const getTableElementMoveTypeBySlice: (slice: Slice, state: EditorState) => 'row' | 'column' | undefined;
|
|
20
|
+
export declare const isInsideFirstCellOfRowOrColumn: (selection: Selection, type?: 'row' | 'column') => boolean;
|
|
21
21
|
export declare const deleteTable: Command;
|
|
22
22
|
export declare const deleteTableIfSelected: Command;
|
|
23
23
|
export declare const convertFirstRowToHeader: (schema: Schema) => (tr: Transaction) => Transaction;
|
|
@@ -2,9 +2,9 @@ import type { IntlShape } from 'react-intl/src/types';
|
|
|
2
2
|
import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { AriaLiveElementAttributes } from '@atlaskit/editor-plugin-accessibility-utils';
|
|
4
4
|
import type tablePlugin from '../../tablePlugin';
|
|
5
|
-
export declare const arrowLeftFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
6
|
-
export declare const arrowRightFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
7
|
-
export declare const selectColumns: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
8
|
-
export declare const selectRows: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
9
|
-
export declare const shiftArrowUpFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
10
|
-
export declare const modASelectTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>[
|
|
5
|
+
export declare const arrowLeftFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined) => () => Command;
|
|
6
|
+
export declare const arrowRightFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined) => () => Command;
|
|
7
|
+
export declare const selectColumns: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (triggeredByKeyboard?: boolean) => Command;
|
|
8
|
+
export declare const selectRows: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (triggeredByKeyboard?: boolean) => Command;
|
|
9
|
+
export declare const shiftArrowUpFromTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined) => () => Command;
|
|
10
|
+
export declare const modASelectTable: (editorSelectionAPI: ExtractInjectionAPI<typeof tablePlugin>['selection'] | undefined) => () => Command;
|
|
@@ -4,7 +4,7 @@ import type { Command } from '@atlaskit/editor-common/types';
|
|
|
4
4
|
* Table layout toggle logic
|
|
5
5
|
* default -> wide -> full-width -> default
|
|
6
6
|
*/
|
|
7
|
-
export declare const getNextLayout: (currentLayout: TableLayout) =>
|
|
7
|
+
export declare const getNextLayout: (currentLayout: TableLayout) => 'default' | 'wide' | 'full-width';
|
|
8
8
|
export declare const toggleHeaderRow: Command;
|
|
9
9
|
export declare const toggleHeaderColumn: Command;
|
|
10
10
|
export declare const toggleNumberColumn: Command;
|
|
@@ -6,9 +6,9 @@ interface DragAndDropAction<T, D> {
|
|
|
6
6
|
type: T;
|
|
7
7
|
}
|
|
8
8
|
export declare const DragAndDropActionType: {
|
|
9
|
-
readonly SET_DROP_TARGET:
|
|
10
|
-
readonly CLEAR_DROP_TARGET:
|
|
11
|
-
readonly TOGGLE_DRAG_MENU:
|
|
9
|
+
readonly SET_DROP_TARGET: 'SET_DROP_TARGET';
|
|
10
|
+
readonly CLEAR_DROP_TARGET: 'CLEAR_DROP_TARGET';
|
|
11
|
+
readonly TOGGLE_DRAG_MENU: 'TOGGLE_DRAG_MENU';
|
|
12
12
|
};
|
|
13
13
|
type DragAndDropSetDropTargetAction = DragAndDropAction<typeof DragAndDropActionType.SET_DROP_TARGET, {
|
|
14
14
|
decorationSet: DecorationSet;
|
|
@@ -8,6 +8,6 @@ import type { DraggableData, DraggableType, TableDirection } from '../../types';
|
|
|
8
8
|
import type { TriggerType } from './types';
|
|
9
9
|
export declare const clearDropTargetWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP, sourceType: DraggableType, sourceIndexes: number[] | undefined, status: TABLE_STATUS.CANCELLED | TABLE_STATUS.INVALID, tr?: Transaction) => Command;
|
|
10
10
|
export declare const moveSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, tr?: Transaction) => Command;
|
|
11
|
-
export declare const moveSourceWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (sourceType: DraggableType, direction: DraggableData[
|
|
12
|
-
export declare const cloneSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection:
|
|
11
|
+
export declare const moveSourceWithAnalyticsViaShortcut: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null, ariaNotify?: (message: string, ariaLiveElementAttributes?: AriaLiveElementAttributes) => void, getIntl?: () => IntlShape) => (sourceType: DraggableType, direction: DraggableData['direction']) => Command;
|
|
12
|
+
export declare const cloneSourceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (inputMethod: INPUT_METHOD.TABLE_CONTEXT_MENU | INPUT_METHOD.DRAG_AND_DROP | INPUT_METHOD.SHORTCUT, sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection: 'start' | 'end', tr?: Transaction) => Command;
|
|
13
13
|
export declare const toggleDragMenuWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null) => (isDragMenuOpen: boolean | undefined, direction?: TableDirection, index?: number, trigger?: TriggerType) => Command;
|
|
@@ -7,4 +7,4 @@ export declare const setDropTarget: (type: DropTargetType, index: number, hasMer
|
|
|
7
7
|
export declare const clearDropTarget: (tr?: Transaction) => Command;
|
|
8
8
|
export declare const moveSource: (sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, tr?: Transaction) => Command;
|
|
9
9
|
export declare const toggleDragMenu: (isDragMenuOpen: boolean | undefined, direction?: TableDirection, index?: number, trigger?: TriggerType) => Command;
|
|
10
|
-
export declare const cloneSource: (sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection:
|
|
10
|
+
export declare const cloneSource: (sourceType: DraggableType, sourceIndexes: number[], targetIndex: number, targetDirection: 'start' | 'end', tr?: Transaction) => Command;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const DropTargetType: {
|
|
2
|
-
readonly NONE:
|
|
3
|
-
readonly ROW:
|
|
4
|
-
readonly COLUMN:
|
|
2
|
+
readonly NONE: 'none';
|
|
3
|
+
readonly ROW: 'row';
|
|
4
|
+
readonly COLUMN: 'column';
|
|
5
5
|
};
|
|
6
6
|
export type DropTargetType = (typeof DropTargetType)[keyof typeof DropTargetType];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DragAndDropPluginAction } from './actions';
|
|
2
2
|
import type { DragAndDropPluginState } from './types';
|
|
3
|
-
declare const _default: (pluginState: DragAndDropPluginState, action: DragAndDropPluginAction) => DragAndDropPluginState;
|
|
4
3
|
export default _default;
|
|
4
|
+
declare function _default(pluginState: DragAndDropPluginState, action: DragAndDropPluginAction): DragAndDropPluginState;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TablePluginAction, TablePluginState } from '../types';
|
|
2
|
-
declare const _default: (pluginState: TablePluginState, action: TablePluginAction) => TablePluginState;
|
|
3
2
|
export default _default;
|
|
3
|
+
declare function _default(pluginState: TablePluginState, action: TablePluginAction): TablePluginState;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ColumnResizingPluginAction, ColumnResizingPluginState } from '../../types';
|
|
2
|
-
declare const _default: (pluginState: ColumnResizingPluginState, action: ColumnResizingPluginAction) => ColumnResizingPluginState;
|
|
3
2
|
export default _default;
|
|
3
|
+
declare function _default(pluginState: ColumnResizingPluginState, action: ColumnResizingPluginAction): ColumnResizingPluginState;
|
|
@@ -9,11 +9,11 @@ import { TableDecorations } from '../../types';
|
|
|
9
9
|
export declare const findColumnControlSelectedDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
10
10
|
export declare const findControlsHoverDecoration: (decorationSet: DecorationSet) => Decoration[];
|
|
11
11
|
export declare const createCellHoverDecoration: (cells: Cell[]) => Decoration[];
|
|
12
|
-
export declare const createControlsHoverDecoration: (cells: Cell[], type:
|
|
12
|
+
export declare const createControlsHoverDecoration: (cells: Cell[], type: 'row' | 'column' | 'table', tr: Transaction | ReadonlyTransaction, hoveredIndexes: number[], danger?: boolean, selected?: boolean) => Decoration[];
|
|
13
13
|
export declare const createColumnSelectedDecoration: (tr: Transaction | ReadonlyTransaction) => Decoration[];
|
|
14
14
|
export declare const createColumnControlsDecoration: (selection: Selection) => Decoration[];
|
|
15
15
|
export declare const updateDecorations: (node: PmNode, decorationSet: DecorationSet, decorations: Decoration[], key: TableDecorations) => DecorationSet;
|
|
16
|
-
export declare const createResizeHandleDecoration: (tr: Transaction | ReadonlyTransaction, rowIndexTarget: number, columnEndIndexTarget: Omit<CellColumnPositioning,
|
|
17
|
-
export declare const createColumnLineResize: (selection: Selection, cellColumnPositioning: Omit<CellColumnPositioning,
|
|
16
|
+
export declare const createResizeHandleDecoration: (tr: Transaction | ReadonlyTransaction, rowIndexTarget: number, columnEndIndexTarget: Omit<CellColumnPositioning, 'left'>, includeTooltip: boolean | undefined, getIntl: () => IntlShape, nodeViewPortalProviderAPI: PortalProviderAPI) => Decoration[];
|
|
17
|
+
export declare const createColumnLineResize: (selection: Selection, cellColumnPositioning: Omit<CellColumnPositioning, 'left'>) => Decoration[];
|
|
18
18
|
export declare const createColumnInsertLine: (columnIndex: number, selection: Selection, hasMergedCells: boolean) => Decoration[];
|
|
19
19
|
export declare const createRowInsertLine: (rowIndex: number, selection: Selection, hasMergedCells: boolean) => Decoration[];
|
|
@@ -31,8 +31,8 @@ export declare const isTableDragHandleButton: (target: EventTarget | null) => bo
|
|
|
31
31
|
* @param gapInPixels
|
|
32
32
|
* @returns
|
|
33
33
|
*/
|
|
34
|
-
export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, offsetX: number, gapInPixels?: number) =>
|
|
35
|
-
export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) =>
|
|
34
|
+
export declare const getMousePositionHorizontalRelativeByElement: (mouseEvent: MouseEvent, offsetX: number, gapInPixels?: number) => 'left' | 'right' | null;
|
|
35
|
+
export declare const getMousePositionVerticalRelativeByElement: (mouseEvent: MouseEvent) => 'top' | 'bottom' | null;
|
|
36
36
|
export declare const hasResizeHandler: ({ columnEndIndexTarget, target, }: {
|
|
37
37
|
columnEndIndexTarget: number;
|
|
38
38
|
target: HTMLElement;
|
|
@@ -7,8 +7,8 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
7
7
|
import type { Rect, TableMap } from '@atlaskit/editor-tables/table-map';
|
|
8
8
|
import type { NewIconProps, IconProps } from '@atlaskit/icon/types';
|
|
9
9
|
import type { DraggableData, DraggableType, PluginInjectionAPI, TableDirection } from '../../types';
|
|
10
|
-
export declare const getTargetIndex: (selectedIndexes: number[], direction: DraggableData[
|
|
11
|
-
export declare const canMove: (sourceType: DraggableType, direction: DraggableData[
|
|
10
|
+
export declare const getTargetIndex: (selectedIndexes: number[], direction: DraggableData['direction']) => number;
|
|
11
|
+
export declare const canMove: (sourceType: DraggableType, direction: DraggableData['direction'], totalItemsOfSourceTypeCount: number, selection: Selection, selectionRect?: Rect) => boolean;
|
|
12
12
|
export type DragMenuOptionIdType = 'add_row_above' | 'add_row_below' | 'add_column_left' | 'add_column_right' | 'distribute_columns' | 'clear_cells' | 'delete_row' | 'delete_column' | 'move_column_left' | 'move_column_right' | 'move_row_up' | 'move_row_down' | 'sort_column_asc' | 'sort_column_desc';
|
|
13
13
|
export interface DragMenuConfig extends Omit<DropdownOptionT<Command>, 'icon'> {
|
|
14
14
|
icon?: React.ComponentType<React.PropsWithChildren<NewIconProps>>;
|
|
@@ -14,7 +14,7 @@ export declare const hasMergedCellsInSelection: (indexes: number[], type: MergeT
|
|
|
14
14
|
* @param direction - check selection is selected by row or column
|
|
15
15
|
* @returns boolean
|
|
16
16
|
*/
|
|
17
|
-
export declare const checkEdgeHasMergedCells: (indexes: number[], tableMap: TableMap, direction:
|
|
17
|
+
export declare const checkEdgeHasMergedCells: (indexes: number[], tableMap: TableMap, direction: 'row' | 'column') => boolean;
|
|
18
18
|
/**
|
|
19
19
|
* this function will find the duplicate position in the array(table map position array).
|
|
20
20
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
4
|
export declare const isIsolating: (node: PmNode) => boolean;
|
|
4
5
|
export declare const containsHeaderColumn: (table: PmNode) => boolean;
|
|
5
6
|
export declare const containsHeaderRow: (table: PmNode) => boolean;
|
|
@@ -17,8 +18,10 @@ export declare const isTableNestedInMoreThanOneNode: (state: EditorState, tableP
|
|
|
17
18
|
* Used to prefer DOM-measured wrapper width over getParentNodeWidth() for stable scaling.
|
|
18
19
|
*/
|
|
19
20
|
export declare const isTableNestedUnderBodiedSyncBlock: (state: EditorState, tablePos: number) => boolean;
|
|
21
|
+
export declare const getTableRowIndex: (view: EditorView, getPos: () => number | undefined) => number;
|
|
20
22
|
/**
|
|
21
23
|
* Check if a given node is a header row with this definition:
|
|
24
|
+
* - the row is the first row when platform_editor_table_q4_patch_5 is enabled
|
|
22
25
|
* - all children are tableHeader cells
|
|
23
26
|
* - no table cells have been merged with other table row cells (rowspan > 1)
|
|
24
27
|
* - no table cells have been merged with other table column cells (colspan > 1),
|
|
@@ -21,5 +21,5 @@ type DragControlsProps = {
|
|
|
21
21
|
updateCellHoverLocation: (rowIndex: number) => void;
|
|
22
22
|
};
|
|
23
23
|
export declare const DragControls: ({ tableRef, tableNode, tableWidth, hoveredCell, tableActive, editorView, isInDanger, isResizing, isTableHovered, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, selection, }: DragControlsProps) => React.JSX.Element | null;
|
|
24
|
-
export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps,
|
|
24
|
+
export declare const DragControlsWithSelection: ({ editorView, tableRef, tableNode, tableWidth, tableActive, hoveredCell, isInDanger, isTableHovered, isResizing, hoverRows, selectRow, selectRows, updateCellHoverLocation, api, }: Exclude<DragControlsProps, 'selection'>) => React.JSX.Element;
|
|
25
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "24.4.
|
|
3
|
+
"version": "24.4.24",
|
|
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": "^12.0.0",
|
|
30
30
|
"@atlaskit/editor-plugin-content-insertion": "^12.0.0",
|
|
31
31
|
"@atlaskit/editor-plugin-editor-viewmode": "^14.0.0",
|
|
32
|
-
"@atlaskit/editor-plugin-extension": "15.0.
|
|
32
|
+
"@atlaskit/editor-plugin-extension": "15.0.39",
|
|
33
33
|
"@atlaskit/editor-plugin-guideline": "^12.0.0",
|
|
34
34
|
"@atlaskit/editor-plugin-interaction": "^23.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-limited-mode": "^9.0.0",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"@atlaskit/editor-ui-control-model": "^2.2.0",
|
|
46
46
|
"@atlaskit/icon": "^37.2.0",
|
|
47
47
|
"@atlaskit/icon-lab": "^7.4.0",
|
|
48
|
-
"@atlaskit/insm": "^1.
|
|
48
|
+
"@atlaskit/insm": "^1.1.0",
|
|
49
49
|
"@atlaskit/menu": "^9.2.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
51
51
|
"@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.0",
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^2.0.0",
|
|
54
54
|
"@atlaskit/primitives": "^22.2.0",
|
|
55
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^135.2.0",
|
|
56
56
|
"@atlaskit/toggle": "^17.1.0",
|
|
57
57
|
"@atlaskit/tokens": "^16.3.0",
|
|
58
|
-
"@atlaskit/tooltip": "^23.
|
|
58
|
+
"@atlaskit/tooltip": "^23.2.0",
|
|
59
59
|
"@babel/runtime": "^7.0.0",
|
|
60
60
|
"@compiled/react": "^1.0.0",
|
|
61
61
|
"@emotion/react": "^11.7.1",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"uuid": "^3.1.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@atlaskit/editor-common": "^116.
|
|
70
|
+
"@atlaskit/editor-common": "^116.42.0",
|
|
71
71
|
"react": "^18.2.0",
|
|
72
72
|
"react-dom": "^18.2.0",
|
|
73
73
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|