@jetbrains/ring-ui 5.0.127 → 5.0.129

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 (310) hide show
  1. package/components/alert/alert.js +2 -1
  2. package/components/alert/container.js +2 -1
  3. package/components/auth/auth__core.js +2 -1
  4. package/components/auth/request-builder.js +2 -1
  5. package/components/auth/response-parser.js +2 -1
  6. package/components/auth/token-validator.js +2 -1
  7. package/components/auth-dialog/auth-dialog.js +2 -1
  8. package/components/avatar/avatar.js +2 -1
  9. package/components/badge/badge.js +2 -1
  10. package/components/button/button.js +2 -1
  11. package/components/button-group/button-group.js +2 -1
  12. package/components/button-group/caption.js +2 -1
  13. package/components/button-set/button-set.js +2 -1
  14. package/components/button-toolbar/button-toolbar.js +2 -1
  15. package/components/caret/caret.js +2 -1
  16. package/components/checkbox/checkbox.js +2 -1
  17. package/components/code/code.js +2 -1
  18. package/components/confirm/confirm.js +2 -1
  19. package/components/content-layout/content-layout.js +2 -1
  20. package/components/content-layout/sidebar.js +2 -1
  21. package/components/data-list/data-list.js +2 -1
  22. package/components/data-list/item.js +2 -1
  23. package/components/date-picker/date-input.js +2 -1
  24. package/components/date-picker/date-picker.js +2 -1
  25. package/components/date-picker/date-popup.js +2 -1
  26. package/components/date-picker/day.js +2 -1
  27. package/components/date-picker/month-slider.js +2 -1
  28. package/components/date-picker/years.js +2 -1
  29. package/components/dialog/dialog.d.ts +4 -16
  30. package/components/dialog/dialog.js +6 -3
  31. package/components/dropdown/dropdown.js +2 -1
  32. package/components/error-bubble/error-bubble.js +2 -1
  33. package/components/error-message/error-message.js +2 -1
  34. package/components/footer/footer.js +1 -0
  35. package/components/global/react-dom-renderer.js +2 -1
  36. package/components/grid/col.js +2 -1
  37. package/components/grid/grid.js +2 -1
  38. package/components/grid/row.js +2 -1
  39. package/components/group/group.js +2 -1
  40. package/components/header/logo.js +2 -1
  41. package/components/header/profile.js +2 -1
  42. package/components/header/services-link.js +2 -1
  43. package/components/header/services.js +2 -1
  44. package/components/header/smart-profile.js +2 -1
  45. package/components/header/smart-services.js +2 -1
  46. package/components/header/tray-icon.js +2 -1
  47. package/components/header/tray.js +2 -1
  48. package/components/hub-source/hub-source.js +2 -1
  49. package/components/icon/icon.js +2 -1
  50. package/components/input/input.js +2 -1
  51. package/components/island/island.js +2 -1
  52. package/components/island-legacy/content-legacy.js +2 -1
  53. package/components/island-legacy/header-legacy.js +2 -1
  54. package/components/island-legacy/island-legacy.js +2 -1
  55. package/components/link/clickableLink.js +2 -1
  56. package/components/list/list.js +2 -1
  57. package/components/list/list__hint.js +2 -1
  58. package/components/list/list__users-groups-source.js +2 -1
  59. package/components/loader/loader.js +2 -1
  60. package/components/loader/loader__core.js +2 -1
  61. package/components/loader-screen/loader-screen.js +2 -1
  62. package/components/login-dialog/login-dialog.js +2 -1
  63. package/components/message/message.js +2 -1
  64. package/components/pager/pager.js +2 -1
  65. package/components/panel/panel.js +2 -1
  66. package/components/permissions/permissions.js +2 -1
  67. package/components/permissions/permissions__cache.js +2 -1
  68. package/components/popup/popup.js +2 -1
  69. package/components/popup-menu/popup-menu.js +2 -1
  70. package/components/progress-bar/progress-bar.js +2 -1
  71. package/components/query-assist/query-assist.js +4 -3
  72. package/components/radio/radio.js +2 -1
  73. package/components/radio/radio__item.js +2 -1
  74. package/components/select/select.js +2 -1
  75. package/components/select/select__filter.js +2 -1
  76. package/components/select/select__popup.js +4 -2
  77. package/components/shortcuts/shortcuts.js +2 -1
  78. package/components/storage/storage__fallback.js +2 -1
  79. package/components/tab-trap/tab-trap.js +2 -1
  80. package/components/table/cell.js +2 -1
  81. package/components/table/header-cell.js +2 -1
  82. package/components/table/header.js +2 -1
  83. package/components/table/multitable.js +2 -1
  84. package/components/table/row.d.ts +1 -0
  85. package/components/table/row.js +6 -4
  86. package/components/table/smart-table.d.ts +1 -0
  87. package/components/table/table.d.ts +2 -0
  88. package/components/table/table.js +8 -4
  89. package/components/tabs/smart-tabs.js +2 -1
  90. package/components/tabs/tab.js +2 -1
  91. package/components/tag/tag.js +2 -1
  92. package/components/tags-input/tags-input.d.ts +1 -1
  93. package/components/tags-input/tags-input.js +3 -2
  94. package/components/tags-list/tags-list.js +2 -1
  95. package/components/text/text.js +2 -1
  96. package/components/tooltip/tooltip.js +2 -1
  97. package/components/user-agreement/user-agreement.js +2 -1
  98. package/components/user-card/card.js +2 -1
  99. package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
  100. package/components/user-card/smart-user-card-tooltip.js +2 -1
  101. package/components/user-card/tooltip.js +2 -1
  102. package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -29
  103. package/dist/_helpers/anchor.js +1 -1
  104. package/dist/_helpers/card.js +44 -47
  105. package/dist/_helpers/footer.js +1 -0
  106. package/dist/_helpers/select__filter.js +10 -13
  107. package/dist/_helpers/services-link.js +10 -10
  108. package/dist/_helpers/sidebar.js +34 -37
  109. package/dist/_helpers/theme.js +1 -1
  110. package/dist/_helpers/title.js +12 -16
  111. package/dist/alert/alert.js +63 -66
  112. package/dist/alert/container.js +5 -5
  113. package/dist/alert-service/alert-service.js +5 -7
  114. package/dist/analytics/analytics.js +1 -2
  115. package/dist/analytics/analytics__custom-plugin.js +6 -8
  116. package/dist/auth/auth.js +1 -1
  117. package/dist/auth/auth__core.js +26 -26
  118. package/dist/auth/background-flow.js +4 -5
  119. package/dist/auth/iframe-flow.js +12 -12
  120. package/dist/auth/landing.js +1 -1
  121. package/dist/auth/request-builder.js +3 -5
  122. package/dist/auth/response-parser.js +5 -6
  123. package/dist/auth/storage.js +12 -12
  124. package/dist/auth/token-validator.js +13 -16
  125. package/dist/auth/window-flow.js +18 -19
  126. package/dist/auth-dialog/auth-dialog.js +54 -57
  127. package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
  128. package/dist/auth-ng/auth-ng.js +1 -1
  129. package/dist/avatar/avatar.js +30 -33
  130. package/dist/avatar-ng/avatar-ng.js +1 -1
  131. package/dist/badge/badge.js +10 -10
  132. package/dist/badge-ng/badge-ng.js +1 -1
  133. package/dist/breadcrumb-ng/breadcrumb-ng.js +0 -1
  134. package/dist/button/button.js +24 -27
  135. package/dist/button-group/button-group.js +5 -5
  136. package/dist/button-group/caption.js +4 -4
  137. package/dist/button-ng/button-ng.js +68 -69
  138. package/dist/button-set/button-set.js +6 -6
  139. package/dist/button-toolbar/button-toolbar.js +6 -6
  140. package/dist/caret/caret.js +2 -4
  141. package/dist/checkbox/checkbox.js +27 -30
  142. package/dist/checkbox-ng/checkbox-ng.js +0 -1
  143. package/dist/code/code.js +17 -21
  144. package/dist/confirm/confirm.js +31 -34
  145. package/dist/confirm-ng/confirm-ng.js +1 -1
  146. package/dist/confirm-service/confirm-service.js +1 -1
  147. package/dist/content-layout/content-layout.js +17 -20
  148. package/dist/contenteditable/contenteditable.js +11 -11
  149. package/dist/data-list/data-list.js +49 -55
  150. package/dist/data-list/item.js +64 -67
  151. package/dist/data-list/selection.js +0 -1
  152. package/dist/data-list/title.js +1 -1
  153. package/dist/data-list-ng/data-list-ng.js +1 -1
  154. package/dist/date-picker/date-input.js +39 -42
  155. package/dist/date-picker/date-picker.js +162 -165
  156. package/dist/date-picker/date-popup.js +119 -119
  157. package/dist/date-picker/day.js +34 -38
  158. package/dist/date-picker/month-names.js +11 -14
  159. package/dist/date-picker/month-slider.js +24 -28
  160. package/dist/date-picker/month.js +1 -1
  161. package/dist/date-picker/months.js +1 -1
  162. package/dist/date-picker/years.js +9 -13
  163. package/dist/dialog/dialog.d.ts +4 -16
  164. package/dist/dialog/dialog.js +68 -65
  165. package/dist/dialog-ng/dialog-ng.js +21 -22
  166. package/dist/docked-panel-ng/docked-panel-ng.js +0 -1
  167. package/dist/dropdown/dropdown.js +101 -104
  168. package/dist/dropdown-menu/dropdown-menu.js +1 -1
  169. package/dist/editable-heading/editable-heading.js +1 -1
  170. package/dist/error-bubble/error-bubble.js +6 -6
  171. package/dist/error-message/error-message.js +10 -10
  172. package/dist/error-message-ng/error-message-ng.js +0 -1
  173. package/dist/footer-ng/footer-ng.js +19 -21
  174. package/dist/global/angular-component-factory.js +2 -3
  175. package/dist/global/dom.js +1 -5
  176. package/dist/global/focus-sensor-hoc.js +58 -61
  177. package/dist/global/listeners.js +1 -5
  178. package/dist/global/react-dom-renderer.js +8 -12
  179. package/dist/global/rerender-hoc.js +1 -5
  180. package/dist/global/ring-angular-component.js +1 -3
  181. package/dist/grid/col.js +13 -14
  182. package/dist/grid/grid.js +5 -5
  183. package/dist/grid/row.js +16 -17
  184. package/dist/group/group.js +5 -5
  185. package/dist/header/header.js +10 -10
  186. package/dist/header/logo.js +9 -9
  187. package/dist/header/profile.js +58 -58
  188. package/dist/header/services.js +19 -22
  189. package/dist/header/smart-profile.js +40 -43
  190. package/dist/header/smart-services.js +28 -31
  191. package/dist/header/tray-icon.js +6 -6
  192. package/dist/header/tray.js +5 -5
  193. package/dist/heading/heading.js +1 -1
  194. package/dist/heading-ng/heading-ng.js +1 -1
  195. package/dist/http/http.js +111 -107
  196. package/dist/http/http.mock.js +3 -4
  197. package/dist/hub-source/hub-source.js +7 -9
  198. package/dist/hub-source/hub-source__user.js +0 -1
  199. package/dist/hub-source/hub-source__users-groups.js +4 -5
  200. package/dist/icon/icon.js +18 -18
  201. package/dist/icon/icon__svg.js +1 -1
  202. package/dist/icon-ng/icon-ng.js +0 -1
  203. package/dist/input/input.js +35 -38
  204. package/dist/input-ng/input-ng.js +25 -26
  205. package/dist/island/adaptive-island-hoc.js +21 -25
  206. package/dist/island/content.js +62 -65
  207. package/dist/island/header.js +11 -11
  208. package/dist/island/island.js +8 -8
  209. package/dist/island-legacy/content-legacy.js +5 -5
  210. package/dist/island-legacy/header-legacy.js +5 -5
  211. package/dist/island-legacy/island-legacy.js +5 -5
  212. package/dist/link/clickableLink.js +27 -30
  213. package/dist/link/link.js +16 -16
  214. package/dist/list/list.js +389 -391
  215. package/dist/list/list__custom.js +6 -10
  216. package/dist/list/list__hint.js +3 -4
  217. package/dist/list/list__item.js +4 -7
  218. package/dist/list/list__link.js +1 -1
  219. package/dist/list/list__users-groups-source.js +3 -3
  220. package/dist/loader/loader.js +16 -19
  221. package/dist/loader/loader__core.js +62 -62
  222. package/dist/loader-inline/loader-inline.js +6 -6
  223. package/dist/loader-ng/loader-ng.js +3 -4
  224. package/dist/loader-screen/loader-screen.js +6 -6
  225. package/dist/loader-screen-ng/loader-screen-ng.js +0 -1
  226. package/dist/login-dialog/login-dialog.js +55 -58
  227. package/dist/login-dialog/service.js +1 -1
  228. package/dist/markdown/code.js +0 -1
  229. package/dist/markdown/markdown.js +1 -1
  230. package/dist/message/message.js +22 -25
  231. package/dist/old-browsers-message/white-list.js +2 -2
  232. package/dist/pager/pager.js +55 -58
  233. package/dist/pager-ng/pager-ng.js +1 -1
  234. package/dist/panel/panel.js +5 -5
  235. package/dist/panel-ng/panel-ng.js +0 -1
  236. package/dist/permissions/permissions.js +14 -16
  237. package/dist/permissions/permissions__cache.js +4 -6
  238. package/dist/permissions-ng/permissions-ng.js +1 -1
  239. package/dist/place-under-ng/place-under-ng.js +0 -1
  240. package/dist/popup/popup.js +118 -121
  241. package/dist/popup/popup.target.js +1 -1
  242. package/dist/popup/position.js +0 -1
  243. package/dist/popup-menu/popup-menu.js +19 -22
  244. package/dist/progress-bar/progress-bar.js +41 -44
  245. package/dist/progress-bar-ng/progress-bar-ng.js +1 -1
  246. package/dist/promised-click-ng/promised-click-ng.js +0 -1
  247. package/dist/query-assist/query-assist.js +507 -501
  248. package/dist/query-assist/query-assist__suggestions.js +1 -1
  249. package/dist/query-assist-ng/query-assist-ng.js +1 -1
  250. package/dist/radio/radio.js +10 -13
  251. package/dist/radio/radio__item.js +19 -22
  252. package/dist/select/select.js +350 -349
  253. package/dist/select/select__popup.js +148 -152
  254. package/dist/select-ng/select-ng.js +1 -1
  255. package/dist/select-ng/select-ng__lazy.js +4 -4
  256. package/dist/select-ng/select-ng__options.js +14 -15
  257. package/dist/shortcuts/core.js +35 -36
  258. package/dist/shortcuts/shortcuts-hoc.js +7 -11
  259. package/dist/shortcuts/shortcuts.js +10 -11
  260. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -1
  261. package/dist/shortcuts-ng/shortcuts-ng.js +0 -1
  262. package/dist/sidebar-ng/sidebar-ng.js +0 -1
  263. package/dist/storage/storage.js +1 -1
  264. package/dist/storage/storage__fallback.js +8 -10
  265. package/dist/storage/storage__local.js +2 -2
  266. package/dist/style.css +1 -1
  267. package/dist/tab-trap/tab-trap.js +84 -86
  268. package/dist/table/cell.js +6 -6
  269. package/dist/table/disable-hover-hoc.js +23 -25
  270. package/dist/table/header-cell.js +28 -31
  271. package/dist/table/header.js +58 -61
  272. package/dist/table/multitable.js +91 -95
  273. package/dist/table/row-with-focus-sensor.js +15 -18
  274. package/dist/table/row.d.ts +1 -0
  275. package/dist/table/row.js +54 -55
  276. package/dist/table/selection-shortcuts-hoc.js +145 -147
  277. package/dist/table/selection.js +7 -9
  278. package/dist/table/smart-table.d.ts +1 -0
  279. package/dist/table/smart-table.js +21 -24
  280. package/dist/table/table.d.ts +2 -0
  281. package/dist/table/table.js +107 -109
  282. package/dist/table-legacy-ng/table-legacy-ng.js +1 -1
  283. package/dist/table-legacy-ng/table-legacy-ng__pager.js +1 -1
  284. package/dist/table-legacy-ng/table-legacy-ng__selection.js +1 -3
  285. package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +0 -1
  286. package/dist/table-ng/smart-table-ng.js +1 -1
  287. package/dist/table-ng/table-ng.js +1 -1
  288. package/dist/tabs/collapsible-more.js +1 -1
  289. package/dist/tabs/collapsible-tab.js +1 -1
  290. package/dist/tabs/dumb-tabs.js +46 -49
  291. package/dist/tabs/smart-tabs.js +10 -10
  292. package/dist/tabs/tab.js +7 -8
  293. package/dist/tag/tag.js +42 -45
  294. package/dist/tags-input/tags-input.d.ts +1 -1
  295. package/dist/tags-input/tags-input.js +214 -213
  296. package/dist/tags-input-ng/tags-input-ng.js +1 -1
  297. package/dist/tags-list/tags-list.js +20 -20
  298. package/dist/template-ng/template-ng.js +25 -26
  299. package/dist/text/text.js +6 -6
  300. package/dist/toggle/toggle.js +19 -19
  301. package/dist/toggle-ng/toggle-ng.js +1 -1
  302. package/dist/tooltip/tooltip.js +86 -89
  303. package/dist/tooltip-ng/tooltip-ng.js +1 -1
  304. package/dist/user-agreement/service.js +207 -205
  305. package/dist/user-agreement/user-agreement.js +39 -42
  306. package/dist/user-card/smart-user-card-tooltip.d.ts +1 -1
  307. package/dist/user-card/smart-user-card-tooltip.js +32 -35
  308. package/dist/user-card/tooltip.js +26 -26
  309. package/dist/user-card-ng/user-card-ng.js +1 -1
  310. package/package.json +17 -17
package/dist/list/list.js CHANGED
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React, { Component, cloneElement } from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import classNames from 'classnames';
@@ -27,6 +26,7 @@ import '../shortcuts/core.js';
27
26
  import 'combokeys';
28
27
  import '../global/sniffer.js';
29
28
  import 'sniffr';
29
+ import '../_helpers/_rollupPluginBabelHelpers.js';
30
30
  import '../link/link.js';
31
31
  import 'focus-visible';
32
32
  import '../link/clickableLink.js';
@@ -77,350 +77,57 @@ const ActiveItemContext = createStatefulContext(undefined, 'ActiveItem');
77
77
  * Displays a list of items.
78
78
  */
79
79
  class List extends Component {
80
- constructor() {
81
- var _this;
82
- super(...arguments);
83
- _this = this;
84
- _defineProperty(this, "state", {
85
- activeIndex: null,
86
- prevActiveIndex: null,
87
- prevData: [],
88
- activeItem: null,
89
- needScrollToActive: false,
90
- scrolling: false,
91
- hasOverflow: false,
92
- disabledHover: false,
93
- scrolledToBottom: false
94
- });
95
- _defineProperty(this, "scheduleScrollListener", scheduleRAF());
96
- _defineProperty(this, "scheduleHoverListener", scheduleRAF());
97
- _defineProperty(this, "virtualizedList", void 0);
98
- _defineProperty(this, "unmounted", void 0);
99
- _defineProperty(this, "container", void 0);
100
- _defineProperty(this, "hoverHandler", memoize(index => () => this.scheduleHoverListener(() => {
101
- if (this.state.disabledHover) {
102
- return;
103
- }
104
- if (this.container) {
105
- this.setState({
106
- activeIndex: index,
107
- activeItem: this.props.data[index],
108
- needScrollToActive: false
109
- });
110
- }
111
- })));
112
- _defineProperty(this, "_activatableItems", false);
113
- // eslint-disable-next-line @typescript-eslint/no-magic-numbers
114
- _defineProperty(this, "_bufferSize", 10);
115
- // keep X items above and below of the visible area
116
- // reuse size cache for similar items
117
- _defineProperty(this, "sizeCacheKey", index => {
118
- if (index === 0 || index === this.props.data.length + 1) {
119
- return Type.MARGIN;
120
- }
121
- const item = this.props.data[index - 1];
122
- const isFirst = index === 1;
123
- switch (item.rgItemType) {
124
- case Type.SEPARATOR:
125
- case Type.TITLE:
126
- return `${item.rgItemType}${isFirst ? '_first' : ''}${item.description ? '_desc' : ''}`;
127
- case Type.MARGIN:
128
- return Type.MARGIN;
129
- case Type.CUSTOM:
130
- return `${Type.CUSTOM}_${item.key}`;
131
- case Type.ITEM:
132
- case Type.LINK:
133
- default:
134
- if (item.details) {
135
- return `${Type.ITEM}_${item.details}`;
136
- }
137
- return Type.ITEM;
138
- }
139
- });
140
- _defineProperty(this, "_cache", new CellMeasurerCache({
141
- defaultHeight: this.defaultItemHeight(),
142
- fixedWidth: true,
143
- keyMapper: this.sizeCacheKey
144
- }));
145
- _defineProperty(this, "_hasActivatableItems", memoizeOne(items => items.some(isActivatable)));
146
- _defineProperty(this, "activateFirst", () => {
147
- const firstActivatableIndex = this.props.data.findIndex(isActivatable);
148
- if (firstActivatableIndex >= 0) {
149
- this.setState({
150
- activeIndex: firstActivatableIndex,
151
- activeItem: this.props.data[firstActivatableIndex],
152
- needScrollToActive: true
153
- });
154
- }
155
- });
156
- _defineProperty(this, "selectHandler", memoize(index => function (event) {
157
- let tryKeepOpen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
158
- const item = _this.props.data[index];
159
- if (!_this.props.useMouseUp && item.onClick) {
160
- item.onClick(item, event);
161
- } else if (_this.props.useMouseUp && item.onMouseUp) {
162
- item.onMouseUp(item, event);
163
- }
164
- if (_this.props.onSelect) {
165
- _this.props.onSelect(item, event, {
166
- tryKeepOpen
167
- });
168
- }
169
- }));
170
- _defineProperty(this, "checkboxHandler", memoize(index => event => this.selectHandler(index)(event, true)));
171
- _defineProperty(this, "upHandler", e => {
172
- const {
173
- data,
174
- disableMoveOverflow
175
- } = this.props;
176
- const index = this.state.activeIndex;
177
- let newIndex;
178
- if (index === null || index === 0) {
179
- if (!disableMoveOverflow) {
180
- newIndex = data.length - 1;
181
- } else {
182
- return;
183
- }
184
- } else {
185
- newIndex = index - 1;
186
- }
187
- this.moveHandler(newIndex, this.upHandler, e);
188
- });
189
- _defineProperty(this, "downHandler", e => {
190
- const {
191
- data,
192
- disableMoveOverflow,
193
- disableMoveDownOverflow
194
- } = this.props;
195
- const index = this.state.activeIndex;
196
- let newIndex;
197
- if (index === null) {
198
- newIndex = 0;
199
- } else if (index + 1 === data.length) {
200
- if (!disableMoveOverflow && !disableMoveDownOverflow) {
201
- newIndex = 0;
202
- } else {
203
- return;
204
- }
205
- } else {
206
- newIndex = index + 1;
207
- }
208
- this.moveHandler(newIndex, this.downHandler, e);
209
- });
210
- _defineProperty(this, "homeHandler", e => {
211
- this.moveHandler(0, this.downHandler, e);
212
- });
213
- _defineProperty(this, "endHandler", e => {
214
- this.moveHandler(this.props.data.length - 1, this.upHandler, e);
215
- });
216
- _defineProperty(this, "onDocumentMouseMove", () => {
217
- if (this.state.disabledHover) {
218
- this.setState({
219
- disabledHover: false
220
- });
221
- }
222
- });
223
- _defineProperty(this, "onDocumentKeyDown", e => {
224
- const metaKeys = [16, 17, 18, 19, 20, 91]; // eslint-disable-line @typescript-eslint/no-magic-numbers
225
- if (!this.state.disabledHover && !metaKeys.includes(e.keyCode)) {
226
- this.setState({
227
- disabledHover: true
228
- });
229
- }
230
- });
231
- _defineProperty(this, "mouseHandler", () => {
232
- this.setState({
233
- scrolling: false
234
- });
235
- });
236
- _defineProperty(this, "scrollHandler", () => {
237
- this.setState({
238
- scrolling: true
239
- }, this.scrollEndHandler);
240
- });
241
- _defineProperty(this, "enterHandler", (event, shortcut) => {
242
- if (this.state.activeIndex !== null) {
243
- const item = this.props.data[this.state.activeIndex];
244
- this.selectHandler(this.state.activeIndex)(event);
245
- if (item.href && !event.defaultPrevented) {
246
- if (shortcut != null && ['command+enter', 'ctrl+enter'].includes(shortcut)) {
247
- window.open(item.href, '_blank');
248
- } else if (shortcut === 'shift+enter') {
249
- window.open(item.href);
250
- } else {
251
- window.location.href = item.href;
252
- }
253
- }
254
- return false; // do not propagate event
255
- } else {
256
- return true; // propagate event to the parent component (e.g., QueryAssist)
257
- }
258
- });
259
- _defineProperty(this, "clearSelected", () => {
260
- this.setState({
261
- activeIndex: null,
262
- needScrollToActive: false
263
- });
264
- });
265
- _defineProperty(this, "scrollEndHandler", () => this.scheduleScrollListener(() => {
266
- const innerContainer = this.inner;
267
- if (innerContainer) {
268
- const maxScrollingPosition = innerContainer.scrollHeight;
269
- const sensitivity = this.defaultItemHeight() / 2;
270
- const currentScrollingPosition = innerContainer.scrollTop + innerContainer.clientHeight + sensitivity;
271
- const scrolledToBottom = maxScrollingPosition > 0 && currentScrollingPosition >= maxScrollingPosition;
272
- if (!this.unmounted) {
273
- this.setState({
274
- scrolledToBottom
275
- });
276
- }
277
- if (scrolledToBottom) {
278
- this.props.onScrollToBottom();
279
- }
280
- }
281
- }));
282
- _defineProperty(this, "checkOverflow", () => {
283
- if (this.inner) {
284
- this.setState({
285
- hasOverflow: this.inner.scrollHeight - this.inner.clientHeight > 1
286
- });
287
- }
288
- });
289
- _defineProperty(this, "renderItem", _ref => {
290
- let {
291
- index = 1,
292
- style,
293
- isScrolling = false,
294
- parent,
295
- key
296
- } = _ref;
297
- let itemKey;
298
- let el;
299
- const realIndex = index - 1;
300
- const item = this.props.data[realIndex];
301
- const itemId = this.getId(item);
302
- // top and bottom margins
303
- if (index === 0 || index === this.props.data.length + 1 || item.rgItemType === Type.MARGIN) {
304
- itemKey = key || `${Type.MARGIN}_${index}`;
305
- el = /*#__PURE__*/React.createElement("div", {
306
- style: {
307
- height: Dimension.MARGIN
308
- }
309
- });
310
- } else {
311
- // Hack around SelectNG implementation
312
- const {
313
- selectedLabel,
314
- originalModel,
315
- ...restProps
316
- } = item;
317
- const cleanedProps = restProps;
318
- if (cleanedProps.url) {
319
- cleanedProps.href = cleanedProps.url;
320
- }
321
- if (cleanedProps.href) {
322
- cleanedProps.rgItemType = Type.LINK;
323
- }
324
- const itemProps = Object.assign({
325
- rgItemType: DEFAULT_ITEM_TYPE
326
- }, restProps);
327
- itemKey = key || itemId;
328
- itemProps.hover = realIndex === this.state.activeIndex;
329
- if (itemProps.hoverClassName != null && itemProps.hover) {
330
- itemProps.className = classNames(itemProps.className, itemProps.hoverClassName);
331
- }
332
- itemProps.onMouseOver = this.hoverHandler(realIndex);
333
- itemProps.tabIndex = -1;
334
- itemProps.scrolling = isScrolling;
335
- const selectHandler = this.selectHandler(realIndex);
336
- if (this.props.useMouseUp) {
337
- itemProps.onMouseUp = selectHandler;
338
- } else {
339
- itemProps.onClick = selectHandler;
340
- }
341
- itemProps.onCheckboxChange = this.checkboxHandler(realIndex);
342
- if (itemProps.compact == null) {
343
- itemProps.compact = this.props.compact;
344
- }
345
- let ItemComponent;
346
- const isFirst = index === 1;
347
- switch (itemProps.rgItemType) {
348
- case Type.SEPARATOR:
349
- ItemComponent = ListSeparator;
350
- itemProps.isFirst = isFirst;
351
- break;
352
- case Type.LINK:
353
- ItemComponent = ListLink;
354
- this.addItemDataTestToProp(itemProps);
355
- break;
356
- case Type.ITEM:
357
- ItemComponent = ListItem;
358
- this.addItemDataTestToProp(itemProps);
359
- break;
360
- case Type.CUSTOM:
361
- ItemComponent = ListCustom;
362
- this.addItemDataTestToProp(itemProps);
363
- break;
364
- case Type.TITLE:
365
- itemProps.isFirst = isFirst;
366
- ItemComponent = ListTitle;
367
- break;
368
- default:
369
- throw new Error(`Unknown menu element type: ${itemProps.rgItemType}`);
370
- }
371
- el = /*#__PURE__*/React.createElement(ItemComponent, itemProps);
372
- }
373
- return parent ? /*#__PURE__*/React.createElement(CellMeasurer, {
374
- cache: this._cache,
375
- key: itemKey,
376
- parent: parent,
377
- rowIndex: index,
378
- columnIndex: 0
379
- }, _ref2 => {
380
- let {
381
- registerChild
382
- } = _ref2;
383
- return /*#__PURE__*/React.createElement("div", {
384
- ref: registerChild,
385
- style: style,
386
- role: "row",
387
- id: itemId
388
- }, /*#__PURE__*/React.createElement("div", {
389
- role: "cell"
390
- }, el));
391
- }) : /*#__PURE__*/React.createElement("div", {
392
- role: "row",
393
- id: itemId,
394
- key: itemKey
395
- }, /*#__PURE__*/React.createElement("div", {
396
- role: "cell"
397
- }, /*#__PURE__*/cloneElement(el)));
398
- });
399
- _defineProperty(this, "addItemDataTestToProp", props => {
400
- props['data-test'] = joinDataTestAttributes('ring-list-item', props['data-test']);
401
- return props;
402
- });
403
- _defineProperty(this, "virtualizedListRef", el => {
404
- this.virtualizedList = el;
405
- });
406
- _defineProperty(this, "containerRef", el => {
407
- this.container = el;
408
- });
409
- _defineProperty(this, "_inner", void 0);
410
- _defineProperty(this, "id", getUID('list-'));
411
- _defineProperty(this, "shortcutsScope", this.id);
412
- _defineProperty(this, "shortcutsMap", {
413
- up: this.upHandler,
414
- down: this.downHandler,
415
- home: this.homeHandler,
416
- end: this.endHandler,
417
- enter: this.enterHandler,
418
- 'meta+enter': this.enterHandler,
419
- 'ctrl+enter': this.enterHandler,
420
- 'command+enter': this.enterHandler,
421
- 'shift+enter': this.enterHandler
422
- });
423
- }
80
+ static propTypes = {
81
+ id: PropTypes.string,
82
+ className: PropTypes.string,
83
+ hint: PropTypes.node,
84
+ hintOnSelection: PropTypes.string,
85
+ data: PropTypes.array,
86
+ maxHeight: PropTypes.number,
87
+ activeIndex: PropTypes.number,
88
+ restoreActiveIndex: PropTypes.bool,
89
+ activateSingleItem: PropTypes.bool,
90
+ activateFirstItem: PropTypes.bool,
91
+ shortcuts: PropTypes.bool,
92
+ onMouseOut: PropTypes.func,
93
+ onSelect: PropTypes.func,
94
+ onScrollToBottom: PropTypes.func,
95
+ onResize: PropTypes.func,
96
+ useMouseUp: PropTypes.bool,
97
+ visible: PropTypes.bool,
98
+ renderOptimization: PropTypes.bool,
99
+ disableMoveOverflow: PropTypes.bool,
100
+ disableMoveDownOverflow: PropTypes.bool,
101
+ compact: PropTypes.bool,
102
+ disableScrollToActive: PropTypes.bool,
103
+ hidden: PropTypes.bool,
104
+ ariaLabel: PropTypes.string
105
+ };
106
+ static defaultProps = {
107
+ data: [],
108
+ restoreActiveIndex: false,
109
+ activateSingleItem: false,
110
+ activateFirstItem: false,
111
+ onMouseOut: noop,
112
+ onSelect: noop,
113
+ onScrollToBottom: noop,
114
+ onResize: noop,
115
+ shortcuts: false,
116
+ renderOptimization: true,
117
+ disableMoveDownOverflow: false,
118
+ ariaLabel: 'List'
119
+ };
120
+ state = {
121
+ activeIndex: null,
122
+ prevActiveIndex: null,
123
+ prevData: [],
124
+ activeItem: null,
125
+ needScrollToActive: false,
126
+ scrolling: false,
127
+ hasOverflow: false,
128
+ disabledHover: false,
129
+ scrolledToBottom: false
130
+ };
424
131
  static getDerivedStateFromProps(nextProps, prevState) {
425
132
  const {
426
133
  prevActiveIndex,
@@ -484,9 +191,153 @@ class List extends Component {
484
191
  document.removeEventListener('mousemove', this.onDocumentMouseMove);
485
192
  document.removeEventListener('keydown', this.onDocumentKeyDown, true);
486
193
  }
194
+ scheduleScrollListener = scheduleRAF();
195
+ scheduleHoverListener = scheduleRAF();
196
+ static isItemType = isItemType;
197
+ static ListHint = ListHint;
198
+ static ListProps = {
199
+ Type,
200
+ Dimension
201
+ };
202
+ virtualizedList;
203
+ unmounted;
204
+ container;
205
+ hoverHandler = memoize(index => () => this.scheduleHoverListener(() => {
206
+ if (this.state.disabledHover) {
207
+ return;
208
+ }
209
+ if (this.container) {
210
+ this.setState({
211
+ activeIndex: index,
212
+ activeItem: this.props.data[index],
213
+ needScrollToActive: false
214
+ });
215
+ }
216
+ }));
217
+ _activatableItems = false;
218
+ // eslint-disable-next-line @typescript-eslint/no-magic-numbers
219
+ _bufferSize = 10; // keep X items above and below of the visible area
220
+ // reuse size cache for similar items
221
+ sizeCacheKey = index => {
222
+ if (index === 0 || index === this.props.data.length + 1) {
223
+ return Type.MARGIN;
224
+ }
225
+ const item = this.props.data[index - 1];
226
+ const isFirst = index === 1;
227
+ switch (item.rgItemType) {
228
+ case Type.SEPARATOR:
229
+ case Type.TITLE:
230
+ return `${item.rgItemType}${isFirst ? '_first' : ''}${item.description ? '_desc' : ''}`;
231
+ case Type.MARGIN:
232
+ return Type.MARGIN;
233
+ case Type.CUSTOM:
234
+ return `${Type.CUSTOM}_${item.key}`;
235
+ case Type.ITEM:
236
+ case Type.LINK:
237
+ default:
238
+ if (item.details) {
239
+ return `${Type.ITEM}_${item.details}`;
240
+ }
241
+ return Type.ITEM;
242
+ }
243
+ };
244
+ _cache = new CellMeasurerCache({
245
+ defaultHeight: this.defaultItemHeight(),
246
+ fixedWidth: true,
247
+ keyMapper: this.sizeCacheKey
248
+ });
249
+ _hasActivatableItems = memoizeOne(items => items.some(isActivatable));
487
250
  hasActivatableItems() {
488
251
  return this._hasActivatableItems(this.props.data);
489
252
  }
253
+ activateFirst = () => {
254
+ const firstActivatableIndex = this.props.data.findIndex(isActivatable);
255
+ if (firstActivatableIndex >= 0) {
256
+ this.setState({
257
+ activeIndex: firstActivatableIndex,
258
+ activeItem: this.props.data[firstActivatableIndex],
259
+ needScrollToActive: true
260
+ });
261
+ }
262
+ };
263
+ selectHandler = memoize(index => {
264
+ var _this = this;
265
+ return function (event) {
266
+ let tryKeepOpen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
267
+ const item = _this.props.data[index];
268
+ if (!_this.props.useMouseUp && item.onClick) {
269
+ item.onClick(item, event);
270
+ } else if (_this.props.useMouseUp && item.onMouseUp) {
271
+ item.onMouseUp(item, event);
272
+ }
273
+ if (_this.props.onSelect) {
274
+ _this.props.onSelect(item, event, {
275
+ tryKeepOpen
276
+ });
277
+ }
278
+ };
279
+ });
280
+ checkboxHandler = memoize(index => event => this.selectHandler(index)(event, true));
281
+ upHandler = e => {
282
+ const {
283
+ data,
284
+ disableMoveOverflow
285
+ } = this.props;
286
+ const index = this.state.activeIndex;
287
+ let newIndex;
288
+ if (index === null || index === 0) {
289
+ if (!disableMoveOverflow) {
290
+ newIndex = data.length - 1;
291
+ } else {
292
+ return;
293
+ }
294
+ } else {
295
+ newIndex = index - 1;
296
+ }
297
+ this.moveHandler(newIndex, this.upHandler, e);
298
+ };
299
+ downHandler = e => {
300
+ const {
301
+ data,
302
+ disableMoveOverflow,
303
+ disableMoveDownOverflow
304
+ } = this.props;
305
+ const index = this.state.activeIndex;
306
+ let newIndex;
307
+ if (index === null) {
308
+ newIndex = 0;
309
+ } else if (index + 1 === data.length) {
310
+ if (!disableMoveOverflow && !disableMoveDownOverflow) {
311
+ newIndex = 0;
312
+ } else {
313
+ return;
314
+ }
315
+ } else {
316
+ newIndex = index + 1;
317
+ }
318
+ this.moveHandler(newIndex, this.downHandler, e);
319
+ };
320
+ homeHandler = e => {
321
+ this.moveHandler(0, this.downHandler, e);
322
+ };
323
+ endHandler = e => {
324
+ this.moveHandler(this.props.data.length - 1, this.upHandler, e);
325
+ };
326
+ onDocumentMouseMove = () => {
327
+ if (this.state.disabledHover) {
328
+ this.setState({
329
+ disabledHover: false
330
+ });
331
+ }
332
+ };
333
+ onDocumentKeyDown = e => {
334
+ const metaKeys = [16, 17, 18, 19, 20, 91]; // eslint-disable-line @typescript-eslint/no-magic-numbers
335
+ if (!this.state.disabledHover && !metaKeys.includes(e.keyCode)) {
336
+ this.setState({
337
+ disabledHover: true
338
+ });
339
+ }
340
+ };
490
341
  moveHandler(index, retryCallback, e) {
491
342
  let correctedIndex;
492
343
  if (this.props.data.length === 0 || !this.hasActivatableItems()) {
@@ -511,15 +362,74 @@ class List extends Component {
511
362
  }
512
363
  });
513
364
  }
365
+ mouseHandler = () => {
366
+ this.setState({
367
+ scrolling: false
368
+ });
369
+ };
370
+ scrollHandler = () => {
371
+ this.setState({
372
+ scrolling: true
373
+ }, this.scrollEndHandler);
374
+ };
375
+ enterHandler = (event, shortcut) => {
376
+ if (this.state.activeIndex !== null) {
377
+ const item = this.props.data[this.state.activeIndex];
378
+ this.selectHandler(this.state.activeIndex)(event);
379
+ if (item.href && !event.defaultPrevented) {
380
+ if (shortcut != null && ['command+enter', 'ctrl+enter'].includes(shortcut)) {
381
+ window.open(item.href, '_blank');
382
+ } else if (shortcut === 'shift+enter') {
383
+ window.open(item.href);
384
+ } else {
385
+ window.location.href = item.href;
386
+ }
387
+ }
388
+ return false; // do not propagate event
389
+ } else {
390
+ return true; // propagate event to the parent component (e.g., QueryAssist)
391
+ }
392
+ };
393
+
514
394
  getFirst() {
515
395
  return this.props.data.find(item => item.rgItemType === Type.ITEM || item.rgItemType === Type.CUSTOM);
516
396
  }
517
397
  getSelected() {
518
398
  return this.state.activeIndex != null ? this.props.data[this.state.activeIndex] : null;
519
399
  }
400
+ clearSelected = () => {
401
+ this.setState({
402
+ activeIndex: null,
403
+ needScrollToActive: false
404
+ });
405
+ };
520
406
  defaultItemHeight() {
521
407
  return this.props.compact ? Dimension.COMPACT_ITEM_HEIGHT : Dimension.ITEM_HEIGHT;
522
408
  }
409
+ scrollEndHandler = () => this.scheduleScrollListener(() => {
410
+ const innerContainer = this.inner;
411
+ if (innerContainer) {
412
+ const maxScrollingPosition = innerContainer.scrollHeight;
413
+ const sensitivity = this.defaultItemHeight() / 2;
414
+ const currentScrollingPosition = innerContainer.scrollTop + innerContainer.clientHeight + sensitivity;
415
+ const scrolledToBottom = maxScrollingPosition > 0 && currentScrollingPosition >= maxScrollingPosition;
416
+ if (!this.unmounted) {
417
+ this.setState({
418
+ scrolledToBottom
419
+ });
420
+ }
421
+ if (scrolledToBottom) {
422
+ this.props.onScrollToBottom();
423
+ }
424
+ }
425
+ });
426
+ checkOverflow = () => {
427
+ if (this.inner) {
428
+ this.setState({
429
+ hasOverflow: this.inner.scrollHeight - this.inner.clientHeight > 1
430
+ });
431
+ }
432
+ };
523
433
  getVisibleListHeight(maxHeight) {
524
434
  return maxHeight - this.defaultItemHeight() - Dimension.INNER_PADDING;
525
435
  }
@@ -535,6 +445,127 @@ class List extends Component {
535
445
  getId(item) {
536
446
  return item != null ? `${this.id}:${item.key || this._deprecatedGenerateKeyFromContent(item)}` : undefined;
537
447
  }
448
+ renderItem = _ref => {
449
+ let {
450
+ index = 1,
451
+ style,
452
+ isScrolling = false,
453
+ parent,
454
+ key
455
+ } = _ref;
456
+ let itemKey;
457
+ let el;
458
+ const realIndex = index - 1;
459
+ const item = this.props.data[realIndex];
460
+ const itemId = this.getId(item);
461
+ // top and bottom margins
462
+ if (index === 0 || index === this.props.data.length + 1 || item.rgItemType === Type.MARGIN) {
463
+ itemKey = key || `${Type.MARGIN}_${index}`;
464
+ el = /*#__PURE__*/React.createElement("div", {
465
+ style: {
466
+ height: Dimension.MARGIN
467
+ }
468
+ });
469
+ } else {
470
+ // Hack around SelectNG implementation
471
+ const {
472
+ selectedLabel,
473
+ originalModel,
474
+ ...restProps
475
+ } = item;
476
+ const cleanedProps = restProps;
477
+ if (cleanedProps.url) {
478
+ cleanedProps.href = cleanedProps.url;
479
+ }
480
+ if (cleanedProps.href) {
481
+ cleanedProps.rgItemType = Type.LINK;
482
+ }
483
+ const itemProps = Object.assign({
484
+ rgItemType: DEFAULT_ITEM_TYPE
485
+ }, restProps);
486
+ itemKey = key || itemId;
487
+ itemProps.hover = realIndex === this.state.activeIndex;
488
+ if (itemProps.hoverClassName != null && itemProps.hover) {
489
+ itemProps.className = classNames(itemProps.className, itemProps.hoverClassName);
490
+ }
491
+ itemProps.onMouseOver = this.hoverHandler(realIndex);
492
+ itemProps.tabIndex = -1;
493
+ itemProps.scrolling = isScrolling;
494
+ const selectHandler = this.selectHandler(realIndex);
495
+ if (this.props.useMouseUp) {
496
+ itemProps.onMouseUp = selectHandler;
497
+ } else {
498
+ itemProps.onClick = selectHandler;
499
+ }
500
+ itemProps.onCheckboxChange = this.checkboxHandler(realIndex);
501
+ if (itemProps.compact == null) {
502
+ itemProps.compact = this.props.compact;
503
+ }
504
+ let ItemComponent;
505
+ const isFirst = index === 1;
506
+ switch (itemProps.rgItemType) {
507
+ case Type.SEPARATOR:
508
+ ItemComponent = ListSeparator;
509
+ itemProps.isFirst = isFirst;
510
+ break;
511
+ case Type.LINK:
512
+ ItemComponent = ListLink;
513
+ this.addItemDataTestToProp(itemProps);
514
+ break;
515
+ case Type.ITEM:
516
+ ItemComponent = ListItem;
517
+ this.addItemDataTestToProp(itemProps);
518
+ break;
519
+ case Type.CUSTOM:
520
+ ItemComponent = ListCustom;
521
+ this.addItemDataTestToProp(itemProps);
522
+ break;
523
+ case Type.TITLE:
524
+ itemProps.isFirst = isFirst;
525
+ ItemComponent = ListTitle;
526
+ break;
527
+ default:
528
+ throw new Error(`Unknown menu element type: ${itemProps.rgItemType}`);
529
+ }
530
+ el = /*#__PURE__*/React.createElement(ItemComponent, itemProps);
531
+ }
532
+ return parent ? /*#__PURE__*/React.createElement(CellMeasurer, {
533
+ cache: this._cache,
534
+ key: itemKey,
535
+ parent: parent,
536
+ rowIndex: index,
537
+ columnIndex: 0
538
+ }, _ref2 => {
539
+ let {
540
+ registerChild
541
+ } = _ref2;
542
+ return /*#__PURE__*/React.createElement("div", {
543
+ ref: registerChild,
544
+ style: style,
545
+ role: "row",
546
+ id: itemId
547
+ }, /*#__PURE__*/React.createElement("div", {
548
+ role: "cell"
549
+ }, el));
550
+ }) : /*#__PURE__*/React.createElement("div", {
551
+ role: "row",
552
+ id: itemId,
553
+ key: itemKey
554
+ }, /*#__PURE__*/React.createElement("div", {
555
+ role: "cell"
556
+ }, /*#__PURE__*/cloneElement(el)));
557
+ };
558
+ addItemDataTestToProp = props => {
559
+ props['data-test'] = joinDataTestAttributes('ring-list-item', props['data-test']);
560
+ return props;
561
+ };
562
+ virtualizedListRef = el => {
563
+ this.virtualizedList = el;
564
+ };
565
+ containerRef = el => {
566
+ this.container = el;
567
+ };
568
+ _inner;
538
569
  get inner() {
539
570
  if (!this._inner) {
540
571
  this._inner = this.container && this.container.querySelector('.ring-list__i');
@@ -632,6 +663,19 @@ class List extends Component {
632
663
  } : undefined
633
664
  }, items));
634
665
  }
666
+ id = getUID('list-');
667
+ shortcutsScope = this.id;
668
+ shortcutsMap = {
669
+ up: this.upHandler,
670
+ down: this.downHandler,
671
+ home: this.homeHandler,
672
+ end: this.endHandler,
673
+ enter: this.enterHandler,
674
+ 'meta+enter': this.enterHandler,
675
+ 'ctrl+enter': this.enterHandler,
676
+ 'command+enter': this.enterHandler,
677
+ 'shift+enter': this.enterHandler
678
+ };
635
679
  /** @override */
636
680
  render() {
637
681
  const hint = this.getSelected() && this.props.hintOnSelection || this.props.hint;
@@ -663,51 +707,5 @@ class List extends Component {
663
707
  })));
664
708
  }
665
709
  }
666
- _defineProperty(List, "propTypes", {
667
- id: PropTypes.string,
668
- className: PropTypes.string,
669
- hint: PropTypes.node,
670
- hintOnSelection: PropTypes.string,
671
- data: PropTypes.array,
672
- maxHeight: PropTypes.number,
673
- activeIndex: PropTypes.number,
674
- restoreActiveIndex: PropTypes.bool,
675
- activateSingleItem: PropTypes.bool,
676
- activateFirstItem: PropTypes.bool,
677
- shortcuts: PropTypes.bool,
678
- onMouseOut: PropTypes.func,
679
- onSelect: PropTypes.func,
680
- onScrollToBottom: PropTypes.func,
681
- onResize: PropTypes.func,
682
- useMouseUp: PropTypes.bool,
683
- visible: PropTypes.bool,
684
- renderOptimization: PropTypes.bool,
685
- disableMoveOverflow: PropTypes.bool,
686
- disableMoveDownOverflow: PropTypes.bool,
687
- compact: PropTypes.bool,
688
- disableScrollToActive: PropTypes.bool,
689
- hidden: PropTypes.bool,
690
- ariaLabel: PropTypes.string
691
- });
692
- _defineProperty(List, "defaultProps", {
693
- data: [],
694
- restoreActiveIndex: false,
695
- activateSingleItem: false,
696
- activateFirstItem: false,
697
- onMouseOut: noop,
698
- onSelect: noop,
699
- onScrollToBottom: noop,
700
- onResize: noop,
701
- shortcuts: false,
702
- renderOptimization: true,
703
- disableMoveDownOverflow: false,
704
- ariaLabel: 'List'
705
- });
706
- _defineProperty(List, "isItemType", isItemType);
707
- _defineProperty(List, "ListHint", ListHint);
708
- _defineProperty(List, "ListProps", {
709
- Type,
710
- Dimension
711
- });
712
710
 
713
711
  export { ActiveItemContext, List as default };