@jetbrains/ring-ui-built 6.0.61 → 6.0.63
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/query-assist/query-assist.js +1 -1
- package/components/table/header.d.ts +1 -2
- package/components/table/header.js +1 -8
- package/components/table/row.d.ts +0 -1
- package/components/table/row.js +1 -7
- package/components/table/simple-table.d.ts +0 -1
- package/components/table/smart-table.d.ts +0 -1
- package/components/table/table.d.ts +0 -1
- package/components/table/table.js +2 -5
- package/components/tooltip/tooltip.js +8 -1
- package/package.json +1 -1
@@ -590,7 +590,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
590
590
|
}, {
|
591
591
|
key: "shouldComponentUpdate",
|
592
592
|
value: function shouldComponentUpdate(props, state) {
|
593
|
-
return state.query !== this.state.query || state.dirty !== this.state.dirty || state.loading !== this.state.loading || state.showPopup !== this.state.showPopup || state.suggestions !== this.state.suggestions || state.styleRanges !== this.state.styleRanges || state.placeholderEnabled !== this.state.placeholderEnabled || props.placeholder !== this.props.placeholder || props.disabled !== this.props.disabled || props.clear !== this.props.clear || props.focus !== this.props.focus || props.actions !== this.props.actions || props.loader !== this.props.loader || props.glass !== this.props.glass;
|
593
|
+
return state.query !== this.state.query || state.dirty !== this.state.dirty || state.loading !== this.state.loading || state.showPopup !== this.state.showPopup || state.suggestions !== this.state.suggestions || state.styleRanges !== this.state.styleRanges || state.placeholderEnabled !== this.state.placeholderEnabled || props.placeholder !== this.props.placeholder || props.disabled !== this.props.disabled || props.clear !== this.props.clear || props.focus !== this.props.focus || props.actions !== this.props.actions || props.loader !== this.props.loader || props.glass !== this.props.glass || props.className !== this.props.className;
|
594
594
|
}
|
595
595
|
}, {
|
596
596
|
key: "componentDidUpdate",
|
@@ -14,7 +14,6 @@ export interface HeaderProps {
|
|
14
14
|
sortOrder: boolean;
|
15
15
|
caption?: string | null | undefined;
|
16
16
|
checkboxDisabled?: boolean | undefined;
|
17
|
-
maxColSpan?: number;
|
18
17
|
}
|
19
18
|
declare module 'react-waypoint' {
|
20
19
|
namespace Waypoint {
|
@@ -51,7 +50,7 @@ export default class Header extends PureComponent<HeaderProps> {
|
|
51
50
|
};
|
52
51
|
id: string;
|
53
52
|
onCheckboxFocus: (event: SyntheticEvent<HTMLElement>) => void;
|
54
|
-
createCells(widths?: never[]):
|
53
|
+
createCells(widths?: never[]): import("react").JSX.Element[];
|
55
54
|
render(): import("react").JSX.Element;
|
56
55
|
}
|
57
56
|
export type HeaderAttrs = JSX.LibraryManagedAttributes<typeof Header, HeaderProps>;
|
@@ -54,7 +54,6 @@ var Header = /*#__PURE__*/function (_PureComponent) {
|
|
54
54
|
return _createClass(Header, [{
|
55
55
|
key: "createCells",
|
56
56
|
value: function createCells() {
|
57
|
-
var _this2 = this;
|
58
57
|
var widths = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
59
58
|
var _this$props = this.props,
|
60
59
|
selectable = _this$props.selectable,
|
@@ -77,7 +76,6 @@ var Header = /*#__PURE__*/function (_PureComponent) {
|
|
77
76
|
onFocus: this.onCheckboxFocus
|
78
77
|
})
|
79
78
|
});
|
80
|
-
var colSpan = 0;
|
81
79
|
return columns.map(function (column, index) {
|
82
80
|
var columnStyle = widths[index] ? {
|
83
81
|
width: widths[index]
|
@@ -89,13 +87,8 @@ var Header = /*#__PURE__*/function (_PureComponent) {
|
|
89
87
|
sortOrder,
|
90
88
|
style: columnStyle
|
91
89
|
};
|
92
|
-
colSpan += column.colSpan || 1;
|
93
|
-
if (colSpan > (_this2.props.maxColSpan || Infinity)) {
|
94
|
-
return null;
|
95
|
-
}
|
96
90
|
return /*#__PURE__*/jsx(HeaderCell, _objectSpread2(_objectSpread2({
|
97
|
-
"data-test": column.id
|
98
|
-
colSpan: column.colSpan
|
91
|
+
"data-test": column.id
|
99
92
|
}, props), {}, {
|
100
93
|
children: index === 0 && (draggable || selectable) && metaColumn
|
101
94
|
}), column.id);
|
@@ -6,7 +6,6 @@ import { SelectionItem } from './selection';
|
|
6
6
|
export interface RowProps<T extends SelectionItem> extends Omit<HTMLAttributes<HTMLTableRowElement>, 'onClick' | 'onDoubleClick' | 'onSelect'>, FocusSensorAddProps<HTMLTableRowElement> {
|
7
7
|
item: T;
|
8
8
|
columns: readonly Column<T>[] | ((item: T) => readonly Column<T>[]);
|
9
|
-
maxColSpan?: number;
|
10
9
|
selectable: boolean;
|
11
10
|
showFocus: boolean;
|
12
11
|
draggable: boolean;
|
package/components/table/row.js
CHANGED
@@ -66,7 +66,7 @@ import '../popup/popup.target.js';
|
|
66
66
|
import 'core-js/modules/es.array.reduce.js';
|
67
67
|
import 'memoize-one';
|
68
68
|
|
69
|
-
var _excluded = ["item", "columns", "selectable", "selected", "showFocus", "draggable", "alwaysShowDragHandle", "dragHandleTitle", "level", "collapsible", "parentCollapsible", "collapsed", "
|
69
|
+
var _excluded = ["item", "columns", "selectable", "selected", "showFocus", "draggable", "alwaysShowDragHandle", "dragHandleTitle", "level", "collapsible", "parentCollapsible", "collapsed", "onCollapse", "onExpand", "showDisabledSelection", "onSelect", "checkboxTooltip", "innerRef", "focused", "autofocus", "onFocusReset", "onFocusRestore", "onHover", "className", "metaColumnClassName", "data-test"];
|
70
70
|
var DragHandle = function DragHandle(_ref) {
|
71
71
|
var alwaysShowDragHandle = _ref.alwaysShowDragHandle,
|
72
72
|
_ref$dragHandleTitle = _ref.dragHandleTitle,
|
@@ -153,7 +153,6 @@ var Row = /*#__PURE__*/function (_PureComponent) {
|
|
153
153
|
collapsible = _this$props3.collapsible,
|
154
154
|
parentCollapsible = _this$props3.parentCollapsible,
|
155
155
|
collapsed = _this$props3.collapsed,
|
156
|
-
maxColSpan = _this$props3.maxColSpan,
|
157
156
|
onCollapse = _this$props3.onCollapse,
|
158
157
|
onExpand = _this$props3.onExpand,
|
159
158
|
showDisabledSelection = _this$props3.showDisabledSelection;
|
@@ -223,7 +222,6 @@ var Row = /*#__PURE__*/function (_PureComponent) {
|
|
223
222
|
})]
|
224
223
|
});
|
225
224
|
var columns = typeof columnProps === 'function' ? columnProps(item) : columnProps;
|
226
|
-
var colSpan = 0;
|
227
225
|
var cells = columns.map(function (column, index) {
|
228
226
|
var getValue = column.getValue || function () {
|
229
227
|
return item[column.id];
|
@@ -236,10 +234,6 @@ var Row = /*#__PURE__*/function (_PureComponent) {
|
|
236
234
|
[modules_1db4bbca.cellRight]: column.rightAlign
|
237
235
|
}, column.className);
|
238
236
|
var showMetaColumn = draggable || selectable || collapsible || showDisabledSelection || !!level;
|
239
|
-
colSpan += column.colSpan || 1;
|
240
|
-
if (colSpan > (maxColSpan || Infinity)) {
|
241
|
-
return null;
|
242
|
-
}
|
243
237
|
return /*#__PURE__*/jsxs(Cell, {
|
244
238
|
colSpan: column.colSpan,
|
245
239
|
className: cellClasses,
|
@@ -22,7 +22,6 @@ declare class SimpleTable<T extends SelectionItem> extends PureComponent<SimpleT
|
|
22
22
|
onSort?: import("react").Validator<((params: import("./header-cell").SortParams) => void) | null | undefined> | undefined;
|
23
23
|
sortKey?: import("react").Validator<string | null | undefined> | undefined;
|
24
24
|
sortOrder?: import("react").Validator<boolean | null | undefined> | undefined;
|
25
|
-
maxColSpan?: import("react").Validator<number | null | undefined> | undefined;
|
26
25
|
alwaysShowDragHandle?: import("react").Validator<boolean | null | undefined> | undefined;
|
27
26
|
dragHandleTitle?: import("react").Validator<string | null | undefined> | undefined;
|
28
27
|
onReorder?: import("react").Validator<((params: import("./table").ReorderParams<SelectionItem>) => void) | null | undefined> | undefined;
|
@@ -26,7 +26,6 @@ declare class SmartTable<T extends SelectionItem> extends PureComponent<SmartTab
|
|
26
26
|
onSort?: import("react").Validator<((params: import("./header-cell").SortParams) => void) | null | undefined> | undefined;
|
27
27
|
sortKey?: import("react").Validator<string | null | undefined> | undefined;
|
28
28
|
sortOrder?: import("react").Validator<boolean | null | undefined> | undefined;
|
29
|
-
maxColSpan?: import("react").Validator<number | null | undefined> | undefined;
|
30
29
|
alwaysShowDragHandle?: import("react").Validator<boolean | null | undefined> | undefined;
|
31
30
|
dragHandleTitle?: import("react").Validator<string | null | undefined> | undefined;
|
32
31
|
onReorder?: import("react").Validator<((params: import("./table").ReorderParams<SelectionItem>) => void) | null | undefined> | undefined;
|
@@ -18,7 +18,6 @@ export interface ReorderParams<T> {
|
|
18
18
|
export interface TableProps<T extends SelectionItem> extends FocusSensorAddProps<HTMLTableRowElement>, SelectionShortcutsAddProps<T>, DisableHoverAddProps {
|
19
19
|
data: readonly T[];
|
20
20
|
columns: readonly Column<T>[] | ((item: T | null) => readonly Column<T>[]);
|
21
|
-
maxColSpan?: number;
|
22
21
|
isItemSelectable: (item: T) => boolean;
|
23
22
|
loading: boolean;
|
24
23
|
onSort: (params: SortParams) => void;
|
@@ -220,7 +220,6 @@ var Table = /*#__PURE__*/function (_PureComponent) {
|
|
220
220
|
onItemDoubleClick = _this$props4.onItemDoubleClick,
|
221
221
|
onItemClick = _this$props4.onItemClick,
|
222
222
|
renderEmpty = _this$props4.renderEmpty,
|
223
|
-
maxColSpan = _this$props4.maxColSpan,
|
224
223
|
RowComponent = _this$props4.RowComponent;
|
225
224
|
// NOTE: Do not construct new object per render because it causes all rows rerendering
|
226
225
|
var columnsArray = typeof columns === 'function' ? columns(null) : columns;
|
@@ -233,8 +232,7 @@ var Table = /*#__PURE__*/function (_PureComponent) {
|
|
233
232
|
sortKey,
|
234
233
|
sortOrder,
|
235
234
|
sticky: stickyHeader,
|
236
|
-
topStickOffset: stickyHeaderOffset
|
237
|
-
maxColSpan: this.props.maxColSpan
|
235
|
+
topStickOffset: stickyHeaderOffset
|
238
236
|
};
|
239
237
|
var selectedSize = selection.getSelected().size;
|
240
238
|
var allSelectedSize = selection.selectAll().getSelected().size;
|
@@ -311,8 +309,7 @@ var Table = /*#__PURE__*/function (_PureComponent) {
|
|
311
309
|
alwaysShowDragHandle: alwaysShowDragHandle,
|
312
310
|
dragHandleTitle: dragHandleTitle,
|
313
311
|
columns: columns,
|
314
|
-
"data-test": getItemDataTest(value)
|
315
|
-
maxColSpan: maxColSpan
|
312
|
+
"data-test": getItemDataTest(value)
|
316
313
|
}, restProps), {}, {
|
317
314
|
key: (_restProps$key = restProps.key) !== null && _restProps$key !== void 0 ? _restProps$key : getItemKey(value)
|
318
315
|
}));
|
@@ -158,7 +158,13 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
158
158
|
var _this3 = this;
|
159
159
|
if (this.containerNode != null) {
|
160
160
|
this.listeners.add(this.containerNode, 'mouseover', this.tryToShowPopup);
|
161
|
-
this.listeners.add(this.containerNode, 'mouseout',
|
161
|
+
this.listeners.add(this.containerNode, 'mouseout', function (ev) {
|
162
|
+
var _this3$popup;
|
163
|
+
if (ev.relatedTarget && (_this3$popup = _this3.popup) !== null && _this3$popup !== void 0 && (_this3$popup = _this3$popup.container) !== null && _this3$popup !== void 0 && _this3$popup.contains(ev.relatedTarget)) {
|
164
|
+
return;
|
165
|
+
}
|
166
|
+
_this3.hidePopup();
|
167
|
+
});
|
162
168
|
}
|
163
169
|
this.listeners.add(document, 'scroll', function () {
|
164
170
|
return scheduleScroll(_this3.hidePopup);
|
@@ -202,6 +208,7 @@ var Tooltip = /*#__PURE__*/function (_Component) {
|
|
202
208
|
[modules_cd5e45a9.long]: long
|
203
209
|
}),
|
204
210
|
attached: false,
|
211
|
+
onMouseOut: this.hidePopup,
|
205
212
|
top: 4,
|
206
213
|
dontCloseOnAnchorClick: true,
|
207
214
|
ref: this.popupRef
|