@hi-ui/table 4.3.4 → 4.4.0-alpha.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/lib/cjs/BaseTable.js +2 -2
  3. package/lib/cjs/ColGroupContent.js +2 -2
  4. package/lib/cjs/SettingDrawer.js +29 -20
  5. package/lib/cjs/Table.js +7 -5
  6. package/lib/cjs/TableAdvancedFilter.js +4 -4
  7. package/lib/cjs/TableBody.js +5 -5
  8. package/lib/cjs/TableCell.js +2 -2
  9. package/lib/cjs/TableColumnMenu.js +3 -3
  10. package/lib/cjs/TableEmbedRow.js +3 -3
  11. package/lib/cjs/TableHeader.js +2 -2
  12. package/lib/cjs/TableRow.js +7 -4
  13. package/lib/cjs/TableSettingMenu.js +3 -3
  14. package/lib/cjs/TbodyContent.js +5 -3
  15. package/lib/cjs/TheadContent.js +2 -2
  16. package/lib/cjs/hooks/use-async-switch.js +2 -2
  17. package/lib/cjs/hooks/use-check.js +2 -2
  18. package/lib/cjs/hooks/use-col-width.js +46 -17
  19. package/lib/cjs/hooks/use-colgroup.js +2 -2
  20. package/lib/cjs/hooks/use-drag.js +2 -2
  21. package/lib/cjs/hooks/use-embed-expand.js +3 -3
  22. package/lib/cjs/hooks/use-pagination.js +3 -3
  23. package/lib/cjs/icons/index.js +2 -2
  24. package/lib/cjs/node_modules/rc-resize-observer/es/index.js +9 -9
  25. package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/Children/toArray.js +2 -2
  26. package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/Dom/findDOMNode.js +2 -2
  27. package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/ref.js +2 -2
  28. package/lib/cjs/node_modules/rc-util/es/Dom/findDOMNode.js +2 -2
  29. package/lib/cjs/node_modules/rc-util/es/hooks/useLayoutEffect.js +4 -3
  30. package/lib/cjs/node_modules/rc-virtual-list/es/Filler.js +4 -3
  31. package/lib/cjs/node_modules/rc-virtual-list/es/Item.js +4 -3
  32. package/lib/cjs/node_modules/rc-virtual-list/es/List.js +4 -3
  33. package/lib/cjs/node_modules/rc-virtual-list/es/ScrollBar.js +4 -3
  34. package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useChildren.js +4 -3
  35. package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useDiffItem.js +4 -3
  36. package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useHeights.js +7 -17
  37. package/lib/cjs/node_modules/rc-virtual-list/es/hooks/useScrollTo.js +4 -3
  38. package/lib/cjs/styles/index.scss.js +1 -1
  39. package/lib/cjs/use-table.js +8 -4
  40. package/lib/esm/SettingDrawer.js +26 -17
  41. package/lib/esm/Table.js +2 -0
  42. package/lib/esm/TableBody.js +1 -2
  43. package/lib/esm/TableRow.js +5 -2
  44. package/lib/esm/TbodyContent.js +3 -1
  45. package/lib/esm/hooks/use-col-width.js +44 -15
  46. package/lib/esm/node_modules/rc-virtual-list/es/hooks/useHeights.js +3 -14
  47. package/lib/esm/node_modules/rc-virtual-list/es/index.js +1 -1
  48. package/lib/esm/node_modules/react-is/cjs/react-is.development.js +1 -1
  49. package/lib/esm/node_modules/react-is/cjs/react-is.production.min.js +1 -1
  50. package/lib/esm/styles/index.scss.js +1 -1
  51. package/lib/esm/use-table.js +6 -2
  52. package/lib/types/SettingDrawer.d.ts +5 -0
  53. package/lib/types/TableRow.d.ts +4 -0
  54. package/lib/types/context.d.ts +6 -2
  55. package/lib/types/types.d.ts +4 -0
  56. package/lib/types/use-table.d.ts +11 -1
  57. package/package.json +2 -1
  58. package/lib/cjs/node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js +0 -1090
  59. package/lib/cjs/packages/hooks/use-merge-refs/lib/esm/index.js +0 -68
  60. package/lib/cjs/packages/ui/scrollbar/lib/esm/Scrollbar.js +0 -157
  61. package/lib/cjs/packages/ui/scrollbar/lib/esm/styles/index.scss.js +0 -35
  62. package/lib/cjs/packages/ui/scrollbar/lib/esm/utils/index.js +0 -72
  63. package/lib/esm/node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js +0 -1084
  64. package/lib/esm/packages/hooks/use-merge-refs/lib/esm/index.js +0 -62
  65. package/lib/esm/packages/ui/scrollbar/lib/esm/Scrollbar.js +0 -145
  66. package/lib/esm/packages/ui/scrollbar/lib/esm/styles/index.scss.js +0 -23
  67. package/lib/esm/packages/ui/scrollbar/lib/esm/utils/index.js +0 -66
@@ -1,68 +0,0 @@
1
- /** @LICENSE
2
- * @hi-ui/table
3
- * https://github.com/XiaoMi/hiui/tree/master/packages/ui/table#readme
4
- *
5
- * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
- 'use strict';
11
-
12
- Object.defineProperty(exports, '__esModule', {
13
- value: true
14
- });
15
- var React = require('react');
16
-
17
- /** @LICENSE
18
- * @hi-ui/use-merge-refs
19
- * https://github.com/XiaoMi/hiui/tree/master/packages/hooks/use-merge-refs#readme
20
- *
21
- * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */
26
-
27
- /**
28
- * A hook to merge multiple refs into a single function ref.
29
- *
30
- * @param refs
31
- */
32
- var useMergeRefs = function useMergeRefs() {
33
- for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
34
- refs[_key] = arguments[_key];
35
- }
36
- return React.useMemo(function () {
37
- return mergeRefs.apply(void 0, refs);
38
- }, refs);
39
- };
40
- /**
41
- * Merges multiple refs into a single function ref.
42
- *
43
- * @param refs
44
- * @returns
45
- */
46
- function mergeRefs() {
47
- for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
48
- refs[_key2] = arguments[_key2];
49
- }
50
- // Empty check
51
- if (refs.some(function (ref) {
52
- return ref;
53
- }) === false) return null;
54
- return function (value) {
55
- refs.forEach(function (ref) {
56
- setRef(ref, value);
57
- });
58
- };
59
- }
60
- function setRef(ref, value) {
61
- if (typeof ref === 'function') {
62
- ref(value);
63
- } else if (ref) {
64
- ref.current = value;
65
- }
66
- }
67
- exports.mergeRefs = mergeRefs;
68
- exports.useMergeRefs = useMergeRefs;
@@ -1,157 +0,0 @@
1
- /** @LICENSE
2
- * @hi-ui/table
3
- * https://github.com/XiaoMi/hiui/tree/master/packages/ui/table#readme
4
- *
5
- * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
- 'use strict';
11
-
12
- var _typeof = require("@babel/runtime/helpers/typeof");
13
- Object.defineProperty(exports, '__esModule', {
14
- value: true
15
- });
16
- var tslib = require('tslib');
17
- var React = require('react');
18
- var classname = require('@hi-ui/classname');
19
- var env = require('@hi-ui/env');
20
- var index$1 = require('../../../../hooks/use-merge-refs/lib/esm/index.js');
21
- var perfectScrollbar_esm = require('../../../../../node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js');
22
- var index = require('./utils/index.js');
23
- function _interopDefaultLegacy(e) {
24
- return e && _typeof(e) === 'object' && 'default' in e ? e : {
25
- 'default': e
26
- };
27
- }
28
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
29
-
30
- /** @LICENSE
31
- * @hi-ui/scrollbar
32
- * https://github.com/XiaoMi/hiui/tree/master/packages/ui/scrollbar#readme
33
- *
34
- * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
35
- *
36
- * This source code is licensed under the MIT license found in the
37
- * LICENSE file in the root directory of this source tree.
38
- */
39
- var SCROLLBAR_PREFIX = classname.getPrefixCls('scrollbar');
40
- var Scrollbar = /*#__PURE__*/React.forwardRef(function (_a, ref) {
41
- var _cx;
42
- var _a$prefixCls = _a.prefixCls,
43
- prefixCls = _a$prefixCls === void 0 ? SCROLLBAR_PREFIX : _a$prefixCls,
44
- _a$role = _a.role,
45
- role = _a$role === void 0 ? 'scrollbar' : _a$role,
46
- _a$position = _a.position,
47
- position = _a$position === void 0 ? 'relative' : _a$position,
48
- _a$axes = _a.axes,
49
- axes = _a$axes === void 0 ? 'both' : _a$axes,
50
- _a$keepVisible = _a.keepVisible,
51
- keepVisible = _a$keepVisible === void 0 ? false : _a$keepVisible,
52
- _a$onlyScrollVisible = _a.onlyScrollVisible,
53
- onlyScrollVisible = _a$onlyScrollVisible === void 0 ? false : _a$onlyScrollVisible,
54
- className = _a.className,
55
- children = _a.children,
56
- style = _a.style,
57
- innerRef = _a.innerRef,
58
- rest = tslib.__rest(_a, ["prefixCls", "role", "position", "axes", "keepVisible", "onlyScrollVisible", "className", "children", "style", "innerRef"]);
59
- var cls = classname.cx(prefixCls, className, 'priority', (_cx = {}, _cx[prefixCls + "--keep-visible"] = keepVisible, _cx[prefixCls + "--only-scroll-visible"] = !keepVisible && onlyScrollVisible, _cx));
60
- var _useState = React.useState(undefined),
61
- ps = _useState[0],
62
- setPs = _useState[1];
63
- var _useState2 = React.useState(null),
64
- containerElement = _useState2[0],
65
- setContainer = _useState2[1];
66
- var _useState3 = React.useState(null),
67
- wrapperElement = _useState3[0],
68
- setWrapperElement = _useState3[1];
69
- var eventPropsRef = React.useRef({});
70
- React.useEffect(function () {
71
- if (containerElement) {
72
- setPs(new perfectScrollbar_esm["default"](containerElement));
73
- }
74
- }, [containerElement]);
75
- // 轴定制
76
- React.useEffect(function () {
77
- if (ps) {
78
- ps.settings.suppressScrollX = true;
79
- ps.settings.suppressScrollY = true;
80
- if (axes === 'both' || axes === 'x') {
81
- ps.settings.suppressScrollX = false;
82
- }
83
- if (axes === 'both' || axes === 'y') {
84
- ps.settings.suppressScrollY = false;
85
- }
86
- ps.update();
87
- }
88
- }, [ps, axes]);
89
- // 监听容器以及内容尺寸
90
- React.useEffect(function () {
91
- if (ps && wrapperElement && containerElement) {
92
- var observer = new ResizeObserver(function (entries) {
93
- ps.update();
94
- });
95
- observer.observe(containerElement);
96
- observer.observe(wrapperElement);
97
- return function () {
98
- observer.disconnect();
99
- };
100
- }
101
- }, [ps, wrapperElement, containerElement]);
102
- React.useImperativeHandle(innerRef, function () {
103
- return {
104
- instance: ps,
105
- containerElement: containerElement || undefined
106
- };
107
- }, [ps, containerElement]);
108
- var _useMemo = React.useMemo(function () {
109
- var eventProps = {};
110
- var injectProps = {};
111
- var eventNames = Object.keys(index.ScrollbarEventToPsMap);
112
- for (var _i = 0, _Object$keys = Object.keys(rest); _i < _Object$keys.length; _i++) {
113
- var propsName = _Object$keys[_i];
114
- if (eventNames.includes(propsName)) {
115
- eventProps[propsName] = rest[propsName];
116
- } else {
117
- injectProps[propsName] = rest[propsName];
118
- }
119
- }
120
- return {
121
- eventProps: eventProps,
122
- injectProps: injectProps
123
- };
124
- }, [rest]),
125
- eventProps = _useMemo.eventProps,
126
- injectProps = _useMemo.injectProps;
127
- // 更新event props引用
128
- React.useEffect(function () {
129
- eventPropsRef.current = eventProps;
130
- }, [eventProps]);
131
- // 注册监听事件
132
- React.useEffect(function () {
133
- if (containerElement) {
134
- Object.keys(index.ScrollbarEventToPsMap).forEach(function (event) {
135
- containerElement.addEventListener(index.ScrollbarEventToPsMap[event], function (e) {
136
- var _a, _b;
137
- (_b = (_a = eventPropsRef.current)[event]) === null || _b === void 0 ? void 0 : _b.call(_a, e);
138
- });
139
- });
140
- }
141
- }, [containerElement]);
142
- return /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
143
- ref: index$1.useMergeRefs(setContainer, ref),
144
- role: role,
145
- className: cls,
146
- style: Object.assign(Object.assign({}, style), {
147
- position: position
148
- })
149
- }, injectProps), /*#__PURE__*/React__default["default"].createElement("div", {
150
- className: prefixCls + "__wrapper",
151
- ref: setWrapperElement
152
- }, children));
153
- });
154
- if (env.__DEV__) {
155
- Scrollbar.displayName = 'Scrollbar';
156
- }
157
- exports.Scrollbar = Scrollbar;
@@ -1,35 +0,0 @@
1
- /** @LICENSE
2
- * @hi-ui/table
3
- * https://github.com/XiaoMi/hiui/tree/master/packages/ui/table#readme
4
- *
5
- * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
- 'use strict';
11
-
12
- var _typeof = require("@babel/runtime/helpers/typeof");
13
- Object.defineProperty(exports, '__esModule', {
14
- value: true
15
- });
16
- var __styleInject__ = require('style-inject');
17
- function _interopDefaultLegacy(e) {
18
- return e && _typeof(e) === 'object' && 'default' in e ? e : {
19
- 'default': e
20
- };
21
- }
22
- var __styleInject____default = /*#__PURE__*/_interopDefaultLegacy(__styleInject__);
23
-
24
- /** @LICENSE
25
- * @hi-ui/scrollbar
26
- * https://github.com/XiaoMi/hiui/tree/master/packages/ui/scrollbar#readme
27
- *
28
- * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE file in the root directory of this source tree.
32
- */
33
- var css_248z = "/** Container style*/.ps {overflow: hidden !important;overflow-anchor: none;-ms-overflow-style: none;touch-action: auto;-ms-touch-action: auto;}/** Scrollbar rail styles*/.ps__rail-x {display: none;opacity: 0;transition: background-color 0.2s linear, opacity 0.2s linear;-webkit-transition: background-color 0.2s linear, opacity 0.2s linear;height: 15px;/* there must be 'bottom' or 'top' for ps__rail-x */bottom: 0px;/* please don't change 'position' */position: absolute;}.ps__rail-y {display: none;opacity: 0;transition: background-color 0.2s linear, opacity 0.2s linear;-webkit-transition: background-color 0.2s linear, opacity 0.2s linear;width: 15px;/* there must be 'right' or 'left' for ps__rail-y */right: 0;/* please don't change 'position' */position: absolute;}.ps--active-x > .ps__rail-x,.ps--active-y > .ps__rail-y {display: block;background-color: transparent;}.ps:hover > .ps__rail-x,.ps:hover > .ps__rail-y,.ps--focus > .ps__rail-x,.ps--focus > .ps__rail-y,.ps--scrolling-x > .ps__rail-x,.ps--scrolling-y > .ps__rail-y {opacity: 0.6;}.ps .ps__rail-x:hover,.ps .ps__rail-y:hover,.ps .ps__rail-x:focus,.ps .ps__rail-y:focus,.ps .ps__rail-x.ps--clicking,.ps .ps__rail-y.ps--clicking {background-color: #eee;opacity: 0.9;}/** Scrollbar thumb styles*/.ps__thumb-x {background-color: #aaa;border-radius: 6px;transition: background-color 0.2s linear, height 0.2s ease-in-out;-webkit-transition: background-color 0.2s linear, height 0.2s ease-in-out;height: 6px;/* there must be 'bottom' for ps__thumb-x */bottom: 2px;/* please don't change 'position' */position: absolute;}.ps__thumb-y {background-color: #aaa;border-radius: 6px;transition: background-color 0.2s linear, width 0.2s ease-in-out;-webkit-transition: background-color 0.2s linear, width 0.2s ease-in-out;width: 6px;/* there must be 'right' for ps__thumb-y */right: 2px;/* please don't change 'position' */position: absolute;}.ps__rail-x:hover > .ps__thumb-x,.ps__rail-x:focus > .ps__thumb-x,.ps__rail-x.ps--clicking .ps__thumb-x {background-color: #999;height: 11px;}.ps__rail-y:hover > .ps__thumb-y,.ps__rail-y:focus > .ps__thumb-y,.ps__rail-y.ps--clicking .ps__thumb-y {background-color: #999;width: 11px;}/* MS supports */@supports (-ms-overflow-style: none) {.ps {overflow: auto !important;}}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {.ps {overflow: auto !important;}}.hi-v4-scrollbar {overflow: hidden;width: 100%;height: 100%;}.hi-v4-scrollbar__wrapper {width: -webkit-fit-content;width: -moz-fit-content;width: fit-content;height: -webkit-fit-content;height: -moz-fit-content;height: fit-content;min-width: 100%;min-height: 100%;}.hi-v4-scrollbar--keep-visible.priority > .ps__rail-y, .hi-v4-scrollbar--keep-visible.priority > .ps__rail-x {opacity: 0.8;}.hi-v4-scrollbar--keep-visible.priority .ps__thumb-y,.hi-v4-scrollbar--keep-visible.priority .ps__thumb-x {background-color: var(--hi-v4-color-gray-400, #b5bcc7);}.hi-v4-scrollbar.priority:hover > .ps__rail-y, .hi-v4-scrollbar.priority:hover > .ps__rail-x, .hi-v4-scrollbar.priority:focus > .ps__rail-y, .hi-v4-scrollbar.priority:focus > .ps__rail-x {opacity: 0.8;}.hi-v4-scrollbar.priority > .ps__rail-y,.hi-v4-scrollbar.priority .ps__thumb-y {width: 8px;border-radius: 4px;right: 0;-webkit-transition: opacity var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1)), background-color var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));transition: opacity var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1)), background-color var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));}.hi-v4-scrollbar.priority > .ps__rail-y:hover, .hi-v4-scrollbar.priority > .ps__rail-y:focus, .hi-v4-scrollbar.priority > .ps__rail-y.ps--clicking {width: 8px;background-color: var(--hi-v4-color-gray-200, #ebedf0);opacity: 0.8;}.hi-v4-scrollbar.priority > .ps__rail-y:hover .ps__thumb-y, .hi-v4-scrollbar.priority > .ps__rail-y:focus .ps__thumb-y, .hi-v4-scrollbar.priority > .ps__rail-y.ps--clicking .ps__thumb-y {width: 8px;right: 0;background-color: var(--hi-v4-color-gray-500, #929aa6);}.hi-v4-scrollbar.priority > .ps__rail-x,.hi-v4-scrollbar.priority .ps__thumb-x {height: 8px;border-radius: 4px;bottom: 0;-webkit-transition: opacity var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1)), background-color var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));transition: opacity var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1)), background-color var(--hi-v4-motion-duration-normal, 200ms) var(--hi-v4-motion-bezier-easing, cubic-bezier(0.37, 0.02, 0.34, 1));}.hi-v4-scrollbar.priority > .ps__rail-x:hover, .hi-v4-scrollbar.priority > .ps__rail-x:focus, .hi-v4-scrollbar.priority > .ps__rail-x.ps--clicking {height: 8px;background-color: var(--hi-v4-color-gray-200, #ebedf0);opacity: 0.8;}.hi-v4-scrollbar.priority > .ps__rail-x:hover .ps__thumb-x, .hi-v4-scrollbar.priority > .ps__rail-x:focus .ps__thumb-x, .hi-v4-scrollbar.priority > .ps__rail-x.ps--clicking .ps__thumb-x {height: 8px;bottom: 0;background-color: var(--hi-v4-color-gray-500, #929aa6);}.hi-v4-scrollbar--only-scroll-visible.priority:not(.ps--scrolling-y) > .ps__rail-y:not(:hover):not(:focus), .hi-v4-scrollbar--only-scroll-visible.priority:not(.ps--scrolling-x) > .ps__rail-x:not(:hover):not(:focus) {opacity: 0;}";
34
- __styleInject____default["default"](css_248z);
35
- exports["default"] = css_248z;
@@ -1,72 +0,0 @@
1
- /** @LICENSE
2
- * @hi-ui/table
3
- * https://github.com/XiaoMi/hiui/tree/master/packages/ui/table#readme
4
- *
5
- * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */
10
- 'use strict';
11
-
12
- Object.defineProperty(exports, '__esModule', {
13
- value: true
14
- });
15
-
16
- /** @LICENSE
17
- * @hi-ui/scrollbar
18
- * https://github.com/XiaoMi/hiui/tree/master/packages/ui/scrollbar#readme
19
- *
20
- * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
21
- *
22
- * This source code is licensed under the MIT license found in the
23
- * LICENSE file in the root directory of this source tree.
24
- */
25
- var ScrollbarPsToEventMatch = {
26
- /**
27
- * This event fires when the y-axis is scrolled in either direction
28
- */
29
- 'ps-scroll-y': 'onScrollY',
30
- /**
31
- * This event fires when the x-axis is scrolled in either direction.
32
- */
33
- 'ps-scroll-x': 'onScrollX',
34
- /**
35
- * This event fires when scrolling upwards.
36
- */
37
- 'ps-scroll-up': 'onScrollUp',
38
- /**
39
- * This event fires when scrolling downwards.
40
- */
41
- 'ps-scroll-down': 'onScrollDown',
42
- /**
43
- * This event fires when scrolling to the left.
44
- */
45
- 'ps-scroll-left': 'onScrollLeft',
46
- /**
47
- * This event fires when scrolling to the right.
48
- */
49
- 'ps-scroll-right': 'onScrollRight',
50
- /**
51
- * This event fires when scrolling reaches the start of the y-axis.
52
- */
53
- 'ps-y-reach-start': 'onYReachStart',
54
- /**
55
- * This event fires when scrolling reaches the end of the y-axis (useful for infinite scroll).
56
- */
57
- 'ps-y-reach-end': 'onYReachEnd',
58
- /**
59
- * This event fires when scrolling reaches the start of the x-axis.
60
- */
61
- 'ps-x-reach-start': 'onXReachStart',
62
- /**
63
- * This event fires when scrolling reaches the end of the x-axis.
64
- */
65
- 'ps-x-reach-end': 'onXReachEnd'
66
- };
67
- var ScrollbarEventToPsMap = Object.keys(ScrollbarPsToEventMatch).reduce(function (acc, key) {
68
- var value = ScrollbarPsToEventMatch[key];
69
- acc[value] = key;
70
- return acc;
71
- }, {});
72
- exports.ScrollbarEventToPsMap = ScrollbarEventToPsMap;