@atlaskit/editor-plugin-table 10.9.11 → 10.9.13
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/nodeviews/TableRow.js +4 -7
- package/dist/cjs/nodeviews/TableStickyScrollbar.js +5 -6
- package/dist/es2019/nodeviews/TableRow.js +4 -7
- package/dist/es2019/nodeviews/TableStickyScrollbar.js +5 -5
- package/dist/esm/nodeviews/TableRow.js +4 -7
- package/dist/esm/nodeviews/TableStickyScrollbar.js +5 -6
- package/package.json +5 -8
- package/src/nodeviews/TableRow.ts +5 -10
- package/src/nodeviews/TableStickyScrollbar.ts +2 -7
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 10.9.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.9.12
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#148537](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/148537)
|
|
14
|
+
[`3df3e55411ffd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3df3e55411ffd) -
|
|
15
|
+
EDITOR-328 Clean up nested table bugfix feature gate
|
|
16
|
+
`platform_editor_nested_tables_bottom_sentinel`
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 10.9.11
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -273,13 +273,10 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
|
273
273
|
// Multiple bottom sentinels may be found if there are nested tables.
|
|
274
274
|
// We need to make sure we get the last one which will belong to the parent table.
|
|
275
275
|
var bottomSentinels = tableContainer && tableContainer.getElementsByClassName(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM);
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
bottomSentinels && bottomSentinels.item(bottomSentinels.length - 1) : tableContainer &&
|
|
281
|
-
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
282
|
-
tableContainer.getElementsByClassName(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM).item(0);
|
|
276
|
+
return (
|
|
277
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
278
|
+
bottomSentinels && bottomSentinels.item(bottomSentinels.length - 1)
|
|
279
|
+
);
|
|
283
280
|
};
|
|
284
281
|
var sentinelsInDom = function sentinelsInDom() {
|
|
285
282
|
return getSentinelTop() !== null && getSentinelBottom() !== null;
|
|
@@ -72,8 +72,7 @@ var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function
|
|
|
72
72
|
value: function createIntersectionObserver() {
|
|
73
73
|
var _this2 = this,
|
|
74
74
|
_this$wrapper,
|
|
75
|
-
_this$wrapper2
|
|
76
|
-
_this$wrapper3;
|
|
75
|
+
_this$wrapper2;
|
|
77
76
|
this.editorScrollableElement =
|
|
78
77
|
// Ignored via go/ees005
|
|
79
78
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -107,13 +106,13 @@ var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function
|
|
|
107
106
|
|
|
108
107
|
// Multiple bottom sentinels may be found if there are nested tables. We need to make sure we get the last one which will belong to the parent table.
|
|
109
108
|
var bottomSentinels = (_this$wrapper = this.wrapper) === null || _this$wrapper === void 0 || (_this$wrapper = _this$wrapper.parentElement) === null || _this$wrapper === void 0 ? void 0 : _this$wrapper.getElementsByClassName(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
|
|
110
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
111
|
+
this.sentinels.bottom = bottomSentinels === null || bottomSentinels === void 0 ? void 0 : bottomSentinels.item(bottomSentinels.length - 1);
|
|
113
112
|
|
|
114
113
|
// Ignored via go/ees005
|
|
115
114
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
116
|
-
this.sentinels.top = (_this$
|
|
115
|
+
this.sentinels.top = (_this$wrapper2 = this.wrapper) === null || _this$wrapper2 === void 0 || (_this$wrapper2 = _this$wrapper2.parentElement) === null || _this$wrapper2 === void 0 || (_this$wrapper2 = _this$wrapper2.getElementsByClassName(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP)) === null || _this$wrapper2 === void 0 ? void 0 : _this$wrapper2.item(0);
|
|
117
116
|
[this.sentinels.bottom, this.sentinels.top].forEach(function (el) {
|
|
118
117
|
if (el !== null && _this2.intersectionObserver) {
|
|
119
118
|
_this2.intersectionObserver.observe(el);
|
|
@@ -241,13 +241,10 @@ export default class TableRow extends TableNodeView {
|
|
|
241
241
|
// Multiple bottom sentinels may be found if there are nested tables.
|
|
242
242
|
// We need to make sure we get the last one which will belong to the parent table.
|
|
243
243
|
const bottomSentinels = tableContainer && tableContainer.getElementsByClassName(ClassName.TABLE_STICKY_SENTINEL_BOTTOM);
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
bottomSentinels && bottomSentinels.item(bottomSentinels.length - 1) : tableContainer &&
|
|
249
|
-
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
250
|
-
tableContainer.getElementsByClassName(ClassName.TABLE_STICKY_SENTINEL_BOTTOM).item(0);
|
|
244
|
+
return (
|
|
245
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
246
|
+
bottomSentinels && bottomSentinels.item(bottomSentinels.length - 1)
|
|
247
|
+
);
|
|
251
248
|
};
|
|
252
249
|
const sentinelsInDom = () => getSentinelTop() !== null && getSentinelBottom() !== null;
|
|
253
250
|
const observeStickySentinels = () => {
|
|
@@ -51,7 +51,7 @@ export class TableStickyScrollbar {
|
|
|
51
51
|
this.createIntersectionObserver();
|
|
52
52
|
}
|
|
53
53
|
createIntersectionObserver() {
|
|
54
|
-
var _this$wrapper, _this$wrapper$parentE2, _this$wrapper2, _this$wrapper2$parent, _this$wrapper2$parent2
|
|
54
|
+
var _this$wrapper, _this$wrapper$parentE2, _this$wrapper2, _this$wrapper2$parent, _this$wrapper2$parent2;
|
|
55
55
|
this.editorScrollableElement =
|
|
56
56
|
// Ignored via go/ees005
|
|
57
57
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -85,13 +85,13 @@ export class TableStickyScrollbar {
|
|
|
85
85
|
|
|
86
86
|
// Multiple bottom sentinels may be found if there are nested tables. We need to make sure we get the last one which will belong to the parent table.
|
|
87
87
|
const bottomSentinels = (_this$wrapper = this.wrapper) === null || _this$wrapper === void 0 ? void 0 : (_this$wrapper$parentE2 = _this$wrapper.parentElement) === null || _this$wrapper$parentE2 === void 0 ? void 0 : _this$wrapper$parentE2.getElementsByClassName(ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
|
|
89
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
90
|
+
this.sentinels.bottom = bottomSentinels === null || bottomSentinels === void 0 ? void 0 : bottomSentinels.item(bottomSentinels.length - 1);
|
|
91
91
|
|
|
92
92
|
// Ignored via go/ees005
|
|
93
93
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
94
|
-
this.sentinels.top = (_this$
|
|
94
|
+
this.sentinels.top = (_this$wrapper2 = this.wrapper) === null || _this$wrapper2 === void 0 ? void 0 : (_this$wrapper2$parent = _this$wrapper2.parentElement) === null || _this$wrapper2$parent === void 0 ? void 0 : (_this$wrapper2$parent2 = _this$wrapper2$parent.getElementsByClassName(ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP)) === null || _this$wrapper2$parent2 === void 0 ? void 0 : _this$wrapper2$parent2.item(0);
|
|
95
95
|
[this.sentinels.bottom, this.sentinels.top].forEach(el => {
|
|
96
96
|
if (el !== null && this.intersectionObserver) {
|
|
97
97
|
this.intersectionObserver.observe(el);
|
|
@@ -266,13 +266,10 @@ var TableRow = /*#__PURE__*/function (_TableNodeView) {
|
|
|
266
266
|
// Multiple bottom sentinels may be found if there are nested tables.
|
|
267
267
|
// We need to make sure we get the last one which will belong to the parent table.
|
|
268
268
|
var bottomSentinels = tableContainer && tableContainer.getElementsByClassName(ClassName.TABLE_STICKY_SENTINEL_BOTTOM);
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
bottomSentinels && bottomSentinels.item(bottomSentinels.length - 1) : tableContainer &&
|
|
274
|
-
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
275
|
-
tableContainer.getElementsByClassName(ClassName.TABLE_STICKY_SENTINEL_BOTTOM).item(0);
|
|
269
|
+
return (
|
|
270
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
271
|
+
bottomSentinels && bottomSentinels.item(bottomSentinels.length - 1)
|
|
272
|
+
);
|
|
276
273
|
};
|
|
277
274
|
var sentinelsInDom = function sentinelsInDom() {
|
|
278
275
|
return getSentinelTop() !== null && getSentinelBottom() !== null;
|
|
@@ -65,8 +65,7 @@ export var TableStickyScrollbar = /*#__PURE__*/function () {
|
|
|
65
65
|
value: function createIntersectionObserver() {
|
|
66
66
|
var _this2 = this,
|
|
67
67
|
_this$wrapper,
|
|
68
|
-
_this$wrapper2
|
|
69
|
-
_this$wrapper3;
|
|
68
|
+
_this$wrapper2;
|
|
70
69
|
this.editorScrollableElement =
|
|
71
70
|
// Ignored via go/ees005
|
|
72
71
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -100,13 +99,13 @@ export var TableStickyScrollbar = /*#__PURE__*/function () {
|
|
|
100
99
|
|
|
101
100
|
// Multiple bottom sentinels may be found if there are nested tables. We need to make sure we get the last one which will belong to the parent table.
|
|
102
101
|
var bottomSentinels = (_this$wrapper = this.wrapper) === null || _this$wrapper === void 0 || (_this$wrapper = _this$wrapper.parentElement) === null || _this$wrapper === void 0 ? void 0 : _this$wrapper.getElementsByClassName(ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
|
|
103
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
104
|
+
this.sentinels.bottom = bottomSentinels === null || bottomSentinels === void 0 ? void 0 : bottomSentinels.item(bottomSentinels.length - 1);
|
|
106
105
|
|
|
107
106
|
// Ignored via go/ees005
|
|
108
107
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
109
|
-
this.sentinels.top = (_this$
|
|
108
|
+
this.sentinels.top = (_this$wrapper2 = this.wrapper) === null || _this$wrapper2 === void 0 || (_this$wrapper2 = _this$wrapper2.parentElement) === null || _this$wrapper2 === void 0 || (_this$wrapper2 = _this$wrapper2.getElementsByClassName(ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP)) === null || _this$wrapper2 === void 0 ? void 0 : _this$wrapper2.item(0);
|
|
110
109
|
[this.sentinels.bottom, this.sentinels.top].forEach(function (el) {
|
|
111
110
|
if (el !== null && _this2.intersectionObserver) {
|
|
112
111
|
_this2.intersectionObserver.observe(el);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "10.9.
|
|
3
|
+
"version": "10.9.13",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
33
33
|
"@atlaskit/button": "^23.0.0",
|
|
34
34
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
35
|
-
"@atlaskit/editor-common": "^103.
|
|
35
|
+
"@atlaskit/editor-common": "^103.21.0",
|
|
36
36
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-accessibility-utils": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-content-insertion": "^2.1.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.1.0",
|
|
42
|
-
"@atlaskit/editor-plugin-extension": "5.3.
|
|
42
|
+
"@atlaskit/editor-plugin-extension": "5.3.2",
|
|
43
43
|
"@atlaskit/editor-plugin-guideline": "^2.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection": "^2.1.0",
|
|
45
45
|
"@atlaskit/editor-plugin-width": "^3.0.0",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
48
48
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
49
49
|
"@atlaskit/icon": "^25.6.0",
|
|
50
|
-
"@atlaskit/menu": "^
|
|
50
|
+
"@atlaskit/menu": "^5.0.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
52
|
"@atlaskit/pragmatic-drag-and-drop": "^1.6.0",
|
|
53
53
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
54
54
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.0",
|
|
55
|
-
"@atlaskit/primitives": "^14.
|
|
55
|
+
"@atlaskit/primitives": "^14.5.0",
|
|
56
56
|
"@atlaskit/theme": "^18.0.0",
|
|
57
57
|
"@atlaskit/tmp-editor-statsig": "^4.15.0",
|
|
58
58
|
"@atlaskit/toggle": "^15.0.0",
|
|
@@ -144,9 +144,6 @@
|
|
|
144
144
|
"platform_editor_nested_tables_view_mode_sort": {
|
|
145
145
|
"type": "boolean"
|
|
146
146
|
},
|
|
147
|
-
"platform_editor_nested_tables_bottom_sentinel": {
|
|
148
|
-
"type": "boolean"
|
|
149
|
-
},
|
|
150
147
|
"platform_editor_nested_tables_bodied_extension_fix": {
|
|
151
148
|
"type": "boolean"
|
|
152
149
|
},
|
|
@@ -314,16 +314,11 @@ export default class TableRow extends TableNodeView<HTMLTableRowElement> impleme
|
|
|
314
314
|
const bottomSentinels =
|
|
315
315
|
tableContainer &&
|
|
316
316
|
tableContainer.getElementsByClassName(ClassName.TABLE_STICKY_SENTINEL_BOTTOM);
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
: tableContainer &&
|
|
323
|
-
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
324
|
-
(tableContainer
|
|
325
|
-
.getElementsByClassName(ClassName.TABLE_STICKY_SENTINEL_BOTTOM)
|
|
326
|
-
.item(0) as HTMLElement);
|
|
317
|
+
|
|
318
|
+
return (
|
|
319
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
320
|
+
bottomSentinels && (bottomSentinels.item(bottomSentinels.length - 1) as HTMLElement)
|
|
321
|
+
);
|
|
327
322
|
};
|
|
328
323
|
|
|
329
324
|
const sentinelsInDom = () => getSentinelTop() !== null && getSentinelBottom() !== null;
|
|
@@ -113,13 +113,8 @@ export class TableStickyScrollbar {
|
|
|
113
113
|
ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM,
|
|
114
114
|
);
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
(bottomSentinels?.item(bottomSentinels.length - 1) as HTMLElement)
|
|
119
|
-
: // eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
120
|
-
(this.wrapper?.parentElement
|
|
121
|
-
?.getElementsByClassName(ClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM)
|
|
122
|
-
?.item(0) as HTMLElement);
|
|
116
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
117
|
+
this.sentinels.bottom = bottomSentinels?.item(bottomSentinels.length - 1) as HTMLElement;
|
|
123
118
|
|
|
124
119
|
// Ignored via go/ees005
|
|
125
120
|
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
@@ -107,7 +107,7 @@ export const ColumnControls = ({
|
|
|
107
107
|
const hasHeaderRow = firstRow ? firstRow.getAttribute('data-header-row') : false;
|
|
108
108
|
|
|
109
109
|
const rowControlStickyTop = 45;
|
|
110
|
-
const marginTop = hasHeaderRow && stickyTop !== undefined ?
|
|
110
|
+
const marginTop = hasHeaderRow && stickyTop !== undefined ? rowControlStickyTop ?? 0 : 0;
|
|
111
111
|
|
|
112
112
|
const handleClick = useCallback(
|
|
113
113
|
(event: MouseEvent) => {
|