@jetbrains/ring-ui-built 6.0.28 → 6.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 +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.d.ts +1 -1
- 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/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 +3 -4
@@ -1,35 +1,35 @@
|
|
1
|
-
import {
|
1
|
+
import { c as _objectWithoutProperties, _ as _defineProperty, d as _objectSpread2, 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 React from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
5
5
|
import Popup from '../popup/popup.js';
|
6
6
|
import List from '../list/list.js';
|
7
|
-
import 'core-js/modules/es.object.to-string.js';
|
8
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
9
7
|
import 'core-js/modules/es.object.entries.js';
|
10
|
-
import 'core-js/modules/es.
|
8
|
+
import 'core-js/modules/es.object.to-string.js';
|
11
9
|
import 'core-js/modules/es.regexp.exec.js';
|
10
|
+
import 'core-js/modules/es.regexp.to-string.js';
|
12
11
|
import 'core-js/modules/es.string.replace.js';
|
12
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
13
13
|
import 'react-dom';
|
14
14
|
import 'classnames';
|
15
15
|
import '../global/get-uid.js';
|
16
16
|
import '../global/schedule-raf.js';
|
17
17
|
import '../global/dom.js';
|
18
|
-
import 'core-js/modules/es.object.assign.js';
|
19
18
|
import 'core-js/modules/es.array.filter.js';
|
20
|
-
import 'core-js/modules/es.string.split.js';
|
21
19
|
import 'core-js/modules/es.array.iterator.js';
|
20
|
+
import 'core-js/modules/es.object.assign.js';
|
22
21
|
import 'core-js/modules/es.set.js';
|
22
|
+
import 'core-js/modules/es.string.split.js';
|
23
23
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
24
24
|
import '../shortcuts/shortcuts.js';
|
25
25
|
import 'core-js/modules/es.array.map.js';
|
26
26
|
import '../shortcuts/core.js';
|
27
|
+
import 'core-js/modules/es.array.find-index.js';
|
27
28
|
import 'core-js/modules/es.array.includes.js';
|
28
|
-
import 'core-js/modules/es.string.includes.js';
|
29
29
|
import 'core-js/modules/es.array.slice.js';
|
30
30
|
import 'core-js/modules/es.array.splice.js';
|
31
|
+
import 'core-js/modules/es.string.includes.js';
|
31
32
|
import 'core-js/modules/es.string.match.js';
|
32
|
-
import 'core-js/modules/es.array.find-index.js';
|
33
33
|
import 'combokeys';
|
34
34
|
import '../global/sniffer.js';
|
35
35
|
import 'sniffr';
|
@@ -88,28 +88,27 @@ var _ref = Popup.propTypes || {};
|
|
88
88
|
* @name Popup Menu
|
89
89
|
*/
|
90
90
|
var PopupMenu = /*#__PURE__*/function (_Popup) {
|
91
|
-
_inherits(PopupMenu, _Popup);
|
92
|
-
var _super = _createSuper(PopupMenu);
|
93
91
|
function PopupMenu() {
|
94
92
|
var _this;
|
95
93
|
_classCallCheck(this, PopupMenu);
|
96
94
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
97
95
|
args[_key] = arguments[_key];
|
98
96
|
}
|
99
|
-
_this =
|
100
|
-
_defineProperty(
|
97
|
+
_this = _callSuper(this, PopupMenu, [].concat(args));
|
98
|
+
_defineProperty(_this, "onSelect", function (item, event) {
|
101
99
|
if (_this.props.closeOnSelect) {
|
102
100
|
_this._onCloseAttempt(event);
|
103
101
|
}
|
104
102
|
_this.props.onSelect(item, event);
|
105
103
|
});
|
106
|
-
_defineProperty(
|
107
|
-
_defineProperty(
|
104
|
+
_defineProperty(_this, "list", void 0);
|
105
|
+
_defineProperty(_this, "listRef", function (el) {
|
108
106
|
_this.list = el;
|
109
107
|
});
|
110
108
|
return _this;
|
111
109
|
}
|
112
|
-
|
110
|
+
_inherits(PopupMenu, _Popup);
|
111
|
+
return _createClass(PopupMenu, [{
|
113
112
|
key: "getInternalContent",
|
114
113
|
value: /** @override */
|
115
114
|
function getInternalContent() {
|
@@ -125,7 +124,6 @@ var PopupMenu = /*#__PURE__*/function (_Popup) {
|
|
125
124
|
})));
|
126
125
|
}
|
127
126
|
}]);
|
128
|
-
return PopupMenu;
|
129
127
|
}(Popup);
|
130
128
|
_defineProperty(PopupMenu, "isItemType", List.isItemType);
|
131
129
|
_defineProperty(PopupMenu, "ListProps", List.ListProps);
|
@@ -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';
|
@@ -11,26 +11,25 @@ var _excluded = ["className", "global", "max", "value", "label", "staticColor"];
|
|
11
11
|
* @name Progress Bar
|
12
12
|
*/
|
13
13
|
var ProgressBar = /*#__PURE__*/function (_PureComponent) {
|
14
|
-
_inherits(ProgressBar, _PureComponent);
|
15
|
-
var _super = _createSuper(ProgressBar);
|
16
14
|
function ProgressBar() {
|
17
15
|
var _this;
|
18
16
|
_classCallCheck(this, ProgressBar);
|
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(
|
24
|
-
_defineProperty(
|
20
|
+
_this = _callSuper(this, ProgressBar, [].concat(args));
|
21
|
+
_defineProperty(_this, "progressbarWrapper", void 0);
|
22
|
+
_defineProperty(_this, "progressbarWrapperRef", function (el) {
|
25
23
|
_this.progressbarWrapper = el;
|
26
24
|
});
|
27
|
-
_defineProperty(
|
28
|
-
_defineProperty(
|
25
|
+
_defineProperty(_this, "progressbar", void 0);
|
26
|
+
_defineProperty(_this, "progressbarRef", function (el) {
|
29
27
|
_this.progressbar = el;
|
30
28
|
});
|
31
29
|
return _this;
|
32
30
|
}
|
33
|
-
|
31
|
+
_inherits(ProgressBar, _PureComponent);
|
32
|
+
return _createClass(ProgressBar, [{
|
34
33
|
key: "render",
|
35
34
|
value: function render() {
|
36
35
|
var _this$props = this.props,
|
@@ -77,7 +76,6 @@ var ProgressBar = /*#__PURE__*/function (_PureComponent) {
|
|
77
76
|
return percents > HUNDRED_PERCENT ? HUNDRED_PERCENT : percents;
|
78
77
|
}
|
79
78
|
}]);
|
80
|
-
return ProgressBar;
|
81
79
|
}(PureComponent);
|
82
80
|
_defineProperty(ProgressBar, "propTypes", {
|
83
81
|
label: PropTypes.string,
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as
|
2
|
-
import 'core-js/modules/es.regexp.exec.js';
|
3
|
-
import 'core-js/modules/es.string.replace.js';
|
4
|
-
import 'core-js/modules/es.array.find.js';
|
5
|
-
import 'core-js/modules/es.object.to-string.js';
|
6
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
7
|
-
import 'core-js/modules/es.array.filter.js';
|
8
|
-
import 'core-js/modules/es.array.splice.js';
|
9
|
-
import 'core-js/modules/es.promise.js';
|
10
|
-
import 'core-js/modules/es.object.assign.js';
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, k as _toConsumableArray, f as _classCallCheck, g as _callSuper, m as _get, n as _getPrototypeOf, c as _objectWithoutProperties } from '../_helpers/_rollupPluginBabelHelpers.js';
|
11
2
|
import 'core-js/modules/es.symbol.js';
|
12
3
|
import 'core-js/modules/es.symbol.description.js';
|
13
4
|
import 'core-js/modules/es.array.concat.js';
|
14
|
-
import 'core-js/modules/es.array.
|
5
|
+
import 'core-js/modules/es.array.filter.js';
|
6
|
+
import 'core-js/modules/es.array.find.js';
|
15
7
|
import 'core-js/modules/es.array.from.js';
|
8
|
+
import 'core-js/modules/es.array.map.js';
|
9
|
+
import 'core-js/modules/es.array.splice.js';
|
10
|
+
import 'core-js/modules/es.object.assign.js';
|
11
|
+
import 'core-js/modules/es.object.to-string.js';
|
12
|
+
import 'core-js/modules/es.promise.js';
|
13
|
+
import 'core-js/modules/es.regexp.exec.js';
|
14
|
+
import 'core-js/modules/es.string.replace.js';
|
15
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
16
16
|
import React, { Component } from 'react';
|
17
17
|
import PropTypes from 'prop-types';
|
18
18
|
import debounce from 'just-debounce-it';
|
@@ -22,7 +22,7 @@ import searchIcon from '@jetbrains/icons/search';
|
|
22
22
|
import closeIcon from '@jetbrains/icons/close-12px';
|
23
23
|
import getUID from '../global/get-uid.js';
|
24
24
|
import joinDataTestAttributes from '../global/data-tests.js';
|
25
|
-
import {
|
25
|
+
import { getRect, preventDefault } from '../global/dom.js';
|
26
26
|
import Caret from '../caret/caret.js';
|
27
27
|
import ContentEditable from '../contenteditable/contenteditable.js';
|
28
28
|
import PopupMenu from '../popup-menu/popup-menu.js';
|
@@ -38,9 +38,9 @@ import { Q as QueryAssistSuggestions, m as modules_da7ab055 } from '../_helpers/
|
|
38
38
|
import 'core-js/modules/es.regexp.to-string.js';
|
39
39
|
import 'core-js/modules/es.array.reduce.js';
|
40
40
|
import 'core-js/modules/es.object.entries.js';
|
41
|
-
import 'core-js/modules/es.string.split.js';
|
42
41
|
import 'core-js/modules/es.array.iterator.js';
|
43
42
|
import 'core-js/modules/es.set.js';
|
43
|
+
import 'core-js/modules/es.string.split.js';
|
44
44
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
45
45
|
import 'react-dom/server';
|
46
46
|
import '../popup/popup.js';
|
@@ -49,8 +49,8 @@ import '../global/schedule-raf.js';
|
|
49
49
|
import '../tab-trap/tab-trap.js';
|
50
50
|
import '../popup/position.js';
|
51
51
|
import 'core-js/modules/es.array.includes.js';
|
52
|
-
import 'core-js/modules/es.string.includes.js';
|
53
52
|
import 'core-js/modules/es.array.sort.js';
|
53
|
+
import 'core-js/modules/es.string.includes.js';
|
54
54
|
import '../popup/popup.consts.js';
|
55
55
|
import '../popup/popup.target.js';
|
56
56
|
import '../list/list.js';
|
@@ -148,13 +148,11 @@ function cleanText(text) {
|
|
148
148
|
+ __icon__ \`string=\` Icon URI, Data URI is possible
|
149
149
|
*/
|
150
150
|
var QueryAssist = /*#__PURE__*/function (_Component) {
|
151
|
-
_inherits(QueryAssist, _Component);
|
152
|
-
var _super = _createSuper(QueryAssist);
|
153
151
|
function QueryAssist(_props) {
|
154
152
|
var _this;
|
155
153
|
_classCallCheck(this, QueryAssist);
|
156
|
-
_this =
|
157
|
-
_defineProperty(
|
154
|
+
_this = _callSuper(this, QueryAssist, [_props]);
|
155
|
+
_defineProperty(_this, "state", {
|
158
156
|
dirty: !_this.props.query,
|
159
157
|
query: _this.props.query,
|
160
158
|
placeholderEnabled: !_this.props.query,
|
@@ -162,13 +160,13 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
162
160
|
suggestions: [],
|
163
161
|
showPopup: false
|
164
162
|
});
|
165
|
-
_defineProperty(
|
166
|
-
_defineProperty(
|
167
|
-
_defineProperty(
|
163
|
+
_defineProperty(_this, "immediateState", void 0);
|
164
|
+
_defineProperty(_this, "requestData", void 0);
|
165
|
+
_defineProperty(_this, "ngModelStateField", ngModelStateField);
|
168
166
|
// An array of {query: string; caret: number}[]
|
169
|
-
_defineProperty(
|
170
|
-
_defineProperty(
|
171
|
-
_defineProperty(
|
167
|
+
_defineProperty(_this, "historyStack", []);
|
168
|
+
_defineProperty(_this, "mouseIsDownOnPopup", void 0);
|
169
|
+
_defineProperty(_this, "handleFocusChange", function (e) {
|
172
170
|
// otherwise it's blur and false
|
173
171
|
var focus = e.type === 'focus';
|
174
172
|
_this.immediateState.focus = focus;
|
@@ -190,11 +188,11 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
190
188
|
shortcuts: focus
|
191
189
|
});
|
192
190
|
});
|
193
|
-
_defineProperty(
|
194
|
-
_defineProperty(
|
191
|
+
_defineProperty(_this, "node", void 0);
|
192
|
+
_defineProperty(_this, "nodeRef", function (node) {
|
195
193
|
_this.node = node;
|
196
194
|
});
|
197
|
-
_defineProperty(
|
195
|
+
_defineProperty(_this, "setCaretPosition", function () {
|
198
196
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
199
197
|
var queryLength = _this.immediateState.query != null ? _this.immediateState.query.length : 0;
|
200
198
|
var newCaretPosition = _this.immediateState.caret < queryLength ? _this.immediateState.caret : queryLength;
|
@@ -216,7 +214,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
216
214
|
}
|
217
215
|
}
|
218
216
|
});
|
219
|
-
_defineProperty(
|
217
|
+
_defineProperty(_this, "togglePlaceholder", function () {
|
220
218
|
var query = _this.getQuery();
|
221
219
|
var currentQueryIsEmpty = _this.immediateState.query === '';
|
222
220
|
var newQueryIsEmpty = query === '';
|
@@ -226,8 +224,8 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
226
224
|
});
|
227
225
|
}
|
228
226
|
});
|
229
|
-
_defineProperty(
|
230
|
-
_defineProperty(
|
227
|
+
_defineProperty(_this, "isComposing", void 0);
|
228
|
+
_defineProperty(_this, "handleInput", function (e) {
|
231
229
|
var _this$caret4, _currentCaret$positio;
|
232
230
|
_this.togglePlaceholder();
|
233
231
|
var currentCaret = (_this$caret4 = _this.caret) === null || _this$caret4 === void 0 ? void 0 : _this$caret4.getPosition();
|
@@ -273,12 +271,12 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
273
271
|
}
|
274
272
|
});
|
275
273
|
// It's necessary to prevent new element creation before any other hooks
|
276
|
-
_defineProperty(
|
274
|
+
_defineProperty(_this, "handleEnter", function (e) {
|
277
275
|
if (e.key === 'Enter') {
|
278
276
|
preventDefault(e);
|
279
277
|
}
|
280
278
|
});
|
281
|
-
_defineProperty(
|
279
|
+
_defineProperty(_this, "handleTab", function (e) {
|
282
280
|
var list = _this._popup && _this._popup.list;
|
283
281
|
var suggestion = list && (list.getSelected() || list.getFirst());
|
284
282
|
if (suggestion && _this.state.showPopup) {
|
@@ -294,13 +292,13 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
294
292
|
}
|
295
293
|
return true;
|
296
294
|
});
|
297
|
-
_defineProperty(
|
298
|
-
_get((
|
295
|
+
_defineProperty(_this, "setState", function (state, resolve) {
|
296
|
+
_get((_getPrototypeOf(QueryAssist.prototype)), "setState", _this).call(_this, state, function () {
|
299
297
|
_this._pushHistory(state);
|
300
298
|
resolve === null || resolve === void 0 || resolve();
|
301
299
|
});
|
302
300
|
});
|
303
|
-
_defineProperty(
|
301
|
+
_defineProperty(_this, "undo", function (e) {
|
304
302
|
var previous = _this.historyStack.splice(0, 2)[1];
|
305
303
|
if (!previous) {
|
306
304
|
return;
|
@@ -313,7 +311,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
313
311
|
_this.handleInput(e);
|
314
312
|
});
|
315
313
|
});
|
316
|
-
_defineProperty(
|
314
|
+
_defineProperty(_this, "handlePaste", function (e) {
|
317
315
|
var INSERT_COMMAND = 'insertText';
|
318
316
|
if (e.clipboardData && document.queryCommandSupported(INSERT_COMMAND)) {
|
319
317
|
preventDefault(e);
|
@@ -322,7 +320,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
322
320
|
_this.handleInput(e);
|
323
321
|
}
|
324
322
|
});
|
325
|
-
_defineProperty(
|
323
|
+
_defineProperty(_this, "handleCaretMove", function (e) {
|
326
324
|
var _this$caret6, _currentCaret$positio2;
|
327
325
|
if (_this.isComposing) {
|
328
326
|
return;
|
@@ -345,12 +343,12 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
345
343
|
});
|
346
344
|
}
|
347
345
|
});
|
348
|
-
_defineProperty(
|
346
|
+
_defineProperty(_this, "handleStyleRangesResponse", function (_ref) {
|
349
347
|
_ref.suggestions;
|
350
348
|
var restProps = _objectWithoutProperties(_ref, _excluded);
|
351
349
|
return _this.handleResponse(restProps);
|
352
350
|
});
|
353
|
-
_defineProperty(
|
351
|
+
_defineProperty(_this, "handleResponse", function (_ref2) {
|
354
352
|
var _ref2$query = _ref2.query,
|
355
353
|
query = _ref2$query === void 0 ? '' : _ref2$query,
|
356
354
|
_ref2$caret = _ref2.caret,
|
@@ -388,7 +386,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
388
386
|
}
|
389
387
|
});
|
390
388
|
});
|
391
|
-
_defineProperty(
|
389
|
+
_defineProperty(_this, "handleApply", function () {
|
392
390
|
_this.closePopup();
|
393
391
|
_this.immediateState.dirty = false;
|
394
392
|
// Only set dirty to false when query is saved already
|
@@ -399,7 +397,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
399
397
|
}
|
400
398
|
return _this.props.onApply(_this.immediateState);
|
401
399
|
});
|
402
|
-
_defineProperty(
|
400
|
+
_defineProperty(_this, "handleComplete", function (data, replace) {
|
403
401
|
var _suggestion$caret, _suggestion$caret2, _this$requestData3, _this4;
|
404
402
|
if (!data || !data.data) {
|
405
403
|
_this.handleApply();
|
@@ -441,7 +439,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
441
439
|
_this.closePopup();
|
442
440
|
(_this$requestData3 = (_this4 = _this).requestData) === null || _this$requestData3 === void 0 || _this$requestData3.call(_this4, true);
|
443
441
|
});
|
444
|
-
_defineProperty(
|
442
|
+
_defineProperty(_this, "requestStyleRanges", function () {
|
445
443
|
var _this$immediateState = _this.immediateState,
|
446
444
|
query = _this$immediateState.query,
|
447
445
|
caret = _this$immediateState.caret;
|
@@ -454,7 +452,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
454
452
|
omitSuggestions: true
|
455
453
|
}).then(_this.handleStyleRangesResponse).catch(noop);
|
456
454
|
});
|
457
|
-
_defineProperty(
|
455
|
+
_defineProperty(_this, "requestHandler", function () {
|
458
456
|
var afterCompletion = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
459
457
|
if (_this.props.disabled) {
|
460
458
|
return Promise.reject(new Error('QueryAssist(@jetbrains/ring-ui): null exception'));
|
@@ -469,27 +467,27 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
469
467
|
return _this.handleResponse(data, afterCompletion);
|
470
468
|
}).catch(noop);
|
471
469
|
});
|
472
|
-
_defineProperty(
|
470
|
+
_defineProperty(_this, "handleCtrlSpace", function (e) {
|
473
471
|
preventDefault(e);
|
474
472
|
if (!_this.state.showPopup) {
|
475
473
|
var _this$requestData4, _this5;
|
476
474
|
(_this$requestData4 = (_this5 = _this).requestData) === null || _this$requestData4 === void 0 || _this$requestData4.call(_this5);
|
477
475
|
}
|
478
476
|
});
|
479
|
-
_defineProperty(
|
477
|
+
_defineProperty(_this, "trackPopupMouseState", function (e) {
|
480
478
|
_this.mouseIsDownOnPopup = e.type === 'mousedown';
|
481
479
|
});
|
482
|
-
_defineProperty(
|
480
|
+
_defineProperty(_this, "trackCompositionState", function (e) {
|
483
481
|
_this.isComposing = e.type !== 'compositionend';
|
484
482
|
});
|
485
|
-
_defineProperty(
|
483
|
+
_defineProperty(_this, "closePopup", function () {
|
486
484
|
if (_this.node) {
|
487
485
|
_this.setState({
|
488
486
|
showPopup: false
|
489
487
|
});
|
490
488
|
}
|
491
489
|
});
|
492
|
-
_defineProperty(
|
490
|
+
_defineProperty(_this, "clearQuery", function () {
|
493
491
|
var state = {
|
494
492
|
dirty: false,
|
495
493
|
caret: 0,
|
@@ -506,37 +504,37 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
506
504
|
loading: false
|
507
505
|
});
|
508
506
|
});
|
509
|
-
_defineProperty(
|
510
|
-
_defineProperty(
|
511
|
-
_defineProperty(
|
507
|
+
_defineProperty(_this, "input", void 0);
|
508
|
+
_defineProperty(_this, "caret", void 0);
|
509
|
+
_defineProperty(_this, "inputRef", function (node) {
|
512
510
|
if (!node) {
|
513
511
|
return;
|
514
512
|
}
|
515
513
|
_this.input = node;
|
516
514
|
_this.caret = new Caret(_this.input);
|
517
515
|
});
|
518
|
-
_defineProperty(
|
519
|
-
_defineProperty(
|
516
|
+
_defineProperty(_this, "_popup", void 0);
|
517
|
+
_defineProperty(_this, "popupRef", function (node) {
|
520
518
|
_this._popup = node;
|
521
519
|
});
|
522
|
-
_defineProperty(
|
523
|
-
_defineProperty(
|
520
|
+
_defineProperty(_this, "placeholder", void 0);
|
521
|
+
_defineProperty(_this, "placeholderRef", function (node) {
|
524
522
|
_this.placeholder = node;
|
525
523
|
});
|
526
|
-
_defineProperty(
|
527
|
-
_defineProperty(
|
524
|
+
_defineProperty(_this, "glass", void 0);
|
525
|
+
_defineProperty(_this, "glassRef", function (node) {
|
528
526
|
_this.glass = node;
|
529
527
|
});
|
530
|
-
_defineProperty(
|
531
|
-
_defineProperty(
|
528
|
+
_defineProperty(_this, "loader", void 0);
|
529
|
+
_defineProperty(_this, "loaderRef", function (node) {
|
532
530
|
_this.loader = node;
|
533
531
|
});
|
534
|
-
_defineProperty(
|
535
|
-
_defineProperty(
|
532
|
+
_defineProperty(_this, "clear", void 0);
|
533
|
+
_defineProperty(_this, "clearRef", function (node) {
|
536
534
|
_this.clear = node;
|
537
535
|
});
|
538
|
-
_defineProperty(
|
539
|
-
_defineProperty(
|
536
|
+
_defineProperty(_this, "shortcutsScope", getUID('ring-query-assist-'));
|
537
|
+
_defineProperty(_this, "shortcutsMap", {
|
540
538
|
del: noop,
|
541
539
|
enter: function enter() {
|
542
540
|
return _this.handleComplete();
|
@@ -556,7 +554,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
556
554
|
home: noop,
|
557
555
|
end: noop
|
558
556
|
});
|
559
|
-
_defineProperty(
|
557
|
+
_defineProperty(_this, "listShortcutsMap", {
|
560
558
|
home: noop,
|
561
559
|
end: noop
|
562
560
|
});
|
@@ -568,7 +566,8 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
568
566
|
};
|
569
567
|
return _this;
|
570
568
|
}
|
571
|
-
|
569
|
+
_inherits(QueryAssist, _Component);
|
570
|
+
return _createClass(QueryAssist, [{
|
572
571
|
key: "componentDidMount",
|
573
572
|
value: function componentDidMount() {
|
574
573
|
var query = this.props.query || '';
|
@@ -990,7 +989,6 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
990
989
|
return nextState;
|
991
990
|
}
|
992
991
|
}]);
|
993
|
-
return QueryAssist;
|
994
992
|
}(Component);
|
995
993
|
_defineProperty(QueryAssist, "propTypes", {
|
996
994
|
/**
|
@@ -6,13 +6,13 @@ import 'core-js/modules/web.dom-collections.for-each.js';
|
|
6
6
|
import 'react';
|
7
7
|
import '../list/list.js';
|
8
8
|
export { Q as default } from '../_helpers/query-assist__suggestions.js';
|
9
|
-
import 'core-js/modules/es.array.includes.js';
|
10
|
-
import 'core-js/modules/es.string.includes.js';
|
11
|
-
import 'core-js/modules/es.array.map.js';
|
12
9
|
import 'core-js/modules/es.array.concat.js';
|
10
|
+
import 'core-js/modules/es.array.find.js';
|
13
11
|
import 'core-js/modules/es.array.find-index.js';
|
12
|
+
import 'core-js/modules/es.array.includes.js';
|
13
|
+
import 'core-js/modules/es.array.map.js';
|
14
14
|
import 'core-js/modules/es.object.assign.js';
|
15
|
-
import 'core-js/modules/es.
|
15
|
+
import 'core-js/modules/es.string.includes.js';
|
16
16
|
import 'prop-types';
|
17
17
|
import 'classnames';
|
18
18
|
import 'react-virtualized/dist/es/List';
|
@@ -30,13 +30,13 @@ import '../global/schedule-raf.js';
|
|
30
30
|
import '../global/memoize.js';
|
31
31
|
import 'core-js/modules/es.array.iterator.js';
|
32
32
|
import 'core-js/modules/es.map.js';
|
33
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
34
33
|
import 'core-js/modules/es.weak-map.js';
|
34
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
35
35
|
import '../global/dom.js';
|
36
36
|
import 'core-js/modules/es.array.filter.js';
|
37
37
|
import 'core-js/modules/es.regexp.exec.js';
|
38
|
-
import 'core-js/modules/es.string.split.js';
|
39
38
|
import 'core-js/modules/es.set.js';
|
39
|
+
import 'core-js/modules/es.string.split.js';
|
40
40
|
import '../shortcuts/shortcuts.js';
|
41
41
|
import '../shortcuts/core.js';
|
42
42
|
import 'core-js/modules/es.array.slice.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as _inherits, b as
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, d as _objectSpread2, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.array.concat.js';
|
3
3
|
import React, { Component } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
@@ -12,19 +12,18 @@ import 'classnames';
|
|
12
12
|
* @name Radio
|
13
13
|
*/
|
14
14
|
var Radio = /*#__PURE__*/function (_Component) {
|
15
|
-
_inherits(Radio, _Component);
|
16
|
-
var _super = _createSuper(Radio);
|
17
15
|
function Radio() {
|
18
16
|
var _this;
|
19
17
|
_classCallCheck(this, Radio);
|
20
18
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
21
19
|
args[_key] = arguments[_key];
|
22
20
|
}
|
23
|
-
_this =
|
24
|
-
_defineProperty(
|
21
|
+
_this = _callSuper(this, Radio, [].concat(args));
|
22
|
+
_defineProperty(_this, "uid", getUID('ring-radio-'));
|
25
23
|
return _this;
|
26
24
|
}
|
27
|
-
|
25
|
+
_inherits(Radio, _Component);
|
26
|
+
return _createClass(Radio, [{
|
28
27
|
key: "render",
|
29
28
|
value: function render() {
|
30
29
|
return /*#__PURE__*/React.createElement(RadioContext.Provider, {
|
@@ -34,7 +33,6 @@ var Radio = /*#__PURE__*/function (_Component) {
|
|
34
33
|
}, this.props.children);
|
35
34
|
}
|
36
35
|
}]);
|
37
|
-
return Radio;
|
38
36
|
}(Component);
|
39
37
|
_defineProperty(Radio, "propTypes", {
|
40
38
|
name: PropTypes.string,
|
@@ -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, { createContext, Component, forwardRef } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
@@ -13,27 +13,26 @@ var _excluded = ["className", "children"],
|
|
13
13
|
_excluded2 = ["value", "onChange"];
|
14
14
|
var RadioContext = /*#__PURE__*/createContext({});
|
15
15
|
var Radio = /*#__PURE__*/function (_Component) {
|
16
|
-
_inherits(Radio, _Component);
|
17
|
-
var _super = _createSuper(Radio);
|
18
16
|
function Radio() {
|
19
17
|
var _this;
|
20
18
|
_classCallCheck(this, Radio);
|
21
19
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
22
20
|
args[_key] = arguments[_key];
|
23
21
|
}
|
24
|
-
_this =
|
25
|
-
_defineProperty(
|
26
|
-
_defineProperty(
|
27
|
-
_defineProperty(
|
22
|
+
_this = _callSuper(this, Radio, [].concat(args));
|
23
|
+
_defineProperty(_this, "uid", getUID('ring-radio-item-'));
|
24
|
+
_defineProperty(_this, "input", void 0);
|
25
|
+
_defineProperty(_this, "inputRef", function (el) {
|
28
26
|
_this.input = el;
|
29
27
|
});
|
30
|
-
_defineProperty(
|
31
|
-
_defineProperty(
|
28
|
+
_defineProperty(_this, "label", void 0);
|
29
|
+
_defineProperty(_this, "labelRef", function (el) {
|
32
30
|
_this.label = el;
|
33
31
|
});
|
34
32
|
return _this;
|
35
33
|
}
|
36
|
-
|
34
|
+
_inherits(Radio, _Component);
|
35
|
+
return _createClass(Radio, [{
|
37
36
|
key: "render",
|
38
37
|
value: function render() {
|
39
38
|
var _this$props = this.props,
|
@@ -58,7 +57,6 @@ var Radio = /*#__PURE__*/function (_Component) {
|
|
58
57
|
}, children));
|
59
58
|
}
|
60
59
|
}]);
|
61
|
-
return Radio;
|
62
60
|
}(Component);
|
63
61
|
_defineProperty(Radio, "propTypes", {
|
64
62
|
className: PropTypes.string,
|