@jetbrains/ring-ui-built 7.0.19 → 7.0.21
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 +5 -5
- package/components/_helpers/card.js +5 -5
- package/components/_helpers/input.js +7 -7
- package/components/_helpers/list.js +1 -1
- package/components/_helpers/select__filter.js +2 -2
- package/components/_helpers/sidebar.js +2 -2
- package/components/alert/alert.js +2 -2
- package/components/alert-service/alert-service.js +2 -2
- package/components/analytics/analytics.js +1 -1
- package/components/analytics/analytics__custom-plugin.js +8 -8
- package/components/auth/auth__core.js +54 -54
- package/components/auth/background-flow.js +4 -4
- package/components/auth/iframe-flow.js +7 -7
- package/components/auth/request-builder.js +3 -3
- package/components/auth/response-parser.js +4 -4
- package/components/auth/storage.js +12 -12
- package/components/auth/token-validator.js +7 -7
- package/components/auth/window-flow.js +7 -7
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/avatar/avatar.d.ts +2 -0
- package/components/avatar/avatar.js +8 -0
- package/components/avatar-stack/avatar-stack.d.ts +15 -0
- package/components/avatar-stack/avatar-stack.js +117 -0
- package/components/button/button.js +2 -2
- package/components/caret/caret.js +6 -6
- package/components/checkbox/checkbox.js +1 -1
- package/components/clipboard/clipboard-fallback.js +3 -3
- package/components/code/code.js +1 -1
- package/components/collapse/collapse-content.js +2 -2
- package/components/collapse/collapse.js +1 -1
- package/components/data-list/data-list.js +3 -3
- package/components/data-list/item.js +1 -1
- package/components/date-picker/consts.js +1 -1
- package/components/date-picker/date-input.js +5 -5
- package/components/date-picker/date-picker.js +9 -9
- package/components/date-picker/date-popup.js +4 -4
- package/components/date-picker/years.js +1 -1
- package/components/dialog/dialog.js +1 -1
- package/components/dropdown/dropdown.js +4 -4
- package/components/editable-heading/editable-heading.js +4 -4
- package/components/global/focus-sensor-hoc.js +10 -10
- package/components/global/memoize.js +1 -1
- package/components/global/normalize-indent.js +1 -1
- package/components/global/react-dom-renderer.js +1 -1
- package/components/global/schedule-raf.js +1 -1
- package/components/header/profile.js +8 -8
- package/components/header/smart-profile.js +2 -2
- package/components/header/smart-services.js +4 -4
- package/components/http/http.js +9 -9
- package/components/http/http.mock.js +3 -3
- package/components/hub-source/hub-source.js +6 -6
- package/components/hub-source/hub-source__user.js +2 -2
- package/components/hub-source/hub-source__users-groups.js +4 -4
- package/components/i18n/i18n.js +1 -1
- package/components/island/adaptive-island-hoc.js +1 -1
- package/components/island/content.js +3 -3
- package/components/island/header.js +1 -1
- package/components/list/list.js +4 -4
- package/components/list/list__item.js +2 -2
- package/components/list/list__link.js +1 -1
- package/components/list/list__users-groups-source.js +2 -2
- package/components/loader/loader.js +2 -2
- package/components/loader/loader__core.js +27 -27
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/message/message.js +14 -14
- package/components/old-browsers-message/white-list.js +3 -3
- package/components/pager/pager.js +9 -9
- package/components/permissions/permissions.js +7 -7
- package/components/permissions/permissions__cache.js +4 -4
- package/components/popup/popup.js +8 -8
- package/components/popup/position.js +1 -1
- package/components/popup-menu/popup-menu.js +1 -1
- package/components/progress-bar/progress-bar.js +2 -2
- package/components/query-assist/query-assist.js +43 -43
- package/components/radio/radio__item.js +2 -2
- package/components/select/select.js +27 -27
- package/components/select/select__popup.js +9 -9
- package/components/shortcuts/core.js +1 -1
- package/components/slider/slider.js +8 -8
- package/components/slider/slider.utils.js +1 -1
- package/components/storage/storage__local.js +1 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +4 -4
- package/components/table/header-cell.js +2 -2
- package/components/table/multitable.js +7 -7
- package/components/table/row-with-focus-sensor.js +4 -4
- package/components/table/row.js +1 -1
- package/components/table/selection-shortcuts-hoc.js +12 -12
- package/components/table/selection.js +7 -7
- package/components/table/table.js +1 -1
- package/components/tabs/collapsible-tab.js +3 -3
- package/components/tabs/collapsible-tabs.js +6 -6
- package/components/tabs/dumb-tabs.js +1 -1
- package/components/tabs/smart-tabs.js +1 -1
- package/components/tag/tag.js +2 -2
- package/components/tags-input/tags-input.js +17 -17
- package/components/tooltip/tooltip.js +10 -10
- package/components/upload/upload.js +3 -3
- package/components/user-agreement/service.js +3 -3
- package/components/user-agreement/user-agreement.js +8 -8
- package/components/user-card/card.js +2 -2
- package/components/user-card/user-card.js +2 -2
- package/package.json +3 -3
- package/typings.d.ts +5 -0
@@ -47,14 +47,14 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(_ref, ref) {
|
|
47
47
|
focusFirst();
|
48
48
|
} else if (!trapDisabled) {
|
49
49
|
var _nodeRef$current, _nodeRef$current2;
|
50
|
-
const previousFocusedElementIsInContainer = previousFocusedNodeRef.current && ((_nodeRef$current = nodeRef.current) === null || _nodeRef$current ===
|
50
|
+
const previousFocusedElementIsInContainer = previousFocusedNodeRef.current && ((_nodeRef$current = nodeRef.current) === null || _nodeRef$current === undefined ? undefined : _nodeRef$current.contains(previousFocusedNodeRef.current));
|
51
51
|
// The component wrapped in TabTrap can already have a focused element (e.g. Date Picker),
|
52
52
|
// so we need to check if it does. If so, we don't need to focus anything.
|
53
|
-
const currentlyFocusedElementIsInContainer = (_nodeRef$current2 = nodeRef.current) === null || _nodeRef$current2 ===
|
53
|
+
const currentlyFocusedElementIsInContainer = (_nodeRef$current2 = nodeRef.current) === null || _nodeRef$current2 === undefined ? undefined : _nodeRef$current2.contains(document.activeElement);
|
54
54
|
if (!nodeRef.current || !previousFocusedElementIsInContainer && !currentlyFocusedElementIsInContainer) {
|
55
55
|
var _trapButtonNodeRef$cu;
|
56
56
|
trapWithoutFocusRef.current = true;
|
57
|
-
(_trapButtonNodeRef$cu = trapButtonNodeRef.current) === null || _trapButtonNodeRef$cu ===
|
57
|
+
(_trapButtonNodeRef$cu = trapButtonNodeRef.current) === null || _trapButtonNodeRef$cu === undefined || _trapButtonNodeRef$cu.focus();
|
58
58
|
}
|
59
59
|
}
|
60
60
|
return () => {
|
@@ -110,7 +110,7 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(_ref, ref) {
|
|
110
110
|
if (!newFocused) {
|
111
111
|
return;
|
112
112
|
}
|
113
|
-
if (newFocused instanceof Element && (_nodeRef$current3 = nodeRef.current) !== null && _nodeRef$current3 !==
|
113
|
+
if (newFocused instanceof Element && (_nodeRef$current3 = nodeRef.current) !== null && _nodeRef$current3 !== undefined && _nodeRef$current3.contains(newFocused)) {
|
114
114
|
return;
|
115
115
|
}
|
116
116
|
focusLast();
|
@@ -19,8 +19,8 @@ const _excluded = ["className", "column", "onSort", "sortKey", "sortOrder", "dat
|
|
19
19
|
class HeaderCell extends PureComponent {
|
20
20
|
constructor() {
|
21
21
|
super(...arguments);
|
22
|
-
_defineProperty(this, "sortable",
|
23
|
-
_defineProperty(this, "sorted",
|
22
|
+
_defineProperty(this, "sortable", undefined);
|
23
|
+
_defineProperty(this, "sorted", undefined);
|
24
24
|
_defineProperty(this, "onClick", () => {
|
25
25
|
if (this.sortable) {
|
26
26
|
const {
|
@@ -23,14 +23,14 @@ class MultiTable extends PureComponent {
|
|
23
23
|
let newSelection = currentTable.selection.moveUp();
|
24
24
|
if (newSelection) {
|
25
25
|
var _currentTable$onSelec;
|
26
|
-
(_currentTable$onSelec = currentTable.onSelect) === null || _currentTable$onSelec ===
|
26
|
+
(_currentTable$onSelec = currentTable.onSelect) === null || _currentTable$onSelec === undefined || _currentTable$onSelec.call(currentTable, newSelection);
|
27
27
|
} else if (prevTable) {
|
28
28
|
var _currentTable$onSelec2;
|
29
|
-
(_currentTable$onSelec2 = currentTable.onSelect) === null || _currentTable$onSelec2 ===
|
29
|
+
(_currentTable$onSelec2 = currentTable.onSelect) === null || _currentTable$onSelec2 === undefined || _currentTable$onSelec2.call(currentTable, currentTable.selection.resetFocus());
|
30
30
|
newSelection = prevTable.selection.moveUp();
|
31
31
|
if (newSelection) {
|
32
32
|
var _prevTable$onSelect;
|
33
|
-
(_prevTable$onSelect = prevTable.onSelect) === null || _prevTable$onSelect ===
|
33
|
+
(_prevTable$onSelect = prevTable.onSelect) === null || _prevTable$onSelect === undefined || _prevTable$onSelect.call(prevTable, newSelection);
|
34
34
|
}
|
35
35
|
}
|
36
36
|
return false;
|
@@ -52,14 +52,14 @@ class MultiTable extends PureComponent {
|
|
52
52
|
let newSelection = currentTable.selection.moveDown();
|
53
53
|
if (newSelection) {
|
54
54
|
var _currentTable$onSelec3;
|
55
|
-
(_currentTable$onSelec3 = currentTable.onSelect) === null || _currentTable$onSelec3 ===
|
55
|
+
(_currentTable$onSelec3 = currentTable.onSelect) === null || _currentTable$onSelec3 === undefined || _currentTable$onSelec3.call(currentTable, newSelection);
|
56
56
|
} else if (nextTable) {
|
57
57
|
var _currentTable$onSelec4;
|
58
|
-
(_currentTable$onSelec4 = currentTable.onSelect) === null || _currentTable$onSelec4 ===
|
58
|
+
(_currentTable$onSelec4 = currentTable.onSelect) === null || _currentTable$onSelec4 === undefined || _currentTable$onSelec4.call(currentTable, currentTable.selection.resetFocus());
|
59
59
|
newSelection = nextTable.selection.moveDown();
|
60
60
|
if (newSelection) {
|
61
61
|
var _nextTable$onSelect;
|
62
|
-
(_nextTable$onSelect = nextTable.onSelect) === null || _nextTable$onSelect ===
|
62
|
+
(_nextTable$onSelect = nextTable.onSelect) === null || _nextTable$onSelect === undefined || _nextTable$onSelect.call(nextTable, newSelection);
|
63
63
|
}
|
64
64
|
}
|
65
65
|
return false;
|
@@ -110,7 +110,7 @@ class MultiTable extends PureComponent {
|
|
110
110
|
const currentFocused = currentSelections.filter(selection => selection.getFocused());
|
111
111
|
if (currentFocused.includes(prevFocused)) {
|
112
112
|
var _prevProps$children$p, _prevProps$children$p2;
|
113
|
-
(_prevProps$children$p = (_prevProps$children$p2 = prevProps.children[prevFocusedIndex].props).onSelect) === null || _prevProps$children$p ===
|
113
|
+
(_prevProps$children$p = (_prevProps$children$p2 = prevProps.children[prevFocusedIndex].props).onSelect) === null || _prevProps$children$p === undefined || _prevProps$children$p.call(_prevProps$children$p2, prevFocused.resetFocus());
|
114
114
|
}
|
115
115
|
}
|
116
116
|
}
|
@@ -55,19 +55,19 @@ class RowWithFocusSensorCallbacks extends PureComponent {
|
|
55
55
|
_defineProperty(this, "RowWithFocusSensor", getContainer());
|
56
56
|
_defineProperty(this, "onFocus", () => {
|
57
57
|
var _this$props$onFocus, _this$props;
|
58
|
-
(_this$props$onFocus = (_this$props = this.props).onFocus) === null || _this$props$onFocus ===
|
58
|
+
(_this$props$onFocus = (_this$props = this.props).onFocus) === null || _this$props$onFocus === undefined || _this$props$onFocus.call(_this$props, this.props.item);
|
59
59
|
});
|
60
60
|
_defineProperty(this, "onSelect", (item, selected) => {
|
61
61
|
var _this$props$onSelect, _this$props2;
|
62
|
-
(_this$props$onSelect = (_this$props2 = this.props).onSelect) === null || _this$props$onSelect ===
|
62
|
+
(_this$props$onSelect = (_this$props2 = this.props).onSelect) === null || _this$props$onSelect === undefined || _this$props$onSelect.call(_this$props2, item, selected);
|
63
63
|
});
|
64
64
|
_defineProperty(this, "onCollapse", () => {
|
65
65
|
var _this$props$onCollaps, _this$props3;
|
66
|
-
(_this$props$onCollaps = (_this$props3 = this.props).onCollapse) === null || _this$props$onCollaps ===
|
66
|
+
(_this$props$onCollaps = (_this$props3 = this.props).onCollapse) === null || _this$props$onCollaps === undefined || _this$props$onCollaps.call(_this$props3, this.props.item);
|
67
67
|
});
|
68
68
|
_defineProperty(this, "onExpand", () => {
|
69
69
|
var _this$props$onExpand, _this$props4;
|
70
|
-
(_this$props$onExpand = (_this$props4 = this.props).onExpand) === null || _this$props$onExpand ===
|
70
|
+
(_this$props$onExpand = (_this$props4 = this.props).onExpand) === null || _this$props$onExpand === undefined || _this$props$onExpand.call(_this$props4, this.props.item);
|
71
71
|
});
|
72
72
|
}
|
73
73
|
render() {
|
package/components/table/row.js
CHANGED
@@ -15,7 +15,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
15
15
|
} = this.props;
|
16
16
|
const newSelection = selection.moveUp();
|
17
17
|
if (newSelection) {
|
18
|
-
onSelect === null || onSelect ===
|
18
|
+
onSelect === null || onSelect === undefined || onSelect(newSelection);
|
19
19
|
}
|
20
20
|
return false;
|
21
21
|
});
|
@@ -26,11 +26,11 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
26
26
|
} = this.props;
|
27
27
|
const newSelection = selection.moveDown();
|
28
28
|
if (newSelection) {
|
29
|
-
onSelect === null || onSelect ===
|
29
|
+
onSelect === null || onSelect === undefined || onSelect(newSelection);
|
30
30
|
}
|
31
31
|
return false;
|
32
32
|
});
|
33
|
-
_defineProperty(this, "shiftSelectionMode",
|
33
|
+
_defineProperty(this, "shiftSelectionMode", undefined);
|
34
34
|
_defineProperty(this, "onShiftKeyDown", () => {
|
35
35
|
const {
|
36
36
|
selection
|
@@ -61,9 +61,9 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
61
61
|
const newSelection = this.shiftSelect(selection);
|
62
62
|
const newMovedSelection = newSelection.moveUp();
|
63
63
|
if (newMovedSelection) {
|
64
|
-
onSelect === null || onSelect ===
|
64
|
+
onSelect === null || onSelect === undefined || onSelect(newMovedSelection);
|
65
65
|
} else {
|
66
|
-
onSelect === null || onSelect ===
|
66
|
+
onSelect === null || onSelect === undefined || onSelect(newSelection);
|
67
67
|
}
|
68
68
|
});
|
69
69
|
_defineProperty(this, "onShiftDownPress", e => {
|
@@ -79,9 +79,9 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
79
79
|
const newSelection = this.shiftSelect(selection);
|
80
80
|
const newMovedSelection = newSelection.moveDown();
|
81
81
|
if (newMovedSelection) {
|
82
|
-
onSelect === null || onSelect ===
|
82
|
+
onSelect === null || onSelect === undefined || onSelect(newMovedSelection);
|
83
83
|
} else {
|
84
|
-
onSelect === null || onSelect ===
|
84
|
+
onSelect === null || onSelect === undefined || onSelect(newSelection);
|
85
85
|
}
|
86
86
|
});
|
87
87
|
_defineProperty(this, "onHomePress", () => {
|
@@ -91,7 +91,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
91
91
|
} = this.props;
|
92
92
|
const newSelection = selection.moveStart();
|
93
93
|
if (newSelection) {
|
94
|
-
onSelect === null || onSelect ===
|
94
|
+
onSelect === null || onSelect === undefined || onSelect(newSelection);
|
95
95
|
}
|
96
96
|
return false;
|
97
97
|
});
|
@@ -102,7 +102,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
102
102
|
} = this.props;
|
103
103
|
const newSelection = selection.moveEnd();
|
104
104
|
if (newSelection) {
|
105
|
-
onSelect === null || onSelect ===
|
105
|
+
onSelect === null || onSelect === undefined || onSelect(newSelection);
|
106
106
|
}
|
107
107
|
return false;
|
108
108
|
});
|
@@ -115,7 +115,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
115
115
|
if (!selectable) {
|
116
116
|
return true;
|
117
117
|
}
|
118
|
-
onSelect === null || onSelect ===
|
118
|
+
onSelect === null || onSelect === undefined || onSelect(selection.toggleSelection());
|
119
119
|
return false;
|
120
120
|
});
|
121
121
|
_defineProperty(this, "onEscPress", () => {
|
@@ -123,7 +123,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
123
123
|
selection,
|
124
124
|
onSelect
|
125
125
|
} = this.props;
|
126
|
-
onSelect === null || onSelect ===
|
126
|
+
onSelect === null || onSelect === undefined || onSelect(selection.reset());
|
127
127
|
//this.restoreFocusWithoutScroll();
|
128
128
|
});
|
129
129
|
_defineProperty(this, "onCmdAPress", () => {
|
@@ -135,7 +135,7 @@ function selectionShortcutsHOC(ComposedComponent) {
|
|
135
135
|
if (!selectable) {
|
136
136
|
return true;
|
137
137
|
}
|
138
|
-
onSelect === null || onSelect ===
|
138
|
+
onSelect === null || onSelect === undefined || onSelect(selection.selectAll());
|
139
139
|
return false;
|
140
140
|
});
|
141
141
|
_defineProperty(this, "shortcutsMap", {
|
@@ -11,13 +11,13 @@ let Selection$1 = class Selection {
|
|
11
11
|
getChildren = () => [],
|
12
12
|
isItemSelectable = () => true
|
13
13
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
14
|
-
_defineProperty(this, "_rawData",
|
15
|
-
_defineProperty(this, "_getChildren",
|
16
|
-
_defineProperty(this, "_data",
|
17
|
-
_defineProperty(this, "_selected",
|
18
|
-
_defineProperty(this, "_focused",
|
19
|
-
_defineProperty(this, "_getKey",
|
20
|
-
_defineProperty(this, "_isItemSelectable",
|
14
|
+
_defineProperty(this, "_rawData", undefined);
|
15
|
+
_defineProperty(this, "_getChildren", undefined);
|
16
|
+
_defineProperty(this, "_data", undefined);
|
17
|
+
_defineProperty(this, "_selected", undefined);
|
18
|
+
_defineProperty(this, "_focused", undefined);
|
19
|
+
_defineProperty(this, "_getKey", undefined);
|
20
|
+
_defineProperty(this, "_isItemSelectable", undefined);
|
21
21
|
this._rawData = data;
|
22
22
|
this._getChildren = getChildren;
|
23
23
|
this._data = this._buildData(data);
|
@@ -289,7 +289,7 @@ class Table extends PureComponent {
|
|
289
289
|
columns: columns,
|
290
290
|
"data-test": getItemDataTest(value)
|
291
291
|
}, restProps), {}, {
|
292
|
-
key: (_restProps$key = restProps.key) !== null && _restProps$key !==
|
292
|
+
key: (_restProps$key = restProps.key) !== null && _restProps$key !== undefined ? _restProps$key : getItemKey(value)
|
293
293
|
}));
|
294
294
|
return isDragged ? jsx("table", {
|
295
295
|
style: _objectSpread2({}, props.style),
|
@@ -35,9 +35,9 @@ const TabTitle = /*#__PURE__*/React.memo(function TabTitle(_ref) {
|
|
35
35
|
const titleClasses = classNames(styles.title, className, {
|
36
36
|
[styles.selected]: selected,
|
37
37
|
[styles.collapsed]: collapsed,
|
38
|
-
[activeClassName !== null && activeClassName !==
|
39
|
-
[collapsedClassName !== null && collapsedClassName !==
|
40
|
-
[collapsedActiveClassName !== null && collapsedActiveClassName !==
|
38
|
+
[activeClassName !== null && activeClassName !== undefined ? activeClassName : '']: selected,
|
39
|
+
[collapsedClassName !== null && collapsedClassName !== undefined ? collapsedClassName : '']: collapsed,
|
40
|
+
[collapsedActiveClassName !== null && collapsedActiveClassName !== undefined ? collapsedActiveClassName : '']: collapsed && selected
|
41
41
|
});
|
42
42
|
return jsx(TabLink, _objectSpread2({
|
43
43
|
title: title,
|
@@ -100,7 +100,7 @@ const CollapsibleTabs = _ref => {
|
|
100
100
|
const measureRef = useRef(null);
|
101
101
|
const selectedIndex = useMemo(() => {
|
102
102
|
var _children$filter$find;
|
103
|
-
return (_children$filter$find = children.filter(tab => tab.props.alwaysHidden !== true).findIndex(tab => tab.props.id === selected)) !== null && _children$filter$find !==
|
103
|
+
return (_children$filter$find = children.filter(tab => tab.props.alwaysHidden !== true).findIndex(tab => tab.props.id === selected)) !== null && _children$filter$find !== undefined ? _children$filter$find : null;
|
104
104
|
}, [children, selected]);
|
105
105
|
const visibleElements = useMemo(() => {
|
106
106
|
let items;
|
@@ -123,7 +123,7 @@ const CollapsibleTabs = _ref => {
|
|
123
123
|
} = elements.sizes;
|
124
124
|
let renderMore = children.some(tab => tab.props.alwaysHidden);
|
125
125
|
const tabsToRender = [];
|
126
|
-
let filledWidth = renderMore ? more !== null && more !==
|
126
|
+
let filledWidth = renderMore ? more !== null && more !== undefined ? more : 0 : 0;
|
127
127
|
for (let i = 0; i < tabsSizes.length; i++) {
|
128
128
|
if (filledWidth + tabsSizes[i] < containerWidth + MEASURE_TOLERANCE) {
|
129
129
|
filledWidth += tabsSizes[i];
|
@@ -166,7 +166,7 @@ const CollapsibleTabs = _ref => {
|
|
166
166
|
var _elements$lastVisible2;
|
167
167
|
const res = children.reduce((accumulator, tab) => {
|
168
168
|
var _elements$lastVisible;
|
169
|
-
if (tab.props.alwaysHidden !== true && accumulator.visible.length - 1 < ((_elements$lastVisible = elements.lastVisibleIndex) !== null && _elements$lastVisible !==
|
169
|
+
if (tab.props.alwaysHidden !== true && accumulator.visible.length - 1 < ((_elements$lastVisible = elements.lastVisibleIndex) !== null && _elements$lastVisible !== undefined ? _elements$lastVisible : 0)) {
|
170
170
|
accumulator.visible.push(tab);
|
171
171
|
} else {
|
172
172
|
accumulator.hidden.push(tab);
|
@@ -177,7 +177,7 @@ const CollapsibleTabs = _ref => {
|
|
177
177
|
hidden: [],
|
178
178
|
ready: elements.lastVisibleIndex !== null
|
179
179
|
});
|
180
|
-
if (selectedIndex > ((_elements$lastVisible2 = elements.lastVisibleIndex) !== null && _elements$lastVisible2 !==
|
180
|
+
if (selectedIndex > ((_elements$lastVisible2 = elements.lastVisibleIndex) !== null && _elements$lastVisible2 !== undefined ? _elements$lastVisible2 : 0)) {
|
181
181
|
const selectedItem = children.find(tab => !tab.props.alwaysHidden && tab.props.id === selected);
|
182
182
|
if (selectedItem != null) {
|
183
183
|
res.visible.push(selectedItem);
|
@@ -209,9 +209,9 @@ const CollapsibleTabs = _ref => {
|
|
209
209
|
const measureTask = fastdom.measure(() => {
|
210
210
|
var _container$children, _moreButton$offsetWid;
|
211
211
|
const container = measureRef.current;
|
212
|
-
const descendants = [...((_container$children = container === null || container ===
|
212
|
+
const descendants = [...((_container$children = container === null || container === undefined ? undefined : container.children) !== null && _container$children !== undefined ? _container$children : [])];
|
213
213
|
const moreButton = descendants.pop();
|
214
|
-
let moreButtonWidth = (_moreButton$offsetWid = moreButton === null || moreButton ===
|
214
|
+
let moreButtonWidth = (_moreButton$offsetWid = moreButton === null || moreButton === undefined ? undefined : moreButton.offsetWidth) !== null && _moreButton$offsetWid !== undefined ? _moreButton$offsetWid : 0;
|
215
215
|
const {
|
216
216
|
marginLeft: moreButtonMarginLeft = '0',
|
217
217
|
marginRight: moreButtonMarginRight = '0'
|
@@ -78,7 +78,7 @@ class Tabs extends PureComponent {
|
|
78
78
|
super(...arguments);
|
79
79
|
_defineProperty(this, "handleSelect", memoize(key => () => {
|
80
80
|
var _this$props$onSelect, _this$props;
|
81
|
-
return (_this$props$onSelect = (_this$props = this.props).onSelect) === null || _this$props$onSelect ===
|
81
|
+
return (_this$props$onSelect = (_this$props = this.props).onSelect) === null || _this$props$onSelect === undefined ? undefined : _this$props$onSelect.call(_this$props, key);
|
82
82
|
}));
|
83
83
|
_defineProperty(this, "getTabTitle", (child, i) => {
|
84
84
|
if (child == null || typeof child !== 'object' || child.type === CustomItem) {
|
@@ -76,7 +76,7 @@ const _excluded = ["children", "initSelected", "data-test"];
|
|
76
76
|
class SmartTabs extends PureComponent {
|
77
77
|
constructor(props) {
|
78
78
|
super(props);
|
79
|
-
_defineProperty(this, "state",
|
79
|
+
_defineProperty(this, "state", undefined);
|
80
80
|
_defineProperty(this, "handleSelect", selected => this.setState({
|
81
81
|
selected
|
82
82
|
}));
|
package/components/tag/tag.js
CHANGED
@@ -36,7 +36,7 @@ class Tag extends PureComponent {
|
|
36
36
|
});
|
37
37
|
}
|
38
38
|
});
|
39
|
-
_defineProperty(this, "tagNode",
|
39
|
+
_defineProperty(this, "tagNode", undefined);
|
40
40
|
_defineProperty(this, "tagRef", el => {
|
41
41
|
this.tagNode = el;
|
42
42
|
});
|
@@ -49,7 +49,7 @@ class Tag extends PureComponent {
|
|
49
49
|
}
|
50
50
|
if (this.state.focused) {
|
51
51
|
var _this$tagNode;
|
52
|
-
(_this$tagNode = this.tagNode) === null || _this$tagNode ===
|
52
|
+
(_this$tagNode = this.tagNode) === null || _this$tagNode === undefined || _this$tagNode.focus();
|
53
53
|
}
|
54
54
|
this.setDocumentClickListener(this.state.focused);
|
55
55
|
}
|
@@ -103,17 +103,17 @@ class TagsInput extends PureComponent {
|
|
103
103
|
query: '',
|
104
104
|
activeIndex: 0
|
105
105
|
});
|
106
|
-
_defineProperty(this, "ngModelStateField",
|
106
|
+
_defineProperty(this, "ngModelStateField", undefined);
|
107
107
|
_defineProperty(this, "id", this.props.id || getUID('ring-tags-list-'));
|
108
|
-
_defineProperty(this, "node",
|
108
|
+
_defineProperty(this, "node", undefined);
|
109
109
|
_defineProperty(this, "nodeRef", node => {
|
110
110
|
this.node = node;
|
111
111
|
});
|
112
|
-
_defineProperty(this, "input",
|
113
|
-
_defineProperty(this, "caret",
|
112
|
+
_defineProperty(this, "input", undefined);
|
113
|
+
_defineProperty(this, "caret", undefined);
|
114
114
|
_defineProperty(this, "focusInput", () => {
|
115
115
|
var _this$getInputNode;
|
116
|
-
(_this$getInputNode = this.getInputNode()) === null || _this$getInputNode ===
|
116
|
+
(_this$getInputNode = this.getInputNode()) === null || _this$getInputNode === undefined || _this$getInputNode.focus();
|
117
117
|
});
|
118
118
|
_defineProperty(this, "focus", () => {
|
119
119
|
this.focusInput();
|
@@ -124,8 +124,8 @@ class TagsInput extends PureComponent {
|
|
124
124
|
return;
|
125
125
|
}
|
126
126
|
const isUniqueTag = this.state.tags.filter(item => tag.key === item.key).length === 0;
|
127
|
-
(_this$select = this.select) === null || _this$select ===
|
128
|
-
(_this$select2 = this.select) === null || _this$select2 ===
|
127
|
+
(_this$select = this.select) === null || _this$select === undefined || _this$select.clear();
|
128
|
+
(_this$select2 = this.select) === null || _this$select2 === undefined || _this$select2.filterValue('');
|
129
129
|
if (isUniqueTag) {
|
130
130
|
this.setState(prevState => ({
|
131
131
|
tags: prevState.tags.concat([tag])
|
@@ -141,7 +141,7 @@ class TagsInput extends PureComponent {
|
|
141
141
|
if (event.target !== this.node && event.target.parentElement !== this.node) {
|
142
142
|
return;
|
143
143
|
}
|
144
|
-
(_this$select3 = this.select) === null || _this$select3 ===
|
144
|
+
(_this$select3 = this.select) === null || _this$select3 === undefined || _this$select3._clickHandler();
|
145
145
|
});
|
146
146
|
_defineProperty(this, "filterExistingTags", suggestions => {
|
147
147
|
const tagsMap = new Map(this.state.tags.map(tag => [tag.key, tag]));
|
@@ -200,18 +200,18 @@ class TagsInput extends PureComponent {
|
|
200
200
|
const key = getEventKey(event);
|
201
201
|
const isInputFocused = () => {
|
202
202
|
var _this$getInputNode$ta, _this$getInputNode2;
|
203
|
-
return event.target instanceof Element && event.target.matches((_this$getInputNode$ta = (_this$getInputNode2 = this.getInputNode()) === null || _this$getInputNode2 ===
|
203
|
+
return event.target instanceof Element && event.target.matches((_this$getInputNode$ta = (_this$getInputNode2 = this.getInputNode()) === null || _this$getInputNode2 === undefined ? undefined : _this$getInputNode2.tagName) !== null && _this$getInputNode$ta !== undefined ? _this$getInputNode$ta : '');
|
204
204
|
};
|
205
205
|
if (key === ' ' && this.props.allowAddNewTags) {
|
206
206
|
var _this$getInputNode3;
|
207
207
|
event.stopPropagation();
|
208
|
-
const value = (_this$getInputNode3 = this.getInputNode()) === null || _this$getInputNode3 ===
|
208
|
+
const value = (_this$getInputNode3 = this.getInputNode()) === null || _this$getInputNode3 === undefined ? undefined : _this$getInputNode3.value;
|
209
209
|
if (value != null && value !== '') {
|
210
210
|
this.handleTagCreation(value);
|
211
211
|
}
|
212
212
|
return true;
|
213
213
|
}
|
214
|
-
if ((_this$select4 = this.select) !== null && _this$select4 !==
|
214
|
+
if ((_this$select4 = this.select) !== null && _this$select4 !== undefined && (_this$select4 = _this$select4._popup) !== null && _this$select4 !== undefined && _this$select4.isVisible()) {
|
215
215
|
return true;
|
216
216
|
}
|
217
217
|
if (key === 'ArrowLeft') {
|
@@ -225,7 +225,7 @@ class TagsInput extends PureComponent {
|
|
225
225
|
if (this.state.activeIndex === this.state.tags.length - 1) {
|
226
226
|
if (!this.props.disabled) {
|
227
227
|
var _this$getInputNode4;
|
228
|
-
(_this$getInputNode4 = this.getInputNode()) === null || _this$getInputNode4 ===
|
228
|
+
(_this$getInputNode4 = this.getInputNode()) === null || _this$getInputNode4 === undefined || _this$getInputNode4.focus();
|
229
229
|
this.setActiveIndex();
|
230
230
|
}
|
231
231
|
} else {
|
@@ -235,11 +235,11 @@ class TagsInput extends PureComponent {
|
|
235
235
|
}
|
236
236
|
if (!this.props.disabled) {
|
237
237
|
var _this$getInputNode5;
|
238
|
-
if (key === 'Backspace' && !((_this$getInputNode5 = this.getInputNode()) !== null && _this$getInputNode5 !==
|
238
|
+
if (key === 'Backspace' && !((_this$getInputNode5 = this.getInputNode()) !== null && _this$getInputNode5 !== undefined && _this$getInputNode5.value)) {
|
239
239
|
var _this$select5;
|
240
240
|
event.preventDefault();
|
241
241
|
const tagsLength = this.state.tags.length;
|
242
|
-
(_this$select5 = this.select) === null || _this$select5 ===
|
242
|
+
(_this$select5 = this.select) === null || _this$select5 === undefined || _this$select5._hidePopup(true); // otherwise confirmation may be overlapped by popup
|
243
243
|
this.onRemoveTag(this.state.tags[tagsLength - 1]);
|
244
244
|
return false;
|
245
245
|
}
|
@@ -260,7 +260,7 @@ class TagsInput extends PureComponent {
|
|
260
260
|
label
|
261
261
|
});
|
262
262
|
});
|
263
|
-
_defineProperty(this, "select",
|
263
|
+
_defineProperty(this, "select", undefined);
|
264
264
|
_defineProperty(this, "selectRef", el => {
|
265
265
|
this.select = el;
|
266
266
|
});
|
@@ -289,13 +289,13 @@ class TagsInput extends PureComponent {
|
|
289
289
|
var _this$select6;
|
290
290
|
this.focusInput();
|
291
291
|
this.loadSuggestions();
|
292
|
-
(_this$select6 = this.select) === null || _this$select6 ===
|
292
|
+
(_this$select6 = this.select) === null || _this$select6 === undefined || _this$select6._showPopup();
|
293
293
|
}
|
294
294
|
}
|
295
295
|
getInputNode() {
|
296
296
|
if (!this.input) {
|
297
297
|
var _this$select7;
|
298
|
-
this.input = (_this$select7 = this.select) === null || _this$select7 ===
|
298
|
+
this.input = (_this$select7 = this.select) === null || _this$select7 === undefined ? undefined : _this$select7.filter;
|
299
299
|
if (this.input) {
|
300
300
|
this.caret = new Caret(this.input);
|
301
301
|
}
|
@@ -38,9 +38,9 @@ class Tooltip extends Component {
|
|
38
38
|
showPopup: false,
|
39
39
|
showNestedPopup: false
|
40
40
|
});
|
41
|
-
_defineProperty(this, "timeout",
|
41
|
+
_defineProperty(this, "timeout", undefined);
|
42
42
|
_defineProperty(this, "listeners", new Listeners());
|
43
|
-
_defineProperty(this, "containerNode",
|
43
|
+
_defineProperty(this, "containerNode", undefined);
|
44
44
|
_defineProperty(this, "containerRef", el => {
|
45
45
|
this.containerNode = el;
|
46
46
|
});
|
@@ -79,7 +79,7 @@ class Tooltip extends Component {
|
|
79
79
|
return;
|
80
80
|
}
|
81
81
|
}
|
82
|
-
(_this$context = this.context) === null || _this$context ===
|
82
|
+
(_this$context = this.context) === null || _this$context === undefined || _this$context.onNestedTooltipShow();
|
83
83
|
this.setState({
|
84
84
|
showPopup: true
|
85
85
|
});
|
@@ -87,19 +87,19 @@ class Tooltip extends Component {
|
|
87
87
|
_defineProperty(this, "hidePopup", () => {
|
88
88
|
var _this$context2;
|
89
89
|
clearTimeout(this.timeout);
|
90
|
-
(_this$context2 = this.context) === null || _this$context2 ===
|
90
|
+
(_this$context2 = this.context) === null || _this$context2 === undefined || _this$context2.onNestedTooltipHide();
|
91
91
|
this.setState({
|
92
92
|
showPopup: false
|
93
93
|
});
|
94
94
|
});
|
95
95
|
_defineProperty(this, "hideIfMovedOutsidePopup", ev => {
|
96
96
|
var _this$popup;
|
97
|
-
if (!('relatedTarget' in ev) || (_this$popup = this.popup) !== null && _this$popup !==
|
97
|
+
if (!('relatedTarget' in ev) || (_this$popup = this.popup) !== null && _this$popup !== undefined && (_this$popup = _this$popup.container) !== null && _this$popup !== undefined && _this$popup.contains(ev.relatedTarget)) {
|
98
98
|
return;
|
99
99
|
}
|
100
100
|
this.hidePopup();
|
101
101
|
});
|
102
|
-
_defineProperty(this, "popup",
|
102
|
+
_defineProperty(this, "popup", undefined);
|
103
103
|
_defineProperty(this, "popupRef", el => {
|
104
104
|
this.popup = el;
|
105
105
|
});
|
@@ -135,7 +135,7 @@ class Tooltip extends Component {
|
|
135
135
|
this.listeners.add(this.containerNode, 'mouseenter', this.tryToShowPopup);
|
136
136
|
this.listeners.add(this.containerNode, 'mouseleave', ev => {
|
137
137
|
var _this$popup2;
|
138
|
-
if (ev.relatedTarget && (_this$popup2 = this.popup) !== null && _this$popup2 !==
|
138
|
+
if (ev.relatedTarget && (_this$popup2 = this.popup) !== null && _this$popup2 !== undefined && (_this$popup2 = _this$popup2.container) !== null && _this$popup2 !== undefined && _this$popup2.contains(ev.relatedTarget)) {
|
139
139
|
return;
|
140
140
|
}
|
141
141
|
this.hidePopup();
|
@@ -185,15 +185,15 @@ class Tooltip extends Component {
|
|
185
185
|
hidden: !this.state.showPopup || this.state.showNestedPopup,
|
186
186
|
onCloseAttempt: this.hidePopup,
|
187
187
|
maxHeight: 400,
|
188
|
-
className: classNames(styles.tooltip, {
|
189
|
-
[styles.long]: long
|
190
|
-
}),
|
191
188
|
attached: false,
|
192
189
|
onMouseOut: this.hideIfMovedOutsidePopup,
|
193
190
|
top: 4,
|
194
191
|
dontCloseOnAnchorClick: true,
|
195
192
|
ref: this.popupRef
|
196
193
|
}, popupProps), {}, {
|
194
|
+
className: classNames(styles.tooltip, {
|
195
|
+
[styles.long]: long
|
196
|
+
}, popupProps === null || popupProps === undefined ? undefined : popupProps.className),
|
197
197
|
children: title
|
198
198
|
}))
|
199
199
|
})]
|
@@ -35,7 +35,7 @@ const Upload = /*#__PURE__*/forwardRef(function Upload(_ref, ref) {
|
|
35
35
|
useImperativeHandle(ref, () => ({
|
36
36
|
openFilePicker: () => {
|
37
37
|
var _fileInputRef$current;
|
38
|
-
return (_fileInputRef$current = fileInputRef.current) === null || _fileInputRef$current ===
|
38
|
+
return (_fileInputRef$current = fileInputRef.current) === null || _fileInputRef$current === undefined ? undefined : _fileInputRef$current.click();
|
39
39
|
}
|
40
40
|
}), []);
|
41
41
|
const handleSelectedFiles = useCallback(files => {
|
@@ -44,7 +44,7 @@ const Upload = /*#__PURE__*/forwardRef(function Upload(_ref, ref) {
|
|
44
44
|
}
|
45
45
|
const rejected = files.filter(file => !validate(file));
|
46
46
|
if (rejected.length > 0) {
|
47
|
-
onFilesRejected === null || onFilesRejected ===
|
47
|
+
onFilesRejected === null || onFilesRejected === undefined || onFilesRejected(files);
|
48
48
|
return;
|
49
49
|
}
|
50
50
|
onFilesSelected(files);
|
@@ -55,7 +55,7 @@ const Upload = /*#__PURE__*/forwardRef(function Upload(_ref, ref) {
|
|
55
55
|
const onInputChange = useCallback(() => {
|
56
56
|
var _fileInputRef$current2;
|
57
57
|
setDragOver(false);
|
58
|
-
if ((_fileInputRef$current2 = fileInputRef.current) !== null && _fileInputRef$current2 !==
|
58
|
+
if ((_fileInputRef$current2 = fileInputRef.current) !== null && _fileInputRef$current2 !== undefined && _fileInputRef$current2.files) {
|
59
59
|
handleSelectedFiles(Array.from(fileInputRef.current.files));
|
60
60
|
}
|
61
61
|
}, [handleSelectedFiles]);
|
@@ -81,7 +81,7 @@ const DEFAULT_AGREEMENT = {
|
|
81
81
|
class UserAgreementService {
|
82
82
|
constructor(config) {
|
83
83
|
var _this = this;
|
84
|
-
_defineProperty(this, "config",
|
84
|
+
_defineProperty(this, "config", undefined);
|
85
85
|
_defineProperty(this, "_dialogPromise", null);
|
86
86
|
_defineProperty(this, "_alertPromise", null);
|
87
87
|
_defineProperty(this, "tabId", Math.random());
|
@@ -93,7 +93,7 @@ class UserAgreementService {
|
|
93
93
|
_defineProperty(this, "guest", false);
|
94
94
|
_defineProperty(this, "userAgreement", DEFAULT_AGREEMENT);
|
95
95
|
_defineProperty(this, "userConsent", DEFAULT_CONSENT);
|
96
|
-
_defineProperty(this, "intervalId",
|
96
|
+
_defineProperty(this, "intervalId", undefined);
|
97
97
|
_defineProperty(this, "startChecking", () => {
|
98
98
|
this.intervalId = window.setInterval(this.checkConsentAndShowDialog, this.interval);
|
99
99
|
window.addEventListener('storage', this.onStorageEvent);
|
@@ -171,7 +171,7 @@ class UserAgreementService {
|
|
171
171
|
} = userConsent;
|
172
172
|
return !enabled || accepted && actualVersion === acceptedVersion;
|
173
173
|
});
|
174
|
-
_defineProperty(this, "alertKey",
|
174
|
+
_defineProperty(this, "alertKey", undefined);
|
175
175
|
_defineProperty(this, "showAlert", withoutNotifications => {
|
176
176
|
if (this._alertPromise) {
|
177
177
|
return this._alertPromise;
|