@jetbrains/ring-ui-built 7.0.28 → 7.0.30
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 +1 -1
- package/components/_helpers/card.js +5 -5
- package/components/_helpers/input.js +7 -7
- 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-stack/avatar-stack.js +2 -2
- package/components/button/button.js +2 -2
- package/components/caret/caret.js +7 -7
- 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 +6 -6
- 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 +20 -9
- 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 +8 -8
- package/components/old-browsers-message/white-list.js +1 -1
- 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 +49 -47
- 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 +7 -7
- 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 +8 -8
- 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/package.json +2 -2
@@ -49,14 +49,14 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(_ref, ref) {
|
|
49
49
|
focusFirst();
|
50
50
|
} else if (!trapDisabled) {
|
51
51
|
var _nodeRef$current, _nodeRef$current2;
|
52
|
-
const previousFocusedElementIsInContainer = previousFocusedNodeRef.current && ((_nodeRef$current = nodeRef.current) === null || _nodeRef$current ===
|
52
|
+
const previousFocusedElementIsInContainer = previousFocusedNodeRef.current && ((_nodeRef$current = nodeRef.current) === null || _nodeRef$current === void 0 ? void 0 : _nodeRef$current.contains(previousFocusedNodeRef.current));
|
53
53
|
// The component wrapped in TabTrap can already have a focused element (e.g. Date Picker),
|
54
54
|
// so we need to check if it does. If so, we don't need to focus anything.
|
55
|
-
const currentlyFocusedElementIsInContainer = (_nodeRef$current2 = nodeRef.current) === null || _nodeRef$current2 ===
|
55
|
+
const currentlyFocusedElementIsInContainer = (_nodeRef$current2 = nodeRef.current) === null || _nodeRef$current2 === void 0 ? void 0 : _nodeRef$current2.contains(document.activeElement);
|
56
56
|
if (!nodeRef.current || !previousFocusedElementIsInContainer && !currentlyFocusedElementIsInContainer) {
|
57
57
|
var _trapButtonNodeRef$cu;
|
58
58
|
trapWithoutFocusRef.current = true;
|
59
|
-
(_trapButtonNodeRef$cu = trapButtonNodeRef.current) === null || _trapButtonNodeRef$cu ===
|
59
|
+
(_trapButtonNodeRef$cu = trapButtonNodeRef.current) === null || _trapButtonNodeRef$cu === void 0 || _trapButtonNodeRef$cu.focus();
|
60
60
|
}
|
61
61
|
}
|
62
62
|
return () => {
|
@@ -112,7 +112,7 @@ const TabTrap = /*#__PURE__*/forwardRef(function TabTrap(_ref, ref) {
|
|
112
112
|
if (!newFocused) {
|
113
113
|
return;
|
114
114
|
}
|
115
|
-
if (newFocused instanceof Element && (_nodeRef$current3 = nodeRef.current) !== null && _nodeRef$current3 !==
|
115
|
+
if (newFocused instanceof Element && (_nodeRef$current3 = nodeRef.current) !== null && _nodeRef$current3 !== void 0 && _nodeRef$current3.contains(newFocused)) {
|
116
116
|
return;
|
117
117
|
}
|
118
118
|
focusLast();
|
@@ -21,8 +21,8 @@ const _excluded = ["className", "column", "onSort", "sortKey", "sortOrder", "dat
|
|
21
21
|
class HeaderCell extends PureComponent {
|
22
22
|
constructor() {
|
23
23
|
super(...arguments);
|
24
|
-
_defineProperty(this, "sortable",
|
25
|
-
_defineProperty(this, "sorted",
|
24
|
+
_defineProperty(this, "sortable", void 0);
|
25
|
+
_defineProperty(this, "sorted", void 0);
|
26
26
|
_defineProperty(this, "onClick", () => {
|
27
27
|
if (this.sortable) {
|
28
28
|
const {
|
@@ -24,14 +24,14 @@ class MultiTable extends PureComponent {
|
|
24
24
|
let newSelection = currentTable.selection.moveUp();
|
25
25
|
if (newSelection) {
|
26
26
|
var _currentTable$onSelec;
|
27
|
-
(_currentTable$onSelec = currentTable.onSelect) === null || _currentTable$onSelec ===
|
27
|
+
(_currentTable$onSelec = currentTable.onSelect) === null || _currentTable$onSelec === void 0 || _currentTable$onSelec.call(currentTable, newSelection);
|
28
28
|
} else if (prevTable) {
|
29
29
|
var _currentTable$onSelec2;
|
30
|
-
(_currentTable$onSelec2 = currentTable.onSelect) === null || _currentTable$onSelec2 ===
|
30
|
+
(_currentTable$onSelec2 = currentTable.onSelect) === null || _currentTable$onSelec2 === void 0 || _currentTable$onSelec2.call(currentTable, currentTable.selection.resetFocus());
|
31
31
|
newSelection = prevTable.selection.moveUp();
|
32
32
|
if (newSelection) {
|
33
33
|
var _prevTable$onSelect;
|
34
|
-
(_prevTable$onSelect = prevTable.onSelect) === null || _prevTable$onSelect ===
|
34
|
+
(_prevTable$onSelect = prevTable.onSelect) === null || _prevTable$onSelect === void 0 || _prevTable$onSelect.call(prevTable, newSelection);
|
35
35
|
}
|
36
36
|
}
|
37
37
|
return false;
|
@@ -53,14 +53,14 @@ class MultiTable extends PureComponent {
|
|
53
53
|
let newSelection = currentTable.selection.moveDown();
|
54
54
|
if (newSelection) {
|
55
55
|
var _currentTable$onSelec3;
|
56
|
-
(_currentTable$onSelec3 = currentTable.onSelect) === null || _currentTable$onSelec3 ===
|
56
|
+
(_currentTable$onSelec3 = currentTable.onSelect) === null || _currentTable$onSelec3 === void 0 || _currentTable$onSelec3.call(currentTable, newSelection);
|
57
57
|
} else if (nextTable) {
|
58
58
|
var _currentTable$onSelec4;
|
59
|
-
(_currentTable$onSelec4 = currentTable.onSelect) === null || _currentTable$onSelec4 ===
|
59
|
+
(_currentTable$onSelec4 = currentTable.onSelect) === null || _currentTable$onSelec4 === void 0 || _currentTable$onSelec4.call(currentTable, currentTable.selection.resetFocus());
|
60
60
|
newSelection = nextTable.selection.moveDown();
|
61
61
|
if (newSelection) {
|
62
62
|
var _nextTable$onSelect;
|
63
|
-
(_nextTable$onSelect = nextTable.onSelect) === null || _nextTable$onSelect ===
|
63
|
+
(_nextTable$onSelect = nextTable.onSelect) === null || _nextTable$onSelect === void 0 || _nextTable$onSelect.call(nextTable, newSelection);
|
64
64
|
}
|
65
65
|
}
|
66
66
|
return false;
|
@@ -111,7 +111,7 @@ class MultiTable extends PureComponent {
|
|
111
111
|
const currentFocused = currentSelections.filter(selection => selection.getFocused());
|
112
112
|
if (currentFocused.includes(prevFocused)) {
|
113
113
|
var _prevProps$children$p, _prevProps$children$p2;
|
114
|
-
(_prevProps$children$p = (_prevProps$children$p2 = prevProps.children[prevFocusedIndex].props).onSelect) === null || _prevProps$children$p ===
|
114
|
+
(_prevProps$children$p = (_prevProps$children$p2 = prevProps.children[prevFocusedIndex].props).onSelect) === null || _prevProps$children$p === void 0 || _prevProps$children$p.call(_prevProps$children$p2, prevFocused.resetFocus());
|
115
115
|
}
|
116
116
|
}
|
117
117
|
}
|
@@ -62,19 +62,19 @@ class RowWithFocusSensorCallbacks extends PureComponent {
|
|
62
62
|
_defineProperty(this, "RowWithFocusSensor", getContainer());
|
63
63
|
_defineProperty(this, "onFocus", () => {
|
64
64
|
var _this$props$onFocus, _this$props;
|
65
|
-
(_this$props$onFocus = (_this$props = this.props).onFocus) === null || _this$props$onFocus ===
|
65
|
+
(_this$props$onFocus = (_this$props = this.props).onFocus) === null || _this$props$onFocus === void 0 || _this$props$onFocus.call(_this$props, this.props.item);
|
66
66
|
});
|
67
67
|
_defineProperty(this, "onSelect", (item, selected) => {
|
68
68
|
var _this$props$onSelect, _this$props2;
|
69
|
-
(_this$props$onSelect = (_this$props2 = this.props).onSelect) === null || _this$props$onSelect ===
|
69
|
+
(_this$props$onSelect = (_this$props2 = this.props).onSelect) === null || _this$props$onSelect === void 0 || _this$props$onSelect.call(_this$props2, item, selected);
|
70
70
|
});
|
71
71
|
_defineProperty(this, "onCollapse", () => {
|
72
72
|
var _this$props$onCollaps, _this$props3;
|
73
|
-
(_this$props$onCollaps = (_this$props3 = this.props).onCollapse) === null || _this$props$onCollaps ===
|
73
|
+
(_this$props$onCollaps = (_this$props3 = this.props).onCollapse) === null || _this$props$onCollaps === void 0 || _this$props$onCollaps.call(_this$props3, this.props.item);
|
74
74
|
});
|
75
75
|
_defineProperty(this, "onExpand", () => {
|
76
76
|
var _this$props$onExpand, _this$props4;
|
77
|
-
(_this$props$onExpand = (_this$props4 = this.props).onExpand) === null || _this$props$onExpand ===
|
77
|
+
(_this$props$onExpand = (_this$props4 = this.props).onExpand) === null || _this$props$onExpand === void 0 || _this$props$onExpand.call(_this$props4, this.props.item);
|
78
78
|
});
|
79
79
|
}
|
80
80
|
render() {
|
package/components/table/row.js
CHANGED
@@ -100,7 +100,7 @@ class Row extends PureComponent {
|
|
100
100
|
} = this.props;
|
101
101
|
this.props.onDoubleClick(item);
|
102
102
|
});
|
103
|
-
_defineProperty(this, "row",
|
103
|
+
_defineProperty(this, "row", void 0);
|
104
104
|
_defineProperty(this, "rowRef", el => {
|
105
105
|
this.row = el;
|
106
106
|
});
|
@@ -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 === void 0 || 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 === void 0 || onSelect(newSelection);
|
30
30
|
}
|
31
31
|
return false;
|
32
32
|
});
|
33
|
-
_defineProperty(this, "shiftSelectionMode",
|
33
|
+
_defineProperty(this, "shiftSelectionMode", void 0);
|
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 === void 0 || onSelect(newMovedSelection);
|
65
65
|
} else {
|
66
|
-
onSelect === null || onSelect ===
|
66
|
+
onSelect === null || onSelect === void 0 || 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 === void 0 || onSelect(newMovedSelection);
|
83
83
|
} else {
|
84
|
-
onSelect === null || onSelect ===
|
84
|
+
onSelect === null || onSelect === void 0 || 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 === void 0 || 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 === void 0 || 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 === void 0 || 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 === void 0 || 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 === void 0 || 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", void 0);
|
15
|
+
_defineProperty(this, "_getChildren", void 0);
|
16
|
+
_defineProperty(this, "_data", void 0);
|
17
|
+
_defineProperty(this, "_selected", void 0);
|
18
|
+
_defineProperty(this, "_focused", void 0);
|
19
|
+
_defineProperty(this, "_getKey", void 0);
|
20
|
+
_defineProperty(this, "_isItemSelectable", void 0);
|
21
21
|
this._rawData = data;
|
22
22
|
this._getChildren = getChildren;
|
23
23
|
this._data = this._buildData(data);
|
@@ -296,7 +296,7 @@ class Table extends PureComponent {
|
|
296
296
|
columns: columns,
|
297
297
|
"data-test": getItemDataTest(value)
|
298
298
|
}, restProps), {}, {
|
299
|
-
key: (_restProps$key = restProps.key) !== null && _restProps$key !==
|
299
|
+
key: (_restProps$key = restProps.key) !== null && _restProps$key !== void 0 ? _restProps$key : getItemKey(value)
|
300
300
|
}));
|
301
301
|
return isDragged ? jsx("table", {
|
302
302
|
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 !== void 0 ? activeClassName : '']: selected,
|
39
|
+
[collapsedClassName !== null && collapsedClassName !== void 0 ? collapsedClassName : '']: collapsed,
|
40
|
+
[collapsedActiveClassName !== null && collapsedActiveClassName !== void 0 ? collapsedActiveClassName : '']: collapsed && selected
|
41
41
|
});
|
42
42
|
return jsx(TabLink, _objectSpread2({
|
43
43
|
title: title,
|
@@ -110,7 +110,7 @@ const CollapsibleTabs = _ref => {
|
|
110
110
|
const measureRef = useRef(null);
|
111
111
|
const selectedIndex = useMemo(() => {
|
112
112
|
var _children$filter$find;
|
113
|
-
return (_children$filter$find = children.filter(tab => tab.props.alwaysHidden !== true).findIndex(tab => tab.props.id === selected)) !== null && _children$filter$find !==
|
113
|
+
return (_children$filter$find = children.filter(tab => tab.props.alwaysHidden !== true).findIndex(tab => tab.props.id === selected)) !== null && _children$filter$find !== void 0 ? _children$filter$find : null;
|
114
114
|
}, [children, selected]);
|
115
115
|
const visibleElements = useMemo(() => {
|
116
116
|
let items;
|
@@ -142,7 +142,7 @@ const CollapsibleTabs = _ref => {
|
|
142
142
|
} = elements.sizes;
|
143
143
|
let renderMore = children.some(tab => tab.props.alwaysHidden);
|
144
144
|
const tabsToRender = [];
|
145
|
-
let filledWidth = renderMore ? more !== null && more !==
|
145
|
+
let filledWidth = renderMore ? more !== null && more !== void 0 ? more : 0 : 0;
|
146
146
|
for (let i = 0; i < tabsSizes.length; i++) {
|
147
147
|
if (filledWidth + tabsSizes[i] < containerWidth + MEASURE_TOLERANCE) {
|
148
148
|
filledWidth += tabsSizes[i];
|
@@ -178,7 +178,7 @@ const CollapsibleTabs = _ref => {
|
|
178
178
|
const newLastVisibleIndex = tabsToRender.length - 1;
|
179
179
|
if (elements.lastVisibleIndex !== newLastVisibleIndex) {
|
180
180
|
setLastVisibleIndex(newLastVisibleIndex);
|
181
|
-
onLastVisibleIndexChange === null || onLastVisibleIndexChange ===
|
181
|
+
onLastVisibleIndexChange === null || onLastVisibleIndexChange === void 0 || onLastVisibleIndexChange(newLastVisibleIndex);
|
182
182
|
}
|
183
183
|
}, [children, elements.lastVisibleIndex, elements.sizes, onLastVisibleIndexChange, selectedIndex]);
|
184
184
|
// Prepare list of visible and hidden elements
|
@@ -187,7 +187,7 @@ const CollapsibleTabs = _ref => {
|
|
187
187
|
var _elements$lastVisible2;
|
188
188
|
const res = children.reduce((accumulator, tab) => {
|
189
189
|
var _elements$lastVisible;
|
190
|
-
if (tab.props.alwaysHidden !== true && accumulator.visible.length - 1 < ((_elements$lastVisible = elements.lastVisibleIndex) !== null && _elements$lastVisible !==
|
190
|
+
if (tab.props.alwaysHidden !== true && accumulator.visible.length - 1 < ((_elements$lastVisible = elements.lastVisibleIndex) !== null && _elements$lastVisible !== void 0 ? _elements$lastVisible : 0)) {
|
191
191
|
accumulator.visible.push(tab);
|
192
192
|
} else {
|
193
193
|
accumulator.hidden.push(tab);
|
@@ -198,7 +198,7 @@ const CollapsibleTabs = _ref => {
|
|
198
198
|
hidden: [],
|
199
199
|
ready: elements.lastVisibleIndex !== null
|
200
200
|
});
|
201
|
-
if (selectedIndex > ((_elements$lastVisible2 = elements.lastVisibleIndex) !== null && _elements$lastVisible2 !==
|
201
|
+
if (selectedIndex > ((_elements$lastVisible2 = elements.lastVisibleIndex) !== null && _elements$lastVisible2 !== void 0 ? _elements$lastVisible2 : 0)) {
|
202
202
|
const selectedItem = children.find(tab => !tab.props.alwaysHidden && tab.props.id === selected);
|
203
203
|
if (selectedItem != null) {
|
204
204
|
res.visible.push(selectedItem);
|
@@ -230,9 +230,9 @@ const CollapsibleTabs = _ref => {
|
|
230
230
|
const measureTask = fastdom.measure(() => {
|
231
231
|
var _container$children, _moreButton$offsetWid;
|
232
232
|
const container = measureRef.current;
|
233
|
-
const descendants = [...((_container$children = container === null || container ===
|
233
|
+
const descendants = [...((_container$children = container === null || container === void 0 ? void 0 : container.children) !== null && _container$children !== void 0 ? _container$children : [])];
|
234
234
|
const moreButton = descendants.pop();
|
235
|
-
let moreButtonWidth = (_moreButton$offsetWid = moreButton === null || moreButton ===
|
235
|
+
let moreButtonWidth = (_moreButton$offsetWid = moreButton === null || moreButton === void 0 ? void 0 : moreButton.offsetWidth) !== null && _moreButton$offsetWid !== void 0 ? _moreButton$offsetWid : 0;
|
236
236
|
const {
|
237
237
|
marginLeft: moreButtonMarginLeft = '0',
|
238
238
|
marginRight: moreButtonMarginRight = '0'
|
@@ -88,7 +88,7 @@ class Tabs extends PureComponent {
|
|
88
88
|
super(...arguments);
|
89
89
|
_defineProperty(this, "handleSelect", memoize(key => () => {
|
90
90
|
var _this$props$onSelect, _this$props;
|
91
|
-
return (_this$props$onSelect = (_this$props = this.props).onSelect) === null || _this$props$onSelect ===
|
91
|
+
return (_this$props$onSelect = (_this$props = this.props).onSelect) === null || _this$props$onSelect === void 0 ? void 0 : _this$props$onSelect.call(_this$props, key);
|
92
92
|
}));
|
93
93
|
_defineProperty(this, "getTabTitle", (child, i) => {
|
94
94
|
if (child == null || typeof child !== 'object' || child.type === CustomItem) {
|
@@ -86,7 +86,7 @@ const _excluded = ["children", "initSelected", "data-test"];
|
|
86
86
|
class SmartTabs extends PureComponent {
|
87
87
|
constructor(props) {
|
88
88
|
super(props);
|
89
|
-
_defineProperty(this, "state",
|
89
|
+
_defineProperty(this, "state", void 0);
|
90
90
|
_defineProperty(this, "handleSelect", selected => this.setState({
|
91
91
|
selected
|
92
92
|
}));
|
package/components/tag/tag.js
CHANGED
@@ -38,7 +38,7 @@ class Tag extends PureComponent {
|
|
38
38
|
});
|
39
39
|
}
|
40
40
|
});
|
41
|
-
_defineProperty(this, "tagNode",
|
41
|
+
_defineProperty(this, "tagNode", void 0);
|
42
42
|
_defineProperty(this, "tagRef", el => {
|
43
43
|
this.tagNode = el;
|
44
44
|
});
|
@@ -51,7 +51,7 @@ class Tag extends PureComponent {
|
|
51
51
|
}
|
52
52
|
if (this.state.focused) {
|
53
53
|
var _this$tagNode;
|
54
|
-
(_this$tagNode = this.tagNode) === null || _this$tagNode ===
|
54
|
+
(_this$tagNode = this.tagNode) === null || _this$tagNode === void 0 || _this$tagNode.focus();
|
55
55
|
}
|
56
56
|
this.setDocumentClickListener(this.state.focused);
|
57
57
|
}
|
@@ -112,17 +112,17 @@ class TagsInput extends PureComponent {
|
|
112
112
|
query: '',
|
113
113
|
activeIndex: 0
|
114
114
|
});
|
115
|
-
_defineProperty(this, "ngModelStateField",
|
115
|
+
_defineProperty(this, "ngModelStateField", void 0);
|
116
116
|
_defineProperty(this, "id", this.props.id || getUID('ring-tags-list-'));
|
117
|
-
_defineProperty(this, "node",
|
117
|
+
_defineProperty(this, "node", void 0);
|
118
118
|
_defineProperty(this, "nodeRef", node => {
|
119
119
|
this.node = node;
|
120
120
|
});
|
121
|
-
_defineProperty(this, "input",
|
122
|
-
_defineProperty(this, "caret",
|
121
|
+
_defineProperty(this, "input", void 0);
|
122
|
+
_defineProperty(this, "caret", void 0);
|
123
123
|
_defineProperty(this, "focusInput", () => {
|
124
124
|
var _this$getInputNode;
|
125
|
-
(_this$getInputNode = this.getInputNode()) === null || _this$getInputNode ===
|
125
|
+
(_this$getInputNode = this.getInputNode()) === null || _this$getInputNode === void 0 || _this$getInputNode.focus();
|
126
126
|
});
|
127
127
|
_defineProperty(this, "focus", () => {
|
128
128
|
this.focusInput();
|
@@ -133,8 +133,8 @@ class TagsInput extends PureComponent {
|
|
133
133
|
return;
|
134
134
|
}
|
135
135
|
const isUniqueTag = this.state.tags.filter(item => tag.key === item.key).length === 0;
|
136
|
-
(_this$select = this.select) === null || _this$select ===
|
137
|
-
(_this$select2 = this.select) === null || _this$select2 ===
|
136
|
+
(_this$select = this.select) === null || _this$select === void 0 || _this$select.clear();
|
137
|
+
(_this$select2 = this.select) === null || _this$select2 === void 0 || _this$select2.filterValue('');
|
138
138
|
if (isUniqueTag) {
|
139
139
|
this.setState(prevState => ({
|
140
140
|
tags: prevState.tags.concat([tag])
|
@@ -150,7 +150,7 @@ class TagsInput extends PureComponent {
|
|
150
150
|
if (event.target !== this.node && event.target.parentElement !== this.node) {
|
151
151
|
return;
|
152
152
|
}
|
153
|
-
(_this$select3 = this.select) === null || _this$select3 ===
|
153
|
+
(_this$select3 = this.select) === null || _this$select3 === void 0 || _this$select3._clickHandler();
|
154
154
|
});
|
155
155
|
_defineProperty(this, "filterExistingTags", suggestions => {
|
156
156
|
const tagsMap = new Map(this.state.tags.map(tag => [tag.key, tag]));
|
@@ -209,18 +209,18 @@ class TagsInput extends PureComponent {
|
|
209
209
|
const key = getEventKey(event);
|
210
210
|
const isInputFocused = () => {
|
211
211
|
var _this$getInputNode$ta, _this$getInputNode2;
|
212
|
-
return event.target instanceof Element && event.target.matches((_this$getInputNode$ta = (_this$getInputNode2 = this.getInputNode()) === null || _this$getInputNode2 ===
|
212
|
+
return event.target instanceof Element && event.target.matches((_this$getInputNode$ta = (_this$getInputNode2 = this.getInputNode()) === null || _this$getInputNode2 === void 0 ? void 0 : _this$getInputNode2.tagName) !== null && _this$getInputNode$ta !== void 0 ? _this$getInputNode$ta : '');
|
213
213
|
};
|
214
214
|
if (key === ' ' && this.props.allowAddNewTags) {
|
215
215
|
var _this$getInputNode3;
|
216
216
|
event.stopPropagation();
|
217
|
-
const value = (_this$getInputNode3 = this.getInputNode()) === null || _this$getInputNode3 ===
|
217
|
+
const value = (_this$getInputNode3 = this.getInputNode()) === null || _this$getInputNode3 === void 0 ? void 0 : _this$getInputNode3.value;
|
218
218
|
if (value != null && value !== '') {
|
219
219
|
this.handleTagCreation(value);
|
220
220
|
}
|
221
221
|
return true;
|
222
222
|
}
|
223
|
-
if ((_this$select4 = this.select) !== null && _this$select4 !==
|
223
|
+
if ((_this$select4 = this.select) !== null && _this$select4 !== void 0 && (_this$select4 = _this$select4._popup) !== null && _this$select4 !== void 0 && _this$select4.isVisible()) {
|
224
224
|
return true;
|
225
225
|
}
|
226
226
|
if (key === 'ArrowLeft') {
|
@@ -234,7 +234,7 @@ class TagsInput extends PureComponent {
|
|
234
234
|
if (this.state.activeIndex === this.state.tags.length - 1) {
|
235
235
|
if (!this.props.disabled) {
|
236
236
|
var _this$getInputNode4;
|
237
|
-
(_this$getInputNode4 = this.getInputNode()) === null || _this$getInputNode4 ===
|
237
|
+
(_this$getInputNode4 = this.getInputNode()) === null || _this$getInputNode4 === void 0 || _this$getInputNode4.focus();
|
238
238
|
this.setActiveIndex();
|
239
239
|
}
|
240
240
|
} else {
|
@@ -244,11 +244,11 @@ class TagsInput extends PureComponent {
|
|
244
244
|
}
|
245
245
|
if (!this.props.disabled) {
|
246
246
|
var _this$getInputNode5;
|
247
|
-
if (key === 'Backspace' && !((_this$getInputNode5 = this.getInputNode()) !== null && _this$getInputNode5 !==
|
247
|
+
if (key === 'Backspace' && !((_this$getInputNode5 = this.getInputNode()) !== null && _this$getInputNode5 !== void 0 && _this$getInputNode5.value)) {
|
248
248
|
var _this$select5;
|
249
249
|
event.preventDefault();
|
250
250
|
const tagsLength = this.state.tags.length;
|
251
|
-
(_this$select5 = this.select) === null || _this$select5 ===
|
251
|
+
(_this$select5 = this.select) === null || _this$select5 === void 0 || _this$select5._hidePopup(true); // otherwise confirmation may be overlapped by popup
|
252
252
|
this.onRemoveTag(this.state.tags[tagsLength - 1]);
|
253
253
|
return false;
|
254
254
|
}
|
@@ -269,7 +269,7 @@ class TagsInput extends PureComponent {
|
|
269
269
|
label
|
270
270
|
});
|
271
271
|
});
|
272
|
-
_defineProperty(this, "select",
|
272
|
+
_defineProperty(this, "select", void 0);
|
273
273
|
_defineProperty(this, "selectRef", el => {
|
274
274
|
this.select = el;
|
275
275
|
});
|
@@ -298,13 +298,13 @@ class TagsInput extends PureComponent {
|
|
298
298
|
var _this$select6;
|
299
299
|
this.focusInput();
|
300
300
|
this.loadSuggestions();
|
301
|
-
(_this$select6 = this.select) === null || _this$select6 ===
|
301
|
+
(_this$select6 = this.select) === null || _this$select6 === void 0 || _this$select6._showPopup();
|
302
302
|
}
|
303
303
|
}
|
304
304
|
getInputNode() {
|
305
305
|
if (!this.input) {
|
306
306
|
var _this$select7;
|
307
|
-
this.input = (_this$select7 = this.select) === null || _this$select7 ===
|
307
|
+
this.input = (_this$select7 = this.select) === null || _this$select7 === void 0 ? void 0 : _this$select7.filter;
|
308
308
|
if (this.input) {
|
309
309
|
this.caret = new Caret(this.input);
|
310
310
|
}
|
@@ -43,9 +43,9 @@ class Tooltip extends Component {
|
|
43
43
|
showPopup: false,
|
44
44
|
showNestedPopup: false
|
45
45
|
});
|
46
|
-
_defineProperty(this, "timeout",
|
46
|
+
_defineProperty(this, "timeout", void 0);
|
47
47
|
_defineProperty(this, "listeners", new Listeners());
|
48
|
-
_defineProperty(this, "containerNode",
|
48
|
+
_defineProperty(this, "containerNode", void 0);
|
49
49
|
_defineProperty(this, "containerRef", el => {
|
50
50
|
this.containerNode = el;
|
51
51
|
});
|
@@ -84,7 +84,7 @@ class Tooltip extends Component {
|
|
84
84
|
return;
|
85
85
|
}
|
86
86
|
}
|
87
|
-
(_this$context = this.context) === null || _this$context ===
|
87
|
+
(_this$context = this.context) === null || _this$context === void 0 || _this$context.onNestedTooltipShow();
|
88
88
|
this.setState({
|
89
89
|
showPopup: true
|
90
90
|
});
|
@@ -92,19 +92,19 @@ class Tooltip extends Component {
|
|
92
92
|
_defineProperty(this, "hidePopup", () => {
|
93
93
|
var _this$context2;
|
94
94
|
clearTimeout(this.timeout);
|
95
|
-
(_this$context2 = this.context) === null || _this$context2 ===
|
95
|
+
(_this$context2 = this.context) === null || _this$context2 === void 0 || _this$context2.onNestedTooltipHide();
|
96
96
|
this.setState({
|
97
97
|
showPopup: false
|
98
98
|
});
|
99
99
|
});
|
100
100
|
_defineProperty(this, "hideIfMovedOutsidePopup", ev => {
|
101
101
|
var _this$popup;
|
102
|
-
if (!('relatedTarget' in ev) || (_this$popup = this.popup) !== null && _this$popup !==
|
102
|
+
if (!('relatedTarget' in ev) || (_this$popup = this.popup) !== null && _this$popup !== void 0 && (_this$popup = _this$popup.container) !== null && _this$popup !== void 0 && _this$popup.contains(ev.relatedTarget)) {
|
103
103
|
return;
|
104
104
|
}
|
105
105
|
this.hidePopup();
|
106
106
|
});
|
107
|
-
_defineProperty(this, "popup",
|
107
|
+
_defineProperty(this, "popup", void 0);
|
108
108
|
_defineProperty(this, "popupRef", el => {
|
109
109
|
this.popup = el;
|
110
110
|
});
|
@@ -140,7 +140,7 @@ class Tooltip extends Component {
|
|
140
140
|
this.listeners.add(this.containerNode, 'mouseenter', this.tryToShowPopup);
|
141
141
|
this.listeners.add(this.containerNode, 'mouseleave', ev => {
|
142
142
|
var _this$popup2;
|
143
|
-
if (ev.relatedTarget && (_this$popup2 = this.popup) !== null && _this$popup2 !==
|
143
|
+
if (ev.relatedTarget && (_this$popup2 = this.popup) !== null && _this$popup2 !== void 0 && (_this$popup2 = _this$popup2.container) !== null && _this$popup2 !== void 0 && _this$popup2.contains(ev.relatedTarget)) {
|
144
144
|
return;
|
145
145
|
}
|
146
146
|
this.hidePopup();
|
@@ -198,7 +198,7 @@ class Tooltip extends Component {
|
|
198
198
|
}, popupProps), {}, {
|
199
199
|
className: classNames(styles.tooltip, {
|
200
200
|
[styles.long]: long
|
201
|
-
}, popupProps === null || popupProps ===
|
201
|
+
}, popupProps === null || popupProps === void 0 ? void 0 : popupProps.className),
|
202
202
|
children: title
|
203
203
|
}))
|
204
204
|
})]
|
@@ -37,7 +37,7 @@ const Upload = /*#__PURE__*/forwardRef(function Upload(_ref, ref) {
|
|
37
37
|
useImperativeHandle(ref, () => ({
|
38
38
|
openFilePicker: () => {
|
39
39
|
var _fileInputRef$current;
|
40
|
-
return (_fileInputRef$current = fileInputRef.current) === null || _fileInputRef$current ===
|
40
|
+
return (_fileInputRef$current = fileInputRef.current) === null || _fileInputRef$current === void 0 ? void 0 : _fileInputRef$current.click();
|
41
41
|
}
|
42
42
|
}), []);
|
43
43
|
const handleSelectedFiles = useCallback(files => {
|
@@ -46,7 +46,7 @@ const Upload = /*#__PURE__*/forwardRef(function Upload(_ref, ref) {
|
|
46
46
|
}
|
47
47
|
const rejected = files.filter(file => !validate(file));
|
48
48
|
if (rejected.length > 0) {
|
49
|
-
onFilesRejected === null || onFilesRejected ===
|
49
|
+
onFilesRejected === null || onFilesRejected === void 0 || onFilesRejected(files);
|
50
50
|
return;
|
51
51
|
}
|
52
52
|
onFilesSelected(files);
|
@@ -57,7 +57,7 @@ const Upload = /*#__PURE__*/forwardRef(function Upload(_ref, ref) {
|
|
57
57
|
const onInputChange = useCallback(() => {
|
58
58
|
var _fileInputRef$current2;
|
59
59
|
setDragOver(false);
|
60
|
-
if ((_fileInputRef$current2 = fileInputRef.current) !== null && _fileInputRef$current2 !==
|
60
|
+
if ((_fileInputRef$current2 = fileInputRef.current) !== null && _fileInputRef$current2 !== void 0 && _fileInputRef$current2.files) {
|
61
61
|
handleSelectedFiles(Array.from(fileInputRef.current.files));
|
62
62
|
}
|
63
63
|
}, [handleSelectedFiles]);
|
@@ -89,7 +89,7 @@ const DEFAULT_AGREEMENT = {
|
|
89
89
|
class UserAgreementService {
|
90
90
|
constructor(config) {
|
91
91
|
var _this = this;
|
92
|
-
_defineProperty(this, "config",
|
92
|
+
_defineProperty(this, "config", void 0);
|
93
93
|
_defineProperty(this, "_dialogPromise", null);
|
94
94
|
_defineProperty(this, "_alertPromise", null);
|
95
95
|
_defineProperty(this, "tabId", Math.random());
|
@@ -101,7 +101,7 @@ class UserAgreementService {
|
|
101
101
|
_defineProperty(this, "guest", false);
|
102
102
|
_defineProperty(this, "userAgreement", DEFAULT_AGREEMENT);
|
103
103
|
_defineProperty(this, "userConsent", DEFAULT_CONSENT);
|
104
|
-
_defineProperty(this, "intervalId",
|
104
|
+
_defineProperty(this, "intervalId", void 0);
|
105
105
|
_defineProperty(this, "startChecking", () => {
|
106
106
|
this.intervalId = window.setInterval(this.checkConsentAndShowDialog, this.interval);
|
107
107
|
window.addEventListener('storage', this.onStorageEvent);
|
@@ -179,7 +179,7 @@ class UserAgreementService {
|
|
179
179
|
} = userConsent;
|
180
180
|
return !enabled || accepted && actualVersion === acceptedVersion;
|
181
181
|
});
|
182
|
-
_defineProperty(this, "alertKey",
|
182
|
+
_defineProperty(this, "alertKey", void 0);
|
183
183
|
_defineProperty(this, "showAlert", withoutNotifications => {
|
184
184
|
if (this._alertPromise) {
|
185
185
|
return this._alertPromise;
|