@jetbrains/ring-ui 5.0.36 → 5.0.38

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 (239) hide show
  1. package/components/editable-heading/editable-heading.d.ts +4 -2
  2. package/components/editable-heading/editable-heading.js +3 -3
  3. package/components/input/input.css +2 -0
  4. package/components/query-assist/query-assist.js +1 -1
  5. package/dist/_helpers/_rollupPluginBabelHelpers.js +0 -4
  6. package/dist/_helpers/anchor.js +0 -1
  7. package/dist/_helpers/card.js +0 -3
  8. package/dist/_helpers/dialog__body-scroll-preventer.js +0 -11
  9. package/dist/_helpers/footer.js +2 -13
  10. package/dist/_helpers/query-assist__suggestions.js +0 -10
  11. package/dist/_helpers/select__filter.js +0 -11
  12. package/dist/_helpers/services-link.js +0 -2
  13. package/dist/_helpers/sidebar.js +0 -12
  14. package/dist/_helpers/theme.js +0 -3
  15. package/dist/_helpers/title.js +0 -9
  16. package/dist/alert/alert.js +2 -32
  17. package/dist/alert/container.js +0 -5
  18. package/dist/alert-service/alert-service.js +0 -26
  19. package/dist/analytics/analytics.js +0 -22
  20. package/dist/analytics/analytics__custom-plugin.js +0 -38
  21. package/dist/analytics/analytics__fus-plugin.js +0 -20
  22. package/dist/analytics/analytics__ga-plugin.js +0 -13
  23. package/dist/analytics/analytics__plugin-utils.js +0 -8
  24. package/dist/analytics-ng/analytics-ng.js +3 -9
  25. package/dist/auth/auth.js +2 -3
  26. package/dist/auth/auth__core.js +30 -243
  27. package/dist/auth/background-flow.js +2 -25
  28. package/dist/auth/down-notification.js +0 -7
  29. package/dist/auth/iframe-flow.js +2 -26
  30. package/dist/auth/landing.js +2 -6
  31. package/dist/auth/request-builder.js +0 -11
  32. package/dist/auth/response-parser.js +4 -26
  33. package/dist/auth/storage.js +4 -60
  34. package/dist/auth/token-validator.js +6 -42
  35. package/dist/auth/window-flow.js +2 -34
  36. package/dist/auth-dialog/auth-dialog.js +2 -12
  37. package/dist/auth-dialog-service/auth-dialog-service.js +2 -4
  38. package/dist/auth-ng/auth-ng.js +6 -22
  39. package/dist/auth-ng/auth-ng.mock.js +0 -4
  40. package/dist/autofocus-ng/autofocus-ng.js +0 -5
  41. package/dist/avatar/avatar.js +4 -17
  42. package/dist/avatar/fallback-avatar.js +2 -9
  43. package/dist/avatar-editor-ng/avatar-editor-ng.js +1 -17
  44. package/dist/badge/badge.js +0 -3
  45. package/dist/button/button.js +0 -8
  46. package/dist/button-group/button-group.js +0 -3
  47. package/dist/button-group/caption.js +0 -2
  48. package/dist/button-group-ng/button-group-ng.js +0 -4
  49. package/dist/button-ng/button-ng.js +3 -21
  50. package/dist/button-set/button-set.js +0 -3
  51. package/dist/button-set-ng/button-set-ng.js +0 -2
  52. package/dist/button-toolbar/button-toolbar.js +0 -3
  53. package/dist/button-toolbar-ng/button-toolbar-ng.js +0 -2
  54. package/dist/caret/caret.js +2 -53
  55. package/dist/checkbox/checkbox.js +0 -12
  56. package/dist/code/code.js +3 -25
  57. package/dist/compiler-ng/compiler-ng.js +0 -5
  58. package/dist/confirm/confirm.js +0 -6
  59. package/dist/confirm-service/confirm-service.js +10 -8
  60. package/dist/content-layout/content-layout.js +0 -7
  61. package/dist/contenteditable/contenteditable.js +6 -13
  62. package/dist/data-list/data-list.js +4 -28
  63. package/dist/data-list/item.js +0 -15
  64. package/dist/data-list/selection.js +0 -27
  65. package/dist/date-picker/consts.js +0 -7
  66. package/dist/date-picker/date-input.js +0 -20
  67. package/dist/date-picker/date-picker.js +2 -36
  68. package/dist/date-picker/date-popup.js +18 -71
  69. package/dist/date-picker/day.js +0 -14
  70. package/dist/date-picker/month-names.js +0 -9
  71. package/dist/date-picker/month-slider.js +0 -10
  72. package/dist/date-picker/month.js +2 -4
  73. package/dist/date-picker/months.js +6 -13
  74. package/dist/date-picker/years.js +0 -14
  75. package/dist/dialog/dialog.js +0 -19
  76. package/dist/dialog-ng/dialog-ng.js +17 -105
  77. package/dist/docked-panel-ng/docked-panel-ng.js +6 -29
  78. package/dist/dropdown/dropdown.js +2 -33
  79. package/dist/dropdown-menu/dropdown-menu.js +4 -8
  80. package/dist/editable-heading/editable-heading.d.ts +4 -2
  81. package/dist/editable-heading/editable-heading.js +7 -6
  82. package/dist/error-bubble/error-bubble.js +2 -4
  83. package/dist/error-message/error-message.js +0 -3
  84. package/dist/footer-ng/footer-ng.js +0 -13
  85. package/dist/form-ng/form-ng.js +1 -21
  86. package/dist/global/angular-component-factory.js +0 -10
  87. package/dist/global/compose.js +0 -1
  88. package/dist/global/composeRefs.js +0 -1
  89. package/dist/global/controls-height.js +0 -2
  90. package/dist/global/create-stateful-context.js +0 -5
  91. package/dist/global/data-tests.js +0 -4
  92. package/dist/global/dom.js +2 -11
  93. package/dist/global/focus-sensor-hoc.js +4 -33
  94. package/dist/global/fuzzy-highlight.js +2 -16
  95. package/dist/global/get-event-key.js +8 -17
  96. package/dist/global/get-uid.js +0 -2
  97. package/dist/global/linear-function.js +0 -2
  98. package/dist/global/listeners.js +0 -13
  99. package/dist/global/memoize.js +0 -2
  100. package/dist/global/normalize-indent.js +2 -5
  101. package/dist/global/react-dom-renderer.js +0 -8
  102. package/dist/global/react-render-adapter.js +0 -7
  103. package/dist/global/rerender-hoc.js +0 -7
  104. package/dist/global/ring-angular-component.js +0 -5
  105. package/dist/global/schedule-raf.js +0 -5
  106. package/dist/global/trivial-template-tag.js +2 -3
  107. package/dist/global/url.js +0 -27
  108. package/dist/grid/col.js +0 -4
  109. package/dist/grid/grid.js +0 -3
  110. package/dist/grid/row.js +0 -5
  111. package/dist/group/group.js +0 -3
  112. package/dist/header/header.js +0 -5
  113. package/dist/header/logo.js +0 -4
  114. package/dist/header/profile.js +0 -7
  115. package/dist/header/services.js +0 -11
  116. package/dist/header/smart-profile.js +4 -18
  117. package/dist/header/smart-services.js +0 -17
  118. package/dist/header/tray-icon.js +2 -3
  119. package/dist/header/tray.js +0 -3
  120. package/dist/heading/heading.js +0 -5
  121. package/dist/http/http.js +20 -65
  122. package/dist/http/http.mock.js +2 -14
  123. package/dist/hub-source/hub-source.js +0 -32
  124. package/dist/hub-source/hub-source__user.js +0 -1
  125. package/dist/hub-source/hub-source__users-groups.js +0 -12
  126. package/dist/icon/icon.js +0 -13
  127. package/dist/icon/icon__constants.js +0 -4
  128. package/dist/icon/icon__svg.js +0 -10
  129. package/dist/icon-ng/icon-ng.js +2 -7
  130. package/dist/input/input.js +0 -30
  131. package/dist/input-ng/input-ng.js +0 -17
  132. package/dist/island/adaptive-island-hoc.js +0 -7
  133. package/dist/island/content.js +0 -25
  134. package/dist/island/header.js +0 -7
  135. package/dist/island/island.js +0 -4
  136. package/dist/island-legacy/content-legacy.js +0 -2
  137. package/dist/island-legacy/header-legacy.js +0 -2
  138. package/dist/island-legacy/island-legacy.js +0 -2
  139. package/dist/island-ng/island-content-ng.js +0 -3
  140. package/dist/link/clickableLink.js +2 -10
  141. package/dist/link/link.js +2 -9
  142. package/dist/link-ng/link-ng.js +0 -2
  143. package/dist/list/consts.js +0 -4
  144. package/dist/list/list.js +6 -128
  145. package/dist/list/list__custom.js +0 -4
  146. package/dist/list/list__hint.js +0 -3
  147. package/dist/list/list__item.js +0 -8
  148. package/dist/list/list__link.js +2 -3
  149. package/dist/list/list__separator.js +0 -1
  150. package/dist/list/list__title.js +0 -1
  151. package/dist/list/list__users-groups-source.js +4 -17
  152. package/dist/loader/loader.js +0 -10
  153. package/dist/loader/loader__core.js +6 -70
  154. package/dist/loader-inline/loader-inline.js +0 -3
  155. package/dist/loader-ng/loader-ng.js +0 -7
  156. package/dist/loader-screen/loader-screen.js +0 -3
  157. package/dist/loader-screen-ng/loader-screen-ng.js +2 -14
  158. package/dist/login-dialog/login-dialog.js +0 -15
  159. package/dist/login-dialog/service.js +2 -4
  160. package/dist/markdown/code.js +0 -2
  161. package/dist/markdown/heading.js +0 -1
  162. package/dist/markdown/link.js +0 -1
  163. package/dist/markdown/markdown.js +0 -2
  164. package/dist/message/message.js +0 -24
  165. package/dist/message-bundle-ng/message-bundle-ng.js +2 -45
  166. package/dist/old-browsers-message/old-browsers-message.js +2 -21
  167. package/dist/old-browsers-message/white-list.js +2 -6
  168. package/dist/pager/pager.js +2 -39
  169. package/dist/panel/panel.js +0 -3
  170. package/dist/permissions/permissions.js +1 -43
  171. package/dist/permissions/permissions__cache.js +12 -63
  172. package/dist/permissions-ng/permissions-ng.js +11 -19
  173. package/dist/place-under-ng/place-under-ng.js +0 -19
  174. package/dist/popup/popup.consts.js +0 -11
  175. package/dist/popup/popup.js +6 -68
  176. package/dist/popup/position.js +8 -30
  177. package/dist/popup-menu/popup-menu.js +4 -13
  178. package/dist/progress-bar/progress-bar.js +0 -14
  179. package/dist/promised-click-ng/promised-click-ng.js +3 -22
  180. package/dist/query-assist/query-assist.js +17 -201
  181. package/dist/radio/radio.js +0 -6
  182. package/dist/radio/radio__item.js +0 -9
  183. package/dist/radio-ng/radio-ng.js +0 -4
  184. package/dist/save-field-ng/save-field-ng.js +1 -37
  185. package/dist/select/select.js +18 -208
  186. package/dist/select/select__popup.js +4 -76
  187. package/dist/select-ng/select-ng.js +18 -74
  188. package/dist/select-ng/select-ng__lazy.js +2 -17
  189. package/dist/select-ng/select-ng__options.js +3 -29
  190. package/dist/shortcuts/core.js +4 -56
  191. package/dist/shortcuts/shortcuts-hoc.js +0 -4
  192. package/dist/shortcuts/shortcuts.js +0 -10
  193. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -13
  194. package/dist/shortcuts-ng/shortcuts-ng.js +16 -46
  195. package/dist/sidebar-ng/sidebar-ng.js +2 -12
  196. package/dist/storage/storage.js +2 -5
  197. package/dist/storage/storage__fallback.js +2 -48
  198. package/dist/storage/storage__local.js +0 -23
  199. package/dist/style.css +1 -1
  200. package/dist/tab-trap/tab-trap.js +0 -37
  201. package/dist/table/cell.js +0 -2
  202. package/dist/table/disable-hover-hoc.js +0 -9
  203. package/dist/table/header-cell.js +0 -8
  204. package/dist/table/header.js +0 -16
  205. package/dist/table/multitable.js +0 -23
  206. package/dist/table/row-with-focus-sensor.js +0 -12
  207. package/dist/table/row.js +0 -18
  208. package/dist/table/selection-adapter.js +0 -2
  209. package/dist/table/selection-shortcuts-hoc.js +8 -42
  210. package/dist/table/selection.js +0 -50
  211. package/dist/table/smart-table.js +0 -9
  212. package/dist/table/table.js +6 -37
  213. package/dist/table-legacy-ng/table-legacy-ng.js +12 -42
  214. package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +0 -31
  215. package/dist/table-legacy-ng/table-legacy-ng__selection.js +0 -32
  216. package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +2 -5
  217. package/dist/tabs/collapsible-more.js +0 -5
  218. package/dist/tabs/collapsible-tab.js +0 -4
  219. package/dist/tabs/collapsible-tabs.js +8 -28
  220. package/dist/tabs/dumb-tabs.js +0 -8
  221. package/dist/tabs/smart-tabs.js +0 -6
  222. package/dist/tabs/tab-link.js +0 -1
  223. package/dist/tabs/tab.js +0 -2
  224. package/dist/tabs-ng/tabs-ng.js +13 -29
  225. package/dist/tag/tag.js +0 -24
  226. package/dist/tags-input/tags-input.js +0 -76
  227. package/dist/tags-list/tags-list.js +0 -6
  228. package/dist/template-ng/template-ng.js +0 -12
  229. package/dist/text/text.js +0 -3
  230. package/dist/theme-ng/theme-ng.js +0 -8
  231. package/dist/title-ng/title-ng.js +6 -17
  232. package/dist/toggle/toggle.js +0 -4
  233. package/dist/tooltip/tooltip.js +4 -35
  234. package/dist/tooltip-ng/tooltip-ng.js +2 -8
  235. package/dist/user-agreement/service.js +0 -62
  236. package/dist/user-agreement/user-agreement.js +0 -8
  237. package/dist/user-card/smart-user-card-tooltip.js +2 -8
  238. package/dist/user-card/tooltip.js +0 -3
  239. package/package.json +37 -37
@@ -8,31 +8,24 @@ import { m as modules_29747b80 } from '../_helpers/icon.js';
8
8
  function convertReactSVGDOMProperty(str) {
9
9
  return str.replace(/[-|:]([a-z])/g, g => g[1].toUpperCase());
10
10
  }
11
-
12
11
  function serializeAttrs(map) {
13
12
  const res = {};
14
-
15
13
  for (let i = 0; i < map.length; i++) {
16
14
  const key = map[i].name;
17
15
  let prop = key;
18
-
19
16
  if (key === 'class') {
20
17
  prop = 'className';
21
18
  } else if (!key.startsWith('data-')) {
22
19
  prop = convertReactSVGDOMProperty(key);
23
20
  }
24
-
25
21
  res[prop] = map[i].value;
26
22
  }
27
-
28
23
  return res;
29
24
  }
30
-
31
25
  function extractSVGProps(svgNode) {
32
26
  const map = svgNode.attributes;
33
27
  return map.length > 0 ? serializeAttrs(map) : null;
34
28
  }
35
-
36
29
  const getSVGFromSource = memoize(src => {
37
30
  const svgContainer = document.createElement('div');
38
31
  svgContainer.innerHTML = src;
@@ -43,13 +36,11 @@ const getSVGFromSource = memoize(src => {
43
36
  html: svg.innerHTML
44
37
  };
45
38
  });
46
-
47
39
  function isCompatibilityMode(iconSrc) {
48
40
  const hasWidth = /width="[\d\.]+"/ig.test(iconSrc);
49
41
  const hasHeight = /height="[\d\.]+"/ig.test(iconSrc);
50
42
  return !hasWidth || !hasHeight;
51
43
  }
52
-
53
44
  function IconSVG(_ref) {
54
45
  let {
55
46
  src,
@@ -70,7 +61,6 @@ function IconSVG(_ref) {
70
61
  }
71
62
  }));
72
63
  }
73
-
74
64
  IconSVG.propTypes = {
75
65
  className: PropTypes.string,
76
66
  src: PropTypes.string.isRequired,
@@ -30,12 +30,10 @@ angularModule.directive('rgIcon', function rgIconDirective() {
30
30
  const isEncoded = glyph.indexOf(BASE64_PREFIX) === 0;
31
31
  return isEncoded ? window.atob(glyph.replace(BASE64_PREFIX, '')) : glyph;
32
32
  }
33
-
34
33
  $scope.$watch('glyph', value => {
35
34
  if (!value) {
36
35
  return;
37
36
  }
38
-
39
37
  $scope.normalizedGlyph = decodeBase64IfNeeded(value);
40
38
  });
41
39
  }],
@@ -51,8 +49,9 @@ angularModule.directive('rgIcon', function rgIconDirective() {
51
49
  });
52
50
  scope.$watch(() => scope.color && Color[scope.color] && modules_29747b80[Color[scope.color]], (colorClass, prevColorClass) => {
53
51
  if (colorClass) {
54
- iAttrs.$addClass(colorClass); // Remove previous class, but don't remove initial one
52
+ iAttrs.$addClass(colorClass);
55
53
 
54
+ // Remove previous class, but don't remove initial one
56
55
  if (prevColorClass && prevColorClass !== colorClass) {
57
56
  iAttrs.$removeClass(prevColorClass);
58
57
  }
@@ -61,22 +60,18 @@ angularModule.directive('rgIcon', function rgIconDirective() {
61
60
  scope.$watchGroup(['size', 'width', 'height'], _ref => {
62
61
  let [size, width, height] = _ref;
63
62
  const svgNode = iElement[0].querySelector('svg');
64
-
65
63
  if (!svgNode) {
66
64
  return;
67
65
  }
68
-
69
66
  if (size && !width && !height) {
70
67
  const sizeString = `${size}px`;
71
68
  const style = `width: ${sizeString}; height: ${sizeString};`;
72
69
  svgNode.setAttribute('style', style);
73
70
  return;
74
71
  }
75
-
76
72
  if (width) {
77
73
  svgNode.setAttribute('style', `width: ${width}px;`);
78
74
  }
79
-
80
75
  if (height) {
81
76
  svgNode.setAttribute('style', `height: ${height}px;`);
82
77
  }
@@ -24,10 +24,7 @@ function noop() {}
24
24
  /**
25
25
  * @name Input
26
26
  */
27
-
28
-
29
27
  var Size;
30
-
31
28
  (function (Size) {
32
29
  Size["AUTO"] = "Auto";
33
30
  Size["S"] = "S";
@@ -35,92 +32,69 @@ var Size;
35
32
  Size["L"] = "L";
36
33
  Size["FULL"] = "FULL";
37
34
  })(Size || (Size = {}));
38
-
39
35
  class Input extends PureComponent {
40
36
  constructor() {
41
37
  super(...arguments);
42
-
43
38
  _defineProperty(this, "state", {
44
39
  empty: true
45
40
  });
46
-
47
41
  _defineProperty(this, "frame", void 0);
48
-
49
42
  _defineProperty(this, "input", void 0);
50
-
51
43
  _defineProperty(this, "id", getUID('ring-input-'));
52
-
53
44
  _defineProperty(this, "inputRef", el => {
54
45
  this.input = el;
55
46
  });
56
-
57
47
  _defineProperty(this, "clear", e => {
58
48
  this.props.onClear && this.props.onClear(e);
59
49
  });
60
-
61
50
  _defineProperty(this, "handleInputChange", e => {
62
51
  if (!this.props.multiline) {
63
52
  var _this$props$onChange, _this$props;
64
-
65
53
  (_this$props$onChange = (_this$props = this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, e);
66
54
  this.checkValue();
67
55
  }
68
56
  });
69
-
70
57
  _defineProperty(this, "handleTextareaChange", e => {
71
58
  if (this.props.multiline) {
72
59
  var _this$props$onChange2, _this$props2;
73
-
74
60
  (_this$props$onChange2 = (_this$props2 = this.props).onChange) === null || _this$props$onChange2 === void 0 ? void 0 : _this$props$onChange2.call(_this$props2, e);
75
61
  this.checkValue();
76
62
  }
77
63
  });
78
64
  }
79
-
80
65
  componentDidMount() {
81
66
  this.frame = requestAnimationFrame(() => this.adapt());
82
67
  }
83
-
84
68
  componentDidUpdate() {
85
69
  this.adapt();
86
70
  }
87
-
88
71
  componentWillUnmount() {
89
72
  if (this.frame != null) {
90
73
  cancelAnimationFrame(this.frame);
91
74
  }
92
75
  }
93
-
94
76
  getId() {
95
77
  return this.props.id || this.id;
96
78
  }
97
-
98
79
  checkValue() {
99
80
  var _this$input;
100
-
101
81
  this.setState({
102
82
  empty: !((_this$input = this.input) !== null && _this$input !== void 0 && _this$input.value)
103
83
  });
104
-
105
84
  if (this.props.multiline && this.input != null && this.input.scrollHeight >= this.input.clientHeight) {
106
85
  this.stretch(this.input);
107
86
  }
108
87
  }
109
-
110
88
  stretch(el) {
111
89
  if (!el || !el.style) {
112
90
  return;
113
91
  }
114
-
115
92
  el.style.height = '0'; // To know the real scrollHeight
116
-
117
93
  el.style.height = `${el.scrollHeight + 2}px`;
118
94
  }
119
-
120
95
  adapt() {
121
96
  this.checkValue();
122
97
  }
123
-
124
98
  render() {
125
99
  const {
126
100
  // Modifiers
@@ -201,18 +175,14 @@ class Input extends PureComponent {
201
175
  className: modules_88cfaf40.errorText
202
176
  }, error));
203
177
  }
204
-
205
178
  }
206
-
207
179
  _defineProperty(Input, "defaultProps", {
208
180
  size: Size.M,
209
181
  onChange: noop,
210
182
  inputRef: noop,
211
183
  enableShortcuts: ['esc']
212
184
  });
213
-
214
185
  _defineProperty(Input, "contextType", ControlsHeightContext);
215
-
216
186
  Input.propTypes = {
217
187
  value: PropTypes.string,
218
188
  className: PropTypes.string,
@@ -17,50 +17,39 @@ import 'react';
17
17
  var modules_c40fa551 = {"errorText":"errorText_rui_d15a","clear":"clear_rui_d15a"};
18
18
 
19
19
  const angularModule = angular.module('Ring.input', [ButtonNG]);
20
-
21
20
  class RingInputComponent extends RingAngularComponent {
22
21
  $onInit() {
23
22
  this.closeIcon = closeIcon;
24
-
25
23
  if (!this.ngModelCtrl) {
26
24
  return;
27
25
  }
28
-
29
26
  this.ngModelCtrl.$render = () => {
30
27
  this.value = this.ngModelCtrl.$viewValue;
31
28
  };
32
29
  }
33
-
34
30
  onInputChange() {
35
31
  if (!this.ngModelCtrl) {
36
32
  return;
37
33
  }
38
-
39
34
  this.ngModelCtrl.$setViewValue(this.value);
40
35
  }
41
-
42
36
  stretch(el) {
43
37
  if (!el) {
44
38
  return;
45
39
  }
46
-
47
40
  el.style.height = `${el.scrollHeight}px`;
48
41
  }
49
-
50
42
  onKeyUp() {
51
43
  if (!this.inputNode) {
52
44
  this.inputNode = this.$inject.$element[0].querySelector('[data-test="ring-input"]');
53
45
  }
54
-
55
46
  if (this.multiline && this.inputNode.scrollHeight > this.inputNode.clientHeight) {
56
47
  this.stretch(this.inputNode);
57
48
  }
58
49
  }
59
-
60
50
  onClear() {
61
51
  this.value = '';
62
52
  }
63
-
64
53
  getContainerClasses() {
65
54
  return classNames(modules_88cfaf40.outerContainer, this.size ? [modules_88cfaf40[`size${this.size}`]] : null, modules_88cfaf40.heightS, {
66
55
  [modules_88cfaf40.active]: this.active,
@@ -71,15 +60,11 @@ class RingInputComponent extends RingAngularComponent {
71
60
  [modules_88cfaf40.borderless]: this.borderless
72
61
  });
73
62
  }
74
-
75
63
  }
76
-
77
64
  _defineProperty(RingInputComponent, "$inject", ['$element']);
78
-
79
65
  _defineProperty(RingInputComponent, "require", {
80
66
  ngModelCtrl: '?ngModel'
81
67
  });
82
-
83
68
  _defineProperty(RingInputComponent, "bindings", {
84
69
  name: '@',
85
70
  required: '@',
@@ -99,7 +84,6 @@ _defineProperty(RingInputComponent, "bindings", {
99
84
  borderless: '<',
100
85
  multiline: '<'
101
86
  });
102
-
103
87
  _defineProperty(RingInputComponent, "template", `
104
88
  <div
105
89
  data-test="ring-input-container"
@@ -156,7 +140,6 @@ _defineProperty(RingInputComponent, "template", `
156
140
  <div ng-if="!$ctrl.borderless && $ctrl.error" class="${modules_88cfaf40.errorText} ${modules_c40fa551.errorText}">{{$ctrl.error}}</div>
157
141
  </div>
158
142
  `);
159
-
160
143
  angularModule.component('rgInput', RingInputComponent);
161
144
  var InputNg = angularModule.name;
162
145
 
@@ -8,24 +8,19 @@ const PhaseContext = /*#__PURE__*/createContext(null);
8
8
  const ScrollHandlerContext = /*#__PURE__*/createContext(null);
9
9
  function adaptiveIslandHOC(ComposedComponent) {
10
10
  var _class;
11
-
12
11
  return _class = class AdaptiveIsland extends Component {
13
12
  constructor() {
14
13
  super(...arguments);
15
-
16
14
  _defineProperty(this, "state", {
17
15
  phase: null
18
16
  });
19
-
20
17
  _defineProperty(this, "onContentScroll", _ref => {
21
18
  var _this$state$phase;
22
-
23
19
  let {
24
20
  scrollTop,
25
21
  scrollHeight,
26
22
  clientHeight
27
23
  } = _ref;
28
-
29
24
  if (scrollHeight - clientHeight >= interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, (_this$state$phase = this.state.phase) !== null && _this$state$phase !== void 0 ? _this$state$phase : 0)) {
30
25
  const phase = Math.min(1, scrollTop / TITLE_RESIZE_END);
31
26
  this.setState({
@@ -34,7 +29,6 @@ function adaptiveIslandHOC(ComposedComponent) {
34
29
  }
35
30
  });
36
31
  }
37
-
38
32
  render() {
39
33
  return /*#__PURE__*/React.createElement(PhaseContext.Provider, {
40
34
  value: this.state.phase
@@ -42,7 +36,6 @@ function adaptiveIslandHOC(ComposedComponent) {
42
36
  value: this.onContentScroll
43
37
  }, /*#__PURE__*/React.createElement(ComposedComponent, this.props)));
44
38
  }
45
-
46
39
  }, _defineProperty(_class, "propTypes", ComposedComponent.propTypes), _class;
47
40
  }
48
41
 
@@ -9,44 +9,33 @@ import { ScrollHandlerContext } from './adaptive-island-hoc.js';
9
9
  import '../global/linear-function.js';
10
10
 
11
11
  const scheduleScrollAction = scheduleRAF();
12
-
13
12
  const noop = () => {};
14
-
15
13
  const END_DISTANCE = 16;
16
-
17
14
  class Content extends Component {
18
15
  constructor() {
19
16
  super(...arguments);
20
-
21
17
  _defineProperty(this, "state", {
22
18
  scrolledToTop: true,
23
19
  scrolledToBottom: false
24
20
  });
25
-
26
21
  _defineProperty(this, "resizeDetector", createResizeDetector({
27
22
  strategy: 'scroll'
28
23
  }));
29
-
30
24
  _defineProperty(this, "wrapperNode", void 0);
31
-
32
25
  _defineProperty(this, "setWrapper", node => {
33
26
  if (!node) {
34
27
  return;
35
28
  }
36
-
37
29
  this.wrapperNode = node;
38
30
  this.resizeDetector.listenTo(node, this.calculateScrollPosition);
39
31
  });
40
-
41
32
  _defineProperty(this, "calculateScrollPosition", () => scheduleScrollAction(() => {
42
33
  const {
43
34
  scrollableNode
44
35
  } = this;
45
-
46
36
  if (!scrollableNode) {
47
37
  return;
48
38
  }
49
-
50
39
  this.props.onScroll(scrollableNode);
51
40
  const {
52
41
  scrollTop,
@@ -55,41 +44,31 @@ class Content extends Component {
55
44
  } = scrollableNode;
56
45
  const scrolledToTop = scrollTop === 0;
57
46
  const scrolledToBottom = offsetHeight + scrollTop >= scrollHeight - END_DISTANCE;
58
-
59
47
  if (scrolledToBottom) {
60
48
  var _this$props$onScrollT, _this$props;
61
-
62
49
  (_this$props$onScrollT = (_this$props = this.props).onScrollToBottom) === null || _this$props$onScrollT === void 0 ? void 0 : _this$props$onScrollT.call(_this$props);
63
50
  }
64
-
65
51
  this.setState({
66
52
  scrolledToTop,
67
53
  scrolledToBottom
68
54
  });
69
55
  }));
70
-
71
56
  _defineProperty(this, "scrollableNode", void 0);
72
-
73
57
  _defineProperty(this, "setScrollableNodeAndCalculatePosition", node => {
74
58
  if (!node) {
75
59
  return;
76
60
  }
77
-
78
61
  this.scrollableNode = node;
79
62
  this.calculateScrollPosition();
80
63
  });
81
64
  }
82
-
83
65
  componentWillUnmount() {
84
66
  this.scrollableNode = null;
85
-
86
67
  if (!this.wrapperNode) {
87
68
  return;
88
69
  }
89
-
90
70
  this.resizeDetector.removeAllListeners(this.wrapperNode);
91
71
  }
92
-
93
72
  render() {
94
73
  const {
95
74
  children,
@@ -127,9 +106,7 @@ class Content extends Component {
127
106
  ref: this.setWrapper
128
107
  }, children), !fade && children));
129
108
  }
130
-
131
109
  }
132
-
133
110
  _defineProperty(Content, "propTypes", {
134
111
  children: PropTypes.node,
135
112
  className: PropTypes.string,
@@ -139,14 +116,12 @@ _defineProperty(Content, "propTypes", {
139
116
  onScroll: PropTypes.func,
140
117
  onScrollToBottom: PropTypes.func
141
118
  });
142
-
143
119
  _defineProperty(Content, "defaultProps", {
144
120
  fade: true,
145
121
  bottomBorder: false,
146
122
  onScroll: noop,
147
123
  onScrollToBottom: noop
148
124
  });
149
-
150
125
  const ContentWrapper = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement(ScrollHandlerContext.Consumer, null, onScroll => {
151
126
  const addProps = onScroll != null ? {
152
127
  onScroll,
@@ -26,14 +26,11 @@ const End = {
26
26
  SPACING: 1.09
27
27
  };
28
28
  const BORDER_APPEAR_PHASE = 0.5;
29
-
30
29
  class Header extends Component {
31
30
  style(name) {
32
31
  var _this$props$phase;
33
-
34
32
  return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !== void 0 ? _this$props$phase : 0);
35
33
  }
36
-
37
34
  render() {
38
35
  const {
39
36
  children,
@@ -66,9 +63,7 @@ class Header extends Component {
66
63
  style: titleStyle
67
64
  }, children), !wrapWithTitle && children);
68
65
  }
69
-
70
66
  }
71
-
72
67
  _defineProperty(Header, "propTypes", {
73
68
  children: PropTypes.node,
74
69
  className: PropTypes.string,
@@ -76,11 +71,9 @@ _defineProperty(Header, "propTypes", {
76
71
  wrapWithTitle: PropTypes.bool,
77
72
  phase: PropTypes.number
78
73
  });
79
-
80
74
  _defineProperty(Header, "defaultProps", {
81
75
  wrapWithTitle: true
82
76
  });
83
-
84
77
  const HeaderWrapper = props => /*#__PURE__*/React.createElement(PhaseContext.Consumer, null, phase => {
85
78
  const addProps = phase != null ? {
86
79
  phase
@@ -14,7 +14,6 @@ import '../global/schedule-raf.js';
14
14
  /**
15
15
  * @name Island
16
16
  */
17
-
18
17
  class Island extends Component {
19
18
  render() {
20
19
  const {
@@ -34,9 +33,7 @@ class Island extends Component {
34
33
  "data-test": joinDataTestAttributes('ring-island', dataTest)
35
34
  }), children);
36
35
  }
37
-
38
36
  }
39
-
40
37
  _defineProperty(Island, "propTypes", {
41
38
  children: PropTypes.node,
42
39
  className: PropTypes.string,
@@ -44,7 +41,6 @@ _defineProperty(Island, "propTypes", {
44
41
  withoutPaddings: PropTypes.bool,
45
42
  'data-test': PropTypes.string
46
43
  });
47
-
48
44
  const AdaptiveIsland = adaptiveIslandHOC(Island);
49
45
 
50
46
  export { AdaptiveIsland, Island as default };
@@ -15,9 +15,7 @@ class Content extends PureComponent {
15
15
  className: classes
16
16
  }), children);
17
17
  }
18
-
19
18
  }
20
-
21
19
  _defineProperty(Content, "propTypes", {
22
20
  className: PropTypes.string,
23
21
  children: PropTypes.node
@@ -17,9 +17,7 @@ class Header extends PureComponent {
17
17
  className: "ring-island__title"
18
18
  }, children));
19
19
  }
20
-
21
20
  }
22
-
23
21
  _defineProperty(Header, "propTypes", {
24
22
  className: PropTypes.string,
25
23
  children: PropTypes.node
@@ -17,9 +17,7 @@ class Island extends PureComponent {
17
17
  className: classes
18
18
  }), children);
19
19
  }
20
-
21
20
  }
22
-
23
21
  _defineProperty(Island, "propTypes", {
24
22
  className: PropTypes.string,
25
23
  children: PropTypes.node
@@ -33,10 +33,8 @@ angularModule.directive('rgIslandContent', function islandContentDirective() {
33
33
  controllerAs: 'contentCtrl',
34
34
  controller: ["$scope", "$element", function controller($scope, $element) {
35
35
  const el = $element[0];
36
-
37
36
  if (this.onScroll) {
38
37
  const scrollable = el.querySelector('.js-scrollable-wrapper');
39
-
40
38
  const scrollCallback = evt => {
41
39
  const $scrollTop = scrollable.scrollTop;
42
40
  this.onScroll({
@@ -45,7 +43,6 @@ angularModule.directive('rgIslandContent', function islandContentDirective() {
45
43
  });
46
44
  $scope.$apply();
47
45
  };
48
-
49
46
  scrollable.addEventListener('scroll', () => scheduleScroll(scrollCallback));
50
47
  }
51
48
  }]
@@ -2,14 +2,12 @@ import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBa
2
2
  import React, { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
- const LEFT_BUTTON = 0; // Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks
6
-
5
+ const LEFT_BUTTON = 0;
6
+ // Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks
7
7
  const isPlainLeftClick = e => e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey;
8
-
9
8
  class ClickableLink extends PureComponent {
10
9
  constructor() {
11
10
  super(...arguments);
12
-
13
11
  _defineProperty(this, "onClick", e => {
14
12
  const {
15
13
  onClick,
@@ -17,22 +15,18 @@ class ClickableLink extends PureComponent {
17
15
  onPlainLeftClick
18
16
  } = this.props;
19
17
  const isPlainLeft = isPlainLeftClick(e);
20
-
21
18
  if (onClick) {
22
19
  onClick(e);
23
20
  }
24
-
25
21
  if (onConditionalClick) {
26
22
  onConditionalClick(isPlainLeft, e);
27
23
  }
28
-
29
24
  if (onPlainLeftClick && isPlainLeft) {
30
25
  e.preventDefault();
31
26
  onPlainLeftClick(e);
32
27
  }
33
28
  });
34
29
  }
35
-
36
30
  render() {
37
31
  const {
38
32
  onConditionalClick,
@@ -48,9 +42,7 @@ class ClickableLink extends PureComponent {
48
42
  onClick: this.onClick
49
43
  }), children);
50
44
  }
51
-
52
45
  }
53
-
54
46
  _defineProperty(ClickableLink, "propTypes", {
55
47
  onClick: PropTypes.func,
56
48
  onPlainLeftClick: PropTypes.func,
package/dist/link/link.js CHANGED
@@ -11,7 +11,6 @@ import { m as modules_607b0772 } from '../_helpers/link.js';
11
11
  /**
12
12
  * @name Link
13
13
  */
14
-
15
14
  let isCompatibilityMode = false;
16
15
  function setCompatibilityMode(isEnabled) {
17
16
  isCompatibilityMode = isEnabled;
@@ -27,7 +26,6 @@ const makeWrapText = memoize(innerClassName => {
27
26
  className: classes
28
27
  }, children);
29
28
  }
30
-
31
29
  WrapText.propTypes = {
32
30
  className: PropTypes.string,
33
31
  children: PropTypes.node
@@ -36,7 +34,6 @@ const makeWrapText = memoize(innerClassName => {
36
34
  });
37
35
  function linkHOC(ComposedComponent) {
38
36
  var _class;
39
-
40
37
  const isCustom = typeof ComposedComponent !== 'string' && ComposedComponent !== ClickableLink;
41
38
  return _class = class Link extends PureComponent {
42
39
  getChildren() {
@@ -47,7 +44,6 @@ function linkHOC(ComposedComponent) {
47
44
  const WrapText = makeWrapText(innerClassName);
48
45
  return typeof children === 'function' ? children(WrapText) : /*#__PURE__*/React.createElement(WrapText, null, children);
49
46
  }
50
-
51
47
  render() {
52
48
  const {
53
49
  active,
@@ -73,13 +69,12 @@ function linkHOC(ComposedComponent) {
73
69
  [modules_607b0772.text]: typeof children !== 'function'
74
70
  });
75
71
  let props = restProps;
76
-
77
72
  if (isCustom && !props.activeClassName) {
78
- props = { ...props,
73
+ props = {
74
+ ...props,
79
75
  activeClassName: modules_607b0772.active
80
76
  };
81
77
  }
82
-
83
78
  if (useButton) {
84
79
  return /*#__PURE__*/React.createElement("button", _extends({
85
80
  type: "button"
@@ -89,7 +84,6 @@ function linkHOC(ComposedComponent) {
89
84
  "data-test": joinDataTestAttributes('ring-link', dataTest)
90
85
  }), this.getChildren());
91
86
  }
92
-
93
87
  return /*#__PURE__*/React.createElement(ComposedComponent, _extends({}, props, {
94
88
  href: href,
95
89
  className: classes,
@@ -98,7 +92,6 @@ function linkHOC(ComposedComponent) {
98
92
  "data-test": joinDataTestAttributes('ring-link', dataTest)
99
93
  }), this.getChildren());
100
94
  }
101
-
102
95
  }, _defineProperty(_class, "propTypes", {
103
96
  className: PropTypes.string,
104
97
  innerClassName: PropTypes.string,
@@ -6,7 +6,6 @@ import { m as modules_607b0772 } from '../_helpers/link.js';
6
6
  */
7
7
 
8
8
  const angularModule = angular.module('Ring.link', []);
9
-
10
9
  function rgLinkDirective() {
11
10
  return {
12
11
  restrict: 'E',
@@ -18,7 +17,6 @@ function rgLinkDirective() {
18
17
  `
19
18
  };
20
19
  }
21
-
22
20
  angularModule.directive('rgLink', rgLinkDirective);
23
21
  var LinkNG = angularModule.name;
24
22