@jetbrains/ring-ui 5.0.35 → 5.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/components/date-picker/date-popup.js +3 -1
  2. package/components/editable-heading/editable-heading.css +69 -0
  3. package/components/editable-heading/editable-heading.d.ts +21 -0
  4. package/components/editable-heading/editable-heading.js +34 -0
  5. package/components/input/input.css +2 -0
  6. package/components/query-assist/query-assist.js +1 -1
  7. package/dist/_helpers/_rollupPluginBabelHelpers.js +0 -4
  8. package/dist/_helpers/anchor.js +0 -1
  9. package/dist/_helpers/card.js +0 -3
  10. package/dist/_helpers/dialog__body-scroll-preventer.js +0 -11
  11. package/dist/_helpers/footer.js +2 -13
  12. package/dist/_helpers/query-assist__suggestions.js +0 -10
  13. package/dist/_helpers/select__filter.js +0 -11
  14. package/dist/_helpers/services-link.js +0 -2
  15. package/dist/_helpers/sidebar.js +0 -12
  16. package/dist/_helpers/theme.js +0 -3
  17. package/dist/_helpers/title.js +0 -9
  18. package/dist/alert/alert.js +2 -32
  19. package/dist/alert/container.js +0 -5
  20. package/dist/alert-service/alert-service.js +0 -26
  21. package/dist/analytics/analytics.js +0 -22
  22. package/dist/analytics/analytics__custom-plugin.js +0 -38
  23. package/dist/analytics/analytics__fus-plugin.js +0 -20
  24. package/dist/analytics/analytics__ga-plugin.js +0 -13
  25. package/dist/analytics/analytics__plugin-utils.js +0 -8
  26. package/dist/analytics-ng/analytics-ng.js +3 -9
  27. package/dist/auth/auth.js +2 -3
  28. package/dist/auth/auth__core.js +30 -243
  29. package/dist/auth/background-flow.js +2 -25
  30. package/dist/auth/down-notification.js +0 -7
  31. package/dist/auth/iframe-flow.js +2 -26
  32. package/dist/auth/landing.js +2 -6
  33. package/dist/auth/request-builder.js +0 -11
  34. package/dist/auth/response-parser.js +4 -26
  35. package/dist/auth/storage.js +4 -60
  36. package/dist/auth/token-validator.js +6 -42
  37. package/dist/auth/window-flow.js +2 -34
  38. package/dist/auth-dialog/auth-dialog.js +2 -12
  39. package/dist/auth-dialog-service/auth-dialog-service.js +2 -4
  40. package/dist/auth-ng/auth-ng.js +6 -22
  41. package/dist/auth-ng/auth-ng.mock.js +0 -4
  42. package/dist/autofocus-ng/autofocus-ng.js +0 -5
  43. package/dist/avatar/avatar.js +4 -17
  44. package/dist/avatar/fallback-avatar.js +2 -9
  45. package/dist/avatar-editor-ng/avatar-editor-ng.js +1 -17
  46. package/dist/badge/badge.js +0 -3
  47. package/dist/button/button.js +0 -8
  48. package/dist/button-group/button-group.js +0 -3
  49. package/dist/button-group/caption.js +0 -2
  50. package/dist/button-group-ng/button-group-ng.js +0 -4
  51. package/dist/button-ng/button-ng.js +3 -21
  52. package/dist/button-set/button-set.js +0 -3
  53. package/dist/button-set-ng/button-set-ng.js +0 -2
  54. package/dist/button-toolbar/button-toolbar.js +0 -3
  55. package/dist/button-toolbar-ng/button-toolbar-ng.js +0 -2
  56. package/dist/caret/caret.js +2 -53
  57. package/dist/checkbox/checkbox.js +0 -12
  58. package/dist/code/code.js +3 -25
  59. package/dist/compiler-ng/compiler-ng.js +0 -5
  60. package/dist/confirm/confirm.js +0 -6
  61. package/dist/confirm-service/confirm-service.js +10 -8
  62. package/dist/content-layout/content-layout.js +0 -7
  63. package/dist/contenteditable/contenteditable.js +6 -13
  64. package/dist/data-list/data-list.js +4 -28
  65. package/dist/data-list/item.js +0 -15
  66. package/dist/data-list/selection.js +0 -27
  67. package/dist/date-picker/consts.js +0 -7
  68. package/dist/date-picker/date-input.js +0 -20
  69. package/dist/date-picker/date-picker.js +2 -36
  70. package/dist/date-picker/date-popup.js +21 -72
  71. package/dist/date-picker/day.js +0 -14
  72. package/dist/date-picker/month-names.js +0 -9
  73. package/dist/date-picker/month-slider.js +0 -10
  74. package/dist/date-picker/month.js +2 -4
  75. package/dist/date-picker/months.js +6 -13
  76. package/dist/date-picker/years.js +0 -14
  77. package/dist/dialog/dialog.js +0 -19
  78. package/dist/dialog-ng/dialog-ng.js +17 -105
  79. package/dist/docked-panel-ng/docked-panel-ng.js +6 -29
  80. package/dist/dropdown/dropdown.js +2 -33
  81. package/dist/dropdown-menu/dropdown-menu.js +4 -8
  82. package/dist/editable-heading/editable-heading.d.ts +21 -0
  83. package/dist/editable-heading/editable-heading.js +85 -0
  84. package/dist/error-bubble/error-bubble.js +2 -4
  85. package/dist/error-message/error-message.js +0 -3
  86. package/dist/footer-ng/footer-ng.js +0 -13
  87. package/dist/form-ng/form-ng.js +1 -21
  88. package/dist/global/angular-component-factory.js +0 -10
  89. package/dist/global/compose.js +0 -1
  90. package/dist/global/composeRefs.js +0 -1
  91. package/dist/global/controls-height.js +0 -2
  92. package/dist/global/create-stateful-context.js +0 -5
  93. package/dist/global/data-tests.js +0 -4
  94. package/dist/global/dom.js +2 -11
  95. package/dist/global/focus-sensor-hoc.js +4 -33
  96. package/dist/global/fuzzy-highlight.js +2 -16
  97. package/dist/global/get-event-key.js +8 -17
  98. package/dist/global/get-uid.js +0 -2
  99. package/dist/global/linear-function.js +0 -2
  100. package/dist/global/listeners.js +0 -13
  101. package/dist/global/memoize.js +0 -2
  102. package/dist/global/normalize-indent.js +2 -5
  103. package/dist/global/react-dom-renderer.js +0 -8
  104. package/dist/global/react-render-adapter.js +0 -7
  105. package/dist/global/rerender-hoc.js +0 -7
  106. package/dist/global/ring-angular-component.js +0 -5
  107. package/dist/global/schedule-raf.js +0 -5
  108. package/dist/global/trivial-template-tag.js +2 -3
  109. package/dist/global/url.js +0 -27
  110. package/dist/grid/col.js +0 -4
  111. package/dist/grid/grid.js +0 -3
  112. package/dist/grid/row.js +0 -5
  113. package/dist/group/group.js +0 -3
  114. package/dist/header/header.js +0 -5
  115. package/dist/header/logo.js +0 -4
  116. package/dist/header/profile.js +0 -7
  117. package/dist/header/services.js +0 -11
  118. package/dist/header/smart-profile.js +4 -18
  119. package/dist/header/smart-services.js +0 -17
  120. package/dist/header/tray-icon.js +2 -3
  121. package/dist/header/tray.js +0 -3
  122. package/dist/heading/heading.js +0 -5
  123. package/dist/http/http.js +20 -65
  124. package/dist/http/http.mock.js +2 -14
  125. package/dist/hub-source/hub-source.js +0 -32
  126. package/dist/hub-source/hub-source__user.js +0 -1
  127. package/dist/hub-source/hub-source__users-groups.js +0 -12
  128. package/dist/icon/icon.js +0 -13
  129. package/dist/icon/icon__constants.js +0 -4
  130. package/dist/icon/icon__svg.js +0 -10
  131. package/dist/icon-ng/icon-ng.js +2 -7
  132. package/dist/input/input.js +0 -30
  133. package/dist/input-ng/input-ng.js +0 -17
  134. package/dist/island/adaptive-island-hoc.js +0 -7
  135. package/dist/island/content.js +0 -25
  136. package/dist/island/header.js +0 -7
  137. package/dist/island/island.js +0 -4
  138. package/dist/island-legacy/content-legacy.js +0 -2
  139. package/dist/island-legacy/header-legacy.js +0 -2
  140. package/dist/island-legacy/island-legacy.js +0 -2
  141. package/dist/island-ng/island-content-ng.js +0 -3
  142. package/dist/link/clickableLink.js +2 -10
  143. package/dist/link/link.js +2 -9
  144. package/dist/link-ng/link-ng.js +0 -2
  145. package/dist/list/consts.js +0 -4
  146. package/dist/list/list.js +6 -128
  147. package/dist/list/list__custom.js +0 -4
  148. package/dist/list/list__hint.js +0 -3
  149. package/dist/list/list__item.js +0 -8
  150. package/dist/list/list__link.js +2 -3
  151. package/dist/list/list__separator.js +0 -1
  152. package/dist/list/list__title.js +0 -1
  153. package/dist/list/list__users-groups-source.js +4 -17
  154. package/dist/loader/loader.js +0 -10
  155. package/dist/loader/loader__core.js +6 -70
  156. package/dist/loader-inline/loader-inline.js +0 -3
  157. package/dist/loader-ng/loader-ng.js +0 -7
  158. package/dist/loader-screen/loader-screen.js +0 -3
  159. package/dist/loader-screen-ng/loader-screen-ng.js +2 -14
  160. package/dist/login-dialog/login-dialog.js +0 -15
  161. package/dist/login-dialog/service.js +2 -4
  162. package/dist/markdown/code.js +0 -2
  163. package/dist/markdown/heading.js +0 -1
  164. package/dist/markdown/link.js +0 -1
  165. package/dist/markdown/markdown.js +0 -2
  166. package/dist/message/message.js +0 -24
  167. package/dist/message-bundle-ng/message-bundle-ng.js +2 -45
  168. package/dist/old-browsers-message/old-browsers-message.js +2 -21
  169. package/dist/old-browsers-message/white-list.js +2 -6
  170. package/dist/pager/pager.js +2 -39
  171. package/dist/panel/panel.js +0 -3
  172. package/dist/permissions/permissions.js +1 -43
  173. package/dist/permissions/permissions__cache.js +12 -63
  174. package/dist/permissions-ng/permissions-ng.js +11 -19
  175. package/dist/place-under-ng/place-under-ng.js +0 -19
  176. package/dist/popup/popup.consts.js +0 -11
  177. package/dist/popup/popup.js +6 -68
  178. package/dist/popup/position.js +8 -30
  179. package/dist/popup-menu/popup-menu.js +4 -13
  180. package/dist/progress-bar/progress-bar.js +0 -14
  181. package/dist/promised-click-ng/promised-click-ng.js +3 -22
  182. package/dist/query-assist/query-assist.js +17 -201
  183. package/dist/radio/radio.js +0 -6
  184. package/dist/radio/radio__item.js +0 -9
  185. package/dist/radio-ng/radio-ng.js +0 -4
  186. package/dist/save-field-ng/save-field-ng.js +1 -37
  187. package/dist/select/select.js +18 -208
  188. package/dist/select/select__popup.js +4 -76
  189. package/dist/select-ng/select-ng.js +18 -74
  190. package/dist/select-ng/select-ng__lazy.js +2 -17
  191. package/dist/select-ng/select-ng__options.js +3 -29
  192. package/dist/shortcuts/core.js +4 -56
  193. package/dist/shortcuts/shortcuts-hoc.js +0 -4
  194. package/dist/shortcuts/shortcuts.js +0 -10
  195. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -13
  196. package/dist/shortcuts-ng/shortcuts-ng.js +16 -46
  197. package/dist/sidebar-ng/sidebar-ng.js +2 -12
  198. package/dist/storage/storage.js +2 -5
  199. package/dist/storage/storage__fallback.js +2 -48
  200. package/dist/storage/storage__local.js +0 -23
  201. package/dist/style.css +1 -1
  202. package/dist/tab-trap/tab-trap.js +0 -37
  203. package/dist/table/cell.js +0 -2
  204. package/dist/table/disable-hover-hoc.js +0 -9
  205. package/dist/table/header-cell.js +0 -8
  206. package/dist/table/header.js +0 -16
  207. package/dist/table/multitable.js +0 -23
  208. package/dist/table/row-with-focus-sensor.js +0 -12
  209. package/dist/table/row.js +0 -18
  210. package/dist/table/selection-adapter.js +0 -2
  211. package/dist/table/selection-shortcuts-hoc.js +8 -42
  212. package/dist/table/selection.js +0 -50
  213. package/dist/table/smart-table.js +0 -9
  214. package/dist/table/table.js +6 -37
  215. package/dist/table-legacy-ng/table-legacy-ng.js +12 -42
  216. package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +0 -31
  217. package/dist/table-legacy-ng/table-legacy-ng__selection.js +0 -32
  218. package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +2 -5
  219. package/dist/tabs/collapsible-more.js +0 -5
  220. package/dist/tabs/collapsible-tab.js +0 -4
  221. package/dist/tabs/collapsible-tabs.js +8 -28
  222. package/dist/tabs/dumb-tabs.js +0 -8
  223. package/dist/tabs/smart-tabs.js +0 -6
  224. package/dist/tabs/tab-link.js +0 -1
  225. package/dist/tabs/tab.js +0 -2
  226. package/dist/tabs-ng/tabs-ng.js +13 -29
  227. package/dist/tag/tag.js +0 -24
  228. package/dist/tags-input/tags-input.js +0 -76
  229. package/dist/tags-list/tags-list.js +0 -6
  230. package/dist/template-ng/template-ng.js +0 -12
  231. package/dist/text/text.js +0 -3
  232. package/dist/theme-ng/theme-ng.js +0 -8
  233. package/dist/title-ng/title-ng.js +6 -17
  234. package/dist/toggle/toggle.js +0 -4
  235. package/dist/tooltip/tooltip.js +4 -35
  236. package/dist/tooltip-ng/tooltip-ng.js +2 -8
  237. package/dist/user-agreement/service.js +0 -62
  238. package/dist/user-agreement/user-agreement.js +0 -8
  239. package/dist/user-card/smart-user-card-tooltip.js +2 -8
  240. package/dist/user-card/tooltip.js +0 -3
  241. package/package.json +22 -22
@@ -2,8 +2,8 @@ function normalizeIndent(string) {
2
2
  const nonemptyRE = /\S/;
3
3
  const indentRE = /^\s*/;
4
4
  const lines = string.split(/\n/g);
5
- const linesCopy = [...lines]; //remove empty lines at the beginning and the end
6
-
5
+ const linesCopy = [...lines];
6
+ //remove empty lines at the beginning and the end
7
7
  for (const line of linesCopy) {
8
8
  if (nonemptyRE.test(line)) {
9
9
  break;
@@ -11,7 +11,6 @@ function normalizeIndent(string) {
11
11
  lines.shift();
12
12
  }
13
13
  }
14
-
15
14
  for (const line of linesCopy.reverse()) {
16
15
  if (nonemptyRE.test(line)) {
17
16
  break;
@@ -19,10 +18,8 @@ function normalizeIndent(string) {
19
18
  lines.pop();
20
19
  }
21
20
  }
22
-
23
21
  const indents = lines.filter(line => nonemptyRE.test(line)).map(line => {
24
22
  var _line$match$0$length, _line$match;
25
-
26
23
  return (_line$match$0$length = (_line$match = line.match(indentRE)) === null || _line$match === void 0 ? void 0 : _line$match[0].length) !== null && _line$match$0$length !== void 0 ? _line$match$0$length : 0;
27
24
  });
28
25
  const minIndent = Math.min(...indents);
@@ -5,28 +5,22 @@ import PropTypes from 'prop-types';
5
5
  class Renderer extends Component {
6
6
  constructor() {
7
7
  super(...arguments);
8
-
9
8
  _defineProperty(this, "node", void 0);
10
-
11
9
  _defineProperty(this, "nodeRef", node => {
12
10
  this.node = node;
13
11
  });
14
12
  }
15
-
16
13
  componentDidMount() {
17
14
  const {
18
15
  nodes
19
16
  } = this.props;
20
-
21
17
  if (!this.node || !nodes || !nodes.length) {
22
18
  return;
23
19
  }
24
-
25
20
  const fragment = document.createDocumentFragment();
26
21
  nodes.forEach(nodeToRender => fragment.appendChild(nodeToRender));
27
22
  this.node.appendChild(fragment);
28
23
  }
29
-
30
24
  render() {
31
25
  const {
32
26
  className
@@ -36,9 +30,7 @@ class Renderer extends Component {
36
30
  ref: this.nodeRef
37
31
  });
38
32
  }
39
-
40
33
  }
41
-
42
34
  _defineProperty(Renderer, "propTypes", {
43
35
  className: PropTypes.string,
44
36
  nodes: PropTypes.array
@@ -1,7 +1,6 @@
1
1
  import { render as render$1, unmountComponentAtNode as unmountComponentAtNode$1, hydrate as hydrate$1 } from 'react-dom';
2
2
 
3
3
  /* eslint-disable import/no-mutable-exports */
4
-
5
4
  let render = render$1;
6
5
  let unmountComponentAtNode = unmountComponentAtNode$1;
7
6
  let hydrate = hydrate$1;
@@ -13,24 +12,18 @@ function setClient(_ref) {
13
12
  hydrateRoot
14
13
  } = _ref;
15
14
  const roots = new WeakMap();
16
-
17
15
  render = (element, container) => {
18
16
  let root = roots.get(container);
19
-
20
17
  if (root == null) {
21
18
  root = createRoot(container);
22
19
  roots.set(container, root);
23
20
  }
24
-
25
21
  root.render(element);
26
22
  };
27
-
28
23
  unmountComponentAtNode = container => {
29
24
  var _roots$get;
30
-
31
25
  return (_roots$get = roots.get(container)) === null || _roots$get === void 0 ? void 0 : _roots$get.unmount();
32
26
  };
33
-
34
27
  hydrate = (element, container) => {
35
28
  const root = hydrateRoot(container, element);
36
29
  roots.set(container, root);
@@ -10,35 +10,28 @@ import 'react-dom';
10
10
  * @param captureNode, whether the wrapper should capture this.node itself. Set to false if the component already has "node" property captured
11
11
  * @returns {Rerenderer}
12
12
  */
13
-
14
13
  function rerenderHOC(ComposedComponent) {
15
14
  return class Rerenderer extends ComposedComponent {
16
15
  constructor() {
17
16
  super(...arguments);
18
-
19
17
  _defineProperty(this, "_propsCache", this.props);
20
18
  }
21
-
22
19
  rerender() {
23
20
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
24
21
  let callback = arguments.length > 1 ? arguments[1] : undefined;
25
22
  let container;
26
-
27
23
  try {
28
24
  var _this$node;
29
-
30
25
  container = (_this$node = this.node) === null || _this$node === void 0 ? void 0 : _this$node.parentNode;
31
26
  } finally {
32
27
  if (!container || !(container instanceof Element)) {
33
28
  throw new Error(`${this.constructor.name} component isn't mounted`);
34
29
  }
35
30
  }
36
-
37
31
  this._propsCache = Object.assign({}, this.props, this._propsCache, props);
38
32
  this._propsCache.ref = composeRefs(this._propsCache.ref, callback);
39
33
  render( /*#__PURE__*/createElement(this.constructor, this._propsCache), container);
40
34
  }
41
-
42
35
  };
43
36
  }
44
37
 
@@ -4,21 +4,16 @@ class RingAngularComponent {
4
4
  static get controller() {
5
5
  return this;
6
6
  }
7
-
8
7
  constructor() {
9
8
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
10
9
  args[_key] = arguments[_key];
11
10
  }
12
-
13
11
  _defineProperty(this, "$inject", {});
14
-
15
12
  this.constructor.$inject.forEach((injectName, i) => {
16
13
  this.$inject[injectName] = args[i];
17
14
  });
18
15
  }
19
-
20
16
  }
21
-
22
17
  _defineProperty(RingAngularComponent, "$inject", []);
23
18
 
24
19
  export { RingAngularComponent as default };
@@ -2,13 +2,10 @@ function scheduleRAF(trailingCall) {
2
2
  let scheduledCb;
3
3
  let RAF;
4
4
  let trailingCallScheduled = false;
5
-
6
5
  function doSchedule() {
7
6
  RAF = window.requestAnimationFrame(() => {
8
7
  var _scheduledCb;
9
-
10
8
  (_scheduledCb = scheduledCb) === null || _scheduledCb === void 0 ? void 0 : _scheduledCb();
11
-
12
9
  if (trailingCallScheduled) {
13
10
  trailingCallScheduled = false;
14
11
  doSchedule();
@@ -18,10 +15,8 @@ function scheduleRAF(trailingCall) {
18
15
  }
19
16
  });
20
17
  }
21
-
22
18
  return function schedule(cb) {
23
19
  scheduledCb = cb;
24
-
25
20
  if (!RAF) {
26
21
  doSchedule();
27
22
  } else if (trailingCall) {
@@ -1,12 +1,11 @@
1
1
  const TWO = 2;
2
2
  function trivialTemplateTag(f) {
3
3
  return function (strings) {
4
- const chunks = [...strings]; // insert the interpolations where they belong to
5
-
4
+ const chunks = [...strings];
5
+ // insert the interpolations where they belong to
6
6
  for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
7
7
  interpolations[_key - 1] = arguments[_key];
8
8
  }
9
-
10
9
  interpolations.forEach((value, i) => chunks.splice(TWO * i + 1, 0, value));
11
10
  return f(chunks.join(''));
12
11
  };
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * @description Provides a set of utilities for URL manipulation.
3
3
  */
4
-
5
4
  /**
6
5
  * @const {RegExp}
7
6
  */
@@ -9,18 +8,15 @@ const ORIGIN_PATTERN = /^[a-z]+:\/\/[^/]+/i;
9
8
  /**
10
9
  * @const {RegExp}
11
10
  */
12
-
13
11
  const ABSOLUTE_URL_PATTERN = /^[a-z]+:\/\//i;
14
12
  /**
15
13
  * @const {RegExp}
16
14
  */
17
-
18
15
  const ENDING_SLASH_PATTERN = /\/$/;
19
16
  /**
20
17
  * Get URI from the <base> tag
21
18
  * @return {string|undefined} base URI
22
19
  */
23
-
24
20
  function getBaseURI() {
25
21
  const baseElement = document.getElementsByTagName('base')[0];
26
22
  return baseElement ? baseElement.href : undefined;
@@ -29,18 +25,15 @@ function getBaseURI() {
29
25
  * Get absolute URI from the <base> tag
30
26
  * @return {string} absolute base URI
31
27
  */
32
-
33
28
  function getAbsoluteBaseURL() {
34
29
  const baseUrl = getBaseURI();
35
30
  const host = `${window.location.protocol}//${window.location.host}`;
36
31
  let uri;
37
-
38
32
  if (baseUrl) {
39
33
  uri = ABSOLUTE_URL_PATTERN.test(baseUrl) ? baseUrl : host + baseUrl;
40
34
  } else {
41
35
  uri = host;
42
36
  }
43
-
44
37
  return uri;
45
38
  }
46
39
  /**
@@ -48,21 +41,17 @@ function getAbsoluteBaseURL() {
48
41
  * @param {string} url URL to extract origin from
49
42
  * @returns {string|undefined} origin
50
43
  */
51
-
52
44
  function getOrigin(url) {
53
45
  const matches = url.match(ORIGIN_PATTERN);
54
-
55
46
  if (matches) {
56
47
  return matches[0];
57
48
  }
58
-
59
49
  return undefined;
60
50
  }
61
51
  /**
62
52
  * Get absolute URI from current page
63
53
  * @return {string} absolute URL of current page
64
54
  */
65
-
66
55
  function getAbsoluteURL() {
67
56
  return window.location.href.split('#')[0];
68
57
  }
@@ -74,25 +63,20 @@ function getAbsoluteURL() {
74
63
  * @param {Function} baseURIGetter a function that returns base URI
75
64
  * @return {string} fixed URL
76
65
  */
77
-
78
66
  function fixUrl(url) {
79
67
  let baseURIGetter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getBaseURI;
80
-
81
68
  if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1 && url.indexOf('/') !== 0) {
82
69
  const baseUrl = baseURIGetter();
83
-
84
70
  if (baseUrl) {
85
71
  return baseUrl + url;
86
72
  }
87
73
  }
88
-
89
74
  return url;
90
75
  }
91
76
  function joinBaseURLAndPath(baseUrl, path) {
92
77
  if (!baseUrl || path.indexOf('http://') !== -1 || path.indexOf('https://') !== -1) {
93
78
  return path;
94
79
  }
95
-
96
80
  return baseUrl + path;
97
81
  }
98
82
  /**
@@ -104,30 +88,23 @@ function joinBaseURLAndPath(baseUrl, path) {
104
88
  * @param {string} queryString query parameter string to parse
105
89
  * @return {AuthResponse} object with query parameters map
106
90
  */
107
-
108
91
  function parseQueryString(queryString) {
109
92
  if (queryString == null) {
110
93
  return {};
111
94
  }
112
-
113
95
  const queryParameterPairRE = /([^&;=]+)=?([^&;]*)/g;
114
96
  const FIRST_PAIR_ELEMENT = 1;
115
97
  const SECOND_PAIR_ELEMENT = 2;
116
98
  const urlParams = {};
117
-
118
99
  function decode(s) {
119
100
  return decodeURIComponent(s.replace(/\+/g, ' '));
120
101
  }
121
-
122
102
  let matchedQueryPair;
123
-
124
103
  while ((matchedQueryPair = queryParameterPairRE.exec(queryString)) != null) {
125
104
  urlParams[decode(matchedQueryPair[FIRST_PAIR_ELEMENT])] = decode(matchedQueryPair[SECOND_PAIR_ELEMENT]);
126
105
  }
127
-
128
106
  return urlParams;
129
107
  }
130
-
131
108
  function customEncodeURIComponent(str) {
132
109
  const commaRE = /%2C/g;
133
110
  return encodeURIComponent(String(str)).replace(commaRE, ',');
@@ -139,21 +116,17 @@ function customEncodeURIComponent(str) {
139
116
  * @param {Object} params parameters to add
140
117
  * @returns {string} encoded URL
141
118
  */
142
-
143
-
144
119
  function encodeURL(url, params) {
145
120
  const equalsSign = '=';
146
121
  const firstSeparator = url.indexOf('?') === -1 ? '?' : '&';
147
122
  let res = url;
148
123
  let k;
149
124
  let i = 0;
150
-
151
125
  for (k in params) {
152
126
  if (params.hasOwnProperty(k) && params[k] != null) {
153
127
  res += (i++ === 0 ? firstSeparator : '&') + customEncodeURIComponent(k) + equalsSign + customEncodeURIComponent(params[k]);
154
128
  }
155
129
  }
156
-
157
130
  return res;
158
131
  }
159
132
  function isDataURI(uri) {
package/dist/grid/col.js CHANGED
@@ -20,7 +20,6 @@ const classMap = {
20
20
  * @param {Object} props incoming props
21
21
  * @returns {Array} result classnames
22
22
  */
23
-
24
23
  function getClassNames(props) {
25
24
  return Object.entries(props).filter(_ref => {
26
25
  let [key] = _ref;
@@ -30,7 +29,6 @@ function getClassNames(props) {
30
29
  return modules_855170c0[Number.isInteger(value) ? `${classMap[key]}-${value}` : classMap[key]];
31
30
  });
32
31
  }
33
-
34
32
  class Col extends Component {
35
33
  render() {
36
34
  const {
@@ -46,9 +44,7 @@ class Col extends Component {
46
44
  className: classes
47
45
  }, children);
48
46
  }
49
-
50
47
  }
51
-
52
48
  _defineProperty(Col, "propTypes", {
53
49
  xs: ModifierType,
54
50
  sm: ModifierType,
package/dist/grid/grid.js CHANGED
@@ -9,7 +9,6 @@ export { default as Col } from './col.js';
9
9
  /**
10
10
  * @name Grid
11
11
  */
12
-
13
12
  class Grid extends Component {
14
13
  render() {
15
14
  const {
@@ -22,9 +21,7 @@ class Grid extends Component {
22
21
  className: classes
23
22
  }), children);
24
23
  }
25
-
26
24
  }
27
-
28
25
  _defineProperty(Grid, "propTypes", {
29
26
  className: PropTypes.string,
30
27
  children: PropTypes.node
package/dist/grid/row.js CHANGED
@@ -12,17 +12,14 @@ const modifierKeys = ['start', 'center', 'end', 'around', 'between', 'top', 'mid
12
12
  * @param {Object} props incoming props
13
13
  * @returns {Array} result modifier classes
14
14
  */
15
-
16
15
  function getModifierClassNames(props) {
17
16
  return modifierKeys.reduce((result, key) => {
18
17
  if (props[key]) {
19
18
  return result.concat(modules_855170c0[`${key}-${props[key]}`]);
20
19
  }
21
-
22
20
  return result;
23
21
  }, []);
24
22
  }
25
-
26
23
  class Row extends Component {
27
24
  render() {
28
25
  const {
@@ -38,9 +35,7 @@ class Row extends Component {
38
35
  className: classes
39
36
  }, children);
40
37
  }
41
-
42
38
  }
43
-
44
39
  _defineProperty(Row, "propTypes", {
45
40
  reverse: PropTypes.bool,
46
41
  start: ModifierType,
@@ -7,7 +7,6 @@ import { m as modules_d9da30c7 } from '../_helpers/group.js';
7
7
  /**
8
8
  * @name Group
9
9
  */
10
-
11
10
  class Group extends Component {
12
11
  render() {
13
12
  const {
@@ -20,9 +19,7 @@ class Group extends Component {
20
19
  className: classes
21
20
  }), children);
22
21
  }
23
-
24
22
  }
25
-
26
23
  _defineProperty(Group, "propTypes", {
27
24
  children: PropTypes.node,
28
25
  className: PropTypes.string
@@ -104,11 +104,9 @@ import '../_helpers/services-link.js';
104
104
  /**
105
105
  * @name Header
106
106
  */
107
-
108
107
  /**
109
108
  * Displays a configurable page header. See available presentation options in the knobs panel.
110
109
  */
111
-
112
110
  class Header extends Component {
113
111
  render() {
114
112
  const {
@@ -127,15 +125,12 @@ class Header extends Component {
127
125
  className: classes
128
126
  }), children));
129
127
  }
130
-
131
128
  }
132
-
133
129
  _defineProperty(Header, "propTypes", {
134
130
  className: PropTypes.string,
135
131
  children: PropTypes.node,
136
132
  spaced: PropTypes.bool
137
133
  });
138
-
139
134
  _defineProperty(Header, "defaultProps", {
140
135
  spaced: true,
141
136
  theme: Theme.DARK
@@ -21,18 +21,14 @@ class Logo extends PureComponent {
21
21
  className: classes
22
22
  }, /*#__PURE__*/React.createElement(Icon, restProps));
23
23
  }
24
-
25
24
  }
26
-
27
25
  _defineProperty(Logo, "propTypes", {
28
26
  className: PropTypes.string
29
27
  });
30
-
31
28
  _defineProperty(Logo, "defaultProps", {
32
29
  size: Size.Size48,
33
30
  suppressSizeWarning: true
34
31
  });
35
-
36
32
  _defineProperty(Logo, "Size", Size);
37
33
 
38
34
  export { Logo as default };
@@ -87,7 +87,6 @@ class Profile extends PureComponent {
87
87
  onLogin,
88
88
  ...props
89
89
  } = this.props;
90
-
91
90
  if (!user) {
92
91
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
93
92
  className: classNames(modules_47759f5e.profileEmpty, className)
@@ -96,11 +95,9 @@ class Profile extends PureComponent {
96
95
  round: round
97
96
  }));
98
97
  }
99
-
100
98
  if (user.guest) {
101
99
  return renderGuest(this.props);
102
100
  }
103
-
104
101
  const anchorClassName = classNames(modules_47759f5e.avatarWrapper, {
105
102
  [modules_47759f5e.hasUpdates]: hasUpdates
106
103
  });
@@ -152,9 +149,7 @@ class Profile extends PureComponent {
152
149
  }
153
150
  }));
154
151
  }
155
-
156
152
  }
157
-
158
153
  _defineProperty(Profile, "propTypes", {
159
154
  className: PropTypes.string,
160
155
  closeOnSelect: PropTypes.bool,
@@ -187,7 +182,6 @@ _defineProperty(Profile, "propTypes", {
187
182
  onRevertPostponement: PropTypes.func,
188
183
  renderGuest: PropTypes.func
189
184
  });
190
-
191
185
  _defineProperty(Profile, "defaultProps", {
192
186
  closeOnSelect: true,
193
187
  renderPopupItems: items => items,
@@ -211,7 +205,6 @@ _defineProperty(Profile, "defaultProps", {
211
205
  }, translations.login || 'Log in...'));
212
206
  }
213
207
  });
214
-
215
208
  _defineProperty(Profile, "Size", Size);
216
209
 
217
210
  export { Profile as default };
@@ -52,20 +52,16 @@ const makeAnchor = loading => {
52
52
  "aria-label": "Services"
53
53
  });
54
54
  };
55
-
56
55
  Anchor.propTypes = {
57
56
  active: PropTypes.bool
58
57
  };
59
58
  return Anchor;
60
59
  };
61
-
62
60
  class Services extends PureComponent {
63
61
  constructor() {
64
62
  super(...arguments);
65
-
66
63
  _defineProperty(this, "serviceIsActive", service => service.id === this.props.clientId);
67
64
  }
68
-
69
65
  render() {
70
66
  const {
71
67
  clientId,
@@ -75,7 +71,6 @@ class Services extends PureComponent {
75
71
  theme,
76
72
  ...props
77
73
  } = this.props;
78
-
79
74
  if (!services) {
80
75
  return /*#__PURE__*/React.createElement(TrayIcon, _extends({}, props, {
81
76
  loader: loading,
@@ -84,7 +79,6 @@ class Services extends PureComponent {
84
79
  "aria-label": "Services"
85
80
  }));
86
81
  }
87
-
88
82
  const sortedServices = [...services].sort(Services.sort);
89
83
  const servicesWithIcons = sortedServices.filter(service => service.iconUrl);
90
84
  const servicesWithOutIcons = sortedServices.filter(service => !service.iconUrl);
@@ -118,15 +112,12 @@ class Services extends PureComponent {
118
112
  });
119
113
  })));
120
114
  }
121
-
122
115
  }
123
-
124
116
  _defineProperty(Services, "sort", (a, b) => {
125
117
  const aApplicationName = a.applicationName || '';
126
118
  const bApplicationName = b.applicationName || '';
127
119
  return aApplicationName.localeCompare(bApplicationName) || a.name.localeCompare(b.name);
128
120
  });
129
-
130
121
  _defineProperty(Services, "propTypes", {
131
122
  className: PropTypes.string,
132
123
  clientId: PropTypes.string,
@@ -135,11 +126,9 @@ _defineProperty(Services, "propTypes", {
135
126
  onClick: PropTypes.func,
136
127
  services: PropTypes.arrayOf(ServicesLink.propTypes.service)
137
128
  });
138
-
139
129
  _defineProperty(Services, "defaultProps", {
140
130
  theme: Theme.DARK
141
131
  });
142
-
143
132
  _defineProperty(Services, "Link", ServicesLink);
144
133
 
145
134
  export { Services as default };
@@ -97,48 +97,40 @@ const CERTIFICATE_MISMATCH_HEADER = 'x-client-certificate-token-mismatch';
97
97
  class SmartProfile extends PureComponent {
98
98
  constructor() {
99
99
  super(...arguments);
100
-
101
100
  _defineProperty(this, "state", {
102
101
  user: null,
103
102
  size: Profile.defaultProps.size,
104
103
  isLogoutPostponed: false,
105
104
  isUserChangePostponed: false
106
105
  });
107
-
108
106
  _defineProperty(this, "login", async () => {
109
107
  this.setState({
110
108
  loading: true
111
109
  });
112
-
113
110
  try {
114
111
  await this.props.auth.login();
115
- } catch (err) {// do nothing
112
+ } catch (err) {
113
+ // do nothing
116
114
  } finally {
117
115
  this.setState({
118
116
  loading: false
119
117
  });
120
118
  }
121
119
  });
122
-
123
120
  _defineProperty(this, "logout", () => this.props.auth.logout());
124
-
125
121
  _defineProperty(this, "switchUser", () => this.props.auth.switchUser());
126
-
127
122
  _defineProperty(this, "onRevertPostponement", () => {
128
123
  if (this.state.isLogoutPostponed) {
129
124
  this.props.auth.login();
130
125
  }
131
-
132
126
  if (this.state.isUserChangePostponed) {
133
127
  this.props.auth.updateUser();
134
128
  }
135
129
  });
136
130
  }
137
-
138
131
  componentDidMount() {
139
132
  this.requestUser();
140
133
  }
141
-
142
134
  async requestUser() {
143
135
  try {
144
136
  const {
@@ -166,25 +158,22 @@ class SmartProfile extends PureComponent {
166
158
  isUserChangePostponed: true
167
159
  });
168
160
  });
169
- } catch (e) {// noop
161
+ } catch (e) {
162
+ // noop
170
163
  }
171
164
  }
172
-
173
165
  checkUserCertificateMismatch(user) {
174
166
  var _userMeta$headers;
175
-
176
167
  const {
177
168
  auth,
178
169
  translations
179
170
  } = this.props;
180
171
  const userMeta = auth.http.getMetaForResponse(user);
181
-
182
172
  if (userMeta !== null && userMeta !== void 0 && (_userMeta$headers = userMeta.headers) !== null && _userMeta$headers !== void 0 && _userMeta$headers.has(CERTIFICATE_MISMATCH_HEADER)) {
183
173
  const message = (translations === null || translations === void 0 ? void 0 : translations.certificateMismatch) || `You are authenticated as ${user.login || user.name}. To authenticate with the client certificate for your account, log out, then click the "Log in with certificate" option on the login page.`;
184
174
  alertService.warning(message, 0);
185
175
  }
186
176
  }
187
-
188
177
  render() {
189
178
  const {
190
179
  user,
@@ -212,9 +201,7 @@ class SmartProfile extends PureComponent {
212
201
  onRevertPostponement: this.onRevertPostponement
213
202
  }, props));
214
203
  }
215
-
216
204
  }
217
-
218
205
  _defineProperty(SmartProfile, "propTypes", {
219
206
  auth: PropTypes.instanceOf(Auth).isRequired,
220
207
  className: PropTypes.string,
@@ -223,7 +210,6 @@ _defineProperty(SmartProfile, "propTypes", {
223
210
  size: Profile.propTypes.size,
224
211
  round: Profile.propTypes.round
225
212
  });
226
-
227
213
  _defineProperty(SmartProfile, "Size", Profile.Size);
228
214
 
229
215
  export { SmartProfile as default };