@jetbrains/ring-ui 5.0.35 → 5.0.37

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 (241) hide show
  1. package/components/date-picker/date-popup.js +3 -1
  2. package/components/editable-heading/editable-heading.css +69 -0
  3. package/components/editable-heading/editable-heading.d.ts +21 -0
  4. package/components/editable-heading/editable-heading.js +34 -0
  5. package/components/input/input.css +2 -0
  6. package/components/query-assist/query-assist.js +1 -1
  7. package/dist/_helpers/_rollupPluginBabelHelpers.js +0 -4
  8. package/dist/_helpers/anchor.js +0 -1
  9. package/dist/_helpers/card.js +0 -3
  10. package/dist/_helpers/dialog__body-scroll-preventer.js +0 -11
  11. package/dist/_helpers/footer.js +2 -13
  12. package/dist/_helpers/query-assist__suggestions.js +0 -10
  13. package/dist/_helpers/select__filter.js +0 -11
  14. package/dist/_helpers/services-link.js +0 -2
  15. package/dist/_helpers/sidebar.js +0 -12
  16. package/dist/_helpers/theme.js +0 -3
  17. package/dist/_helpers/title.js +0 -9
  18. package/dist/alert/alert.js +2 -32
  19. package/dist/alert/container.js +0 -5
  20. package/dist/alert-service/alert-service.js +0 -26
  21. package/dist/analytics/analytics.js +0 -22
  22. package/dist/analytics/analytics__custom-plugin.js +0 -38
  23. package/dist/analytics/analytics__fus-plugin.js +0 -20
  24. package/dist/analytics/analytics__ga-plugin.js +0 -13
  25. package/dist/analytics/analytics__plugin-utils.js +0 -8
  26. package/dist/analytics-ng/analytics-ng.js +3 -9
  27. package/dist/auth/auth.js +2 -3
  28. package/dist/auth/auth__core.js +30 -243
  29. package/dist/auth/background-flow.js +2 -25
  30. package/dist/auth/down-notification.js +0 -7
  31. package/dist/auth/iframe-flow.js +2 -26
  32. package/dist/auth/landing.js +2 -6
  33. package/dist/auth/request-builder.js +0 -11
  34. package/dist/auth/response-parser.js +4 -26
  35. package/dist/auth/storage.js +4 -60
  36. package/dist/auth/token-validator.js +6 -42
  37. package/dist/auth/window-flow.js +2 -34
  38. package/dist/auth-dialog/auth-dialog.js +2 -12
  39. package/dist/auth-dialog-service/auth-dialog-service.js +2 -4
  40. package/dist/auth-ng/auth-ng.js +6 -22
  41. package/dist/auth-ng/auth-ng.mock.js +0 -4
  42. package/dist/autofocus-ng/autofocus-ng.js +0 -5
  43. package/dist/avatar/avatar.js +4 -17
  44. package/dist/avatar/fallback-avatar.js +2 -9
  45. package/dist/avatar-editor-ng/avatar-editor-ng.js +1 -17
  46. package/dist/badge/badge.js +0 -3
  47. package/dist/button/button.js +0 -8
  48. package/dist/button-group/button-group.js +0 -3
  49. package/dist/button-group/caption.js +0 -2
  50. package/dist/button-group-ng/button-group-ng.js +0 -4
  51. package/dist/button-ng/button-ng.js +3 -21
  52. package/dist/button-set/button-set.js +0 -3
  53. package/dist/button-set-ng/button-set-ng.js +0 -2
  54. package/dist/button-toolbar/button-toolbar.js +0 -3
  55. package/dist/button-toolbar-ng/button-toolbar-ng.js +0 -2
  56. package/dist/caret/caret.js +2 -53
  57. package/dist/checkbox/checkbox.js +0 -12
  58. package/dist/code/code.js +3 -25
  59. package/dist/compiler-ng/compiler-ng.js +0 -5
  60. package/dist/confirm/confirm.js +0 -6
  61. package/dist/confirm-service/confirm-service.js +10 -8
  62. package/dist/content-layout/content-layout.js +0 -7
  63. package/dist/contenteditable/contenteditable.js +6 -13
  64. package/dist/data-list/data-list.js +4 -28
  65. package/dist/data-list/item.js +0 -15
  66. package/dist/data-list/selection.js +0 -27
  67. package/dist/date-picker/consts.js +0 -7
  68. package/dist/date-picker/date-input.js +0 -20
  69. package/dist/date-picker/date-picker.js +2 -36
  70. package/dist/date-picker/date-popup.js +21 -72
  71. package/dist/date-picker/day.js +0 -14
  72. package/dist/date-picker/month-names.js +0 -9
  73. package/dist/date-picker/month-slider.js +0 -10
  74. package/dist/date-picker/month.js +2 -4
  75. package/dist/date-picker/months.js +6 -13
  76. package/dist/date-picker/years.js +0 -14
  77. package/dist/dialog/dialog.js +0 -19
  78. package/dist/dialog-ng/dialog-ng.js +17 -105
  79. package/dist/docked-panel-ng/docked-panel-ng.js +6 -29
  80. package/dist/dropdown/dropdown.js +2 -33
  81. package/dist/dropdown-menu/dropdown-menu.js +4 -8
  82. package/dist/editable-heading/editable-heading.d.ts +21 -0
  83. package/dist/editable-heading/editable-heading.js +85 -0
  84. package/dist/error-bubble/error-bubble.js +2 -4
  85. package/dist/error-message/error-message.js +0 -3
  86. package/dist/footer-ng/footer-ng.js +0 -13
  87. package/dist/form-ng/form-ng.js +1 -21
  88. package/dist/global/angular-component-factory.js +0 -10
  89. package/dist/global/compose.js +0 -1
  90. package/dist/global/composeRefs.js +0 -1
  91. package/dist/global/controls-height.js +0 -2
  92. package/dist/global/create-stateful-context.js +0 -5
  93. package/dist/global/data-tests.js +0 -4
  94. package/dist/global/dom.js +2 -11
  95. package/dist/global/focus-sensor-hoc.js +4 -33
  96. package/dist/global/fuzzy-highlight.js +2 -16
  97. package/dist/global/get-event-key.js +8 -17
  98. package/dist/global/get-uid.js +0 -2
  99. package/dist/global/linear-function.js +0 -2
  100. package/dist/global/listeners.js +0 -13
  101. package/dist/global/memoize.js +0 -2
  102. package/dist/global/normalize-indent.js +2 -5
  103. package/dist/global/react-dom-renderer.js +0 -8
  104. package/dist/global/react-render-adapter.js +0 -7
  105. package/dist/global/rerender-hoc.js +0 -7
  106. package/dist/global/ring-angular-component.js +0 -5
  107. package/dist/global/schedule-raf.js +0 -5
  108. package/dist/global/trivial-template-tag.js +2 -3
  109. package/dist/global/url.js +0 -27
  110. package/dist/grid/col.js +0 -4
  111. package/dist/grid/grid.js +0 -3
  112. package/dist/grid/row.js +0 -5
  113. package/dist/group/group.js +0 -3
  114. package/dist/header/header.js +0 -5
  115. package/dist/header/logo.js +0 -4
  116. package/dist/header/profile.js +0 -7
  117. package/dist/header/services.js +0 -11
  118. package/dist/header/smart-profile.js +4 -18
  119. package/dist/header/smart-services.js +0 -17
  120. package/dist/header/tray-icon.js +2 -3
  121. package/dist/header/tray.js +0 -3
  122. package/dist/heading/heading.js +0 -5
  123. package/dist/http/http.js +20 -65
  124. package/dist/http/http.mock.js +2 -14
  125. package/dist/hub-source/hub-source.js +0 -32
  126. package/dist/hub-source/hub-source__user.js +0 -1
  127. package/dist/hub-source/hub-source__users-groups.js +0 -12
  128. package/dist/icon/icon.js +0 -13
  129. package/dist/icon/icon__constants.js +0 -4
  130. package/dist/icon/icon__svg.js +0 -10
  131. package/dist/icon-ng/icon-ng.js +2 -7
  132. package/dist/input/input.js +0 -30
  133. package/dist/input-ng/input-ng.js +0 -17
  134. package/dist/island/adaptive-island-hoc.js +0 -7
  135. package/dist/island/content.js +0 -25
  136. package/dist/island/header.js +0 -7
  137. package/dist/island/island.js +0 -4
  138. package/dist/island-legacy/content-legacy.js +0 -2
  139. package/dist/island-legacy/header-legacy.js +0 -2
  140. package/dist/island-legacy/island-legacy.js +0 -2
  141. package/dist/island-ng/island-content-ng.js +0 -3
  142. package/dist/link/clickableLink.js +2 -10
  143. package/dist/link/link.js +2 -9
  144. package/dist/link-ng/link-ng.js +0 -2
  145. package/dist/list/consts.js +0 -4
  146. package/dist/list/list.js +6 -128
  147. package/dist/list/list__custom.js +0 -4
  148. package/dist/list/list__hint.js +0 -3
  149. package/dist/list/list__item.js +0 -8
  150. package/dist/list/list__link.js +2 -3
  151. package/dist/list/list__separator.js +0 -1
  152. package/dist/list/list__title.js +0 -1
  153. package/dist/list/list__users-groups-source.js +4 -17
  154. package/dist/loader/loader.js +0 -10
  155. package/dist/loader/loader__core.js +6 -70
  156. package/dist/loader-inline/loader-inline.js +0 -3
  157. package/dist/loader-ng/loader-ng.js +0 -7
  158. package/dist/loader-screen/loader-screen.js +0 -3
  159. package/dist/loader-screen-ng/loader-screen-ng.js +2 -14
  160. package/dist/login-dialog/login-dialog.js +0 -15
  161. package/dist/login-dialog/service.js +2 -4
  162. package/dist/markdown/code.js +0 -2
  163. package/dist/markdown/heading.js +0 -1
  164. package/dist/markdown/link.js +0 -1
  165. package/dist/markdown/markdown.js +0 -2
  166. package/dist/message/message.js +0 -24
  167. package/dist/message-bundle-ng/message-bundle-ng.js +2 -45
  168. package/dist/old-browsers-message/old-browsers-message.js +2 -21
  169. package/dist/old-browsers-message/white-list.js +2 -6
  170. package/dist/pager/pager.js +2 -39
  171. package/dist/panel/panel.js +0 -3
  172. package/dist/permissions/permissions.js +1 -43
  173. package/dist/permissions/permissions__cache.js +12 -63
  174. package/dist/permissions-ng/permissions-ng.js +11 -19
  175. package/dist/place-under-ng/place-under-ng.js +0 -19
  176. package/dist/popup/popup.consts.js +0 -11
  177. package/dist/popup/popup.js +6 -68
  178. package/dist/popup/position.js +8 -30
  179. package/dist/popup-menu/popup-menu.js +4 -13
  180. package/dist/progress-bar/progress-bar.js +0 -14
  181. package/dist/promised-click-ng/promised-click-ng.js +3 -22
  182. package/dist/query-assist/query-assist.js +17 -201
  183. package/dist/radio/radio.js +0 -6
  184. package/dist/radio/radio__item.js +0 -9
  185. package/dist/radio-ng/radio-ng.js +0 -4
  186. package/dist/save-field-ng/save-field-ng.js +1 -37
  187. package/dist/select/select.js +18 -208
  188. package/dist/select/select__popup.js +4 -76
  189. package/dist/select-ng/select-ng.js +18 -74
  190. package/dist/select-ng/select-ng__lazy.js +2 -17
  191. package/dist/select-ng/select-ng__options.js +3 -29
  192. package/dist/shortcuts/core.js +4 -56
  193. package/dist/shortcuts/shortcuts-hoc.js +0 -4
  194. package/dist/shortcuts/shortcuts.js +0 -10
  195. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -13
  196. package/dist/shortcuts-ng/shortcuts-ng.js +16 -46
  197. package/dist/sidebar-ng/sidebar-ng.js +2 -12
  198. package/dist/storage/storage.js +2 -5
  199. package/dist/storage/storage__fallback.js +2 -48
  200. package/dist/storage/storage__local.js +0 -23
  201. package/dist/style.css +1 -1
  202. package/dist/tab-trap/tab-trap.js +0 -37
  203. package/dist/table/cell.js +0 -2
  204. package/dist/table/disable-hover-hoc.js +0 -9
  205. package/dist/table/header-cell.js +0 -8
  206. package/dist/table/header.js +0 -16
  207. package/dist/table/multitable.js +0 -23
  208. package/dist/table/row-with-focus-sensor.js +0 -12
  209. package/dist/table/row.js +0 -18
  210. package/dist/table/selection-adapter.js +0 -2
  211. package/dist/table/selection-shortcuts-hoc.js +8 -42
  212. package/dist/table/selection.js +0 -50
  213. package/dist/table/smart-table.js +0 -9
  214. package/dist/table/table.js +6 -37
  215. package/dist/table-legacy-ng/table-legacy-ng.js +12 -42
  216. package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +0 -31
  217. package/dist/table-legacy-ng/table-legacy-ng__selection.js +0 -32
  218. package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +2 -5
  219. package/dist/tabs/collapsible-more.js +0 -5
  220. package/dist/tabs/collapsible-tab.js +0 -4
  221. package/dist/tabs/collapsible-tabs.js +8 -28
  222. package/dist/tabs/dumb-tabs.js +0 -8
  223. package/dist/tabs/smart-tabs.js +0 -6
  224. package/dist/tabs/tab-link.js +0 -1
  225. package/dist/tabs/tab.js +0 -2
  226. package/dist/tabs-ng/tabs-ng.js +13 -29
  227. package/dist/tag/tag.js +0 -24
  228. package/dist/tags-input/tags-input.js +0 -76
  229. package/dist/tags-list/tags-list.js +0 -6
  230. package/dist/template-ng/template-ng.js +0 -12
  231. package/dist/text/text.js +0 -3
  232. package/dist/theme-ng/theme-ng.js +0 -8
  233. package/dist/title-ng/title-ng.js +6 -17
  234. package/dist/toggle/toggle.js +0 -4
  235. package/dist/tooltip/tooltip.js +4 -35
  236. package/dist/tooltip-ng/tooltip-ng.js +2 -8
  237. package/dist/user-agreement/service.js +0 -62
  238. package/dist/user-agreement/user-agreement.js +0 -8
  239. package/dist/user-card/smart-user-card-tooltip.js +2 -8
  240. package/dist/user-card/tooltip.js +0 -3
  241. package/package.json +22 -22
@@ -87,7 +87,9 @@ export default class DatePopup extends Component {
87
87
  isInTimeMode = () => !this.props.range && this.props.withTime || false;
88
88
  componentRef = React.createRef();
89
89
  handleWheel = (e) => {
90
- e.preventDefault();
90
+ if (e.cancelable) {
91
+ e.preventDefault();
92
+ }
91
93
  };
92
94
  parse(text, type) {
93
95
  if (type === 'time') {
@@ -0,0 +1,69 @@
1
+ @value unit from "../global/global.css";
2
+
3
+ .editableHeading {
4
+ display: flex;
5
+ gap: unit;
6
+ }
7
+
8
+ .heading.heading {
9
+ margin-bottom: 0;
10
+
11
+ line-height: 28px;
12
+ }
13
+
14
+ .heading {
15
+ padding: 6px 0;
16
+
17
+ cursor: pointer;
18
+
19
+ border-radius: var(--ring-border-radius);
20
+
21
+ &:hover {
22
+ background-color: var(--ring-hover-background-color);
23
+ }
24
+ }
25
+
26
+ .input {
27
+ margin-bottom: 2px;
28
+ padding: 0;
29
+ padding-top: 6px;
30
+ padding-bottom: 3px;
31
+
32
+ color: var(--ring-heading-color);
33
+ caret-color: var(--ring-main-color);
34
+
35
+ border: none;
36
+ border-bottom: 1px solid var(--ring-borders-color);
37
+ outline: none;
38
+
39
+ font-family: var(--ring-font-family);
40
+ font-weight: bold;
41
+ line-height: 28px;
42
+
43
+ &::placeholder {
44
+ color: var(--ring-disabled-color);
45
+ }
46
+
47
+ &:focus {
48
+ margin-bottom: 1px;
49
+
50
+ border-bottom-width: 2px;
51
+ border-bottom-color: var(--ring-main-color);
52
+ }
53
+ }
54
+
55
+ .button {
56
+ margin: 6px 0;
57
+ }
58
+
59
+ .level1 {
60
+ font-size: 24px;
61
+ }
62
+
63
+ .level2 {
64
+ font-size: 20px;
65
+ }
66
+
67
+ .level3 {
68
+ font-size: 14px;
69
+ }
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { Levels } from '../heading/heading';
3
+ import { Size } from '../input/input';
4
+ export { Levels };
5
+ export interface EditableHeadingProps {
6
+ level?: Levels;
7
+ className?: string | null;
8
+ editing?: boolean;
9
+ edited?: boolean;
10
+ children?: string;
11
+ placeholder?: string;
12
+ embedded?: boolean;
13
+ size?: Size;
14
+ onEdit?: () => void;
15
+ onChange?: (text: string) => void;
16
+ onSave?: () => void;
17
+ onCancel?: () => void;
18
+ }
19
+ export declare const EditableHeading: ({ level, className, editing, edited, children, placeholder, embedded, size, onEdit, onChange, onSave, onCancel }: EditableHeadingProps) => JSX.Element;
20
+ declare const _default: React.MemoExoticComponent<({ level, className, editing, edited, children, placeholder, embedded, size, onEdit, onChange, onSave, onCancel }: EditableHeadingProps) => JSX.Element>;
21
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import classNames from 'classnames';
3
+ import Heading, { Levels } from '../heading/heading';
4
+ import Button from '../button/button';
5
+ import { Size } from '../input/input';
6
+ import inputStyles from '../input/input.css';
7
+ import { ControlsHeight } from '../global/controls-height';
8
+ import getUID from '../global/get-uid';
9
+ import Shortcuts from '../shortcuts/shortcuts';
10
+ import styles from './editable-heading.css';
11
+ export { Levels };
12
+ function noop() { }
13
+ const shortcutsScope = getUID('ring-editable-heading-');
14
+ export const EditableHeading = ({ level = Levels.H1, className, editing, edited, children, placeholder, embedded = false, size = Size.L, onEdit, onChange, onSave = noop, onCancel = noop }) => {
15
+ const onInputChange = (e) => {
16
+ onChange?.(e.target.value);
17
+ };
18
+ return (<div className={classNames(styles.editableHeading, className)}>
19
+ {editing
20
+ ? (<>
21
+ {!embedded && (<Shortcuts map={{ enter: onSave, esc: onCancel }} scope={shortcutsScope}/>)}
22
+
23
+ <input className={classNames('ring-js-shortcuts', styles.input, [inputStyles[`size${size}`], [[styles[`level${level}`]]]])} value={children} onChange={onInputChange} placeholder={placeholder} autoFocus/>
24
+ </>)
25
+ : (<Heading className={classNames(styles.heading, [inputStyles[`size${size}`]])} level={level} onClick={onEdit}>{children}</Heading>)}
26
+
27
+ {editing && !embedded && (<>
28
+ <Button height={ControlsHeight.M} className={styles.button} primary disabled={!edited || !children || children?.trim() === ''} onClick={onSave}>{'Save'}</Button>
29
+
30
+ <Button height={ControlsHeight.M} className={styles.button} onClick={onCancel}>{'Cancel'}</Button>
31
+ </>)}
32
+ </div>);
33
+ };
34
+ export default React.memo(EditableHeading);
@@ -109,6 +109,8 @@
109
109
  top: calc(var(--ring-input-padding-block) + 1px);
110
110
  left: var(--ring-input-padding-inline);
111
111
 
112
+ pointer-events: none;
113
+
112
114
  color: var(--ring-icon-secondary-color);
113
115
 
114
116
  @nest [dir=rtl] & {
@@ -431,7 +431,7 @@ export default class QueryAssist extends Component {
431
431
  if (!this.props.disabled && (caret !== this.immediateState.caret || popupHidden)) {
432
432
  this.immediateState.caret = caret;
433
433
  this.scrollInput();
434
- if (this.props.autoOpen === 'force' || this.immediateState.query.length > 0) {
434
+ if (this.immediateState.query.length > 0) {
435
435
  this.requestData?.();
436
436
  }
437
437
  }
@@ -9,22 +9,18 @@ function _defineProperty(obj, key, value) {
9
9
  } else {
10
10
  obj[key] = value;
11
11
  }
12
-
13
12
  return obj;
14
13
  }
15
-
16
14
  function _extends() {
17
15
  _extends = Object.assign ? Object.assign.bind() : function (target) {
18
16
  for (var i = 1; i < arguments.length; i++) {
19
17
  var source = arguments[i];
20
-
21
18
  for (var key in source) {
22
19
  if (Object.prototype.hasOwnProperty.call(source, key)) {
23
20
  target[key] = source[key];
24
21
  }
25
22
  }
26
23
  }
27
-
28
24
  return target;
29
25
  };
30
26
  return _extends.apply(this, arguments);
@@ -23,7 +23,6 @@ const Anchor = _ref => {
23
23
  className: modules_d9414203.chevron
24
24
  }));
25
25
  };
26
-
27
26
  Anchor.propTypes = {
28
27
  children: PropTypes.node,
29
28
  className: PropTypes.string
@@ -41,9 +41,7 @@ class UserCard extends PureComponent {
41
41
  title: user.online ? wording.online : wording.offline
42
42
  }), user.login), user.email && /*#__PURE__*/React.createElement("div", null, user.email))), children);
43
43
  }
44
-
45
44
  }
46
-
47
45
  _defineProperty(UserCard, "propTypes", {
48
46
  children: PropTypes.node,
49
47
  className: PropTypes.string,
@@ -63,7 +61,6 @@ _defineProperty(UserCard, "propTypes", {
63
61
  offline: PropTypes.string.isRequired
64
62
  })
65
63
  });
66
-
67
64
  _defineProperty(UserCard, "defaultProps", {
68
65
  wording: {
69
66
  banned: 'banned',
@@ -4,47 +4,36 @@ var modules_5e9b8c03 = {"unit":"8px","header":"header_rui_1d72","container":"con
4
4
 
5
5
  const isPrevented = new Set();
6
6
  let previousDocumentWidth = null;
7
-
8
7
  const prevent = key => {
9
8
  if (isPrevented.has(key)) {
10
9
  return;
11
10
  }
12
-
13
11
  isPrevented.add(key);
14
-
15
12
  if (isPrevented.size > 1) {
16
13
  return;
17
14
  }
18
-
19
15
  const documentHasScroll = document.documentElement.scrollHeight > window.innerHeight || getComputedStyle(document.documentElement).overflowY === 'scroll';
20
16
  document.documentElement.classList.add(modules_5e9b8c03.documentWithoutScroll);
21
17
  const scrollWidth = scrollbarWidth();
22
-
23
18
  if (documentHasScroll && scrollWidth != null && scrollWidth > 0) {
24
19
  previousDocumentWidth = document.documentElement.style.width;
25
20
  document.documentElement.style.width = `calc(100% - ${scrollWidth}px)`;
26
21
  }
27
22
  };
28
-
29
23
  const reset = key => {
30
24
  if (isPrevented.size === 0) {
31
25
  return;
32
26
  }
33
-
34
27
  isPrevented.delete(key);
35
-
36
28
  if (isPrevented.size > 0) {
37
29
  return;
38
30
  }
39
-
40
31
  document.documentElement.classList.remove(modules_5e9b8c03.documentWithoutScroll);
41
-
42
32
  if (previousDocumentWidth !== null) {
43
33
  document.documentElement.style.width = previousDocumentWidth;
44
34
  previousDocumentWidth = null;
45
35
  }
46
36
  };
47
-
48
37
  const preventerFactory = key => {
49
38
  const preventerKey = key || Math.random();
50
39
  return {
@@ -30,35 +30,28 @@ FooterColumn.propTypes = {
30
30
  * @param year {int}
31
31
  * @returns {string}
32
32
  */
33
-
34
33
  function copyright(year) {
35
34
  const currentYear = new Date().getUTCFullYear();
36
35
  const ndash = '–';
37
36
  let ret = 'Copyright © ';
38
-
39
37
  if (year >= currentYear) {
40
38
  ret += year;
41
39
  } else {
42
40
  ret += year + ndash + currentYear;
43
41
  }
44
-
45
42
  return ret;
46
43
  }
47
44
  /**
48
45
  * @constructor
49
46
  * @extends {ReactComponent}
50
47
  */
51
-
52
48
  const FooterLine = /*#__PURE__*/memo(function FooterLine(props) {
53
49
  const items = Array.isArray(props.item) ? props.item : [props.item];
54
-
55
50
  function renderItem(item) {
56
51
  if ( /*#__PURE__*/isValidElement(item) || typeof item !== 'object') {
57
52
  return item;
58
53
  }
59
-
60
54
  const element = (item.copyright ? copyright(item.copyright) : '') + (item.label || item);
61
-
62
55
  if (item.url) {
63
56
  return /*#__PURE__*/React.createElement(Link, {
64
57
  href: item.url,
@@ -67,10 +60,8 @@ const FooterLine = /*#__PURE__*/memo(function FooterLine(props) {
67
60
  title: item.title
68
61
  }, element);
69
62
  }
70
-
71
63
  return element;
72
64
  }
73
-
74
65
  return /*#__PURE__*/React.createElement("li", {
75
66
  className: modules_7385b3fd.line
76
67
  }, items.map(renderItem));
@@ -86,22 +77,20 @@ const Footer = /*#__PURE__*/memo(function Footer(_ref2) {
86
77
  center,
87
78
  right
88
79
  } = _ref2;
89
-
90
80
  function content(elements, position) {
91
81
  if (!elements) {
92
82
  return false;
93
83
  }
94
-
95
84
  return /*#__PURE__*/React.createElement(FooterColumn, {
96
85
  key: position,
97
86
  position: position
98
- }, elements.map((item, idx) => /*#__PURE__*/React.createElement(FooterLine // eslint-disable-next-line react/no-array-index-key
87
+ }, elements.map((item, idx) => /*#__PURE__*/React.createElement(FooterLine
88
+ // eslint-disable-next-line react/no-array-index-key
99
89
  , {
100
90
  key: idx,
101
91
  item: item
102
92
  })));
103
93
  }
104
-
105
94
  const classes = classNames(modules_7385b3fd.footer, className, {
106
95
  [modules_7385b3fd.footerFloating]: floating
107
96
  });
@@ -20,7 +20,6 @@ class QueryAssistSuggestions {
20
20
  } = suggestion;
21
21
  return prefix + option + suffix + group + description + (icon ? icon.substring(icon.length - ICON_ID_LENGTH) : '');
22
22
  }
23
-
24
23
  static renderLabel(suggestion) {
25
24
  const {
26
25
  className,
@@ -33,7 +32,6 @@ class QueryAssistSuggestions {
33
32
  let wrappedOption;
34
33
  let before = '';
35
34
  let after = '';
36
-
37
35
  if (matchingStart !== matchingEnd) {
38
36
  before = option.substring(0, matchingStart);
39
37
  wrappedOption = /*#__PURE__*/React.createElement("span", {
@@ -43,7 +41,6 @@ class QueryAssistSuggestions {
43
41
  } else {
44
42
  wrappedOption = option;
45
43
  }
46
-
47
44
  const wrappedPrefix = prefix && /*#__PURE__*/React.createElement("span", {
48
45
  className: modules_da7ab055.service
49
46
  }, prefix);
@@ -54,7 +51,6 @@ class QueryAssistSuggestions {
54
51
  className: className
55
52
  }, wrappedPrefix, before, wrappedOption, after, wrappedSuffix);
56
53
  }
57
-
58
54
  static renderGroupSeparator(suggestion, prevSuggestion) {
59
55
  const {
60
56
  group,
@@ -63,7 +59,6 @@ class QueryAssistSuggestions {
63
59
  const {
64
60
  SEPARATOR
65
61
  } = List.ListProps.Type;
66
-
67
62
  if (prevSuggestion !== group) {
68
63
  return {
69
64
  key: option + group + SEPARATOR,
@@ -71,25 +66,20 @@ class QueryAssistSuggestions {
71
66
  rgItemType: SEPARATOR
72
67
  };
73
68
  }
74
-
75
69
  return null;
76
70
  }
77
-
78
71
  static renderList(suggestions, suggestionRenderer) {
79
72
  const renderedSuggestions = [];
80
73
  suggestions.forEach((suggestion, index, arr) => {
81
74
  const prevSuggestionGroup = arr[index - 1] && arr[index - 1].group;
82
75
  const groupSeparator = QueryAssistSuggestions.renderGroupSeparator(suggestion, prevSuggestionGroup);
83
-
84
76
  if (groupSeparator) {
85
77
  renderedSuggestions.push(groupSeparator);
86
78
  }
87
-
88
79
  renderedSuggestions.push(suggestionRenderer(suggestion));
89
80
  });
90
81
  return renderedSuggestions;
91
82
  }
92
-
93
83
  }
94
84
 
95
85
  export { QueryAssistSuggestions as Q, modules_da7ab055 as m };
@@ -10,39 +10,31 @@ import { ControlsHeight } from '../global/controls-height.js';
10
10
  var modules_b607bec2 = {"unit":"8px","filterWithTags":"filterWithTags_rui_531d","filterWrapper":"filterWrapper_rui_531d","filterWithTagsFocused":"filterWithTagsFocused_rui_531d","filter":"filter_rui_531d","filterIcon":"filterIcon_rui_531d","bottomLine":"bottomLine_rui_531d","message":"message_rui_531d","selectAll":"selectAll_rui_531d"};
11
11
 
12
12
  function noop() {}
13
-
14
13
  class SelectFilter extends Component {
15
14
  constructor() {
16
15
  super(...arguments);
17
-
18
16
  _defineProperty(this, "input", void 0);
19
-
20
17
  _defineProperty(this, "inputRef", el => {
21
18
  this.input = el;
22
19
  this.props.inputRef(el);
23
20
  });
24
21
  }
25
-
26
22
  componentWillUnmount() {
27
23
  this.blur();
28
24
  }
29
-
30
25
  focus() {
31
26
  const {
32
27
  input
33
28
  } = this;
34
-
35
29
  if (input && input !== document.activeElement) {
36
30
  sniffr.browser.name === 'firefox' ? input.select() : input.focus();
37
31
  }
38
32
  }
39
-
40
33
  blur() {
41
34
  if (this.input && this.input === document.activeElement) {
42
35
  this.input.blur();
43
36
  }
44
37
  }
45
-
46
38
  render() {
47
39
  const {
48
40
  className,
@@ -61,14 +53,11 @@ class SelectFilter extends Component {
61
53
  className: classes
62
54
  })));
63
55
  }
64
-
65
56
  }
66
-
67
57
  _defineProperty(SelectFilter, "defaultProps", {
68
58
  placeholder: 'Filter items',
69
59
  inputRef: noop
70
60
  });
71
-
72
61
  SelectFilter.propTypes = {
73
62
  placeholder: PropTypes.string,
74
63
  className: PropTypes.string,
@@ -24,9 +24,7 @@ class ServicesLink extends PureComponent {
24
24
  key: "text"
25
25
  }, /*#__PURE__*/React.createElement(WrapText, null, service.name))] : /*#__PURE__*/React.createElement(WrapText, null, service.name));
26
26
  }
27
-
28
27
  }
29
-
30
28
  _defineProperty(ServicesLink, "propTypes", {
31
29
  isActive: PropTypes.bool,
32
30
  service: PropTypes.shape({
@@ -11,15 +11,12 @@ const INSIDE = 'inside';
11
11
  class Sidebar extends Component {
12
12
  constructor() {
13
13
  super(...arguments);
14
-
15
14
  _defineProperty(this, "state", {
16
15
  topIsOutside: true,
17
16
  bottomIsOutside: true,
18
17
  sidebarVisibleHeight: undefined
19
18
  });
20
-
21
19
  _defineProperty(this, "sidebarNode", void 0);
22
-
23
20
  _defineProperty(this, "handleTopWaypoint", _ref => {
24
21
  let {
25
22
  currentPosition
@@ -28,7 +25,6 @@ class Sidebar extends Component {
28
25
  topIsOutside: currentPosition === ABOVE
29
26
  });
30
27
  });
31
-
32
28
  _defineProperty(this, "handleBottomWaypoint", _ref2 => {
33
29
  let {
34
30
  currentPosition,
@@ -39,12 +35,10 @@ class Sidebar extends Component {
39
35
  bottomIsOutside: currentPosition !== INSIDE
40
36
  });
41
37
  });
42
-
43
38
  _defineProperty(this, "sidebarRef", node => {
44
39
  this.sidebarNode = node;
45
40
  });
46
41
  }
47
-
48
42
  shouldUseFixation() {
49
43
  const {
50
44
  contentNode
@@ -52,14 +46,11 @@ class Sidebar extends Component {
52
46
  const {
53
47
  sidebarNode
54
48
  } = this;
55
-
56
49
  if (!contentNode || !sidebarNode) {
57
50
  return false;
58
51
  }
59
-
60
52
  return contentNode.offsetHeight >= sidebarNode.offsetHeight;
61
53
  }
62
-
63
54
  shouldFixateBottom() {
64
55
  const {
65
56
  topIsOutside,
@@ -67,7 +58,6 @@ class Sidebar extends Component {
67
58
  } = this.state;
68
59
  return !bottomIsOutside && topIsOutside && this.shouldUseFixation();
69
60
  }
70
-
71
61
  render() {
72
62
  const {
73
63
  right,
@@ -113,9 +103,7 @@ class Sidebar extends Component {
113
103
  onLeave: this.handleBottomWaypoint
114
104
  })));
115
105
  }
116
-
117
106
  }
118
-
119
107
  _defineProperty(Sidebar, "propTypes", {
120
108
  right: PropTypes.bool,
121
109
  children: PropTypes.node,
@@ -9,19 +9,16 @@ import getUID from '../global/get-uid.js';
9
9
  var modules_59717246 = {"dark":"dark_rui_eb55"};
10
10
 
11
11
  var Theme;
12
-
13
12
  (function (Theme) {
14
13
  Theme["AUTO"] = "auto";
15
14
  Theme["LIGHT"] = "light";
16
15
  Theme["DARK"] = "dark";
17
16
  })(Theme || (Theme = {}));
18
-
19
17
  const darkMatcher = window.matchMedia('(prefers-color-scheme: dark)');
20
18
  function useTheme() {
21
19
  const [dark, setDark] = useState(darkMatcher.matches);
22
20
  useEffect(() => {
23
21
  const onChange = e => setDark(e.matches);
24
-
25
22
  darkMatcher.addEventListener('change', onChange);
26
23
  return () => darkMatcher.removeEventListener('change', onChange);
27
24
  }, []);
@@ -12,30 +12,24 @@ var modules_09d014b4 = {"unit":"8px","height":"32px","compensate":"2px","dataLis
12
12
  class Title extends PureComponent {
13
13
  constructor() {
14
14
  super(...arguments);
15
-
16
15
  _defineProperty(this, "id", getUID('data-list-title'));
17
-
18
16
  _defineProperty(this, "onCheckboxFocus", () => {
19
17
  this.props.onFocusRestore();
20
18
  });
21
-
22
19
  _defineProperty(this, "onCheckboxChange", () => {
23
20
  this.toggleSelection();
24
21
  });
25
22
  }
26
-
27
23
  toggleSelection() {
28
24
  const {
29
25
  selectable,
30
26
  selected,
31
27
  onSelect
32
28
  } = this.props;
33
-
34
29
  if (selectable) {
35
30
  onSelect(!selected);
36
31
  }
37
32
  }
38
-
39
33
  render() {
40
34
  const {
41
35
  className,
@@ -72,15 +66,12 @@ class Title extends PureComponent {
72
66
  tabIndex: -1
73
67
  })), collapserExpander), title);
74
68
  }
75
-
76
69
  }
77
-
78
70
  _defineProperty(Title, "defaultProps", {
79
71
  selectable: false,
80
72
  selected: false,
81
73
  showFocus: false
82
74
  });
83
-
84
75
  Title.propTypes = {
85
76
  className: PropTypes.string,
86
77
  title: PropTypes.node,