@jetbrains/ring-ui-built 6.0.27 → 6.0.29
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/components/_helpers/_rollupPluginBabelHelpers.js +4 -15
- package/components/_helpers/anchor.js +1 -1
- package/components/_helpers/caption.js +4 -6
- package/components/_helpers/card.js +5 -7
- package/components/_helpers/icon__svg.js +1 -1
- package/components/_helpers/input.js +12 -14
- package/components/_helpers/query-assist__suggestions.js +2 -3
- package/components/_helpers/select__filter.js +6 -8
- package/components/_helpers/services-link.js +4 -6
- package/components/_helpers/sidebar.js +9 -11
- package/components/_helpers/tab-link.js +1 -1
- package/components/_helpers/theme.js +1 -1
- package/components/_helpers/title.js +7 -9
- package/components/alert/alert.js +17 -19
- package/components/alert/container.js +4 -6
- package/components/alert-service/alert-service.js +9 -10
- package/components/analytics/analytics.js +2 -3
- package/components/analytics/analytics__custom-plugin.js +2 -3
- package/components/auth/auth.js +9 -8
- package/components/auth/auth__core.js +16 -16
- package/components/auth/background-flow.js +4 -5
- package/components/auth/down-notification.js +7 -7
- package/components/auth/iframe-flow.js +7 -8
- package/components/auth/request-builder.js +3 -4
- package/components/auth/response-parser.js +10 -12
- package/components/auth/storage.js +10 -11
- package/components/auth/token-validator.js +12 -14
- package/components/auth/window-flow.js +4 -5
- package/components/auth-dialog/auth-dialog.js +13 -15
- package/components/auth-dialog-service/auth-dialog-service.js +7 -7
- package/components/avatar/avatar.js +14 -16
- package/components/avatar/fallback-avatar.js +5 -5
- package/components/badge/badge.js +6 -8
- package/components/button/button.js +7 -9
- package/components/button-group/button-group.js +6 -8
- package/components/button-set/button-set.js +6 -8
- package/components/button-toolbar/button-toolbar.js +6 -8
- package/components/caret/caret.js +7 -8
- package/components/checkbox/checkbox.js +7 -9
- package/components/clipboard/clipboard.js +8 -8
- package/components/code/code.js +12 -14
- package/components/collapse/collapse-content.js +7 -7
- package/components/collapse/collapse-control.js +2 -2
- package/components/collapse/collapse.js +1 -1
- package/components/confirm/confirm.js +11 -13
- package/components/confirm-service/confirm-service.js +6 -6
- package/components/content-layout/content-layout.js +7 -9
- package/components/contenteditable/contenteditable.js +4 -6
- package/components/control-label/control-label.js +1 -1
- package/components/data-list/data-list.js +19 -23
- package/components/data-list/data-list.mock.js +2 -2
- package/components/data-list/item.js +12 -14
- package/components/data-list/selection.js +10 -12
- package/components/data-list/title.js +1 -1
- package/components/date-picker/consts.js +2 -2
- package/components/date-picker/date-input.js +12 -14
- package/components/date-picker/date-picker.js +19 -21
- package/components/date-picker/date-popup.js +23 -25
- package/components/date-picker/day.js +14 -16
- package/components/date-picker/month-names.js +7 -9
- package/components/date-picker/month-slider.js +10 -12
- package/components/date-picker/month.js +5 -5
- package/components/date-picker/months.js +4 -4
- package/components/date-picker/weekdays.js +3 -3
- package/components/date-picker/years.js +12 -14
- package/components/dialog/dialog.js +18 -20
- package/components/dropdown/anchor.js +1 -1
- package/components/dropdown/dropdown.js +13 -15
- package/components/dropdown-menu/dropdown-menu.js +10 -10
- package/components/editable-heading/editable-heading.js +5 -5
- package/components/error-bubble/error-bubble.js +11 -13
- package/components/error-message/error-message.js +6 -8
- package/components/footer/footer.js +2 -2
- package/components/global/create-stateful-context.js +1 -1
- package/components/global/data-tests.js +3 -3
- package/components/global/dom.js +7 -8
- package/components/global/focus-sensor-hoc.js +15 -17
- package/components/global/fuzzy-highlight.js +2 -2
- package/components/global/get-uid.js +1 -1
- package/components/global/inject-styles.js +1 -1
- package/components/global/listeners.js +4 -5
- package/components/global/memoize.js +1 -1
- package/components/global/normalize-indent.js +5 -5
- package/components/global/react-dom-renderer.js +7 -9
- package/components/global/rerender-hoc.js +5 -7
- package/components/global/theme.js +7 -7
- package/components/global/trivial-template-tag.js +2 -2
- package/components/global/url.js +1 -1
- package/components/grid/col.js +7 -9
- package/components/grid/grid.js +6 -8
- package/components/grid/row.js +5 -7
- package/components/group/group.js +4 -6
- package/components/header/header.js +13 -14
- package/components/header/logo.js +5 -7
- package/components/header/profile.js +12 -14
- package/components/header/services-link.js +2 -2
- package/components/header/services.js +12 -14
- package/components/header/smart-profile.js +17 -18
- package/components/header/smart-services.js +16 -17
- package/components/header/tray-icon.js +5 -7
- package/components/header/tray.js +4 -6
- package/components/heading/heading.js +1 -1
- package/components/http/http.js +11 -13
- package/components/http/http.mock.js +15 -17
- package/components/hub-source/hub-source.js +4 -5
- package/components/hub-source/hub-source__user.js +6 -6
- package/components/hub-source/hub-source__users-groups.js +4 -5
- package/components/i18n/i18n.js +1 -1
- package/components/icon/icon.js +5 -7
- package/components/icon/icon__svg.js +1 -1
- package/components/icon/index.js +1 -1
- package/components/input/input.js +1 -1
- package/components/island/adaptive-island-hoc.js +6 -8
- package/components/island/content.js +13 -15
- package/components/island/header.js +4 -6
- package/components/island/island.js +6 -8
- package/components/island-legacy/content-legacy.js +4 -6
- package/components/island-legacy/header-legacy.js +4 -6
- package/components/island-legacy/island-legacy.js +4 -6
- package/components/link/clickableLink.js +5 -7
- package/components/link/link.js +6 -8
- package/components/list/list.js +47 -49
- package/components/list/list__custom.js +6 -8
- package/components/list/list__hint.js +4 -6
- package/components/list/list__item.js +13 -15
- package/components/list/list__link.js +5 -7
- package/components/list/list__separator.js +4 -6
- package/components/list/list__title.js +4 -6
- package/components/list/list__users-groups-source.js +11 -13
- package/components/loader/loader.js +9 -11
- package/components/loader/loader__core.js +7 -9
- package/components/loader-inline/loader-inline.js +6 -8
- package/components/loader-screen/loader-screen.js +7 -9
- package/components/login-dialog/login-dialog.js +12 -14
- package/components/login-dialog/service.js +7 -7
- package/components/markdown/markdown.js +4 -6
- package/components/message/message.js +17 -19
- package/components/old-browsers-message/old-browsers-message.js +1 -1
- package/components/old-browsers-message/old-browsers-message__stop.js +1 -1
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.js +16 -18
- package/components/panel/panel.js +4 -6
- package/components/permissions/permissions.js +4 -5
- package/components/permissions/permissions__cache.js +2 -3
- package/components/popup/popup.js +33 -35
- package/components/popup/popup.target.js +1 -1
- package/components/popup/position.js +9 -9
- package/components/popup-menu/popup-menu.js +14 -16
- package/components/progress-bar/progress-bar.js +8 -10
- package/components/query-assist/query-assist.js +64 -66
- package/components/query-assist/query-assist__suggestions.js +6 -6
- package/components/radio/radio.js +5 -7
- package/components/radio/radio__item.js +9 -11
- package/components/select/select.js +48 -50
- package/components/select/select__filter.js +6 -6
- package/components/select/select__popup.js +36 -38
- package/components/shortcuts/core.js +7 -8
- package/components/shortcuts/shortcuts-hoc.js +8 -10
- package/components/shortcuts/shortcuts.js +8 -10
- package/components/slider/slider.js +6 -6
- package/components/slider/slider.utils.js +4 -4
- package/components/storage/storage.js +8 -8
- package/components/storage/storage__fallback.js +5 -6
- package/components/storage/storage__local.js +9 -10
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +24 -26
- package/components/table/cell.js +6 -8
- package/components/table/disable-hover-hoc.js +7 -9
- package/components/table/header-cell.d.ts +1 -0
- package/components/table/header-cell.js +8 -10
- package/components/table/header.d.ts +2 -1
- package/components/table/header.js +15 -10
- package/components/table/multitable.js +13 -15
- package/components/table/row-with-focus-sensor.js +14 -16
- package/components/table/row.d.ts +2 -1
- package/components/table/row.js +29 -23
- package/components/table/selection-adapter.js +1 -1
- package/components/table/selection-shortcuts-hoc.js +19 -21
- package/components/table/selection.js +4 -5
- package/components/table/smart-table.d.ts +2 -1
- package/components/table/smart-table.js +10 -12
- package/components/table/table.d.ts +2 -1
- package/components/table/table.js +29 -30
- package/components/tabs/collapsible-more.js +8 -8
- package/components/tabs/collapsible-tab.js +3 -3
- package/components/tabs/collapsible-tabs.js +10 -10
- package/components/tabs/dumb-tabs.js +11 -13
- package/components/tabs/smart-tabs.js +13 -15
- package/components/tabs/tab-link.js +2 -2
- package/components/tabs/tab.js +6 -8
- package/components/tabs/tabs.js +5 -5
- package/components/tag/tag.js +9 -11
- package/components/tags-input/tags-input.js +39 -41
- package/components/tags-list/tags-list.js +5 -7
- package/components/text/text.js +4 -6
- package/components/toggle/toggle.js +6 -8
- package/components/tooltip/tooltip.js +27 -29
- package/components/user-agreement/service.js +7 -7
- package/components/user-agreement/user-agreement.js +11 -13
- package/components/user-card/card.js +9 -9
- package/components/user-card/smart-user-card-tooltip.js +14 -16
- package/components/user-card/tooltip.js +11 -13
- package/components/user-card/user-card.js +9 -9
- package/package.json +1 -1
@@ -1,17 +1,17 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, e as _extends, f as _classCallCheck, g as _callSuper, k as _toConsumableArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.array.filter.js';
|
4
4
|
import 'core-js/modules/es.object.to-string.js';
|
5
5
|
import React, { Component } from 'react';
|
6
6
|
import PropTypes from 'prop-types';
|
7
7
|
import { isNodeInVisiblePartOfPage } from '../global/dom.js';
|
8
|
+
import 'core-js/modules/es.array.iterator.js';
|
8
9
|
import 'core-js/modules/es.object.assign.js';
|
9
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
10
|
-
import 'core-js/modules/es.regexp.exec.js';
|
11
|
-
import 'core-js/modules/es.string.split.js';
|
12
10
|
import 'core-js/modules/es.object.entries.js';
|
13
|
-
import 'core-js/modules/es.
|
11
|
+
import 'core-js/modules/es.regexp.exec.js';
|
14
12
|
import 'core-js/modules/es.set.js';
|
13
|
+
import 'core-js/modules/es.string.split.js';
|
14
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
15
15
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
16
16
|
|
17
17
|
var modules_6dce58ae = {"light":"light_rui_2ac4","trapButton":"trapButton_rui_11f0"};
|
@@ -22,37 +22,35 @@ var FOCUSABLE_ELEMENTS = 'input, button, select, textarea, a[href], *[tabindex]:
|
|
22
22
|
* @name TabTrap
|
23
23
|
*/
|
24
24
|
var TabTrap = /*#__PURE__*/function (_Component) {
|
25
|
-
_inherits(TabTrap, _Component);
|
26
|
-
var _super = _createSuper(TabTrap);
|
27
25
|
function TabTrap() {
|
28
26
|
var _this;
|
29
27
|
_classCallCheck(this, TabTrap);
|
30
28
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
31
29
|
args[_key] = arguments[_key];
|
32
30
|
}
|
33
|
-
_this =
|
34
|
-
_defineProperty(
|
35
|
-
_defineProperty(
|
36
|
-
_defineProperty(
|
37
|
-
var
|
38
|
-
previousFocusedNode =
|
31
|
+
_this = _callSuper(this, TabTrap, [].concat(args));
|
32
|
+
_defineProperty(_this, "previousFocusedNode", void 0);
|
33
|
+
_defineProperty(_this, "trapWithoutFocus", void 0);
|
34
|
+
_defineProperty(_this, "restoreFocus", function () {
|
35
|
+
var _this2 = _this,
|
36
|
+
previousFocusedNode = _this2.previousFocusedNode;
|
39
37
|
if (previousFocusedNode instanceof HTMLElement && previousFocusedNode.focus && isNodeInVisiblePartOfPage(previousFocusedNode)) {
|
40
38
|
previousFocusedNode.focus({
|
41
39
|
preventScroll: true
|
42
40
|
});
|
43
41
|
}
|
44
42
|
});
|
45
|
-
_defineProperty(
|
46
|
-
_defineProperty(
|
43
|
+
_defineProperty(_this, "node", void 0);
|
44
|
+
_defineProperty(_this, "containerRef", function (node) {
|
47
45
|
if (!node) {
|
48
46
|
return;
|
49
47
|
}
|
50
48
|
_this.node = node;
|
51
49
|
});
|
52
|
-
_defineProperty(
|
50
|
+
_defineProperty(_this, "focusElement", function () {
|
53
51
|
var first = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
54
|
-
var
|
55
|
-
node =
|
52
|
+
var _this3 = _this,
|
53
|
+
node = _this3.node;
|
56
54
|
if (!node) {
|
57
55
|
return;
|
58
56
|
}
|
@@ -64,13 +62,13 @@ var TabTrap = /*#__PURE__*/function (_Component) {
|
|
64
62
|
toBeFocused.focus();
|
65
63
|
}
|
66
64
|
});
|
67
|
-
_defineProperty(
|
65
|
+
_defineProperty(_this, "focusFirst", function () {
|
68
66
|
return _this.focusElement(true);
|
69
67
|
});
|
70
|
-
_defineProperty(
|
68
|
+
_defineProperty(_this, "focusLast", function () {
|
71
69
|
return _this.focusElement(false);
|
72
70
|
});
|
73
|
-
_defineProperty(
|
71
|
+
_defineProperty(_this, "focusLastIfEnabled", function (event) {
|
74
72
|
if (_this.trapWithoutFocus) {
|
75
73
|
return;
|
76
74
|
}
|
@@ -83,7 +81,7 @@ var TabTrap = /*#__PURE__*/function (_Component) {
|
|
83
81
|
_this.focusLast();
|
84
82
|
}
|
85
83
|
});
|
86
|
-
_defineProperty(
|
84
|
+
_defineProperty(_this, "handleBlurIfWithoutFocus", function (event) {
|
87
85
|
var _this$node;
|
88
86
|
if (!_this.trapWithoutFocus) {
|
89
87
|
return;
|
@@ -98,8 +96,8 @@ var TabTrap = /*#__PURE__*/function (_Component) {
|
|
98
96
|
}
|
99
97
|
_this.focusLast();
|
100
98
|
});
|
101
|
-
_defineProperty(
|
102
|
-
_defineProperty(
|
99
|
+
_defineProperty(_this, "trapButtonNode", void 0);
|
100
|
+
_defineProperty(_this, "trapButtonRef", function (node) {
|
103
101
|
if (!node) {
|
104
102
|
return;
|
105
103
|
}
|
@@ -107,7 +105,8 @@ var TabTrap = /*#__PURE__*/function (_Component) {
|
|
107
105
|
});
|
108
106
|
return _this;
|
109
107
|
}
|
110
|
-
|
108
|
+
_inherits(TabTrap, _Component);
|
109
|
+
return _createClass(TabTrap, [{
|
111
110
|
key: "componentDidMount",
|
112
111
|
value: function componentDidMount() {
|
113
112
|
this.previousFocusedNode = document.activeElement;
|
@@ -161,7 +160,6 @@ var TabTrap = /*#__PURE__*/function (_Component) {
|
|
161
160
|
}));
|
162
161
|
}
|
163
162
|
}]);
|
164
|
-
return TabTrap;
|
165
163
|
}(Component);
|
166
164
|
_defineProperty(TabTrap, "propTypes", {
|
167
165
|
children: PropTypes.node.isRequired,
|
package/components/table/cell.js
CHANGED
@@ -1,22 +1,21 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import joinDataTestAttributes from '../global/data-tests.js';
|
6
6
|
import { m as modules_1db4bbca } from '../_helpers/table.js';
|
7
|
+
import 'core-js/modules/es.array.concat.js';
|
7
8
|
import 'core-js/modules/es.array.reduce.js';
|
8
|
-
import 'core-js/modules/es.object.to-string.js';
|
9
9
|
import 'core-js/modules/es.object.entries.js';
|
10
|
-
import 'core-js/modules/es.
|
10
|
+
import 'core-js/modules/es.object.to-string.js';
|
11
11
|
|
12
12
|
var Cell = /*#__PURE__*/function (_PureComponent) {
|
13
|
-
_inherits(Cell, _PureComponent);
|
14
|
-
var _super = _createSuper(Cell);
|
15
13
|
function Cell() {
|
16
14
|
_classCallCheck(this, Cell);
|
17
|
-
return
|
15
|
+
return _callSuper(this, Cell, arguments);
|
18
16
|
}
|
19
|
-
|
17
|
+
_inherits(Cell, _PureComponent);
|
18
|
+
return _createClass(Cell, [{
|
20
19
|
key: "render",
|
21
20
|
value: function render() {
|
22
21
|
var classes = classNames(modules_1db4bbca.cell, this.props.className);
|
@@ -26,7 +25,6 @@ var Cell = /*#__PURE__*/function (_PureComponent) {
|
|
26
25
|
}), this.props.children);
|
27
26
|
}
|
28
27
|
}]);
|
29
|
-
return Cell;
|
30
28
|
}(PureComponent);
|
31
29
|
_defineProperty(Cell, "propTypes", {
|
32
30
|
children: PropTypes.any,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.array.includes.js';
|
4
4
|
import React, { PureComponent } from 'react';
|
@@ -6,26 +6,24 @@ import React, { PureComponent } from 'react';
|
|
6
6
|
function disableHoverHOC(ComposedComponent) {
|
7
7
|
var _DisableHover;
|
8
8
|
return _DisableHover = /*#__PURE__*/function (_PureComponent) {
|
9
|
-
_inherits(DisableHover, _PureComponent);
|
10
|
-
var _super = _createSuper(DisableHover);
|
11
9
|
function DisableHover() {
|
12
10
|
var _this;
|
13
11
|
_classCallCheck(this, DisableHover);
|
14
12
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
15
13
|
args[_key] = arguments[_key];
|
16
14
|
}
|
17
|
-
_this =
|
18
|
-
_defineProperty(
|
15
|
+
_this = _callSuper(this, DisableHover, [].concat(args));
|
16
|
+
_defineProperty(_this, "state", {
|
19
17
|
disabledHover: false
|
20
18
|
});
|
21
|
-
_defineProperty(
|
19
|
+
_defineProperty(_this, "onMouseMove", function () {
|
22
20
|
if (_this.state.disabledHover) {
|
23
21
|
_this.setState({
|
24
22
|
disabledHover: false
|
25
23
|
});
|
26
24
|
}
|
27
25
|
});
|
28
|
-
_defineProperty(
|
26
|
+
_defineProperty(_this, "onKeyDown", function (e) {
|
29
27
|
var metaKeys = [16, 17, 18, 19, 20, 91]; // eslint-disable-line @typescript-eslint/no-magic-numbers
|
30
28
|
if (!_this.state.disabledHover && !metaKeys.includes(e.keyCode)) {
|
31
29
|
_this.setState({
|
@@ -35,7 +33,8 @@ function disableHoverHOC(ComposedComponent) {
|
|
35
33
|
});
|
36
34
|
return _this;
|
37
35
|
}
|
38
|
-
|
36
|
+
_inherits(DisableHover, _PureComponent);
|
37
|
+
return _createClass(DisableHover, [{
|
39
38
|
key: "componentDidMount",
|
40
39
|
value: function componentDidMount() {
|
41
40
|
document.addEventListener('mousemove', this.onMouseMove);
|
@@ -55,7 +54,6 @@ function disableHoverHOC(ComposedComponent) {
|
|
55
54
|
}));
|
56
55
|
}
|
57
56
|
}]);
|
58
|
-
return DisableHover;
|
59
57
|
}(PureComponent), _defineProperty(_DisableHover, "propTypes", ComposedComponent.propTypes), _defineProperty(_DisableHover, "defaultProps", ComposedComponent.defaultProps), _DisableHover;
|
60
58
|
}
|
61
59
|
|
@@ -10,6 +10,7 @@ export interface Column<T = never> {
|
|
10
10
|
title?: ReactNode;
|
11
11
|
getValue?: ((item: T, column: Column) => ReactNode) | null | undefined;
|
12
12
|
getDataTest?: ((item: T, column: Column) => string) | null | undefined;
|
13
|
+
colSpan?: number;
|
13
14
|
}
|
14
15
|
export interface SortParams {
|
15
16
|
column: Column;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import React, { PureComponent } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
@@ -18,25 +18,23 @@ import '../global/memoize.js';
|
|
18
18
|
import 'core-js/modules/es.array.iterator.js';
|
19
19
|
import 'core-js/modules/es.map.js';
|
20
20
|
import 'core-js/modules/es.object.to-string.js';
|
21
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
22
21
|
import 'core-js/modules/es.weak-map.js';
|
22
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
23
23
|
import 'core-js/modules/es.array.reduce.js';
|
24
24
|
import 'core-js/modules/es.object.entries.js';
|
25
25
|
|
26
26
|
var _excluded = ["className", "column", "onSort", "sortKey", "sortOrder", "data-test"];
|
27
27
|
var HeaderCell = /*#__PURE__*/function (_PureComponent) {
|
28
|
-
_inherits(HeaderCell, _PureComponent);
|
29
|
-
var _super = _createSuper(HeaderCell);
|
30
28
|
function HeaderCell() {
|
31
29
|
var _this;
|
32
30
|
_classCallCheck(this, HeaderCell);
|
33
31
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
34
32
|
args[_key] = arguments[_key];
|
35
33
|
}
|
36
|
-
_this =
|
37
|
-
_defineProperty(
|
38
|
-
_defineProperty(
|
39
|
-
_defineProperty(
|
34
|
+
_this = _callSuper(this, HeaderCell, [].concat(args));
|
35
|
+
_defineProperty(_this, "sortable", void 0);
|
36
|
+
_defineProperty(_this, "sorted", void 0);
|
37
|
+
_defineProperty(_this, "onClick", function () {
|
40
38
|
if (_this.sortable) {
|
41
39
|
var _this$props = _this.props,
|
42
40
|
column = _this$props.column,
|
@@ -50,7 +48,8 @@ var HeaderCell = /*#__PURE__*/function (_PureComponent) {
|
|
50
48
|
});
|
51
49
|
return _this;
|
52
50
|
}
|
53
|
-
|
51
|
+
_inherits(HeaderCell, _PureComponent);
|
52
|
+
return _createClass(HeaderCell, [{
|
54
53
|
key: "onChildrenClick",
|
55
54
|
value: function onChildrenClick(e) {
|
56
55
|
e.stopPropagation();
|
@@ -91,7 +90,6 @@ var HeaderCell = /*#__PURE__*/function (_PureComponent) {
|
|
91
90
|
})));
|
92
91
|
}
|
93
92
|
}]);
|
94
|
-
return HeaderCell;
|
95
93
|
}(PureComponent);
|
96
94
|
_defineProperty(HeaderCell, "propTypes", {
|
97
95
|
children: PropTypes.any,
|
@@ -14,6 +14,7 @@ export interface HeaderProps {
|
|
14
14
|
sortOrder: boolean;
|
15
15
|
caption?: string | null | undefined;
|
16
16
|
checkboxDisabled?: boolean | undefined;
|
17
|
+
maxColSpan?: number;
|
17
18
|
}
|
18
19
|
declare module 'react-waypoint' {
|
19
20
|
namespace Waypoint {
|
@@ -50,7 +51,7 @@ export default class Header extends PureComponent<HeaderProps> {
|
|
50
51
|
};
|
51
52
|
id: string;
|
52
53
|
onCheckboxFocus: (event: SyntheticEvent<HTMLElement>) => void;
|
53
|
-
createCells(widths?: never[]): React.JSX.Element[];
|
54
|
+
createCells(widths?: never[]): (React.JSX.Element | null)[];
|
54
55
|
render(): React.JSX.Element;
|
55
56
|
}
|
56
57
|
export type HeaderAttrs = JSX.LibraryManagedAttributes<typeof Header, HeaderProps>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import 'core-js/modules/es.array.map.js';
|
4
4
|
import React, { PureComponent } from 'react';
|
@@ -21,8 +21,8 @@ import '../global/memoize.js';
|
|
21
21
|
import 'core-js/modules/es.array.iterator.js';
|
22
22
|
import 'core-js/modules/es.map.js';
|
23
23
|
import 'core-js/modules/es.object.to-string.js';
|
24
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
25
24
|
import 'core-js/modules/es.weak-map.js';
|
25
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
26
26
|
import '../global/prop-types.js';
|
27
27
|
import '../global/composeRefs.js';
|
28
28
|
import 'core-js/modules/web.dom-collections.for-each.js';
|
@@ -34,24 +34,24 @@ import 'core-js/modules/es.array.reduce.js';
|
|
34
34
|
import 'core-js/modules/es.object.entries.js';
|
35
35
|
|
36
36
|
var Header = /*#__PURE__*/function (_PureComponent) {
|
37
|
-
_inherits(Header, _PureComponent);
|
38
|
-
var _super = _createSuper(Header);
|
39
37
|
function Header() {
|
40
38
|
var _this;
|
41
39
|
_classCallCheck(this, Header);
|
42
40
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
43
41
|
args[_key] = arguments[_key];
|
44
42
|
}
|
45
|
-
_this =
|
46
|
-
_defineProperty(
|
47
|
-
_defineProperty(
|
43
|
+
_this = _callSuper(this, Header, [].concat(args));
|
44
|
+
_defineProperty(_this, "id", getUID('table-header-'));
|
45
|
+
_defineProperty(_this, "onCheckboxFocus", function (event) {
|
48
46
|
event.currentTarget.blur();
|
49
47
|
});
|
50
48
|
return _this;
|
51
49
|
}
|
52
|
-
|
50
|
+
_inherits(Header, _PureComponent);
|
51
|
+
return _createClass(Header, [{
|
53
52
|
key: "createCells",
|
54
53
|
value: function createCells() {
|
54
|
+
var _this2 = this;
|
55
55
|
var widths = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
56
56
|
var _this$props = this.props,
|
57
57
|
selectable = _this$props.selectable,
|
@@ -73,6 +73,7 @@ var Header = /*#__PURE__*/function (_PureComponent) {
|
|
73
73
|
onChange: onCheckboxChange,
|
74
74
|
onFocus: this.onCheckboxFocus
|
75
75
|
}));
|
76
|
+
var colSpan = 0;
|
76
77
|
return columns.map(function (column, index) {
|
77
78
|
var columnStyle = widths[index] ? {
|
78
79
|
width: widths[index]
|
@@ -84,9 +85,14 @@ var Header = /*#__PURE__*/function (_PureComponent) {
|
|
84
85
|
sortOrder,
|
85
86
|
style: columnStyle
|
86
87
|
};
|
88
|
+
colSpan += column.colSpan || 1;
|
89
|
+
if (colSpan > (_this2.props.maxColSpan || Infinity)) {
|
90
|
+
return null;
|
91
|
+
}
|
87
92
|
return /*#__PURE__*/React.createElement(HeaderCell, _extends({
|
88
93
|
key: column.id,
|
89
|
-
"data-test": column.id
|
94
|
+
"data-test": column.id,
|
95
|
+
colSpan: column.colSpan
|
90
96
|
}, props), index === 0 && (draggable || selectable) && metaColumn);
|
91
97
|
});
|
92
98
|
}
|
@@ -120,7 +126,6 @@ var Header = /*#__PURE__*/function (_PureComponent) {
|
|
120
126
|
}, regularCells));
|
121
127
|
}
|
122
128
|
}]);
|
123
|
-
return Header;
|
124
129
|
}(PureComponent);
|
125
130
|
_defineProperty(Header, "propTypes", {
|
126
131
|
caption: PropTypes.string,
|
@@ -1,26 +1,24 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
|
-
import 'core-js/modules/es.array.find-index.js';
|
4
|
-
import 'core-js/modules/es.object.to-string.js';
|
5
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
6
|
-
import 'core-js/modules/es.array.map.js';
|
7
3
|
import 'core-js/modules/es.array.filter.js';
|
4
|
+
import 'core-js/modules/es.array.find-index.js';
|
8
5
|
import 'core-js/modules/es.array.includes.js';
|
6
|
+
import 'core-js/modules/es.array.map.js';
|
7
|
+
import 'core-js/modules/es.object.to-string.js';
|
9
8
|
import 'core-js/modules/es.string.includes.js';
|
9
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
10
10
|
import React, { Children, cloneElement, PureComponent } from 'react';
|
11
11
|
import PropTypes from 'prop-types';
|
12
12
|
|
13
13
|
var MultiTable = /*#__PURE__*/function (_PureComponent) {
|
14
|
-
_inherits(MultiTable, _PureComponent);
|
15
|
-
var _super = _createSuper(MultiTable);
|
16
14
|
function MultiTable() {
|
17
15
|
var _this;
|
18
16
|
_classCallCheck(this, MultiTable);
|
19
17
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
20
18
|
args[_key] = arguments[_key];
|
21
19
|
}
|
22
|
-
_this =
|
23
|
-
_defineProperty(
|
20
|
+
_this = _callSuper(this, MultiTable, [].concat(args));
|
21
|
+
_defineProperty(_this, "onUpPress", function () {
|
24
22
|
var tables = _this.props.children;
|
25
23
|
var tableIndex = tables.findIndex(function (_ref) {
|
26
24
|
var selection = _ref.props.selection;
|
@@ -43,7 +41,7 @@ var MultiTable = /*#__PURE__*/function (_PureComponent) {
|
|
43
41
|
}
|
44
42
|
return false;
|
45
43
|
});
|
46
|
-
_defineProperty(
|
44
|
+
_defineProperty(_this, "onDownPress", function () {
|
47
45
|
var tables = _this.props.children;
|
48
46
|
var tableIndex = tables.findIndex(function (_ref2) {
|
49
47
|
var selection = _ref2.props.selection;
|
@@ -66,7 +64,7 @@ var MultiTable = /*#__PURE__*/function (_PureComponent) {
|
|
66
64
|
}
|
67
65
|
return false;
|
68
66
|
});
|
69
|
-
_defineProperty(
|
67
|
+
_defineProperty(_this, "onEscPress", function () {
|
70
68
|
var children = _this.props.children;
|
71
69
|
Children.forEach(children, function (_ref3) {
|
72
70
|
var _ref3$props = _ref3.props,
|
@@ -75,7 +73,7 @@ var MultiTable = /*#__PURE__*/function (_PureComponent) {
|
|
75
73
|
onSelect(selection.reset());
|
76
74
|
});
|
77
75
|
});
|
78
|
-
_defineProperty(
|
76
|
+
_defineProperty(_this, "onCmdAPress", function () {
|
79
77
|
var children = _this.props.children;
|
80
78
|
Children.forEach(children, function (_ref4) {
|
81
79
|
var _ref4$props = _ref4.props,
|
@@ -85,7 +83,7 @@ var MultiTable = /*#__PURE__*/function (_PureComponent) {
|
|
85
83
|
});
|
86
84
|
return false;
|
87
85
|
});
|
88
|
-
_defineProperty(
|
86
|
+
_defineProperty(_this, "shortcuts", {
|
89
87
|
up: _this.onUpPress,
|
90
88
|
down: _this.onDownPress,
|
91
89
|
esc: _this.onEscPress,
|
@@ -94,7 +92,8 @@ var MultiTable = /*#__PURE__*/function (_PureComponent) {
|
|
94
92
|
});
|
95
93
|
return _this;
|
96
94
|
}
|
97
|
-
|
95
|
+
_inherits(MultiTable, _PureComponent);
|
96
|
+
return _createClass(MultiTable, [{
|
98
97
|
key: "componentDidUpdate",
|
99
98
|
value: function componentDidUpdate(prevProps) {
|
100
99
|
if (prevProps.children) {
|
@@ -131,7 +130,6 @@ var MultiTable = /*#__PURE__*/function (_PureComponent) {
|
|
131
130
|
}));
|
132
131
|
}
|
133
132
|
}]);
|
134
|
-
return MultiTable;
|
135
133
|
}(PureComponent);
|
136
134
|
_defineProperty(MultiTable, "propTypes", {
|
137
135
|
children: PropTypes.any.isRequired
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { a as _inherits, b as
|
1
|
+
import { a as _inherits, b as _createClass, e as _extends, f as _classCallCheck, g as _callSuper, _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import React, { PureComponent } from 'react';
|
4
4
|
import focusSensorHOC from '../global/focus-sensor-hoc.js';
|
@@ -26,8 +26,8 @@ import 'core-js/modules/es.string.starts-with.js';
|
|
26
26
|
import '../global/memoize.js';
|
27
27
|
import 'core-js/modules/es.array.iterator.js';
|
28
28
|
import 'core-js/modules/es.map.js';
|
29
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
30
29
|
import 'core-js/modules/es.weak-map.js';
|
30
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
31
31
|
import '../button/button.js';
|
32
32
|
import '@jetbrains/icons/chevron-10px';
|
33
33
|
import '../link/clickableLink.js';
|
@@ -41,18 +41,18 @@ import 'react-dom';
|
|
41
41
|
import '../global/get-uid.js';
|
42
42
|
import '../global/schedule-raf.js';
|
43
43
|
import '../global/dom.js';
|
44
|
-
import 'core-js/modules/es.object.assign.js';
|
45
44
|
import 'core-js/modules/es.array.filter.js';
|
46
|
-
import 'core-js/modules/es.
|
45
|
+
import 'core-js/modules/es.object.assign.js';
|
47
46
|
import 'core-js/modules/es.set.js';
|
47
|
+
import 'core-js/modules/es.string.split.js';
|
48
48
|
import '../shortcuts/shortcuts.js';
|
49
49
|
import '../shortcuts/core.js';
|
50
|
+
import 'core-js/modules/es.array.find-index.js';
|
50
51
|
import 'core-js/modules/es.array.includes.js';
|
51
|
-
import 'core-js/modules/es.string.includes.js';
|
52
52
|
import 'core-js/modules/es.array.slice.js';
|
53
53
|
import 'core-js/modules/es.array.splice.js';
|
54
|
+
import 'core-js/modules/es.string.includes.js';
|
54
55
|
import 'core-js/modules/es.string.match.js';
|
55
|
-
import 'core-js/modules/es.array.find-index.js';
|
56
56
|
import 'combokeys';
|
57
57
|
import '../global/sniffer.js';
|
58
58
|
import 'sniffr';
|
@@ -70,36 +70,35 @@ var getContainer = function getContainer() {
|
|
70
70
|
return focusSensorHOC(Row);
|
71
71
|
};
|
72
72
|
var RowWithFocusSensorCallbacks = /*#__PURE__*/function (_PureComponent) {
|
73
|
-
_inherits(RowWithFocusSensorCallbacks, _PureComponent);
|
74
|
-
var _super = _createSuper(RowWithFocusSensorCallbacks);
|
75
73
|
function RowWithFocusSensorCallbacks() {
|
76
74
|
var _this;
|
77
75
|
_classCallCheck(this, RowWithFocusSensorCallbacks);
|
78
76
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
79
77
|
args[_key] = arguments[_key];
|
80
78
|
}
|
81
|
-
_this =
|
79
|
+
_this = _callSuper(this, RowWithFocusSensorCallbacks, [].concat(args));
|
82
80
|
// https://stackoverflow.com/a/53882322/6304152
|
83
|
-
_defineProperty(
|
84
|
-
_defineProperty(
|
81
|
+
_defineProperty(_this, "RowWithFocusSensor", getContainer());
|
82
|
+
_defineProperty(_this, "onFocus", function () {
|
85
83
|
var _this$props$onFocus, _this$props;
|
86
84
|
(_this$props$onFocus = (_this$props = _this.props).onFocus) === null || _this$props$onFocus === void 0 || _this$props$onFocus.call(_this$props, _this.props.item);
|
87
85
|
});
|
88
|
-
_defineProperty(
|
86
|
+
_defineProperty(_this, "onSelect", function (item, selected) {
|
89
87
|
var _this$props$onSelect, _this$props2;
|
90
88
|
(_this$props$onSelect = (_this$props2 = _this.props).onSelect) === null || _this$props$onSelect === void 0 || _this$props$onSelect.call(_this$props2, item, selected);
|
91
89
|
});
|
92
|
-
_defineProperty(
|
90
|
+
_defineProperty(_this, "onCollapse", function () {
|
93
91
|
var _this$props$onCollaps, _this$props3;
|
94
92
|
(_this$props$onCollaps = (_this$props3 = _this.props).onCollapse) === null || _this$props$onCollaps === void 0 || _this$props$onCollaps.call(_this$props3, _this.props.item);
|
95
93
|
});
|
96
|
-
_defineProperty(
|
94
|
+
_defineProperty(_this, "onExpand", function () {
|
97
95
|
var _this$props$onExpand, _this$props4;
|
98
96
|
(_this$props$onExpand = (_this$props4 = _this.props).onExpand) === null || _this$props$onExpand === void 0 || _this$props$onExpand.call(_this$props4, _this.props.item);
|
99
97
|
});
|
100
98
|
return _this;
|
101
99
|
}
|
102
|
-
|
100
|
+
_inherits(RowWithFocusSensorCallbacks, _PureComponent);
|
101
|
+
return _createClass(RowWithFocusSensorCallbacks, [{
|
103
102
|
key: "render",
|
104
103
|
value: function render() {
|
105
104
|
return /*#__PURE__*/React.createElement(this.RowWithFocusSensor, _extends({}, this.props, {
|
@@ -110,7 +109,6 @@ var RowWithFocusSensorCallbacks = /*#__PURE__*/function (_PureComponent) {
|
|
110
109
|
}));
|
111
110
|
}
|
112
111
|
}]);
|
113
|
-
return RowWithFocusSensorCallbacks;
|
114
112
|
}(PureComponent);
|
115
113
|
RowWithFocusSensorCallbacks.propTypes = Row.propTypes;
|
116
114
|
|
@@ -4,7 +4,8 @@ import { Column } from './header-cell';
|
|
4
4
|
import { SelectionItem } from './selection';
|
5
5
|
export interface RowProps<T extends SelectionItem> extends Omit<HTMLAttributes<HTMLTableRowElement>, 'onClick' | 'onDoubleClick' | 'onSelect'>, FocusSensorAddProps<HTMLTableRowElement> {
|
6
6
|
item: T;
|
7
|
-
columns: readonly Column<T>[];
|
7
|
+
columns: readonly Column<T>[] | ((item: T) => readonly Column<T>[]);
|
8
|
+
maxColSpan?: number;
|
8
9
|
selectable: boolean;
|
9
10
|
showFocus: boolean;
|
10
11
|
draggable: boolean;
|