@atlaskit/editor-plugin-table 5.6.0 → 5.6.1
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 +6 -0
- package/dist/cjs/plugins/table/nodeviews/TableStickyScrollbar.js +2 -5
- package/dist/es2019/plugins/table/nodeviews/TableStickyScrollbar.js +2 -5
- package/dist/esm/plugins/table/nodeviews/TableStickyScrollbar.js +2 -5
- package/dist/types/plugins/table/nodeviews/TableStickyScrollbar.d.ts +0 -1
- package/dist/types-ts4.5/plugins/table/nodeviews/TableStickyScrollbar.d.ts +0 -1
- package/package.json +1 -1
- package/src/plugins/table/nodeviews/TableStickyScrollbar.ts +2 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 5.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#61294](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61294) [`70b236bfd951`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/70b236bfd951) - remove raf from sticky scrollbar handler to fix jittery behaviour
|
|
8
|
+
|
|
3
9
|
## 5.6.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -8,7 +8,6 @@ exports.TableStickyScrollbar = void 0;
|
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
12
11
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
13
12
|
var _types = require("../types");
|
|
14
13
|
var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function () {
|
|
@@ -22,7 +21,6 @@ var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function
|
|
|
22
21
|
}
|
|
23
22
|
_this.wrapper.scrollLeft = _this.stickyScrollbarContainerElement.scrollLeft;
|
|
24
23
|
});
|
|
25
|
-
(0, _defineProperty2.default)(this, "handleScrollDebounced", (0, _rafSchd.default)(this.handleScroll));
|
|
26
24
|
this.wrapper = wrapper;
|
|
27
25
|
this.view = view;
|
|
28
26
|
this.init();
|
|
@@ -31,8 +29,7 @@ var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function
|
|
|
31
29
|
key: "dispose",
|
|
32
30
|
value: function dispose() {
|
|
33
31
|
if (this.stickyScrollbarContainerElement) {
|
|
34
|
-
this.stickyScrollbarContainerElement.removeEventListener('scroll', this.
|
|
35
|
-
this.handleScrollDebounced.cancel();
|
|
32
|
+
this.stickyScrollbarContainerElement.removeEventListener('scroll', this.handleScroll);
|
|
36
33
|
}
|
|
37
34
|
this.deleteIntersectionObserver();
|
|
38
35
|
}
|
|
@@ -52,7 +49,7 @@ var TableStickyScrollbar = exports.TableStickyScrollbar = /*#__PURE__*/function
|
|
|
52
49
|
}
|
|
53
50
|
this.stickyScrollbarContainerElement = (_this$wrapper$parentE = this.wrapper.parentElement) === null || _this$wrapper$parentE === void 0 ? void 0 : _this$wrapper$parentE.querySelector(".".concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER));
|
|
54
51
|
if (this.stickyScrollbarContainerElement) {
|
|
55
|
-
this.stickyScrollbarContainerElement.addEventListener('scroll', this.
|
|
52
|
+
this.stickyScrollbarContainerElement.addEventListener('scroll', this.handleScroll, {
|
|
56
53
|
passive: true
|
|
57
54
|
});
|
|
58
55
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import rafSchedule from 'raf-schd';
|
|
3
2
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
4
3
|
import { TableCssClassName as ClassName } from '../types';
|
|
5
4
|
export class TableStickyScrollbar {
|
|
@@ -11,15 +10,13 @@ export class TableStickyScrollbar {
|
|
|
11
10
|
}
|
|
12
11
|
this.wrapper.scrollLeft = this.stickyScrollbarContainerElement.scrollLeft;
|
|
13
12
|
});
|
|
14
|
-
_defineProperty(this, "handleScrollDebounced", rafSchedule(this.handleScroll));
|
|
15
13
|
this.wrapper = wrapper;
|
|
16
14
|
this.view = view;
|
|
17
15
|
this.init();
|
|
18
16
|
}
|
|
19
17
|
dispose() {
|
|
20
18
|
if (this.stickyScrollbarContainerElement) {
|
|
21
|
-
this.stickyScrollbarContainerElement.removeEventListener('scroll', this.
|
|
22
|
-
this.handleScrollDebounced.cancel();
|
|
19
|
+
this.stickyScrollbarContainerElement.removeEventListener('scroll', this.handleScroll);
|
|
23
20
|
}
|
|
24
21
|
this.deleteIntersectionObserver();
|
|
25
22
|
}
|
|
@@ -35,7 +32,7 @@ export class TableStickyScrollbar {
|
|
|
35
32
|
}
|
|
36
33
|
this.stickyScrollbarContainerElement = (_this$wrapper$parentE = this.wrapper.parentElement) === null || _this$wrapper$parentE === void 0 ? void 0 : _this$wrapper$parentE.querySelector(`.${ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER}`);
|
|
37
34
|
if (this.stickyScrollbarContainerElement) {
|
|
38
|
-
this.stickyScrollbarContainerElement.addEventListener('scroll', this.
|
|
35
|
+
this.stickyScrollbarContainerElement.addEventListener('scroll', this.handleScroll, {
|
|
39
36
|
passive: true
|
|
40
37
|
});
|
|
41
38
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import rafSchedule from 'raf-schd';
|
|
5
4
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
6
5
|
import { TableCssClassName as ClassName } from '../types';
|
|
7
6
|
export var TableStickyScrollbar = /*#__PURE__*/function () {
|
|
@@ -15,7 +14,6 @@ export var TableStickyScrollbar = /*#__PURE__*/function () {
|
|
|
15
14
|
}
|
|
16
15
|
_this.wrapper.scrollLeft = _this.stickyScrollbarContainerElement.scrollLeft;
|
|
17
16
|
});
|
|
18
|
-
_defineProperty(this, "handleScrollDebounced", rafSchedule(this.handleScroll));
|
|
19
17
|
this.wrapper = wrapper;
|
|
20
18
|
this.view = view;
|
|
21
19
|
this.init();
|
|
@@ -24,8 +22,7 @@ export var TableStickyScrollbar = /*#__PURE__*/function () {
|
|
|
24
22
|
key: "dispose",
|
|
25
23
|
value: function dispose() {
|
|
26
24
|
if (this.stickyScrollbarContainerElement) {
|
|
27
|
-
this.stickyScrollbarContainerElement.removeEventListener('scroll', this.
|
|
28
|
-
this.handleScrollDebounced.cancel();
|
|
25
|
+
this.stickyScrollbarContainerElement.removeEventListener('scroll', this.handleScroll);
|
|
29
26
|
}
|
|
30
27
|
this.deleteIntersectionObserver();
|
|
31
28
|
}
|
|
@@ -45,7 +42,7 @@ export var TableStickyScrollbar = /*#__PURE__*/function () {
|
|
|
45
42
|
}
|
|
46
43
|
this.stickyScrollbarContainerElement = (_this$wrapper$parentE = this.wrapper.parentElement) === null || _this$wrapper$parentE === void 0 ? void 0 : _this$wrapper$parentE.querySelector(".".concat(ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER));
|
|
47
44
|
if (this.stickyScrollbarContainerElement) {
|
|
48
|
-
this.stickyScrollbarContainerElement.addEventListener('scroll', this.
|
|
45
|
+
this.stickyScrollbarContainerElement.addEventListener('scroll', this.handleScroll, {
|
|
49
46
|
passive: true
|
|
50
47
|
});
|
|
51
48
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import rafSchedule from 'raf-schd';
|
|
2
|
-
|
|
3
1
|
import { findOverflowScrollParent } from '@atlaskit/editor-common/ui';
|
|
4
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
3
|
|
|
@@ -33,9 +31,8 @@ export class TableStickyScrollbar {
|
|
|
33
31
|
if (this.stickyScrollbarContainerElement) {
|
|
34
32
|
this.stickyScrollbarContainerElement.removeEventListener(
|
|
35
33
|
'scroll',
|
|
36
|
-
this.
|
|
34
|
+
this.handleScroll,
|
|
37
35
|
);
|
|
38
|
-
this.handleScrollDebounced.cancel();
|
|
39
36
|
}
|
|
40
37
|
|
|
41
38
|
this.deleteIntersectionObserver();
|
|
@@ -60,7 +57,7 @@ export class TableStickyScrollbar {
|
|
|
60
57
|
if (this.stickyScrollbarContainerElement) {
|
|
61
58
|
this.stickyScrollbarContainerElement.addEventListener(
|
|
62
59
|
'scroll',
|
|
63
|
-
this.
|
|
60
|
+
this.handleScroll,
|
|
64
61
|
{ passive: true },
|
|
65
62
|
);
|
|
66
63
|
}
|
|
@@ -199,6 +196,4 @@ export class TableStickyScrollbar {
|
|
|
199
196
|
|
|
200
197
|
this.wrapper.scrollLeft = this.stickyScrollbarContainerElement.scrollLeft;
|
|
201
198
|
};
|
|
202
|
-
|
|
203
|
-
private handleScrollDebounced = rafSchedule(this.handleScroll);
|
|
204
199
|
}
|