@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
@@ -1,8 +1,7 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import angular from 'angular';
3
2
  import classNames from 'classnames';
4
3
  import RingAngularComponent from '../global/ring-angular-component.js';
5
- import { addClasses, removeClasses, applyMethodToClasses } from '../global/dom.js';
4
+ import { applyMethodToClasses, addClasses, removeClasses } from '../global/dom.js';
6
5
  import IconNG from '../icon-ng/icon-ng.js';
7
6
  import { m as modules_e81895c9, g as getButtonClasses } from '../_helpers/button__classes.js';
8
7
  import { ControlsHeight } from '../global/controls-height.js';
@@ -36,75 +35,16 @@ const LOADER_BACKGROUND_SELECTOR = '.js-button-loader';
36
35
  class ButtonController extends RingAngularComponent {
37
36
  constructor() {
38
37
  super(...arguments);
39
- _defineProperty(this, "updateClasses", () => {
40
- const {
41
- $attrs
42
- } = this.$inject;
43
- const foreignClasses = [...this.element.classList].filter(name => !buttonClassesMap[name]);
44
- this.element.className = classNames(foreignClasses, getButtonClasses({
45
- height: $attrs.height || ControlsHeight.S,
46
- className: modules_e81895c9.button,
47
- active: this.getAttrValue($attrs.active),
48
- disabled: this.getAttrValue($attrs.disabled),
49
- loader: this.getAttrValue($attrs.loader),
50
- primary: $attrs.mode === 'primary' || $attrs.mode === 'blue',
51
- short: this.getAttrValue($attrs.short),
52
- text: this.getAttrValue($attrs.text),
53
- inline: this.getAttrValue($attrs.inline),
54
- danger: this.getAttrValue($attrs.danger),
55
- delayed: this.getAttrValue($attrs.delayed),
56
- icon: $attrs.icon
57
- }), {
58
- // Some overrides for angular buttons
59
- [modules_5f65bc62.buttonWithoutIcon]: !$attrs.icon,
60
- [modules_5f65bc62.narrowRight]: this.getAttrValue($attrs.narrowRight)
61
- });
62
- if (!$attrs.hasOwnProperty('mode')) {
63
- addClasses(this.findTranscludeNode().classList, ringIconDefaultColor);
64
- } else {
65
- removeClasses(this.findTranscludeNode().classList, ringIconDefaultColor);
66
- }
67
- });
68
- _defineProperty(this, "findTranscludeNode", () => this.element.querySelector('ng-transclude'));
69
- _defineProperty(this, "updateIcon", () => {
70
- const {
71
- $attrs,
72
- $compile,
73
- $scope
74
- } = this.$inject;
75
- const icon = this.element.querySelector('rg-icon');
76
- const transcludeNode = this.findTranscludeNode();
77
- const glyph = $attrs.icon;
78
- const size = $attrs.iconSize;
79
- const isLoading = this.getAttrValue($attrs.loader);
80
- if (glyph && isLoading) {
81
- icon.setAttribute('loading', true);
82
- } else {
83
- icon.setAttribute('loading', false);
84
- }
85
- if (glyph) {
86
- addClasses(transcludeNode.classList, transcludeSpacer);
87
- icon.setAttribute('glyph', glyph);
88
- if (size) {
89
- icon.setAttribute('size', size);
90
- }
91
- } else {
92
- removeClasses(transcludeNode.classList, transcludeSpacer);
93
- icon.removeAttribute('glyph');
94
- icon.removeAttribute('size');
95
- }
96
- $compile(icon)($scope);
97
- });
98
38
  const {
99
39
  $element,
100
- $attrs: _$attrs,
101
- $scope: _$scope
40
+ $attrs,
41
+ $scope
102
42
  } = this.$inject;
103
- _$scope.styles = modules_e81895c9;
43
+ $scope.styles = modules_e81895c9;
104
44
  this.element = $element[0];
105
45
  const modifiers = ['delayed', 'loader', 'danger', 'short', 'active', 'text', 'inline', 'narrowRight'];
106
46
  modifiers.forEach(mod => {
107
- _$scope.$watch(() => _$scope.$eval(_$attrs[mod]), val => {
47
+ $scope.$watch(() => $scope.$eval($attrs[mod]), val => {
108
48
  this.updateClasses();
109
49
  const attrName = `data-test-${mod}`;
110
50
  if (val) {
@@ -113,17 +53,17 @@ class ButtonController extends RingAngularComponent {
113
53
  this.element.removeAttribute(attrName);
114
54
  }
115
55
  if (mod === 'loader') {
116
- const isText = this.getAttrValue(_$attrs.text);
117
- const withIcon = !!_$attrs.icon;
56
+ const isText = this.getAttrValue($attrs.text);
57
+ const withIcon = !!$attrs.icon;
118
58
  applyMethodToClasses(val && !isText && !withIcon ? 'add' : 'remove')(this.element.querySelector(LOADER_BACKGROUND_SELECTOR).classList, modules_e81895c9.loaderBackground);
119
59
  }
120
60
  });
121
61
  });
122
- const tabIndex = _$attrs.tabindex || ORDER_NOT_DEFINED;
62
+ const tabIndex = $attrs.tabindex || ORDER_NOT_DEFINED;
123
63
  if (tabIndex !== ORDER_NOT_DEFINED) {
124
64
  this.element.setAttribute('tabindex', tabIndex);
125
65
  }
126
- _$scope.$watch(() => _$scope.$eval(_$attrs.loader), val => {
66
+ $scope.$watch(() => $scope.$eval($attrs.loader), val => {
127
67
  if (val) {
128
68
  this.element.setAttribute('tabindex', ORDER_NOT_DEFINED);
129
69
  } else if (tabIndex !== ORDER_NOT_DEFINED) {
@@ -154,6 +94,65 @@ class ButtonController extends RingAngularComponent {
154
94
  } = this.$inject;
155
95
  return $scope.$eval(attribute);
156
96
  }
97
+ updateClasses = () => {
98
+ const {
99
+ $attrs
100
+ } = this.$inject;
101
+ const foreignClasses = [...this.element.classList].filter(name => !buttonClassesMap[name]);
102
+ this.element.className = classNames(foreignClasses, getButtonClasses({
103
+ height: $attrs.height || ControlsHeight.S,
104
+ className: modules_e81895c9.button,
105
+ active: this.getAttrValue($attrs.active),
106
+ disabled: this.getAttrValue($attrs.disabled),
107
+ loader: this.getAttrValue($attrs.loader),
108
+ primary: $attrs.mode === 'primary' || $attrs.mode === 'blue',
109
+ short: this.getAttrValue($attrs.short),
110
+ text: this.getAttrValue($attrs.text),
111
+ inline: this.getAttrValue($attrs.inline),
112
+ danger: this.getAttrValue($attrs.danger),
113
+ delayed: this.getAttrValue($attrs.delayed),
114
+ icon: $attrs.icon
115
+ }), {
116
+ // Some overrides for angular buttons
117
+ [modules_5f65bc62.buttonWithoutIcon]: !$attrs.icon,
118
+ [modules_5f65bc62.narrowRight]: this.getAttrValue($attrs.narrowRight)
119
+ });
120
+ if (!$attrs.hasOwnProperty('mode')) {
121
+ addClasses(this.findTranscludeNode().classList, ringIconDefaultColor);
122
+ } else {
123
+ removeClasses(this.findTranscludeNode().classList, ringIconDefaultColor);
124
+ }
125
+ };
126
+ findTranscludeNode = () => this.element.querySelector('ng-transclude');
127
+ updateIcon = () => {
128
+ const {
129
+ $attrs,
130
+ $compile,
131
+ $scope
132
+ } = this.$inject;
133
+ const icon = this.element.querySelector('rg-icon');
134
+ const transcludeNode = this.findTranscludeNode();
135
+ const glyph = $attrs.icon;
136
+ const size = $attrs.iconSize;
137
+ const isLoading = this.getAttrValue($attrs.loader);
138
+ if (glyph && isLoading) {
139
+ icon.setAttribute('loading', true);
140
+ } else {
141
+ icon.setAttribute('loading', false);
142
+ }
143
+ if (glyph) {
144
+ addClasses(transcludeNode.classList, transcludeSpacer);
145
+ icon.setAttribute('glyph', glyph);
146
+ if (size) {
147
+ icon.setAttribute('size', size);
148
+ }
149
+ } else {
150
+ removeClasses(transcludeNode.classList, transcludeSpacer);
151
+ icon.removeAttribute('glyph');
152
+ icon.removeAttribute('size');
153
+ }
154
+ $compile(icon)($scope);
155
+ };
157
156
  }
158
157
  ButtonController.$inject = ['$element', '$attrs', '$scope', '$compile', '$log'];
159
158
  function createButtonDirective(tagName) {
@@ -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 classNames from 'classnames';
4
4
  import PropTypes from 'prop-types';
@@ -9,6 +9,11 @@ import { m as modules_fd849143 } from '../_helpers/button-set.js';
9
9
  * @name Button Set
10
10
  */
11
11
  class ButtonSet extends PureComponent {
12
+ static propTypes = {
13
+ children: PropTypes.node,
14
+ className: PropTypes.string,
15
+ 'data-test': PropTypes.string
16
+ };
12
17
  render() {
13
18
  const {
14
19
  className,
@@ -23,10 +28,5 @@ class ButtonSet extends PureComponent {
23
28
  }), children);
24
29
  }
25
30
  }
26
- _defineProperty(ButtonSet, "propTypes", {
27
- children: PropTypes.node,
28
- className: PropTypes.string,
29
- 'data-test': PropTypes.string
30
- });
31
31
 
32
32
  export { ButtonSet as default };
@@ -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';
@@ -9,6 +9,11 @@ import { m as modules_34154ec0 } from '../_helpers/button-toolbar.js';
9
9
  * @name Button Toolbar
10
10
  */
11
11
  class ButtonToolbar extends PureComponent {
12
+ static propTypes = {
13
+ children: PropTypes.node,
14
+ className: PropTypes.string,
15
+ 'data-test': PropTypes.string
16
+ };
12
17
  render() {
13
18
  const {
14
19
  className,
@@ -22,10 +27,5 @@ class ButtonToolbar extends PureComponent {
22
27
  }));
23
28
  }
24
29
  }
25
- _defineProperty(ButtonToolbar, "propTypes", {
26
- children: PropTypes.node,
27
- className: PropTypes.string,
28
- 'data-test': PropTypes.string
29
- });
30
30
 
31
31
  export { ButtonToolbar as default };
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import { getRect } from '../global/dom.js';
3
2
 
4
3
  /**
@@ -9,7 +8,7 @@ class Caret {
9
8
  * Line endings RegExp
10
9
  * @type {RegExp}
11
10
  */
12
-
11
+ static returnRE = /\r/g;
13
12
  /**
14
13
  * Line endings normalizer
15
14
  * Borrowed from jQuery
@@ -20,8 +19,8 @@ class Caret {
20
19
  static normalizeNewlines(value) {
21
20
  return typeof value === 'string' ? value.replace(this.returnRE, '') : value;
22
21
  }
22
+ target;
23
23
  constructor(target) {
24
- _defineProperty(this, "target", void 0);
25
24
  this.target = target;
26
25
  }
27
26
  isContentEditable() {
@@ -221,6 +220,5 @@ class Caret {
221
220
  return offset;
222
221
  }
223
222
  }
224
- _defineProperty(Caret, "returnRE", /\r/g);
225
223
 
226
224
  export { Caret as default };
@@ -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';
@@ -21,16 +21,25 @@ import '../global/memoize.js';
21
21
  * Displays a checkbox.
22
22
  */
23
23
  class Checkbox extends PureComponent {
24
- constructor() {
25
- super(...arguments);
26
- _defineProperty(this, "input", void 0);
27
- _defineProperty(this, "inputRef", el => {
28
- if (el != null) {
29
- el.indeterminate = this.props.indeterminate;
30
- }
31
- this.input = el;
32
- });
33
- }
24
+ static propTypes = {
25
+ name: PropTypes.string,
26
+ label: PropTypes.string,
27
+ className: PropTypes.string,
28
+ containerClassName: PropTypes.string,
29
+ containerStyle: PropTypes.object,
30
+ cellClassName: PropTypes.string,
31
+ labelClassName: PropTypes.string,
32
+ defaultChecked: PropTypes.bool,
33
+ checked: PropTypes.bool,
34
+ indeterminate: PropTypes.bool,
35
+ disabled: PropTypes.bool,
36
+ onChange: PropTypes.func,
37
+ children: PropTypes.node,
38
+ inputRef: PropTypes.oneOfType([PropTypes.func, refObject(PropTypes.instanceOf(HTMLInputElement))])
39
+ };
40
+ static defaultProps = {
41
+ indeterminate: false
42
+ };
34
43
  componentDidMount() {
35
44
  if (this.input != null) {
36
45
  this.input.indeterminate = this.props.indeterminate;
@@ -44,6 +53,13 @@ class Checkbox extends PureComponent {
44
53
  this.input.indeterminate = this.props.indeterminate;
45
54
  }
46
55
  }
56
+ input;
57
+ inputRef = el => {
58
+ if (el != null) {
59
+ el.indeterminate = this.props.indeterminate;
60
+ }
61
+ this.input = el;
62
+ };
47
63
  render() {
48
64
  const {
49
65
  children,
@@ -83,24 +99,5 @@ class Checkbox extends PureComponent {
83
99
  }, label || children));
84
100
  }
85
101
  }
86
- _defineProperty(Checkbox, "propTypes", {
87
- name: PropTypes.string,
88
- label: PropTypes.string,
89
- className: PropTypes.string,
90
- containerClassName: PropTypes.string,
91
- containerStyle: PropTypes.object,
92
- cellClassName: PropTypes.string,
93
- labelClassName: PropTypes.string,
94
- defaultChecked: PropTypes.bool,
95
- checked: PropTypes.bool,
96
- indeterminate: PropTypes.bool,
97
- disabled: PropTypes.bool,
98
- onChange: PropTypes.func,
99
- children: PropTypes.node,
100
- inputRef: PropTypes.oneOfType([PropTypes.func, refObject(PropTypes.instanceOf(HTMLInputElement))])
101
- });
102
- _defineProperty(Checkbox, "defaultProps", {
103
- indeterminate: false
104
- });
105
102
 
106
103
  export { Checkbox as default };
@@ -5,7 +5,6 @@ import proxyAttrs from '../proxy-attrs/proxy-attrs.js';
5
5
  import { m as modules_3199090e } from '../_helpers/checkbox.js';
6
6
  import '../icon/icon__constants.js';
7
7
  import '../template-ng/template-ng.js';
8
- import '../_helpers/_rollupPluginBabelHelpers.js';
9
8
  import '../global/ring-angular-component.js';
10
9
  import '../_helpers/icon.js';
11
10
 
package/dist/code/code.js CHANGED
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React, { PureComponent } from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import classNames from 'classnames';
@@ -22,16 +21,29 @@ const registerLanguage = memoize(async language => {
22
21
  * @name Code
23
22
  */
24
23
  class Code extends PureComponent {
25
- constructor() {
26
- super(...arguments);
27
- _defineProperty(this, "code", void 0);
28
- }
24
+ static propTypes = {
25
+ className: PropTypes.string,
26
+ code: PropTypes.string.isRequired,
27
+ inline: PropTypes.bool,
28
+ softWrap: PropTypes.bool,
29
+ language: PropTypes.string,
30
+ replacer: PropTypes.func,
31
+ codeRef: PropTypes.oneOfType([PropTypes.shape({
32
+ current: PropTypes.instanceOf(Element)
33
+ }), PropTypes.func])
34
+ };
35
+ static defaultProps = {
36
+ inline: false,
37
+ softWrap: false,
38
+ replacer: noop
39
+ };
29
40
  componentDidMount() {
30
41
  this.highlight();
31
42
  }
32
43
  componentDidUpdate() {
33
44
  this.highlight();
34
45
  }
46
+ code;
35
47
  async highlight() {
36
48
  const codeRef = this.codeRef;
37
49
  if (codeRef == null) {
@@ -96,22 +108,6 @@ class Code extends PureComponent {
96
108
  }, normalizeIndent(code)));
97
109
  }
98
110
  }
99
- _defineProperty(Code, "propTypes", {
100
- className: PropTypes.string,
101
- code: PropTypes.string.isRequired,
102
- inline: PropTypes.bool,
103
- softWrap: PropTypes.bool,
104
- language: PropTypes.string,
105
- replacer: PropTypes.func,
106
- codeRef: PropTypes.oneOfType([PropTypes.shape({
107
- current: PropTypes.instanceOf(Element)
108
- }), PropTypes.func])
109
- });
110
- _defineProperty(Code, "defaultProps", {
111
- inline: false,
112
- softWrap: false,
113
- replacer: noop
114
- });
115
111
  const code = trivialTemplateTag(source => /*#__PURE__*/React.createElement(Code, {
116
112
  code: source
117
113
  }));
@@ -1,4 +1,3 @@
1
- import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
2
1
  import React, { PureComponent } from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import Dialog from '../dialog/dialog.js';
@@ -7,6 +6,7 @@ import '../island/island.js';
7
6
  import Panel from '../panel/panel.js';
8
7
  import HeaderWrapper from '../island/header.js';
9
8
  import ContentWrapper from '../island/content.js';
9
+ import '../_helpers/_rollupPluginBabelHelpers.js';
10
10
  import 'react-dom';
11
11
  import 'classnames';
12
12
  import '@jetbrains/icons/close';
@@ -46,14 +46,36 @@ var modules_4c9c3a3a = {"unit":"i__const_unit_0","light":"light_rui_2cda","descr
46
46
  * @name Confirm
47
47
  */
48
48
  class Confirm extends PureComponent {
49
- constructor() {
50
- super(...arguments);
51
- _defineProperty(this, "onEscPress", () => {
52
- if (this.props.rejectOnEsc) {
53
- this.props.onReject();
54
- }
55
- });
56
- }
49
+ static propTypes = {
50
+ className: PropTypes.string,
51
+ text: PropTypes.string,
52
+ description: PropTypes.node,
53
+ show: PropTypes.bool,
54
+ rejectOnEsc: PropTypes.bool,
55
+ inProgress: PropTypes.bool,
56
+ cancelIsDefault: PropTypes.bool,
57
+ confirmLabel: PropTypes.string,
58
+ rejectLabel: PropTypes.string,
59
+ onConfirm: PropTypes.func,
60
+ onReject: PropTypes.func
61
+ };
62
+ static defaultProps = {
63
+ text: null,
64
+ description: null,
65
+ show: false,
66
+ rejectOnEsc: true,
67
+ inProgress: false,
68
+ cancelIsDefault: false,
69
+ confirmLabel: 'OK',
70
+ rejectLabel: 'Cancel',
71
+ onConfirm: () => {},
72
+ onReject: () => {}
73
+ };
74
+ onEscPress = () => {
75
+ if (this.props.rejectOnEsc) {
76
+ this.props.onReject();
77
+ }
78
+ };
57
79
  render() {
58
80
  const {
59
81
  show,
@@ -90,30 +112,5 @@ class Confirm extends PureComponent {
90
112
  }, rejectLabel)));
91
113
  }
92
114
  }
93
- _defineProperty(Confirm, "propTypes", {
94
- className: PropTypes.string,
95
- text: PropTypes.string,
96
- description: PropTypes.node,
97
- show: PropTypes.bool,
98
- rejectOnEsc: PropTypes.bool,
99
- inProgress: PropTypes.bool,
100
- cancelIsDefault: PropTypes.bool,
101
- confirmLabel: PropTypes.string,
102
- rejectLabel: PropTypes.string,
103
- onConfirm: PropTypes.func,
104
- onReject: PropTypes.func
105
- });
106
- _defineProperty(Confirm, "defaultProps", {
107
- text: null,
108
- description: null,
109
- show: false,
110
- rejectOnEsc: true,
111
- inProgress: false,
112
- cancelIsDefault: false,
113
- confirmLabel: 'OK',
114
- rejectLabel: 'Cancel',
115
- onConfirm: () => {},
116
- onReject: () => {}
117
- });
118
115
 
119
116
  export { Confirm as default };
@@ -5,9 +5,9 @@ import 'react';
5
5
  import '../global/react-render-adapter.js';
6
6
  import 'react-dom';
7
7
  import '../confirm/confirm.js';
8
- import '../_helpers/_rollupPluginBabelHelpers.js';
9
8
  import 'prop-types';
10
9
  import '../dialog/dialog.js';
10
+ import '../_helpers/_rollupPluginBabelHelpers.js';
11
11
  import 'classnames';
12
12
  import '@jetbrains/icons/close';
13
13
  import '../island/island.js';
@@ -3,9 +3,9 @@ import { render } from '../global/react-render-adapter.js';
3
3
  import Confirm from '../confirm/confirm.js';
4
4
  import { ControlsHeightContext, getGlobalControlsHeight } from '../global/controls-height.js';
5
5
  import 'react-dom';
6
- import '../_helpers/_rollupPluginBabelHelpers.js';
7
6
  import 'prop-types';
8
7
  import '../dialog/dialog.js';
8
+ import '../_helpers/_rollupPluginBabelHelpers.js';
9
9
  import 'classnames';
10
10
  import '@jetbrains/icons/close';
11
11
  import '../island/island.js';
@@ -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, { Component, cloneElement } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
@@ -9,17 +9,23 @@ import 'react-waypoint';
9
9
  * @name Content Layout
10
10
  */
11
11
  class ContentLayout extends Component {
12
- constructor() {
13
- super(...arguments);
14
- _defineProperty(this, "state", {
15
- contentNode: null
12
+ static propTypes = {
13
+ children: PropTypes.node,
14
+ className: PropTypes.string,
15
+ contentClassName: PropTypes.string,
16
+ responsive: PropTypes.bool
17
+ };
18
+ static defaultProps = {
19
+ responsive: true
20
+ };
21
+ state = {
22
+ contentNode: null
23
+ };
24
+ saveContentNode = contentNode => {
25
+ this.setState({
26
+ contentNode
16
27
  });
17
- _defineProperty(this, "saveContentNode", contentNode => {
18
- this.setState({
19
- contentNode
20
- });
21
- });
22
- }
28
+ };
23
29
  render() {
24
30
  const {
25
31
  children,
@@ -46,14 +52,5 @@ class ContentLayout extends Component {
46
52
  }, contentChildren));
47
53
  }
48
54
  }
49
- _defineProperty(ContentLayout, "propTypes", {
50
- children: PropTypes.node,
51
- className: PropTypes.string,
52
- contentClassName: PropTypes.string,
53
- responsive: PropTypes.bool
54
- });
55
- _defineProperty(ContentLayout, "defaultProps", {
56
- responsive: true
57
- });
58
55
 
59
56
  export { Sidebar, ContentLayout as default };
@@ -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, { Component } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { renderToStaticMarkup } from 'react-dom/server';
@@ -16,6 +16,16 @@ const commonPropTypes = {
16
16
  inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
17
17
  };
18
18
  class ContentEditableBase extends Component {
19
+ static propTypes = {
20
+ ...commonPropTypes,
21
+ __html: PropTypes.string
22
+ };
23
+ static defaultProps = {
24
+ disabled: false,
25
+ tabIndex: 0,
26
+ onInput: noop,
27
+ onComponentUpdate: noop
28
+ };
19
29
  shouldComponentUpdate(nextProps) {
20
30
  return nextProps.disabled !== this.props.disabled || nextProps.__html !== this.props.__html;
21
31
  }
@@ -46,16 +56,6 @@ class ContentEditableBase extends Component {
46
56
  }));
47
57
  }
48
58
  }
49
- _defineProperty(ContentEditableBase, "propTypes", {
50
- ...commonPropTypes,
51
- __html: PropTypes.string
52
- });
53
- _defineProperty(ContentEditableBase, "defaultProps", {
54
- disabled: false,
55
- tabIndex: 0,
56
- onInput: noop,
57
- onComponentUpdate: noop
58
- });
59
59
  const ContentEditable = _ref => {
60
60
  let {
61
61
  children,