@jetbrains/ring-ui 5.0.127 → 5.0.128

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 (304) 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.js +3 -2
  85. package/components/table/table.js +4 -2
  86. package/components/tabs/smart-tabs.js +2 -1
  87. package/components/tabs/tab.js +2 -1
  88. package/components/tag/tag.js +2 -1
  89. package/components/tags-input/tags-input.d.ts +1 -1
  90. package/components/tags-input/tags-input.js +3 -2
  91. package/components/tags-list/tags-list.js +2 -1
  92. package/components/text/text.js +2 -1
  93. package/components/tooltip/tooltip.js +2 -1
  94. package/components/user-agreement/user-agreement.js +2 -1
  95. package/components/user-card/card.js +2 -1
  96. package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
  97. package/components/user-card/smart-user-card-tooltip.js +2 -1
  98. package/components/user-card/tooltip.js +2 -1
  99. package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -29
  100. package/dist/_helpers/anchor.js +1 -1
  101. package/dist/_helpers/card.js +44 -47
  102. package/dist/_helpers/footer.js +1 -0
  103. package/dist/_helpers/select__filter.js +10 -13
  104. package/dist/_helpers/services-link.js +10 -10
  105. package/dist/_helpers/sidebar.js +34 -37
  106. package/dist/_helpers/theme.js +1 -1
  107. package/dist/_helpers/title.js +12 -16
  108. package/dist/alert/alert.js +63 -66
  109. package/dist/alert/container.js +5 -5
  110. package/dist/alert-service/alert-service.js +5 -7
  111. package/dist/analytics/analytics.js +1 -2
  112. package/dist/analytics/analytics__custom-plugin.js +6 -8
  113. package/dist/auth/auth.js +1 -1
  114. package/dist/auth/auth__core.js +26 -26
  115. package/dist/auth/background-flow.js +4 -5
  116. package/dist/auth/iframe-flow.js +12 -12
  117. package/dist/auth/landing.js +1 -1
  118. package/dist/auth/request-builder.js +3 -5
  119. package/dist/auth/response-parser.js +5 -6
  120. package/dist/auth/storage.js +12 -12
  121. package/dist/auth/token-validator.js +13 -16
  122. package/dist/auth/window-flow.js +18 -19
  123. package/dist/auth-dialog/auth-dialog.js +54 -57
  124. package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
  125. package/dist/auth-ng/auth-ng.js +1 -1
  126. package/dist/avatar/avatar.js +30 -33
  127. package/dist/avatar-ng/avatar-ng.js +1 -1
  128. package/dist/badge/badge.js +10 -10
  129. package/dist/badge-ng/badge-ng.js +1 -1
  130. package/dist/breadcrumb-ng/breadcrumb-ng.js +0 -1
  131. package/dist/button/button.js +24 -27
  132. package/dist/button-group/button-group.js +5 -5
  133. package/dist/button-group/caption.js +4 -4
  134. package/dist/button-ng/button-ng.js +68 -69
  135. package/dist/button-set/button-set.js +6 -6
  136. package/dist/button-toolbar/button-toolbar.js +6 -6
  137. package/dist/caret/caret.js +2 -4
  138. package/dist/checkbox/checkbox.js +27 -30
  139. package/dist/checkbox-ng/checkbox-ng.js +0 -1
  140. package/dist/code/code.js +17 -21
  141. package/dist/confirm/confirm.js +31 -34
  142. package/dist/confirm-ng/confirm-ng.js +1 -1
  143. package/dist/confirm-service/confirm-service.js +1 -1
  144. package/dist/content-layout/content-layout.js +17 -20
  145. package/dist/contenteditable/contenteditable.js +11 -11
  146. package/dist/data-list/data-list.js +49 -55
  147. package/dist/data-list/item.js +64 -67
  148. package/dist/data-list/selection.js +0 -1
  149. package/dist/data-list/title.js +1 -1
  150. package/dist/data-list-ng/data-list-ng.js +1 -1
  151. package/dist/date-picker/date-input.js +39 -42
  152. package/dist/date-picker/date-picker.js +162 -165
  153. package/dist/date-picker/date-popup.js +119 -119
  154. package/dist/date-picker/day.js +34 -38
  155. package/dist/date-picker/month-names.js +11 -14
  156. package/dist/date-picker/month-slider.js +24 -28
  157. package/dist/date-picker/month.js +1 -1
  158. package/dist/date-picker/months.js +1 -1
  159. package/dist/date-picker/years.js +9 -13
  160. package/dist/dialog/dialog.d.ts +4 -16
  161. package/dist/dialog/dialog.js +68 -65
  162. package/dist/dialog-ng/dialog-ng.js +21 -22
  163. package/dist/docked-panel-ng/docked-panel-ng.js +0 -1
  164. package/dist/dropdown/dropdown.js +101 -104
  165. package/dist/dropdown-menu/dropdown-menu.js +1 -1
  166. package/dist/editable-heading/editable-heading.js +1 -1
  167. package/dist/error-bubble/error-bubble.js +6 -6
  168. package/dist/error-message/error-message.js +10 -10
  169. package/dist/error-message-ng/error-message-ng.js +0 -1
  170. package/dist/footer-ng/footer-ng.js +19 -21
  171. package/dist/global/angular-component-factory.js +2 -3
  172. package/dist/global/dom.js +1 -5
  173. package/dist/global/focus-sensor-hoc.js +58 -61
  174. package/dist/global/listeners.js +1 -5
  175. package/dist/global/react-dom-renderer.js +8 -12
  176. package/dist/global/rerender-hoc.js +1 -5
  177. package/dist/global/ring-angular-component.js +1 -3
  178. package/dist/grid/col.js +13 -14
  179. package/dist/grid/grid.js +5 -5
  180. package/dist/grid/row.js +16 -17
  181. package/dist/group/group.js +5 -5
  182. package/dist/header/header.js +10 -10
  183. package/dist/header/logo.js +9 -9
  184. package/dist/header/profile.js +58 -58
  185. package/dist/header/services.js +19 -22
  186. package/dist/header/smart-profile.js +40 -43
  187. package/dist/header/smart-services.js +28 -31
  188. package/dist/header/tray-icon.js +6 -6
  189. package/dist/header/tray.js +5 -5
  190. package/dist/heading/heading.js +1 -1
  191. package/dist/heading-ng/heading-ng.js +1 -1
  192. package/dist/http/http.js +111 -107
  193. package/dist/http/http.mock.js +3 -4
  194. package/dist/hub-source/hub-source.js +7 -9
  195. package/dist/hub-source/hub-source__user.js +0 -1
  196. package/dist/hub-source/hub-source__users-groups.js +4 -5
  197. package/dist/icon/icon.js +18 -18
  198. package/dist/icon/icon__svg.js +1 -1
  199. package/dist/icon-ng/icon-ng.js +0 -1
  200. package/dist/input/input.js +35 -38
  201. package/dist/input-ng/input-ng.js +25 -26
  202. package/dist/island/adaptive-island-hoc.js +21 -25
  203. package/dist/island/content.js +62 -65
  204. package/dist/island/header.js +11 -11
  205. package/dist/island/island.js +8 -8
  206. package/dist/island-legacy/content-legacy.js +5 -5
  207. package/dist/island-legacy/header-legacy.js +5 -5
  208. package/dist/island-legacy/island-legacy.js +5 -5
  209. package/dist/link/clickableLink.js +27 -30
  210. package/dist/link/link.js +16 -16
  211. package/dist/list/list.js +389 -391
  212. package/dist/list/list__custom.js +6 -10
  213. package/dist/list/list__hint.js +3 -4
  214. package/dist/list/list__item.js +4 -7
  215. package/dist/list/list__link.js +1 -1
  216. package/dist/list/list__users-groups-source.js +3 -3
  217. package/dist/loader/loader.js +16 -19
  218. package/dist/loader/loader__core.js +62 -62
  219. package/dist/loader-inline/loader-inline.js +6 -6
  220. package/dist/loader-ng/loader-ng.js +3 -4
  221. package/dist/loader-screen/loader-screen.js +6 -6
  222. package/dist/loader-screen-ng/loader-screen-ng.js +0 -1
  223. package/dist/login-dialog/login-dialog.js +55 -58
  224. package/dist/login-dialog/service.js +1 -1
  225. package/dist/markdown/code.js +0 -1
  226. package/dist/markdown/markdown.js +1 -1
  227. package/dist/message/message.js +22 -25
  228. package/dist/old-browsers-message/white-list.js +2 -2
  229. package/dist/pager/pager.js +55 -58
  230. package/dist/pager-ng/pager-ng.js +1 -1
  231. package/dist/panel/panel.js +5 -5
  232. package/dist/panel-ng/panel-ng.js +0 -1
  233. package/dist/permissions/permissions.js +14 -16
  234. package/dist/permissions/permissions__cache.js +4 -6
  235. package/dist/permissions-ng/permissions-ng.js +1 -1
  236. package/dist/place-under-ng/place-under-ng.js +0 -1
  237. package/dist/popup/popup.js +118 -121
  238. package/dist/popup/popup.target.js +1 -1
  239. package/dist/popup/position.js +0 -1
  240. package/dist/popup-menu/popup-menu.js +19 -22
  241. package/dist/progress-bar/progress-bar.js +41 -44
  242. package/dist/progress-bar-ng/progress-bar-ng.js +1 -1
  243. package/dist/promised-click-ng/promised-click-ng.js +0 -1
  244. package/dist/query-assist/query-assist.js +507 -501
  245. package/dist/query-assist/query-assist__suggestions.js +1 -1
  246. package/dist/query-assist-ng/query-assist-ng.js +1 -1
  247. package/dist/radio/radio.js +10 -13
  248. package/dist/radio/radio__item.js +19 -22
  249. package/dist/select/select.js +350 -349
  250. package/dist/select/select__popup.js +148 -152
  251. package/dist/select-ng/select-ng.js +1 -1
  252. package/dist/select-ng/select-ng__lazy.js +4 -4
  253. package/dist/select-ng/select-ng__options.js +14 -15
  254. package/dist/shortcuts/core.js +35 -36
  255. package/dist/shortcuts/shortcuts-hoc.js +7 -11
  256. package/dist/shortcuts/shortcuts.js +10 -11
  257. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -1
  258. package/dist/shortcuts-ng/shortcuts-ng.js +0 -1
  259. package/dist/sidebar-ng/sidebar-ng.js +0 -1
  260. package/dist/storage/storage.js +1 -1
  261. package/dist/storage/storage__fallback.js +8 -10
  262. package/dist/storage/storage__local.js +2 -2
  263. package/dist/style.css +1 -1
  264. package/dist/tab-trap/tab-trap.js +84 -86
  265. package/dist/table/cell.js +6 -6
  266. package/dist/table/disable-hover-hoc.js +23 -25
  267. package/dist/table/header-cell.js +28 -31
  268. package/dist/table/header.js +58 -61
  269. package/dist/table/multitable.js +91 -95
  270. package/dist/table/row-with-focus-sensor.js +15 -18
  271. package/dist/table/row.js +51 -54
  272. package/dist/table/selection-shortcuts-hoc.js +145 -147
  273. package/dist/table/selection.js +7 -9
  274. package/dist/table/smart-table.js +21 -24
  275. package/dist/table/table.js +103 -109
  276. package/dist/table-legacy-ng/table-legacy-ng.js +1 -1
  277. package/dist/table-legacy-ng/table-legacy-ng__pager.js +1 -1
  278. package/dist/table-legacy-ng/table-legacy-ng__selection.js +1 -3
  279. package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +0 -1
  280. package/dist/table-ng/smart-table-ng.js +1 -1
  281. package/dist/table-ng/table-ng.js +1 -1
  282. package/dist/tabs/collapsible-more.js +1 -1
  283. package/dist/tabs/collapsible-tab.js +1 -1
  284. package/dist/tabs/dumb-tabs.js +46 -49
  285. package/dist/tabs/smart-tabs.js +10 -10
  286. package/dist/tabs/tab.js +7 -8
  287. package/dist/tag/tag.js +42 -45
  288. package/dist/tags-input/tags-input.d.ts +1 -1
  289. package/dist/tags-input/tags-input.js +214 -213
  290. package/dist/tags-input-ng/tags-input-ng.js +1 -1
  291. package/dist/tags-list/tags-list.js +20 -20
  292. package/dist/template-ng/template-ng.js +25 -26
  293. package/dist/text/text.js +6 -6
  294. package/dist/toggle/toggle.js +19 -19
  295. package/dist/toggle-ng/toggle-ng.js +1 -1
  296. package/dist/tooltip/tooltip.js +86 -89
  297. package/dist/tooltip-ng/tooltip-ng.js +1 -1
  298. package/dist/user-agreement/service.js +207 -205
  299. package/dist/user-agreement/user-agreement.js +39 -42
  300. package/dist/user-card/smart-user-card-tooltip.d.ts +1 -1
  301. package/dist/user-card/smart-user-card-tooltip.js +32 -35
  302. package/dist/user-card/tooltip.js +26 -26
  303. package/dist/user-card-ng/user-card-ng.js +1 -1
  304. package/package.json +15 -15
@@ -5,11 +5,11 @@ const MAJOR_VERSION_INDEX = 0;
5
5
  /**
6
6
  * SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
7
7
  */
8
- if (!["and_chr 111", "chrome 110", "chrome 109", "edge 110", "edge 109", "firefox 109", "ios_saf 16.3", "ios_saf 16.2", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "samsung 19.0"]) {
8
+ if (!["and_chr 111", "chrome 111", "chrome 110", "chrome 109", "edge 111", "edge 110", "firefox 110", "ios_saf 16.3", "ios_saf 16.2", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "op_mini all", "safari 16.3", "samsung 20"]) {
9
9
  // eslint-disable-next-line no-console
10
10
  console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
11
11
  }
12
- const SUPPORTED = ["and_chr 111", "chrome 110", "chrome 109", "edge 110", "edge 109", "firefox 109", "ios_saf 16.3", "ios_saf 16.2", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "samsung 19.0"] || [];
12
+ const SUPPORTED = ["and_chr 111", "chrome 111", "chrome 110", "chrome 109", "edge 111", "edge 110", "firefox 110", "ios_saf 16.3", "ios_saf 16.2", "ios_saf 16.1", "ios_saf 16.0", "ios_saf 15.6", "op_mini all", "safari 16.3", "samsung 20"] || [];
13
13
  const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
14
14
  const WHITE_LIST = SUPPORTED.reduce((acc, item) => {
15
15
  var _item$match;
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React, { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -90,42 +90,27 @@ import '../_helpers/select__filter.js';
90
90
  var modules_1a5f0d42 = {"unit":"i__const_unit_0","light":"light_rui_2db7","pager":"pager_rui_2db7","links":"links_rui_2db7","link":"link_rui_2db7","linkDisabled":"linkDisabled_rui_2db7"};
91
91
 
92
92
  class Pager extends PureComponent {
93
- constructor() {
94
- super(...arguments);
95
- _defineProperty(this, "handlePageSizeChange", item => {
96
- if (item != null) {
97
- this.props.onPageSizeChange(item.key);
98
- }
99
- });
100
- _defineProperty(this, "handlePrevClick", () => {
101
- const {
102
- currentPage
103
- } = this.props;
104
- if (currentPage !== 1) {
105
- const prevPage = currentPage - 1;
106
- this.props.onPageChange?.(prevPage);
107
- }
108
- });
109
- _defineProperty(this, "handleNextClick", () => {
110
- const {
111
- currentPage,
112
- onLoadPage
113
- } = this.props;
114
- const nextPage = currentPage + 1;
115
- const total = this.getTotalPages();
116
- if (currentPage !== total) {
117
- this.props.onPageChange?.(nextPage);
118
- } else if (this.props.openTotal) {
119
- onLoadPage(nextPage);
120
- }
121
- });
122
- _defineProperty(this, "handlePageChange", memoize(i => event => {
123
- this.props.onPageChange?.(i, event);
124
- }));
125
- _defineProperty(this, "handleLoadMore", memoize(i => () => {
126
- this.props.onLoadPage(i);
127
- }));
128
- }
93
+ static defaultProps = {
94
+ currentPage: 1,
95
+ pageSize: 50,
96
+ // eslint-disable-next-line @typescript-eslint/no-magic-numbers
97
+ pageSizes: [20, 50, 100],
98
+ visiblePagesLimit: 7,
99
+ disablePageSizeSelector: false,
100
+ openTotal: false,
101
+ canLoadLastPageWithOpenTotal: false,
102
+ translations: {
103
+ perPage: 'per page',
104
+ firstPage: 'First page',
105
+ lastPage: 'Last page',
106
+ nextPage: 'Next page',
107
+ previousPage: 'Previous'
108
+ },
109
+ loader: false,
110
+ loaderNavigation: false,
111
+ onPageSizeChange: () => {},
112
+ onLoadPage: () => {}
113
+ };
129
114
  getSelectOptions() {
130
115
  const {
131
116
  pageSize,
@@ -148,6 +133,39 @@ class Pager extends PureComponent {
148
133
  } = this.props;
149
134
  return Math.ceil(total / pageSize);
150
135
  }
136
+ handlePageSizeChange = item => {
137
+ if (item != null) {
138
+ this.props.onPageSizeChange(item.key);
139
+ }
140
+ };
141
+ handlePrevClick = () => {
142
+ const {
143
+ currentPage
144
+ } = this.props;
145
+ if (currentPage !== 1) {
146
+ const prevPage = currentPage - 1;
147
+ this.props.onPageChange?.(prevPage);
148
+ }
149
+ };
150
+ handleNextClick = () => {
151
+ const {
152
+ currentPage,
153
+ onLoadPage
154
+ } = this.props;
155
+ const nextPage = currentPage + 1;
156
+ const total = this.getTotalPages();
157
+ if (currentPage !== total) {
158
+ this.props.onPageChange?.(nextPage);
159
+ } else if (this.props.openTotal) {
160
+ onLoadPage(nextPage);
161
+ }
162
+ };
163
+ handlePageChange = memoize(i => event => {
164
+ this.props.onPageChange?.(i, event);
165
+ });
166
+ handleLoadMore = memoize(i => () => {
167
+ this.props.onLoadPage(i);
168
+ });
151
169
  getButton(page, content, key, active) {
152
170
  return /*#__PURE__*/React.createElement(Button, _extends({
153
171
  href: this.generateHref(page),
@@ -287,27 +305,6 @@ class Pager extends PureComponent {
287
305
  }, this.getTotalPages() > 1 || this.props.openTotal ? this.getPagerContent() : this.getPageSizeSelector());
288
306
  }
289
307
  }
290
- _defineProperty(Pager, "defaultProps", {
291
- currentPage: 1,
292
- pageSize: 50,
293
- // eslint-disable-next-line @typescript-eslint/no-magic-numbers
294
- pageSizes: [20, 50, 100],
295
- visiblePagesLimit: 7,
296
- disablePageSizeSelector: false,
297
- openTotal: false,
298
- canLoadLastPageWithOpenTotal: false,
299
- translations: {
300
- perPage: 'per page',
301
- firstPage: 'First page',
302
- lastPage: 'Last page',
303
- nextPage: 'Next page',
304
- previousPage: 'Previous'
305
- },
306
- loader: false,
307
- loaderNavigation: false,
308
- onPageSizeChange: () => {},
309
- onLoadPage: () => {}
310
- });
311
308
  Pager.propTypes = {
312
309
  total: PropTypes.number.isRequired,
313
310
  currentPage: PropTypes.number,
@@ -1,6 +1,5 @@
1
1
  import angularComponentFactory from '../global/angular-component-factory.js';
2
2
  import Pager$1 from '../pager/pager.js';
3
- import '../_helpers/_rollupPluginBabelHelpers.js';
4
3
  import 'angular';
5
4
  import 'react';
6
5
  import '../global/react-render-adapter.js';
@@ -8,6 +7,7 @@ import 'react-dom';
8
7
  import '../global/ring-angular-component.js';
9
8
  import '../global/react-dom-renderer.js';
10
9
  import 'prop-types';
10
+ import '../_helpers/_rollupPluginBabelHelpers.js';
11
11
  import 'classnames';
12
12
  import '@jetbrains/icons/chevron-left';
13
13
  import '@jetbrains/icons/chevron-right';
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React, { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -8,6 +8,10 @@ import { m as modules_cf670408 } from '../_helpers/panel.js';
8
8
  * @name Panel
9
9
  */
10
10
  class Panel extends PureComponent {
11
+ static propTypes = {
12
+ className: PropTypes.string,
13
+ children: PropTypes.node
14
+ };
11
15
  render() {
12
16
  const {
13
17
  className,
@@ -20,9 +24,5 @@ class Panel extends PureComponent {
20
24
  }), children);
21
25
  }
22
26
  }
23
- _defineProperty(Panel, "propTypes", {
24
- className: PropTypes.string,
25
- children: PropTypes.node
26
- });
27
27
 
28
28
  export { Panel as default };
@@ -1,7 +1,6 @@
1
1
  import angular from 'angular';
2
2
  import { m as modules_cf670408 } from '../_helpers/panel.js';
3
3
  import { addClasses } from '../global/dom.js';
4
- import '../_helpers/_rollupPluginBabelHelpers.js';
5
4
 
6
5
  const angularModule = angular.module('Ring.panel', []);
7
6
  angularModule.directive('rgPanel', function rgEqualValueDirective() {
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import PermissionCache from './permissions__cache.js';
3
2
 
4
3
  /**
@@ -29,22 +28,16 @@ class Permissions {
29
28
  /**
30
29
  * @const {string}
31
30
  */
32
-
31
+ static API_PERMISSION_CACHE_PATH = 'permissions/cache';
32
+ query;
33
+ namesConverter;
34
+ _auth;
35
+ _datasource;
36
+ _promise;
37
+ _subscribed;
38
+ _permissionCache;
33
39
  constructor(auth) {
34
40
  let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
35
- _defineProperty(this, "query", void 0);
36
- _defineProperty(this, "namesConverter", void 0);
37
- _defineProperty(this, "_auth", void 0);
38
- _defineProperty(this, "_datasource", void 0);
39
- _defineProperty(this, "_promise", void 0);
40
- _defineProperty(this, "_subscribed", void 0);
41
- _defineProperty(this, "_permissionCache", void 0);
42
- _defineProperty(this, "_defaultDatasource", query => this._auth.http.get(Permissions.API_PERMISSION_CACHE_PATH, {
43
- query: {
44
- fields: 'permission/key,global,projects(id)',
45
- query
46
- }
47
- }));
48
41
  this.query = Permissions.getPermissionQuery(config.services);
49
42
  this.namesConverter = config.prefix ? Permissions.getDefaultNamesConverter(config.prefix) : config.namesConverter;
50
43
  if (!auth) {
@@ -56,6 +49,12 @@ class Permissions {
56
49
  this._subscribed = false;
57
50
  this._permissionCache = new PermissionCache(null, this.namesConverter);
58
51
  }
52
+ _defaultDatasource = query => this._auth.http.get(Permissions.API_PERMISSION_CACHE_PATH, {
53
+ query: {
54
+ fields: 'permission/key,global,projects(id)',
55
+ query
56
+ }
57
+ });
59
58
  /**
60
59
  * Returns function, which cuts off prefix from server-side permission name
61
60
  *
@@ -172,6 +171,5 @@ class Permissions {
172
171
  });
173
172
  }
174
173
  }
175
- _defineProperty(Permissions, "API_PERMISSION_CACHE_PATH", 'permissions/cache');
176
174
 
177
175
  export { Permissions as default };
@@ -1,5 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
-
3
1
  /**
4
2
  * Converts an array of cached permissions to a a map of a permission key
5
3
  * to the respective cached permission.
@@ -14,6 +12,7 @@ import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
14
12
  * @private
15
13
  */
16
14
  class PermissionCache {
15
+ static GLOBAL_PROJECT_ID = 'global';
17
16
  /**
18
17
  * Convert an array of projects to a set of project ids.
19
18
  *
@@ -31,13 +30,13 @@ class PermissionCache {
31
30
  }
32
31
  return projectIdSet;
33
32
  }
33
+ namesConverter;
34
34
  constructor(permissions, namesConverter) {
35
- _defineProperty(this, "namesConverter", void 0);
36
- _defineProperty(this, "_permissions", void 0);
37
- _defineProperty(this, "permissionCache", void 0);
38
35
  this.namesConverter = namesConverter || (key => key);
39
36
  this.set(permissions);
40
37
  }
38
+ _permissions;
39
+ permissionCache;
41
40
  set(permissions) {
42
41
  const permissionCache = (permissions || []).reduce((_permissionCache, permission) => {
43
42
  const key = this.namesConverter(permission.permission.key);
@@ -223,6 +222,5 @@ class PermissionCache {
223
222
  }
224
223
  }
225
224
  }
226
- _defineProperty(PermissionCache, "GLOBAL_PROJECT_ID", 'global');
227
225
 
228
226
  export { PermissionCache as default };
@@ -4,7 +4,6 @@ import Permissions from '../permissions/permissions.js';
4
4
  import PermissionCache from '../permissions/permissions__cache.js';
5
5
  import '../auth/auth.js';
6
6
  import '../auth/window-flow.js';
7
- import '../_helpers/_rollupPluginBabelHelpers.js';
8
7
  import '../auth/response-parser.js';
9
8
  import 'es6-error';
10
9
  import '../global/url.js';
@@ -12,6 +11,7 @@ import '../auth/down-notification.js';
12
11
  import 'react';
13
12
  import 'prop-types';
14
13
  import '../alert-service/alert-service.js';
14
+ import '../_helpers/_rollupPluginBabelHelpers.js';
15
15
  import '../global/react-render-adapter.js';
16
16
  import 'react-dom';
17
17
  import '../global/get-uid.js';
@@ -2,7 +2,6 @@ import angular from 'angular';
2
2
  import debounce from 'just-debounce-it';
3
3
  import createResizeDetector from 'element-resize-detector';
4
4
  import { getDocumentScrollTop } from '../global/dom.js';
5
- import '../_helpers/_rollupPluginBabelHelpers.js';
6
5
 
7
6
  const resizeDetector = createResizeDetector();
8
7
  const angularModule = angular.module('Ring.place-under', []);
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React, { PureComponent } from 'react';
3
2
  import { createPortal } from 'react-dom';
4
3
  import PropTypes from 'prop-types';
@@ -10,12 +9,13 @@ import Shortcuts from '../shortcuts/shortcuts.js';
10
9
  import joinDataTestAttributes from '../global/data-tests.js';
11
10
  import TabTrap from '../tab-trap/tab-trap.js';
12
11
  import position from './position.js';
13
- import { Display, DEFAULT_DIRECTIONS, Directions, Dimension, MinWidth, MaxHeight } from './popup.consts.js';
12
+ import { DEFAULT_DIRECTIONS, Display, Directions, Dimension, MinWidth, MaxHeight } from './popup.consts.js';
14
13
  import { PopupTargetContext, PopupTarget } from './popup.target.js';
15
14
  import '../shortcuts/core.js';
16
15
  import 'combokeys';
17
16
  import '../global/sniffer.js';
18
17
  import 'sniffr';
18
+ import '../_helpers/_rollupPluginBabelHelpers.js';
19
19
 
20
20
  var modules_2f69e2e2 = {"light":"light_rui_7cd4","popup":"popup_rui_7cd4 font_rui_8bff","hidden":"hidden_rui_7cd4","showing":"showing_rui_7cd4","attached":"attached_rui_7cd4"};
21
21
 
@@ -27,98 +27,30 @@ const getPopupContainer = target => typeof target === 'string' ? document.queryS
27
27
  * @extends {ReactComponent}
28
28
  */
29
29
  class Popup extends PureComponent {
30
- constructor() {
31
- super(...arguments);
32
- _defineProperty(this, "state", {
33
- display: Display.SHOWING
34
- });
35
- _defineProperty(this, "popup", void 0);
36
- _defineProperty(this, "node", void 0);
37
- _defineProperty(this, "parent", void 0);
38
- _defineProperty(this, "container", void 0);
39
- _defineProperty(this, "ringPopupTarget", void 0);
40
- _defineProperty(this, "listeners", new Listeners());
41
- _defineProperty(this, "redrawScheduler", scheduleRAF(true));
42
- _defineProperty(this, "uid", getUID('popup-'));
43
- _defineProperty(this, "calculateDisplay", prevState => ({
44
- ...prevState,
45
- display: this.props.hidden ? Display.SHOWING : Display.SHOWN
46
- }));
47
- _defineProperty(this, "portalRef", el => {
48
- this.node = el;
49
- this.parent = el && el.parentElement;
50
- if (el && this.getContainer()) {
51
- this._redraw();
52
- }
53
- });
54
- _defineProperty(this, "popupRef", el => {
55
- this.popup = el;
56
- this._redraw();
57
- });
58
- _defineProperty(this, "containerRef", el => {
59
- this.container = el;
60
- });
61
- _defineProperty(this, "_updateDirection", newDirection => {
62
- if (this.state.direction !== newDirection) {
63
- this.setState({
64
- direction: newDirection
65
- });
66
- if (this.props.onDirectionChange) {
67
- this.props.onDirectionChange(newDirection);
68
- }
69
- }
70
- });
71
- _defineProperty(this, "_updatePosition", () => {
72
- const popup = this.popup;
73
- if (popup) {
74
- popup.style.position = 'absolute';
75
- if (this.isVisible()) {
76
- const {
77
- styles: style,
78
- direction
79
- } = this.position();
80
- Object.entries(style).forEach(_ref => {
81
- let [key, value] = _ref;
82
- const propKey = key;
83
- if (typeof value === 'number') {
84
- popup.style[propKey] = `${value}px`;
85
- } else {
86
- popup.style[propKey] = value.toString();
87
- }
88
- });
89
- if (direction != null) {
90
- this._updateDirection(direction);
91
- }
92
- }
93
- this.setState(this.calculateDisplay);
94
- }
95
- });
96
- _defineProperty(this, "_redraw", () => {
97
- if (this.isVisible()) {
98
- this.redrawScheduler(this._updatePosition);
99
- }
100
- });
101
- _defineProperty(this, "_listenersEnabled", void 0);
102
- _defineProperty(this, "_onEscPress", evt => {
103
- this.props.onEscPress(evt);
104
- this._onCloseAttempt(evt, true);
105
- });
106
- /**
107
- * @param {jQuery.Event} evt
108
- * @private
109
- */
110
- _defineProperty(this, "_onDocumentClick", evt => {
111
- if (this.container && evt.target instanceof Node && this.container.contains(evt.target) || !this._listenersEnabled || this.props.dontCloseOnAnchorClick && evt.target instanceof Node && this._getAnchor()?.contains(evt.target)) {
112
- return;
113
- }
114
- this.props.onOutsideClick(evt);
115
- this._onCloseAttempt(evt, false);
116
- });
117
- _defineProperty(this, "shortcutsScope", this.uid);
118
- _defineProperty(this, "shortcutsMap", {
119
- esc: this._onEscPress
120
- });
121
- }
30
+ static defaultProps = {
31
+ shortcuts: true,
32
+ hidden: false,
33
+ onOutsideClick() {},
34
+ onEscPress() {},
35
+ onCloseAttempt() {},
36
+ dontCloseOnAnchorClick: false,
37
+ keepMounted: false,
38
+ directions: DEFAULT_DIRECTIONS,
39
+ autoPositioning: true,
40
+ autoPositioningOnScroll: true,
41
+ autoCorrectTopOverflow: true,
42
+ left: 0,
43
+ top: 0,
44
+ offset: 0,
45
+ sidePadding: 8,
46
+ attached: false,
47
+ trapFocus: false,
48
+ autoFocusFirst: false,
49
+ legacy: false
50
+ };
51
+ state = {
52
+ display: Display.SHOWING
53
+ };
122
54
  componentDidMount() {
123
55
  if (!this.props.client) {
124
56
  this.setState({
@@ -146,6 +78,11 @@ class Popup extends PureComponent {
146
78
  componentWillUnmount() {
147
79
  this._setListenersEnabled(false);
148
80
  }
81
+ popup;
82
+ node;
83
+ parent;
84
+ container;
85
+ ringPopupTarget;
149
86
  shouldUseShortcuts() {
150
87
  const {
151
88
  shortcuts,
@@ -153,6 +90,33 @@ class Popup extends PureComponent {
153
90
  } = this.props;
154
91
  return shortcuts && !hidden;
155
92
  }
93
+ listeners = new Listeners();
94
+ redrawScheduler = scheduleRAF(true);
95
+ uid = getUID('popup-');
96
+ calculateDisplay = prevState => ({
97
+ ...prevState,
98
+ display: this.props.hidden ? Display.SHOWING : Display.SHOWN
99
+ });
100
+ static PopupProps = {
101
+ Directions,
102
+ Dimension,
103
+ MinWidth,
104
+ MaxHeight
105
+ };
106
+ portalRef = el => {
107
+ this.node = el;
108
+ this.parent = el && el.parentElement;
109
+ if (el && this.getContainer()) {
110
+ this._redraw();
111
+ }
112
+ };
113
+ popupRef = el => {
114
+ this.popup = el;
115
+ this._redraw();
116
+ };
117
+ containerRef = el => {
118
+ this.container = el;
119
+ };
156
120
  getContainer() {
157
121
  const target = this.props.target || this.ringPopupTarget;
158
122
  return target && getPopupContainer(target);
@@ -185,9 +149,50 @@ class Popup extends PureComponent {
185
149
  minWidth
186
150
  });
187
151
  }
152
+ _updateDirection = newDirection => {
153
+ if (this.state.direction !== newDirection) {
154
+ this.setState({
155
+ direction: newDirection
156
+ });
157
+ if (this.props.onDirectionChange) {
158
+ this.props.onDirectionChange(newDirection);
159
+ }
160
+ }
161
+ };
162
+ _updatePosition = () => {
163
+ const popup = this.popup;
164
+ if (popup) {
165
+ popup.style.position = 'absolute';
166
+ if (this.isVisible()) {
167
+ const {
168
+ styles: style,
169
+ direction
170
+ } = this.position();
171
+ Object.entries(style).forEach(_ref => {
172
+ let [key, value] = _ref;
173
+ const propKey = key;
174
+ if (typeof value === 'number') {
175
+ popup.style[propKey] = `${value}px`;
176
+ } else {
177
+ popup.style[propKey] = value.toString();
178
+ }
179
+ });
180
+ if (direction != null) {
181
+ this._updateDirection(direction);
182
+ }
183
+ }
184
+ this.setState(this.calculateDisplay);
185
+ }
186
+ };
187
+ _redraw = () => {
188
+ if (this.isVisible()) {
189
+ this.redrawScheduler(this._updatePosition);
190
+ }
191
+ };
188
192
  _getAnchor() {
189
193
  return this.props.anchorElement || this.parent;
190
194
  }
195
+ _listenersEnabled;
191
196
  /**
192
197
  * @param {boolean} enable
193
198
  * @private
@@ -224,6 +229,21 @@ class Popup extends PureComponent {
224
229
  _onCloseAttempt(evt, isEsc) {
225
230
  this.props.onCloseAttempt(evt, isEsc);
226
231
  }
232
+ _onEscPress = evt => {
233
+ this.props.onEscPress(evt);
234
+ this._onCloseAttempt(evt, true);
235
+ };
236
+ /**
237
+ * @param {jQuery.Event} evt
238
+ * @private
239
+ */
240
+ _onDocumentClick = evt => {
241
+ if (this.container && evt.target instanceof Node && this.container.contains(evt.target) || !this._listenersEnabled || this.props.dontCloseOnAnchorClick && evt.target instanceof Node && this._getAnchor()?.contains(evt.target)) {
242
+ return;
243
+ }
244
+ this.props.onOutsideClick(evt);
245
+ this._onCloseAttempt(evt, false);
246
+ };
227
247
  getInternalContent() {
228
248
  const {
229
249
  trapFocus,
@@ -235,6 +255,10 @@ class Popup extends PureComponent {
235
255
  focusBackOnExit: true
236
256
  }, children) : children;
237
257
  }
258
+ shortcutsScope = this.uid;
259
+ shortcutsMap = {
260
+ esc: this._onEscPress
261
+ };
238
262
  render() {
239
263
  const {
240
264
  className,
@@ -293,33 +317,6 @@ class Popup extends PureComponent {
293
317
  });
294
318
  }
295
319
  }
296
- _defineProperty(Popup, "defaultProps", {
297
- shortcuts: true,
298
- hidden: false,
299
- onOutsideClick() {},
300
- onEscPress() {},
301
- onCloseAttempt() {},
302
- dontCloseOnAnchorClick: false,
303
- keepMounted: false,
304
- directions: DEFAULT_DIRECTIONS,
305
- autoPositioning: true,
306
- autoPositioningOnScroll: true,
307
- autoCorrectTopOverflow: true,
308
- left: 0,
309
- top: 0,
310
- offset: 0,
311
- sidePadding: 8,
312
- attached: false,
313
- trapFocus: false,
314
- autoFocusFirst: false,
315
- legacy: false
316
- });
317
- _defineProperty(Popup, "PopupProps", {
318
- Directions,
319
- Dimension,
320
- MinWidth,
321
- MaxHeight
322
- });
323
320
  Popup.propTypes = {
324
321
  anchorElement: PropTypes.instanceOf(Node),
325
322
  target: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Element)]),
@@ -1,4 +1,4 @@
1
- import { a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import React, { createContext, forwardRef } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
 
@@ -1,6 +1,5 @@
1
1
  import { getRect, isMounted, getDocumentScrollTop, getDocumentScrollLeft, getWindowHeight } from '../global/dom.js';
2
2
  import { MaxHeight, Dimension, MinWidth, Directions } from './popup.consts.js';
3
- import '../_helpers/_rollupPluginBabelHelpers.js';
4
3
 
5
4
  function getScrollingCoordinates(container) {
6
5
  if (container !== null) {