@jetbrains/ring-ui-built 7.0.0-beta.2 → 7.0.0-beta.3

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.
Files changed (236) hide show
  1. package/components/_helpers/_rollupPluginBabelHelpers.js +1 -504
  2. package/components/_helpers/anchor.js +7 -5
  3. package/components/_helpers/button__classes.js +15 -13
  4. package/components/_helpers/caption.js +11 -17
  5. package/components/_helpers/card.js +92 -96
  6. package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
  7. package/components/_helpers/icon__svg.js +27 -23
  8. package/components/_helpers/input.js +150 -171
  9. package/components/_helpers/query-assist__suggestions.js +78 -93
  10. package/components/_helpers/select__filter.js +56 -67
  11. package/components/_helpers/services-link.js +23 -29
  12. package/components/_helpers/sidebar.js +91 -93
  13. package/components/_helpers/tab-link.js +8 -6
  14. package/components/_helpers/theme.js +41 -50
  15. package/components/_helpers/title.js +59 -69
  16. package/components/alert/alert.js +112 -156
  17. package/components/alert/container.js +32 -39
  18. package/components/alert-service/alert-service.js +104 -161
  19. package/components/analytics/analytics.js +12 -20
  20. package/components/analytics/analytics__custom-plugin.js +52 -68
  21. package/components/auth/auth.js +2 -27
  22. package/components/auth/auth__core.d.ts +1 -1
  23. package/components/auth/auth__core.js +742 -1428
  24. package/components/auth/background-flow.js +84 -121
  25. package/components/auth/down-notification.js +31 -69
  26. package/components/auth/iframe-flow.js +70 -123
  27. package/components/auth/request-builder.js +46 -77
  28. package/components/auth/response-parser.js +84 -112
  29. package/components/auth/storage.js +160 -318
  30. package/components/auth/token-validator.js +132 -227
  31. package/components/auth/window-flow.js +84 -121
  32. package/components/auth-dialog/auth-dialog.js +99 -150
  33. package/components/auth-dialog-service/auth-dialog-service.js +6 -26
  34. package/components/avatar/avatar-example-datauri.js +1 -1
  35. package/components/avatar/avatar.js +94 -123
  36. package/components/avatar/fallback-avatar.js +20 -34
  37. package/components/badge/badge.js +32 -38
  38. package/components/breadcrumbs/breadcrumbs.js +13 -17
  39. package/components/button/button.js +67 -80
  40. package/components/button-group/button-group.js +27 -36
  41. package/components/button-set/button-set.js +19 -27
  42. package/components/button-toolbar/button-toolbar.js +17 -25
  43. package/components/caret/caret.js +184 -211
  44. package/components/checkbox/checkbox.js +69 -86
  45. package/components/clipboard/clipboard-fallback.js +7 -7
  46. package/components/clipboard/clipboard.js +36 -128
  47. package/components/code/code.js +83 -151
  48. package/components/collapse/collapse-content.js +42 -60
  49. package/components/collapse/collapse-context.js +2 -2
  50. package/components/collapse/collapse-control.js +12 -12
  51. package/components/collapse/collapse.js +12 -17
  52. package/components/collapse/consts.js +4 -4
  53. package/components/collapse/utils.js +1 -3
  54. package/components/confirm/confirm.js +57 -87
  55. package/components/confirm-service/confirm-service.js +23 -44
  56. package/components/content-layout/content-layout.js +41 -56
  57. package/components/content-layout/sidebar.js +1 -1
  58. package/components/contenteditable/contenteditable.js +38 -46
  59. package/components/control-help/control-help.js +5 -3
  60. package/components/control-label/control-label.js +9 -8
  61. package/components/data-list/data-list.js +113 -156
  62. package/components/data-list/data-list.mock.js +3 -5
  63. package/components/data-list/item.js +120 -140
  64. package/components/data-list/selection.js +77 -135
  65. package/components/data-list/title.js +2 -10
  66. package/components/date-picker/consts.js +16 -22
  67. package/components/date-picker/date-input.js +99 -124
  68. package/components/date-picker/date-picker.js +140 -184
  69. package/components/date-picker/date-popup.js +280 -327
  70. package/components/date-picker/day.js +71 -94
  71. package/components/date-picker/month-names.js +41 -59
  72. package/components/date-picker/month-slider.js +42 -61
  73. package/components/date-picker/month.js +17 -24
  74. package/components/date-picker/months.js +44 -49
  75. package/components/date-picker/weekdays.js +12 -21
  76. package/components/date-picker/years.js +77 -98
  77. package/components/dialog/dialog.js +151 -187
  78. package/components/dialog/dialog__body-scroll-preventer.js +0 -3
  79. package/components/dropdown/anchor.js +0 -6
  80. package/components/dropdown/dropdown.js +134 -154
  81. package/components/dropdown-menu/dropdown-menu.js +59 -87
  82. package/components/editable-heading/editable-heading.js +69 -116
  83. package/components/error-bubble/error-bubble.js +29 -54
  84. package/components/error-message/error-message.js +34 -49
  85. package/components/footer/footer.js +27 -28
  86. package/components/global/compose.js +1 -8
  87. package/components/global/composeRefs.d.ts +0 -3
  88. package/components/global/composeRefs.js +8 -15
  89. package/components/global/controls-height.js +2 -2
  90. package/components/global/create-stateful-context.js +14 -13
  91. package/components/global/data-tests.js +7 -12
  92. package/components/global/dom.js +49 -82
  93. package/components/global/focus-sensor-hoc.js +99 -106
  94. package/components/global/fuzzy-highlight.js +23 -34
  95. package/components/global/get-event-key.js +8 -8
  96. package/components/global/get-uid.js +3 -7
  97. package/components/global/inject-styles.js +7 -14
  98. package/components/global/listeners.js +28 -47
  99. package/components/global/memoize.js +6 -10
  100. package/components/global/normalize-indent.js +19 -46
  101. package/components/global/promise-with-timeout.js +6 -8
  102. package/components/global/prop-types.js +3 -5
  103. package/components/global/react-dom-renderer.js +29 -40
  104. package/components/global/rerender-hoc.js +16 -32
  105. package/components/global/schedule-raf.js +4 -4
  106. package/components/global/sniffer.js +1 -1
  107. package/components/global/theme.js +1 -18
  108. package/components/global/trivial-template-tag.js +4 -9
  109. package/components/global/typescript-utils.js +2 -6
  110. package/components/global/url.js +20 -23
  111. package/components/global/use-event-callback.js +7 -4
  112. package/components/grid/col.js +27 -39
  113. package/components/grid/grid.js +18 -27
  114. package/components/grid/row.js +23 -30
  115. package/components/group/group.js +16 -22
  116. package/components/header/header-icon.js +19 -31
  117. package/components/header/header.d.ts +0 -1
  118. package/components/header/header.js +30 -64
  119. package/components/header/links.js +6 -3
  120. package/components/header/logo.js +15 -26
  121. package/components/header/profile.js +124 -150
  122. package/components/header/services-link.js +1 -3
  123. package/components/header/services.js +64 -97
  124. package/components/header/smart-profile.js +101 -178
  125. package/components/header/smart-services.js +55 -90
  126. package/components/header/tray.js +21 -30
  127. package/components/heading/heading.js +21 -20
  128. package/components/http/http.js +162 -319
  129. package/components/http/http.mock.js +50 -98
  130. package/components/hub-source/hub-source.js +77 -182
  131. package/components/hub-source/hub-source__user.js +9 -37
  132. package/components/hub-source/hub-source__users-groups.js +34 -60
  133. package/components/i18n/i18n-context.js +7 -8
  134. package/components/i18n/i18n.js +3 -6
  135. package/components/icon/icon.js +60 -74
  136. package/components/icon/icon__svg.js +0 -5
  137. package/components/icon/index.js +0 -5
  138. package/components/input/input.js +1 -11
  139. package/components/island/adaptive-island-hoc.js +29 -37
  140. package/components/island/content.js +100 -110
  141. package/components/island/header.js +56 -66
  142. package/components/island/island.js +25 -33
  143. package/components/island-legacy/content-legacy.js +16 -22
  144. package/components/island-legacy/header-legacy.js +19 -25
  145. package/components/island-legacy/island-legacy.js +16 -22
  146. package/components/link/clickableLink.js +33 -42
  147. package/components/link/link.js +47 -55
  148. package/components/list/consts.js +2 -2
  149. package/components/list/list.js +399 -486
  150. package/components/list/list__custom.js +51 -61
  151. package/components/list/list__hint.js +9 -17
  152. package/components/list/list__item.js +147 -178
  153. package/components/list/list__link.js +38 -47
  154. package/components/list/list__separator.js +15 -24
  155. package/components/list/list__title.js +25 -34
  156. package/components/list/list__users-groups-source.js +55 -121
  157. package/components/loader/loader.js +38 -60
  158. package/components/loader/loader__core.js +123 -184
  159. package/components/loader-inline/loader-inline.js +24 -32
  160. package/components/loader-screen/loader-screen.js +24 -40
  161. package/components/login-dialog/login-dialog.js +81 -121
  162. package/components/login-dialog/service.js +6 -29
  163. package/components/markdown/markdown.js +16 -24
  164. package/components/message/message.js +170 -201
  165. package/components/old-browsers-message/old-browsers-message.js +11 -14
  166. package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
  167. package/components/old-browsers-message/white-list.js +8 -13
  168. package/components/pager/pager.js +212 -257
  169. package/components/panel/panel.js +16 -22
  170. package/components/permissions/permissions.js +118 -161
  171. package/components/permissions/permissions__cache.js +191 -218
  172. package/components/popup/popup.consts.js +1 -1
  173. package/components/popup/popup.js +237 -288
  174. package/components/popup/popup.target.js +9 -7
  175. package/components/popup/position.js +94 -101
  176. package/components/popup-menu/popup-menu.js +33 -67
  177. package/components/progress-bar/progress-bar.js +57 -68
  178. package/components/query-assist/query-assist.js +583 -652
  179. package/components/query-assist/query-assist__suggestions.js +2 -26
  180. package/components/radio/radio.js +15 -27
  181. package/components/radio/radio__item.js +52 -62
  182. package/components/scrollable-section/scrollable-section.js +22 -32
  183. package/components/select/select.js +693 -793
  184. package/components/select/select__filter.js +1 -26
  185. package/components/select/select__popup.js +316 -413
  186. package/components/shortcuts/core.js +147 -195
  187. package/components/shortcuts/shortcut-title.js +6 -10
  188. package/components/shortcuts/shortcuts-hoc.js +23 -41
  189. package/components/shortcuts/shortcuts.js +41 -64
  190. package/components/slider/slider.js +93 -112
  191. package/components/slider/slider.utils.js +16 -23
  192. package/components/storage/storage.js +3 -27
  193. package/components/storage/storage__fallback.js +137 -210
  194. package/components/storage/storage__local.js +89 -147
  195. package/components/style.css +1 -1
  196. package/components/tab-trap/tab-trap.js +35 -53
  197. package/components/table/cell.js +11 -21
  198. package/components/table/disable-hover-hoc.js +27 -42
  199. package/components/table/header-cell.js +59 -75
  200. package/components/table/header.js +89 -110
  201. package/components/table/multitable.js +83 -89
  202. package/components/table/row-with-focus-sensor.js +25 -57
  203. package/components/table/row.js +169 -200
  204. package/components/table/selection-adapter.js +2 -2
  205. package/components/table/selection-shortcuts-hoc.js +108 -113
  206. package/components/table/selection.js +150 -217
  207. package/components/table/simple-table.js +19 -55
  208. package/components/table/smart-table.js +42 -76
  209. package/components/table/table.js +267 -327
  210. package/components/tabs/collapsible-more.js +47 -73
  211. package/components/tabs/collapsible-tab.js +32 -36
  212. package/components/tabs/collapsible-tabs.js +89 -148
  213. package/components/tabs/custom-item.js +4 -2
  214. package/components/tabs/dumb-tabs.js +60 -92
  215. package/components/tabs/smart-tabs.js +29 -61
  216. package/components/tabs/tab-link.js +1 -3
  217. package/components/tabs/tab.js +15 -24
  218. package/components/tabs/tabs.js +1 -26
  219. package/components/tag/tag.d.ts +0 -2
  220. package/components/tag/tag.js +120 -162
  221. package/components/tags-input/tags-input.js +222 -304
  222. package/components/tags-list/tags-list.js +45 -61
  223. package/components/text/text.js +28 -37
  224. package/components/toggle/toggle.js +51 -61
  225. package/components/tooltip/tooltip.js +109 -141
  226. package/components/user-agreement/service.js +259 -400
  227. package/components/user-agreement/user-agreement.js +80 -108
  228. package/components/user-card/card.js +1 -25
  229. package/components/user-card/smart-user-card-tooltip.js +52 -103
  230. package/components/user-card/tooltip.js +35 -65
  231. package/components/user-card/user-card.js +1 -25
  232. package/package.json +1 -1
  233. package/components/global/react-render-adapter.d.ts +0 -1
  234. package/components/global/react-render-adapter.js +0 -6
  235. package/components/header/tray-icon.d.ts +0 -1
  236. package/components/header/tray-icon.js +0 -26
@@ -1,10 +1,6 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createClass, e as _classCallCheck, f as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import 'core-js/modules/es.array.concat.js';
3
- import 'core-js/modules/es.array.filter.js';
4
- import 'core-js/modules/es.array.index-of.js';
1
+ import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
5
2
  import 'core-js/modules/es.array.reduce.js';
6
- import 'core-js/modules/es.array.slice.js';
7
- import 'core-js/modules/es.object.to-string.js';
3
+ import 'core-js/modules/web.dom-collections.iterator.js';
8
4
  import { PureComponent } from 'react';
9
5
  import classNames from 'classnames';
10
6
  import searchIcon from '@jetbrains/icons/search';
@@ -36,29 +32,12 @@ import '../icon/icon__constants.js';
36
32
  import '../_helpers/icon__svg.js';
37
33
  import 'core-js/modules/es.regexp.exec.js';
38
34
  import 'core-js/modules/es.string.replace.js';
39
- import 'core-js/modules/es.string.starts-with.js';
40
- import 'core-js/modules/es.array.iterator.js';
41
- import 'core-js/modules/es.map.js';
42
- import 'core-js/modules/es.weak-map.js';
43
- import 'core-js/modules/web.dom-collections.iterator.js';
44
- import 'core-js/modules/es.object.entries.js';
45
- import 'core-js/modules/es.regexp.to-string.js';
46
- import 'core-js/modules/web.dom-collections.for-each.js';
47
35
  import 'react-dom';
48
36
  import '../global/schedule-raf.js';
49
37
  import '../global/data-tests.js';
50
38
  import '../tab-trap/tab-trap.js';
51
- import 'core-js/modules/es.array.includes.js';
52
- import 'core-js/modules/es.array.map.js';
53
39
  import 'core-js/modules/es.array.sort.js';
54
- import 'core-js/modules/es.string.includes.js';
55
- import 'core-js/modules/es.object.assign.js';
56
- import 'core-js/modules/es.set.js';
57
- import 'core-js/modules/es.string.split.js';
58
- import 'core-js/modules/es.symbol.js';
59
40
  import 'core-js/modules/es.symbol.description.js';
60
- import 'core-js/modules/es.array.find.js';
61
- import 'core-js/modules/es.array.find-index.js';
62
41
  import 'react-virtualized/dist/es/List';
63
42
  import 'react-virtualized/dist/es/AutoSizer';
64
43
  import 'react-virtualized/dist/es/WindowScroller';
@@ -72,9 +51,7 @@ import '../_helpers/list.js';
72
51
  import '../list/list__item.js';
73
52
  import '../avatar/avatar.js';
74
53
  import '../global/url.js';
75
- import 'core-js/modules/es.string.match.js';
76
54
  import '../avatar/fallback-avatar.js';
77
- import 'core-js/modules/es.array.from.js';
78
55
  import '../checkbox/checkbox.js';
79
56
  import '@jetbrains/icons/checkmark-12px';
80
57
  import '@jetbrains/icons/remove-12px';
@@ -86,7 +63,6 @@ import '../list/list__separator.js';
86
63
  import '../list/list__hint.js';
87
64
  import '../list/consts.js';
88
65
  import '../shortcuts/core.js';
89
- import 'core-js/modules/es.array.splice.js';
90
66
  import 'combokeys';
91
67
  import '../global/sniffer.js';
92
68
  import 'sniffr';
@@ -95,55 +71,49 @@ import '@jetbrains/icons/close-12px';
95
71
  import '@jetbrains/icons/chevron-down';
96
72
  import '../_helpers/button__classes.js';
97
73
  import '../_helpers/input.js';
98
- import 'core-js/modules/es.object.values.js';
99
74
  import '../i18n/i18n-context.js';
100
75
  import '../i18n/i18n.js';
101
76
  import '../control-label/control-label.js';
102
77
 
103
- var FILTER_HEIGHT = 35;
104
- var TOOLBAR_HEIGHT = 49;
78
+ const FILTER_HEIGHT = 35;
79
+ const TOOLBAR_HEIGHT = 49;
105
80
  function noop() {}
106
- var FilterWithShortcuts = shortcutsHOC(SelectFilter);
107
- var SelectPopup = /*#__PURE__*/function (_PureComponent) {
108
- function SelectPopup() {
109
- var _this;
110
- _classCallCheck(this, SelectPopup);
111
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
112
- args[_key] = arguments[_key];
113
- }
114
- _this = _callSuper(this, SelectPopup, [].concat(args));
115
- _defineProperty(_this, "state", {
81
+ const FilterWithShortcuts = shortcutsHOC(SelectFilter);
82
+ class SelectPopup extends PureComponent {
83
+ constructor() {
84
+ super(...arguments);
85
+ _defineProperty(this, "state", {
116
86
  popupFilterShortcutsOptions: {
117
87
  modal: true,
118
88
  disabled: true
119
89
  },
120
90
  tagsActiveIndex: null
121
91
  });
122
- _defineProperty(_this, "isClickingPopup", false);
92
+ _defineProperty(this, "isClickingPopup", false);
123
93
  // This flag is set to true while an item in the popup is being clicked
124
- _defineProperty(_this, "filter", void 0);
125
- _defineProperty(_this, "caret", void 0);
126
- _defineProperty(_this, "onFilterFocus", function () {
127
- _this._togglePopupFilterShortcuts(false);
128
- _this.setState({
94
+ _defineProperty(this, "filter", void 0);
95
+ _defineProperty(this, "caret", void 0);
96
+ _defineProperty(this, "onFilterFocus", () => {
97
+ this._togglePopupFilterShortcuts(false);
98
+ this.setState({
129
99
  tagsActiveIndex: null
130
100
  });
131
101
  });
132
- _defineProperty(_this, "popupFilterOnBlur", function () {
133
- if (_this.state.tagsActiveIndex === null) {
134
- _this._togglePopupFilterShortcuts(true);
102
+ _defineProperty(this, "popupFilterOnBlur", () => {
103
+ if (this.state.tagsActiveIndex === null) {
104
+ this._togglePopupFilterShortcuts(true);
135
105
  }
136
106
  });
137
- _defineProperty(_this, "mouseDownHandler", function () {
138
- _this.isClickingPopup = true;
107
+ _defineProperty(this, "mouseDownHandler", () => {
108
+ this.isClickingPopup = true;
139
109
  });
140
- _defineProperty(_this, "mouseUpHandler", function () {
141
- _this.isClickingPopup = false;
110
+ _defineProperty(this, "mouseUpHandler", () => {
111
+ this.isClickingPopup = false;
142
112
  });
143
- _defineProperty(_this, "popup", void 0);
144
- _defineProperty(_this, "onListSelect", function (selected, event, opts) {
145
- var getSelectItemEvent = function getSelectItemEvent() {
146
- var customEvent = document.createEvent('Event');
113
+ _defineProperty(this, "popup", void 0);
114
+ _defineProperty(this, "onListSelect", (selected, event, opts) => {
115
+ const getSelectItemEvent = () => {
116
+ const customEvent = document.createEvent('Event');
147
117
  customEvent.initEvent('select', true, false);
148
118
  if (event && 'persist' in event) {
149
119
  event.persist();
@@ -151,55 +121,45 @@ var SelectPopup = /*#__PURE__*/function (_PureComponent) {
151
121
  customEvent.originalEvent = event;
152
122
  return customEvent;
153
123
  };
154
- _this.props.onSelect(selected, getSelectItemEvent(), opts);
124
+ this.props.onSelect(selected, getSelectItemEvent(), opts);
155
125
  });
156
- _defineProperty(_this, "tabPress", function (event) {
157
- _this.props.onCloseAttempt(event, true);
126
+ _defineProperty(this, "tabPress", event => {
127
+ this.props.onCloseAttempt(event, true);
158
128
  });
159
- _defineProperty(_this, "onClickHandler", function () {
129
+ _defineProperty(this, "onClickHandler", () => {
160
130
  var _this$filter;
161
- return (_this$filter = _this.filter) === null || _this$filter === void 0 ? void 0 : _this$filter.focus();
131
+ return (_this$filter = this.filter) === null || _this$filter === void 0 ? void 0 : _this$filter.focus();
162
132
  });
163
- _defineProperty(_this, "handleRemoveTag", memoize(function (tag) {
164
- return function (event) {
165
- return _this.removeTag(tag, event);
166
- };
167
- }));
168
- _defineProperty(_this, "handleTagClick", memoize(function (tag) {
169
- return function () {
170
- if (Array.isArray(_this.props.selected)) {
171
- _this.setState({
172
- tagsActiveIndex: _this.props.selected.indexOf(tag)
173
- });
174
- }
175
- };
133
+ _defineProperty(this, "handleRemoveTag", memoize(tag => event => this.removeTag(tag, event)));
134
+ _defineProperty(this, "handleTagClick", memoize(tag => () => {
135
+ if (Array.isArray(this.props.selected)) {
136
+ this.setState({
137
+ tagsActiveIndex: this.props.selected.indexOf(tag)
138
+ });
139
+ }
176
140
  }));
177
- _defineProperty(_this, "handleListResize", function () {
178
- _this.forceUpdate();
141
+ _defineProperty(this, "handleListResize", () => {
142
+ this.forceUpdate();
179
143
  });
180
- _defineProperty(_this, "handleSelectAll", function () {
181
- if (Array.isArray(_this.props.selected)) {
182
- _this.props.onSelectAll(_this.props.data.filter(function (item) {
183
- return !item.disabled;
184
- }).length !== _this.props.selected.length);
144
+ _defineProperty(this, "handleSelectAll", () => {
145
+ if (Array.isArray(this.props.selected)) {
146
+ this.props.onSelectAll(this.props.data.filter(item => !item.disabled).length !== this.props.selected.length);
185
147
  }
186
148
  });
187
- _defineProperty(_this, "getSelectAll", function () {
149
+ _defineProperty(this, "getSelectAll", () => {
188
150
  var _multiple$renderSelec;
189
- var multiple = _this.props.multiple;
190
- var activeFilters = _this.props.data.filter(function (item) {
191
- return !item.disabled;
192
- });
193
- return Array.isArray(_this.props.selected) && /*#__PURE__*/jsxs("div", {
151
+ const multiple = this.props.multiple;
152
+ const activeFilters = this.props.data.filter(item => !item.disabled);
153
+ return Array.isArray(this.props.selected) && /*#__PURE__*/jsxs("div", {
194
154
  className: modules_b607bec2.selectAll,
195
155
  children: [activeFilters.length === 0 ? /*#__PURE__*/jsx("span", {}) : /*#__PURE__*/jsx(Button, {
196
156
  text: true,
197
157
  inline: true,
198
- onClick: _this.handleSelectAll,
199
- children: activeFilters.length !== _this.props.selected.length ? multiple.selectAllLabel || 'Select all' : multiple.deselectAllLabel || 'Deselect all'
200
- }), ((_multiple$renderSelec = multiple.renderSelectedItemsDescription) === null || _multiple$renderSelec === void 0 ? void 0 : _multiple$renderSelec.call(multiple, _this.props.selected, activeFilters.length)) || /*#__PURE__*/jsx(Text, {
158
+ onClick: this.handleSelectAll,
159
+ children: activeFilters.length !== this.props.selected.length ? multiple.selectAllLabel || 'Select all' : multiple.deselectAllLabel || 'Deselect all'
160
+ }), ((_multiple$renderSelec = multiple.renderSelectedItemsDescription) === null || _multiple$renderSelec === void 0 ? void 0 : _multiple$renderSelec.call(multiple, this.props.selected, activeFilters.length)) || /*#__PURE__*/jsx(Text, {
201
161
  info: true,
202
- children: "".concat(_this.props.selected.length, " selected")
162
+ children: "".concat(this.props.selected.length, " selected")
203
163
  })]
204
164
  });
205
165
  });
@@ -207,369 +167,312 @@ var SelectPopup = /*#__PURE__*/function (_PureComponent) {
207
167
  // inside `render` function which can be called N times
208
168
  // and should be fast as possible.
209
169
  // Cache invalidates each time hidden or userDefinedMaxHeight changes
210
- _defineProperty(_this, "_adjustListMaxHeight", memoizeOne(function (hidden, userDefinedMaxHeight, ringPopupTarget) {
170
+ _defineProperty(this, "_adjustListMaxHeight", memoizeOne((hidden, userDefinedMaxHeight, ringPopupTarget) => {
211
171
  if (hidden) {
212
172
  return userDefinedMaxHeight;
213
173
  }
214
174
  // Calculate list's maximum height that can't
215
175
  // get beyond the screen
216
176
  // @see RG-1838, JT-48358
217
- var minMaxHeight = 100;
218
- var directions = _this.props.directions || DEFAULT_DIRECTIONS;
177
+ const minMaxHeight = 100;
178
+ const directions = this.props.directions || DEFAULT_DIRECTIONS;
219
179
  // Note:
220
180
  // Create a method which'll be called only when the popup opens and before
221
181
  // render the list would be a better way
222
- var anchorNode = _this.props.anchorElement;
223
- var containerNode = getPopupContainer(ringPopupTarget) || document.documentElement;
224
- return anchorNode != null ? Math.min(directions.reduce(function (maxHeight, direction) {
182
+ const anchorNode = this.props.anchorElement;
183
+ const containerNode = getPopupContainer(ringPopupTarget) || document.documentElement;
184
+ return anchorNode != null ? Math.min(directions.reduce((maxHeight, direction) => {
225
185
  var _maxHeightForDirectio;
226
186
  return Math.max(maxHeight, (_maxHeightForDirectio = maxHeightForDirection(direction, anchorNode, getStyles(containerNode).position !== 'static' ? containerNode : null)) !== null && _maxHeightForDirectio !== void 0 ? _maxHeightForDirectio : 0);
227
187
  }, minMaxHeight), userDefinedMaxHeight) : userDefinedMaxHeight;
228
188
  }));
229
- _defineProperty(_this, "popupRef", function (el) {
230
- _this.popup = el;
189
+ _defineProperty(this, "popupRef", el => {
190
+ this.popup = el;
231
191
  });
232
- _defineProperty(_this, "list", void 0);
233
- _defineProperty(_this, "listRef", function (el) {
234
- _this.list = el;
192
+ _defineProperty(this, "list", void 0);
193
+ _defineProperty(this, "listRef", el => {
194
+ this.list = el;
235
195
  });
236
- _defineProperty(_this, "filterRef", function (el) {
237
- _this.filter = el;
238
- _this.caret = el && new Caret(el);
196
+ _defineProperty(this, "filterRef", el => {
197
+ this.filter = el;
198
+ this.caret = el && new Caret(el);
239
199
  });
240
- _defineProperty(_this, "composedFilterRef", createComposedRef());
241
- _defineProperty(_this, "shortcutsScope", getUID('select-popup-'));
242
- _defineProperty(_this, "shortcutsMap", {
243
- tab: _this.tabPress
200
+ _defineProperty(this, "composedFilterRef", createComposedRef());
201
+ _defineProperty(this, "shortcutsScope", getUID('select-popup-'));
202
+ _defineProperty(this, "shortcutsMap", {
203
+ tab: this.tabPress
244
204
  });
245
- _defineProperty(_this, "popupFilterShortcutsMap", {
246
- up: function up(event) {
247
- return _this.list && _this.list.upHandler(event);
248
- },
249
- down: function down(event) {
250
- return _this.list && _this.list.downHandler(event);
251
- },
252
- home: function home(event) {
253
- return _this.list && _this.list.homeHandler(event);
254
- },
255
- end: function end(event) {
256
- return _this.list && _this.list.endHandler(event);
257
- },
258
- enter: function enter(event) {
259
- return _this.list ? _this.list.enterHandler(event) : _this.props.onEmptyPopupEnter(event);
260
- },
261
- esc: function esc(event) {
262
- return _this.props.onCloseAttempt(event, true);
263
- },
264
- tab: function tab(event) {
265
- return _this.tabPress(event);
266
- },
267
- backspace: function backspace(event) {
268
- return _this.handleBackspace(event);
269
- },
270
- del: function del() {
271
- return _this.removeSelectedTag();
272
- },
273
- left: function left(event) {
274
- return _this.handleNavigation(event, true);
275
- },
276
- right: function right(event) {
277
- return _this.handleNavigation(event);
278
- }
205
+ _defineProperty(this, "popupFilterShortcutsMap", {
206
+ up: event => this.list && this.list.upHandler(event),
207
+ down: event => this.list && this.list.downHandler(event),
208
+ home: event => this.list && this.list.homeHandler(event),
209
+ end: event => this.list && this.list.endHandler(event),
210
+ enter: event => this.list ? this.list.enterHandler(event) : this.props.onEmptyPopupEnter(event),
211
+ esc: event => this.props.onCloseAttempt(event, true),
212
+ tab: event => this.tabPress(event),
213
+ backspace: event => this.handleBackspace(event),
214
+ del: () => this.removeSelectedTag(),
215
+ left: event => this.handleNavigation(event, true),
216
+ right: event => this.handleNavigation(event)
217
+ });
218
+ }
219
+ componentDidMount() {
220
+ window.document.addEventListener('mouseup', this.mouseUpHandler);
221
+ }
222
+ componentWillUnmount() {
223
+ window.document.removeEventListener('mouseup', this.mouseUpHandler);
224
+ }
225
+ focusFilter() {
226
+ setTimeout(() => {
227
+ var _this$filter2;
228
+ return (_this$filter2 = this.filter) === null || _this$filter2 === void 0 ? void 0 : _this$filter2.focus();
279
229
  });
280
- return _this;
281
230
  }
282
- _inherits(SelectPopup, _PureComponent);
283
- return _createClass(SelectPopup, [{
284
- key: "componentDidMount",
285
- value: function componentDidMount() {
286
- window.document.addEventListener('mouseup', this.mouseUpHandler);
231
+ isEventTargetFilter(event) {
232
+ return event.target instanceof Element && event.target.matches('input,textarea');
233
+ }
234
+ handleNavigation(event, navigateLeft) {
235
+ if (this.isEventTargetFilter(event) && this.caret != null && Number(this.caret.getPosition()) > 0 || !Array.isArray(this.props.selected)) {
236
+ return;
287
237
  }
288
- }, {
289
- key: "componentWillUnmount",
290
- value: function componentWillUnmount() {
291
- window.document.removeEventListener('mouseup', this.mouseUpHandler);
238
+ let newIndex = null;
239
+ if (navigateLeft) {
240
+ newIndex = this.state.tagsActiveIndex === null ? this.props.selected.length - 1 : this.state.tagsActiveIndex - 1;
241
+ } else if (this.state.tagsActiveIndex !== null) {
242
+ newIndex = this.state.tagsActiveIndex + 1;
292
243
  }
293
- }, {
294
- key: "focusFilter",
295
- value: function focusFilter() {
296
- var _this2 = this;
297
- setTimeout(function () {
298
- var _this2$filter;
299
- return (_this2$filter = _this2.filter) === null || _this2$filter === void 0 ? void 0 : _this2$filter.focus();
300
- });
244
+ if (newIndex !== null && (newIndex >= this.props.selected.length || newIndex < 0)) {
245
+ newIndex = null;
246
+ this.focusFilter();
301
247
  }
302
- }, {
303
- key: "isEventTargetFilter",
304
- value: function isEventTargetFilter(event) {
305
- return event.target instanceof Element && event.target.matches('input,textarea');
248
+ this.setState({
249
+ tagsActiveIndex: newIndex
250
+ });
251
+ }
252
+ removeTag(tag, event) {
253
+ if (!Array.isArray(this.props.selected)) {
254
+ return;
306
255
  }
307
- }, {
308
- key: "handleNavigation",
309
- value: function handleNavigation(event, navigateLeft) {
310
- if (this.isEventTargetFilter(event) && this.caret != null && Number(this.caret.getPosition()) > 0 || !Array.isArray(this.props.selected)) {
311
- return;
312
- }
313
- var newIndex = null;
314
- if (navigateLeft) {
315
- newIndex = this.state.tagsActiveIndex === null ? this.props.selected.length - 1 : this.state.tagsActiveIndex - 1;
316
- } else if (this.state.tagsActiveIndex !== null) {
317
- newIndex = this.state.tagsActiveIndex + 1;
318
- }
319
- if (newIndex !== null && (newIndex >= this.props.selected.length || newIndex < 0)) {
320
- newIndex = null;
321
- this.focusFilter();
322
- }
256
+ const _tag = tag || this.props.selected.slice(0)[this.props.selected.length - 1];
257
+ if (_tag) {
258
+ this.onListSelect(_tag, event, {
259
+ tryKeepOpen: true
260
+ });
323
261
  this.setState({
324
- tagsActiveIndex: newIndex
262
+ tagsActiveIndex: null
325
263
  });
264
+ this.focusFilter();
326
265
  }
327
- }, {
328
- key: "removeTag",
329
- value: function removeTag(tag, event) {
330
- if (!Array.isArray(this.props.selected)) {
331
- return;
332
- }
333
- var _tag = tag || this.props.selected.slice(0)[this.props.selected.length - 1];
334
- if (_tag) {
335
- this.onListSelect(_tag, event, {
336
- tryKeepOpen: true
337
- });
338
- this.setState({
339
- tagsActiveIndex: null
340
- });
341
- this.focusFilter();
342
- }
343
- }
344
- }, {
345
- key: "removeSelectedTag",
346
- value: function removeSelectedTag() {
347
- if (Array.isArray(this.props.selected) && this.state.tagsActiveIndex != null) {
348
- this.removeTag(this.props.selected[this.state.tagsActiveIndex]);
349
- return false;
350
- }
351
- return true;
266
+ }
267
+ removeSelectedTag() {
268
+ if (Array.isArray(this.props.selected) && this.state.tagsActiveIndex != null) {
269
+ this.removeTag(this.props.selected[this.state.tagsActiveIndex]);
270
+ return false;
352
271
  }
353
- }, {
354
- key: "handleBackspace",
355
- value: function handleBackspace(event) {
356
- if (!this.props.tags) {
357
- return true;
358
- }
359
- if (!this.isEventTargetFilter(event)) {
360
- this.removeSelectedTag();
361
- return false;
362
- }
363
- if ((event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) && !event.target.value) {
364
- this.removeTag();
365
- return false;
366
- }
272
+ return true;
273
+ }
274
+ handleBackspace(event) {
275
+ if (!this.props.tags) {
367
276
  return true;
368
277
  }
369
- }, {
370
- key: "_togglePopupFilterShortcuts",
371
- value: function _togglePopupFilterShortcuts(shortcutsDisabled) {
372
- this.setState({
373
- popupFilterShortcutsOptions: {
374
- modal: true,
375
- disabled: shortcutsDisabled
376
- }
377
- });
278
+ if (!this.isEventTargetFilter(event)) {
279
+ this.removeSelectedTag();
280
+ return false;
378
281
  }
379
- }, {
380
- key: "isVisible",
381
- value: function isVisible() {
382
- return this.popup && this.popup.isVisible();
282
+ if ((event.target instanceof HTMLInputElement || event.target instanceof HTMLTextAreaElement) && !event.target.value) {
283
+ this.removeTag();
284
+ return false;
383
285
  }
384
- }, {
385
- key: "getFilter",
386
- value: function getFilter() {
387
- if (this.props.filter || this.props.tags) {
388
- var _this$props$filterIco;
389
- return /*#__PURE__*/jsxs("div", {
390
- className: modules_b607bec2.filterWrapper,
391
- "data-test": "ring-select-popup-filter",
392
- children: [!this.props.tags && /*#__PURE__*/jsx(Icon, {
393
- glyph: (_this$props$filterIco = this.props.filterIcon) !== null && _this$props$filterIco !== void 0 ? _this$props$filterIco : searchIcon,
394
- className: modules_b607bec2.filterIcon,
395
- "data-test-custom": "ring-select-popup-filter-icon"
396
- }), /*#__PURE__*/jsx(FilterWithShortcuts, {
397
- rgShortcutsOptions: this.state.popupFilterShortcutsOptions,
398
- rgShortcutsMap: this.popupFilterShortcutsMap,
399
- value: this.props.filterValue,
400
- inputRef: this.composedFilterRef(this.filterRef, this.props.filterRef),
401
- onBlur: this.popupFilterOnBlur,
402
- onFocus: this.onFilterFocus,
403
- className: "ring-js-shortcuts",
404
- inputClassName: classNames({
405
- [modules_b607bec2.filterWithTagsInput]: this.props.tags
406
- }),
407
- placeholder: typeof this.props.filter === 'object' ? this.props.filter.placeholder : undefined,
408
- height: this.props.tags ? ControlsHeight.S : ControlsHeight.L,
409
- onChange: this.props.onFilter,
410
- onClick: this.onClickHandler,
411
- onClear: this.props.tags ? undefined : this.props.onClear,
412
- "data-test-custom": "ring-select-popup-filter-input",
413
- listId: this.props.listId,
414
- enableShortcuts: Object.keys(this.popupFilterShortcutsMap)
415
- })]
416
- });
286
+ return true;
287
+ }
288
+ _togglePopupFilterShortcuts(shortcutsDisabled) {
289
+ this.setState({
290
+ popupFilterShortcutsOptions: {
291
+ modal: true,
292
+ disabled: shortcutsDisabled
417
293
  }
418
- return null;
294
+ });
295
+ }
296
+ isVisible() {
297
+ return this.popup && this.popup.isVisible();
298
+ }
299
+ getFilter() {
300
+ if (this.props.filter || this.props.tags) {
301
+ var _this$props$filterIco;
302
+ return /*#__PURE__*/jsxs("div", {
303
+ className: modules_b607bec2.filterWrapper,
304
+ "data-test": "ring-select-popup-filter",
305
+ children: [!this.props.tags && /*#__PURE__*/jsx(Icon, {
306
+ glyph: (_this$props$filterIco = this.props.filterIcon) !== null && _this$props$filterIco !== void 0 ? _this$props$filterIco : searchIcon,
307
+ className: modules_b607bec2.filterIcon,
308
+ "data-test-custom": "ring-select-popup-filter-icon"
309
+ }), /*#__PURE__*/jsx(FilterWithShortcuts, {
310
+ rgShortcutsOptions: this.state.popupFilterShortcutsOptions,
311
+ rgShortcutsMap: this.popupFilterShortcutsMap,
312
+ value: this.props.filterValue,
313
+ inputRef: this.composedFilterRef(this.filterRef, this.props.filterRef),
314
+ onBlur: this.popupFilterOnBlur,
315
+ onFocus: this.onFilterFocus,
316
+ className: "ring-js-shortcuts",
317
+ inputClassName: classNames({
318
+ [modules_b607bec2.filterWithTagsInput]: this.props.tags
319
+ }),
320
+ placeholder: typeof this.props.filter === 'object' ? this.props.filter.placeholder : undefined,
321
+ height: this.props.tags ? ControlsHeight.S : ControlsHeight.L,
322
+ onChange: this.props.onFilter,
323
+ onClick: this.onClickHandler,
324
+ onClear: this.props.tags ? undefined : this.props.onClear,
325
+ "data-test-custom": "ring-select-popup-filter-input",
326
+ listId: this.props.listId,
327
+ enableShortcuts: Object.keys(this.popupFilterShortcutsMap)
328
+ })]
329
+ });
419
330
  }
420
- }, {
421
- key: "getCustomTag",
422
- value: function getCustomTag(tags) {
423
- if (tags !== null && typeof tags !== 'boolean') {
424
- return tags.customTagComponent;
425
- }
426
- return undefined;
331
+ return null;
332
+ }
333
+ getCustomTag(tags) {
334
+ if (tags !== null && typeof tags !== 'boolean') {
335
+ return tags.customTagComponent;
427
336
  }
428
- }, {
429
- key: "getTags",
430
- value: function getTags() {
431
- return Array.isArray(this.props.selected) && /*#__PURE__*/jsx("div", {
432
- children: /*#__PURE__*/jsx(TagsList, {
433
- tags: this.props.selected,
434
- activeIndex: this.state.tagsActiveIndex,
435
- handleRemove: this.handleRemoveTag,
436
- handleClick: this.handleTagClick,
437
- disabled: this.props.disabled,
438
- customTagComponent: this.getCustomTag(this.props.tags)
439
- })
337
+ return undefined;
338
+ }
339
+ getTags() {
340
+ return Array.isArray(this.props.selected) && /*#__PURE__*/jsx("div", {
341
+ children: /*#__PURE__*/jsx(TagsList, {
342
+ tags: this.props.selected,
343
+ activeIndex: this.state.tagsActiveIndex,
344
+ handleRemove: this.handleRemoveTag,
345
+ handleClick: this.handleTagClick,
346
+ disabled: this.props.disabled,
347
+ customTagComponent: this.getCustomTag(this.props.tags)
348
+ })
349
+ });
350
+ }
351
+ getFilterWithTags() {
352
+ if (this.props.tags) {
353
+ const classes = classNames([modules_b607bec2.filterWithTags, {
354
+ [modules_b607bec2.filterWithTagsFocused]: !this.state.popupFilterShortcutsOptions.disabled
355
+ }]);
356
+ return /*#__PURE__*/jsxs("div", {
357
+ className: classes,
358
+ children: [this.getTags(), this.getFilter()]
440
359
  });
441
360
  }
442
- }, {
443
- key: "getFilterWithTags",
444
- value: function getFilterWithTags() {
445
- if (this.props.tags) {
446
- var classes = classNames([modules_b607bec2.filterWithTags, {
447
- [modules_b607bec2.filterWithTagsFocused]: !this.state.popupFilterShortcutsOptions.disabled
448
- }]);
449
- return /*#__PURE__*/jsxs("div", {
450
- className: classes,
451
- children: [this.getTags(), this.getFilter()]
452
- });
361
+ return this.getFilter();
362
+ }
363
+ getBottomLine() {
364
+ const {
365
+ loading,
366
+ message,
367
+ data
368
+ } = this.props;
369
+ const hasMoreThanOneItem = data.length > 1;
370
+ return (loading || message) && /*#__PURE__*/jsxs("div", {
371
+ className: classNames(modules_b607bec2.bottomLine, {
372
+ [modules_b607bec2.bottomLineOverItem]: hasMoreThanOneItem
373
+ }),
374
+ children: [loading && /*#__PURE__*/jsx(LoaderInline, {}), message && /*#__PURE__*/jsx("div", {
375
+ className: modules_b607bec2.message,
376
+ children: message
377
+ })]
378
+ });
379
+ }
380
+ getList(ringPopupTarget) {
381
+ if (this.props.data.length) {
382
+ let {
383
+ maxHeight
384
+ } = this.props;
385
+ if (this.props.anchorElement) {
386
+ maxHeight = this._adjustListMaxHeight(this.props.hidden, maxHeight, ringPopupTarget);
453
387
  }
454
- return this.getFilter();
455
- }
456
- }, {
457
- key: "getBottomLine",
458
- value: function getBottomLine() {
459
- var _this$props = this.props,
460
- loading = _this$props.loading,
461
- message = _this$props.message,
462
- data = _this$props.data;
463
- var hasMoreThanOneItem = data.length > 1;
464
- return (loading || message) && /*#__PURE__*/jsxs("div", {
465
- className: classNames(modules_b607bec2.bottomLine, {
466
- [modules_b607bec2.bottomLineOverItem]: hasMoreThanOneItem
467
- }),
468
- children: [loading && /*#__PURE__*/jsx(LoaderInline, {}), message && /*#__PURE__*/jsx("div", {
469
- className: modules_b607bec2.message,
470
- children: message
471
- })]
388
+ if (this.props.filter) {
389
+ maxHeight -= FILTER_HEIGHT;
390
+ }
391
+ if (this.props.toolbar) {
392
+ maxHeight -= TOOLBAR_HEIGHT;
393
+ }
394
+ return /*#__PURE__*/jsx(List, {
395
+ id: this.props.listId,
396
+ maxHeight: maxHeight,
397
+ data: this.props.data,
398
+ activeIndex: this.props.activeIndex,
399
+ ref: this.listRef,
400
+ restoreActiveIndex: true,
401
+ activateFirstItem: true,
402
+ onSelect: this.onListSelect,
403
+ onResize: this.handleListResize,
404
+ onScrollToBottom: this.props.onLoadMore,
405
+ hidden: this.props.hidden,
406
+ shortcuts: !this.props.hidden,
407
+ disableMoveOverflow: this.props.disableMoveOverflow,
408
+ disableMoveDownOverflow: this.props.loading,
409
+ disableScrollToActive: this.props.disableScrollToActive,
410
+ compact: this.props.compact,
411
+ preventListOverscroll: this.props.preventListOverscroll,
412
+ renderOptimization: this.props.renderOptimization
472
413
  });
473
414
  }
474
- }, {
475
- key: "getList",
476
- value: function getList(ringPopupTarget) {
477
- if (this.props.data.length) {
478
- var maxHeight = this.props.maxHeight;
479
- if (this.props.anchorElement) {
480
- maxHeight = this._adjustListMaxHeight(this.props.hidden, maxHeight, ringPopupTarget);
481
- }
482
- if (this.props.filter) {
483
- maxHeight -= FILTER_HEIGHT;
484
- }
485
- if (this.props.toolbar) {
486
- maxHeight -= TOOLBAR_HEIGHT;
487
- }
488
- return /*#__PURE__*/jsx(List, {
489
- id: this.props.listId,
490
- maxHeight: maxHeight,
491
- data: this.props.data,
492
- activeIndex: this.props.activeIndex,
493
- ref: this.listRef,
494
- restoreActiveIndex: true,
495
- activateFirstItem: true,
496
- onSelect: this.onListSelect,
497
- onResize: this.handleListResize,
498
- onScrollToBottom: this.props.onLoadMore,
499
- hidden: this.props.hidden,
500
- shortcuts: !this.props.hidden,
501
- disableMoveOverflow: this.props.disableMoveOverflow,
502
- disableMoveDownOverflow: this.props.loading,
503
- disableScrollToActive: this.props.disableScrollToActive,
504
- compact: this.props.compact,
505
- preventListOverscroll: this.props.preventListOverscroll,
506
- renderOptimization: this.props.renderOptimization
415
+ return null;
416
+ }
417
+ render() {
418
+ const {
419
+ toolbar,
420
+ topbar,
421
+ className,
422
+ multiple,
423
+ hidden,
424
+ isInputMode,
425
+ anchorElement,
426
+ minWidth,
427
+ onCloseAttempt,
428
+ onOutsideClick,
429
+ directions,
430
+ top,
431
+ left,
432
+ offset,
433
+ style,
434
+ dir,
435
+ filter
436
+ } = this.props;
437
+ const classes = classNames(modules_b607bec2.popup, className);
438
+ return /*#__PURE__*/jsx(PopupTargetContext.Consumer, {
439
+ children: ringPopupTarget => {
440
+ const filterWithTags = this.getFilterWithTags();
441
+ const selectAll = multiple && typeof multiple === 'object' && !multiple.limit && multiple.selectAll && this.getSelectAll();
442
+ const list = this.getList(this.props.ringPopupTarget || ringPopupTarget);
443
+ const bottomLine = this.getBottomLine();
444
+ const hasContent = filterWithTags || selectAll || list || bottomLine || toolbar || topbar;
445
+ return /*#__PURE__*/jsx(Popup, {
446
+ trapFocus: false,
447
+ ref: this.popupRef,
448
+ hidden: hidden || !hasContent,
449
+ attached: isInputMode,
450
+ className: classes,
451
+ dontCloseOnAnchorClick: true,
452
+ anchorElement: anchorElement,
453
+ minWidth: minWidth,
454
+ onCloseAttempt: onCloseAttempt,
455
+ onOutsideClick: onOutsideClick,
456
+ directions: directions,
457
+ top: top,
458
+ left: left,
459
+ offset: offset,
460
+ onMouseDown: this.mouseDownHandler,
461
+ target: this.props.ringPopupTarget,
462
+ autoCorrectTopOverflow: false,
463
+ style: style,
464
+ children: /*#__PURE__*/jsxs("div", {
465
+ dir: dir,
466
+ children: [!hidden && filter && /*#__PURE__*/jsx(Shortcuts, {
467
+ map: this.shortcutsMap,
468
+ scope: this.shortcutsScope
469
+ }), topbar, hidden ? /*#__PURE__*/jsx("div", {}) : filterWithTags, selectAll, list, bottomLine, toolbar]
470
+ })
507
471
  });
508
472
  }
509
- return null;
510
- }
511
- }, {
512
- key: "render",
513
- value: function render() {
514
- var _this3 = this;
515
- var _this$props2 = this.props,
516
- toolbar = _this$props2.toolbar,
517
- topbar = _this$props2.topbar,
518
- className = _this$props2.className,
519
- multiple = _this$props2.multiple,
520
- hidden = _this$props2.hidden,
521
- isInputMode = _this$props2.isInputMode,
522
- anchorElement = _this$props2.anchorElement,
523
- minWidth = _this$props2.minWidth,
524
- onCloseAttempt = _this$props2.onCloseAttempt,
525
- onOutsideClick = _this$props2.onOutsideClick,
526
- directions = _this$props2.directions,
527
- top = _this$props2.top,
528
- left = _this$props2.left,
529
- offset = _this$props2.offset,
530
- style = _this$props2.style,
531
- dir = _this$props2.dir,
532
- filter = _this$props2.filter;
533
- var classes = classNames(modules_b607bec2.popup, className);
534
- return /*#__PURE__*/jsx(PopupTargetContext.Consumer, {
535
- children: function children(ringPopupTarget) {
536
- var filterWithTags = _this3.getFilterWithTags();
537
- var selectAll = multiple && typeof multiple === 'object' && !multiple.limit && multiple.selectAll && _this3.getSelectAll();
538
- var list = _this3.getList(_this3.props.ringPopupTarget || ringPopupTarget);
539
- var bottomLine = _this3.getBottomLine();
540
- var hasContent = filterWithTags || selectAll || list || bottomLine || toolbar || topbar;
541
- return /*#__PURE__*/jsx(Popup, {
542
- trapFocus: false,
543
- ref: _this3.popupRef,
544
- hidden: hidden || !hasContent,
545
- attached: isInputMode,
546
- className: classes,
547
- dontCloseOnAnchorClick: true,
548
- anchorElement: anchorElement,
549
- minWidth: minWidth,
550
- onCloseAttempt: onCloseAttempt,
551
- onOutsideClick: onOutsideClick,
552
- directions: directions,
553
- top: top,
554
- left: left,
555
- offset: offset,
556
- onMouseDown: _this3.mouseDownHandler,
557
- target: _this3.props.ringPopupTarget,
558
- autoCorrectTopOverflow: false,
559
- style: style,
560
- children: /*#__PURE__*/jsxs("div", {
561
- dir: dir,
562
- children: [!hidden && filter && /*#__PURE__*/jsx(Shortcuts, {
563
- map: _this3.shortcutsMap,
564
- scope: _this3.shortcutsScope
565
- }), topbar, hidden ? /*#__PURE__*/jsx("div", {}) : filterWithTags, selectAll, list, bottomLine, toolbar]
566
- })
567
- });
568
- }
569
- });
570
- }
571
- }]);
572
- }(PureComponent);
473
+ });
474
+ }
475
+ }
573
476
  _defineProperty(SelectPopup, "defaultProps", {
574
477
  data: [],
575
478
  activeIndex: null,