@jetbrains/ring-ui-built 6.0.12 → 6.0.14

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 (97) hide show
  1. package/components/_helpers/_rollupPluginBabelHelpers.js +4 -4
  2. package/components/_helpers/anchor.js +1 -1
  3. package/components/_helpers/badge.js +1 -1
  4. package/components/_helpers/button__classes.js +1 -1
  5. package/components/_helpers/caption.js +1 -1
  6. package/components/_helpers/card.js +1 -1
  7. package/components/_helpers/date-picker.js +1 -1
  8. package/components/_helpers/dialog__body-scroll-preventer.js +1 -1
  9. package/components/_helpers/grid.js +1 -1
  10. package/components/_helpers/header.js +1 -1
  11. package/components/_helpers/heading.js +1 -1
  12. package/components/_helpers/icon__svg.js +1 -1
  13. package/components/_helpers/input.js +1 -1
  14. package/components/_helpers/island.js +1 -1
  15. package/components/_helpers/link.js +1 -1
  16. package/components/_helpers/list.js +1 -1
  17. package/components/_helpers/query-assist__suggestions.js +1 -1
  18. package/components/_helpers/select__filter.js +1 -1
  19. package/components/_helpers/services-link.js +1 -1
  20. package/components/_helpers/sidebar.js +1 -1
  21. package/components/_helpers/tab-link.js +1 -1
  22. package/components/_helpers/table.js +1 -1
  23. package/components/_helpers/theme.js +1 -1
  24. package/components/_helpers/title.js +1 -1
  25. package/components/alert/alert.js +1 -1
  26. package/components/alert/container.js +1 -1
  27. package/components/auth/down-notification.js +1 -1
  28. package/components/auth-dialog/auth-dialog.js +1 -1
  29. package/components/avatar/avatar.js +1 -1
  30. package/components/button-set/button-set.js +1 -1
  31. package/components/button-toolbar/button-toolbar.js +1 -1
  32. package/components/checkbox/checkbox.js +1 -1
  33. package/components/code/code.js +2 -2
  34. package/components/collapse/collapse-content.js +1 -1
  35. package/components/confirm/confirm.js +1 -1
  36. package/components/control-label/control-label.js +1 -1
  37. package/components/data-list/data-list.d.ts +1 -1
  38. package/components/date-picker/consts.d.ts +4 -0
  39. package/components/date-picker/consts.js +18 -1
  40. package/components/date-picker/date-input.js +2 -0
  41. package/components/date-picker/date-picker.js +1 -0
  42. package/components/date-picker/date-popup.js +2 -0
  43. package/components/date-picker/day.d.ts +1 -0
  44. package/components/date-picker/day.js +9 -3
  45. package/components/date-picker/month-names.d.ts +1 -1
  46. package/components/date-picker/month-names.js +5 -2
  47. package/components/date-picker/month-slider.js +3 -0
  48. package/components/date-picker/month.d.ts +1 -1
  49. package/components/date-picker/month.js +8 -3
  50. package/components/date-picker/months.js +3 -0
  51. package/components/date-picker/weekdays.d.ts +1 -1
  52. package/components/date-picker/weekdays.js +6 -3
  53. package/components/date-picker/years.js +3 -0
  54. package/components/editable-heading/editable-heading.js +1 -1
  55. package/components/error-bubble/error-bubble.js +1 -1
  56. package/components/error-message/error-message.js +1 -1
  57. package/components/footer/footer.js +1 -1
  58. package/components/global/url.js +1 -2
  59. package/components/group/group.js +1 -1
  60. package/components/header/profile.d.ts +7 -0
  61. package/components/header/profile.js +18 -9
  62. package/components/http/http.d.ts +2 -2
  63. package/components/island/adaptive-island-hoc.d.ts +1 -1
  64. package/components/island/adaptive-island-hoc.js +3 -3
  65. package/components/island/island.d.ts +1 -1
  66. package/components/link/link.d.ts +2 -2
  67. package/components/link/link.js +4 -4
  68. package/components/list/list__item.js +1 -1
  69. package/components/loader/loader__core.js +1 -1
  70. package/components/loader-inline/loader-inline.js +1 -1
  71. package/components/loader-screen/loader-screen.js +1 -1
  72. package/components/login-dialog/login-dialog.js +1 -1
  73. package/components/markdown/markdown.js +1 -1
  74. package/components/message/message.js +1 -1
  75. package/components/old-browsers-message/white-list.js +2 -2
  76. package/components/pager/pager.js +1 -1
  77. package/components/panel/panel.js +1 -1
  78. package/components/popup/popup.js +1 -1
  79. package/components/progress-bar/progress-bar.js +1 -1
  80. package/components/query-assist/query-assist.js +2 -2
  81. package/components/radio/radio__item.js +1 -1
  82. package/components/select/select.js +1 -1
  83. package/components/shortcuts/shortcuts-hoc.d.ts +1 -1
  84. package/components/shortcuts/shortcuts-hoc.js +4 -4
  85. package/components/slider/slider.js +1 -1
  86. package/components/style.css +1 -1
  87. package/components/tab-trap/tab-trap.js +1 -1
  88. package/components/table/disable-hover-hoc.d.ts +1 -1
  89. package/components/table/disable-hover-hoc.js +3 -3
  90. package/components/table/table.d.ts +1 -1
  91. package/components/tag/tag.js +1 -1
  92. package/components/tags-input/tags-input.js +1 -1
  93. package/components/text/text.js +1 -1
  94. package/components/toggle/toggle.js +1 -1
  95. package/components/tooltip/tooltip.js +1 -1
  96. package/components/user-agreement/user-agreement.js +1 -1
  97. package/package.json +3 -3
@@ -1,4 +1,8 @@
1
1
  import 'core-js/modules/es.regexp.exec.js';
2
+ import 'core-js/modules/es.array.concat.js';
3
+ import 'core-js/modules/es.array.slice.js';
4
+ import 'core-js/modules/es.object.values.js';
5
+ import 'core-js/modules/es.array.index-of.js';
2
6
  import PropTypes from 'prop-types';
3
7
  import { add } from 'date-fns/add';
4
8
 
@@ -13,6 +17,7 @@ var units = {
13
17
  };
14
18
  var YEAR = 12;
15
19
  var WEEK = 7;
20
+ var FIFTH_DAY = 4;
16
21
  var weekdays = {
17
22
  MO: 1,
18
23
  TU: 2,
@@ -42,5 +47,17 @@ function parseTime(time) {
42
47
  }
43
48
  return result;
44
49
  }
50
+ function shiftWeekArray(arr, startOfWeek) {
51
+ var shiftTimes = startOfWeek - 1;
52
+ return arr.slice(shiftTimes).concat(arr.slice(0, shiftTimes));
53
+ }
54
+ function getWeekStartsOn(locale) {
55
+ var _locale$options$weekS, _locale$options;
56
+ return (_locale$options$weekS = locale === null || locale === void 0 || (_locale$options = locale.options) === null || _locale$options === void 0 ? void 0 : _locale$options.weekStartsOn) !== null && _locale$options$weekS !== void 0 ? _locale$options$weekS : weekdays.MO;
57
+ }
58
+ function getDayNumInWeek(locale, day) {
59
+ var weekDays = shiftWeekArray(Object.values(weekdays), getWeekStartsOn(locale));
60
+ return weekDays.indexOf(day);
61
+ }
45
62
 
46
- export { DOUBLE, HALF, MIDDLE_DAY, WEEK, YEAR, dateType, units as default, parseTime, weekdays, yearDuration, yearScrollSpeed };
63
+ export { DOUBLE, FIFTH_DAY, HALF, MIDDLE_DAY, WEEK, YEAR, dateType, units as default, getDayNumInWeek, getWeekStartsOn, parseTime, shiftWeekArray, weekdays, yearDuration, yearScrollSpeed };
@@ -36,6 +36,8 @@ import 'core-js/modules/web.dom-collections.for-each.js';
36
36
  import '../control-label/control-label.js';
37
37
  import '../i18n/i18n.js';
38
38
  import 'core-js/modules/es.set.js';
39
+ import 'core-js/modules/es.array.slice.js';
40
+ import 'core-js/modules/es.array.index-of.js';
39
41
  import 'date-fns/add';
40
42
 
41
43
  var DateInput = /*#__PURE__*/function (_React$PureComponent) {
@@ -83,6 +83,7 @@ import 'date-fns/isBefore';
83
83
  import 'date-fns/startOfDay';
84
84
  import 'date-fns';
85
85
  import './date-input.js';
86
+ import 'core-js/modules/es.array.index-of.js';
86
87
  import 'date-fns/add';
87
88
  import './months.js';
88
89
  import 'date-fns/addMonths';
@@ -65,6 +65,8 @@ import 'core-js/modules/es.array.includes.js';
65
65
  import 'core-js/modules/es.string.includes.js';
66
66
  import 'date-fns/getDate';
67
67
  import 'date-fns/isToday';
68
+ import 'core-js/modules/es.array.slice.js';
69
+ import 'core-js/modules/es.array.index-of.js';
68
70
  import 'date-fns/add';
69
71
  import './month-names.js';
70
72
  import 'date-fns/isThisMonth';
@@ -15,6 +15,7 @@ export default class Day extends Component<DayProps> {
15
15
  onSelect: PropTypes.Requireable<(...args: any[]) => any>;
16
16
  parseDateInput: PropTypes.Requireable<(...args: any[]) => any>;
17
17
  onHover: PropTypes.Requireable<(...args: any[]) => any>;
18
+ locale: PropTypes.Requireable<object>;
18
19
  minDate: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
19
20
  maxDate: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
20
21
  };
@@ -15,9 +15,12 @@ import { isBefore } from 'date-fns/isBefore';
15
15
  import { isSameDay } from 'date-fns/isSameDay';
16
16
  import { isToday } from 'date-fns/isToday';
17
17
  import { startOfDay } from 'date-fns/startOfDay';
18
- import { dateType, weekdays } from './consts.js';
18
+ import { dateType, getDayNumInWeek, weekdays } from './consts.js';
19
19
  import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
20
20
  import 'core-js/modules/es.regexp.exec.js';
21
+ import 'core-js/modules/es.array.slice.js';
22
+ import 'core-js/modules/es.object.values.js';
23
+ import 'core-js/modules/es.array.index-of.js';
21
24
  import 'date-fns/add';
22
25
 
23
26
  var hoverTO;
@@ -74,8 +77,10 @@ var Day = /*#__PURE__*/function (_Component) {
74
77
  from = _this$props.from,
75
78
  currentRange = _this$props.currentRange,
76
79
  activeRange = _this$props.activeRange,
77
- empty = _this$props.empty;
80
+ empty = _this$props.empty,
81
+ locale = _this$props.locale;
78
82
  var reverse = activeRange && activeRange[1] === from;
83
+ var dayInWeek = getDayNumInWeek(locale, getDay(day)) + 1;
79
84
  function makeSpreadRange(range) {
80
85
  return range && [range[0], addDays(range[1], 1)];
81
86
  }
@@ -87,7 +92,7 @@ var Day = /*#__PURE__*/function (_Component) {
87
92
  // TODO make keyboard navigation actually work
88
93
  React.createElement("button", {
89
94
  type: "button",
90
- className: classNames(modules_0c7b7d96.day, modules_0c7b7d96[format(day, 'EEEE')], {
95
+ className: classNames(modules_0c7b7d96.day, modules_0c7b7d96["Day".concat(dayInWeek)], {
91
96
  [modules_0c7b7d96.current]: ['date', 'from', 'to'].some(this.is),
92
97
  [modules_0c7b7d96.active]: !disabled && this.is('activeDate'),
93
98
  [modules_0c7b7d96.weekend]: [weekdays.SA, weekdays.SU].includes(getDay(day)),
@@ -126,6 +131,7 @@ _defineProperty(Day, "propTypes", {
126
131
  onSelect: PropTypes.func,
127
132
  parseDateInput: PropTypes.func,
128
133
  onHover: PropTypes.func,
134
+ locale: PropTypes.object,
129
135
  minDate: dateType,
130
136
  maxDate: dateType
131
137
  });
@@ -7,7 +7,7 @@ declare namespace MonthNames {
7
7
  scrollDate: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
8
8
  onScrollChange: PropTypes.Requireable<(...args: any[]) => any>;
9
9
  currentRange: PropTypes.Requireable<(NonNullable<string | number | Date | null | undefined> | null | undefined)[]>;
10
- locale: PropTypes.Requireable<string>;
10
+ locale: PropTypes.Requireable<object>;
11
11
  };
12
12
  }
13
13
  export default MonthNames;
@@ -17,6 +17,9 @@ import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
17
17
  import 'date-fns/addYears';
18
18
  import 'date-fns/subYears';
19
19
  import 'core-js/modules/es.regexp.exec.js';
20
+ import 'core-js/modules/es.array.slice.js';
21
+ import 'core-js/modules/es.object.values.js';
22
+ import 'core-js/modules/es.array.index-of.js';
20
23
  import 'date-fns/add';
21
24
 
22
25
  var MonthName = /*#__PURE__*/function (_PureComponent) {
@@ -57,7 +60,7 @@ var MonthName = /*#__PURE__*/function (_PureComponent) {
57
60
  _defineProperty(MonthName, "propTypes", {
58
61
  month: dateType,
59
62
  onScrollChange: PropTypes.func,
60
- locale: PropTypes.string
63
+ locale: PropTypes.object
61
64
  });
62
65
  function MonthNames(props) {
63
66
  var scrollDate = props.scrollDate,
@@ -104,7 +107,7 @@ MonthNames.propTypes = {
104
107
  scrollDate: dateType,
105
108
  onScrollChange: PropTypes.func,
106
109
  currentRange: PropTypes.arrayOf(dateType),
107
- locale: PropTypes.string
110
+ locale: PropTypes.object
108
111
  };
109
112
 
110
113
  export { MonthNames as default };
@@ -11,6 +11,9 @@ import linearFunction from '../global/linear-function.js';
11
11
  import units, { dateType, yearScrollSpeed } from './consts.js';
12
12
  import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
13
13
  import 'core-js/modules/es.regexp.exec.js';
14
+ import 'core-js/modules/es.array.slice.js';
15
+ import 'core-js/modules/es.object.values.js';
16
+ import 'core-js/modules/es.array.index-of.js';
14
17
  import 'date-fns/add';
15
18
 
16
19
  var COVERYEARS = 3;
@@ -8,7 +8,7 @@ declare function Month(props: MonthProps): React.JSX.Element;
8
8
  declare namespace Month {
9
9
  var propTypes: {
10
10
  month: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
11
- locale: PropTypes.Requireable<string>;
11
+ locale: PropTypes.Requireable<object>;
12
12
  };
13
13
  }
14
14
  export default Month;
@@ -1,4 +1,5 @@
1
1
  import { i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
2
+ import 'core-js/modules/es.object.values.js';
2
3
  import 'core-js/modules/es.array.map.js';
3
4
  import React from 'react';
4
5
  import { addDays } from 'date-fns/addDays';
@@ -8,7 +9,7 @@ import { getDay } from 'date-fns/getDay';
8
9
  import { setDay } from 'date-fns/setDay';
9
10
  import PropTypes from 'prop-types';
10
11
  import Day from './day.js';
11
- import { dateType, weekdays, WEEK } from './consts.js';
12
+ import { dateType, shiftWeekArray, getWeekStartsOn, weekdays, FIFTH_DAY, WEEK } from './consts.js';
12
13
  import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
13
14
  import 'core-js/modules/es.array.concat.js';
14
15
  import 'core-js/modules/es.object.to-string.js';
@@ -22,6 +23,8 @@ import 'date-fns/isSameDay';
22
23
  import 'date-fns/isToday';
23
24
  import 'date-fns/startOfDay';
24
25
  import 'core-js/modules/es.regexp.exec.js';
26
+ import 'core-js/modules/es.array.slice.js';
27
+ import 'core-js/modules/es.array.index-of.js';
25
28
  import 'date-fns/add';
26
29
 
27
30
  function Month(props) {
@@ -30,7 +33,9 @@ function Month(props) {
30
33
  var locale = props.locale;
31
34
  // pad with empty cells starting from last friday
32
35
  var weekday = getDay(start);
33
- var day = setDay(start, weekday >= weekdays.FR ? weekdays.FR : weekdays.FR - WEEK);
36
+ var weekDays = shiftWeekArray(Object.values(weekdays), getWeekStartsOn(props.locale));
37
+ var fifthDayOfWeek = weekDays[FIFTH_DAY];
38
+ var day = setDay(start, weekday >= fifthDayOfWeek ? fifthDayOfWeek : fifthDayOfWeek - WEEK);
34
39
  var days = [];
35
40
  while (day < end) {
36
41
  days.push(day);
@@ -52,7 +57,7 @@ function Month(props) {
52
57
  }
53
58
  Month.propTypes = {
54
59
  month: dateType,
55
- locale: PropTypes.string
60
+ locale: PropTypes.object
56
61
  };
57
62
 
58
63
  export { Month as default };
@@ -15,6 +15,7 @@ import Month from './month.js';
15
15
  import MonthNames from './month-names.js';
16
16
  import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
17
17
  import units, { dateType, DOUBLE, HALF, WEEK, weekdays } from './consts.js';
18
+ import 'core-js/modules/es.object.values.js';
18
19
  import 'date-fns/addDays';
19
20
  import 'date-fns/format';
20
21
  import 'date-fns/setDay';
@@ -37,6 +38,8 @@ import './month-slider.js';
37
38
  import 'date-fns/addYears';
38
39
  import 'date-fns/subYears';
39
40
  import 'core-js/modules/es.regexp.exec.js';
41
+ import 'core-js/modules/es.array.slice.js';
42
+ import 'core-js/modules/es.array.index-of.js';
40
43
  import 'date-fns/add';
41
44
 
42
45
  var unit = units.unit,
@@ -7,7 +7,7 @@ interface WeekdaysProps {
7
7
  declare function Weekdays(props: WeekdaysProps): React.JSX.Element;
8
8
  declare namespace Weekdays {
9
9
  var propTypes: {
10
- locale: PropTypes.Requireable<string>;
10
+ locale: PropTypes.Requireable<object>;
11
11
  };
12
12
  }
13
13
  export default Weekdays;
@@ -9,13 +9,16 @@ import { format } from 'date-fns/format';
9
9
  import { setDay } from 'date-fns/setDay';
10
10
  import { startOfDay } from 'date-fns/startOfDay';
11
11
  import PropTypes from 'prop-types';
12
- import { weekdays } from './consts.js';
12
+ import { shiftWeekArray, getWeekStartsOn, weekdays } from './consts.js';
13
13
  import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
14
14
  import 'core-js/modules/es.regexp.exec.js';
15
+ import 'core-js/modules/es.array.concat.js';
16
+ import 'core-js/modules/es.array.slice.js';
17
+ import 'core-js/modules/es.array.index-of.js';
15
18
  import 'date-fns/add';
16
19
 
17
20
  function Weekdays(props) {
18
- var days = Object.values(weekdays).map(function (value) {
21
+ var days = shiftWeekArray(Object.values(weekdays), getWeekStartsOn(props.locale)).map(function (value) {
19
22
  return startOfDay(setDay(new Date(), value));
20
23
  });
21
24
  var locale = props.locale;
@@ -33,7 +36,7 @@ function Weekdays(props) {
33
36
  }));
34
37
  }
35
38
  Weekdays.propTypes = {
36
- locale: PropTypes.string
39
+ locale: PropTypes.object
37
40
  };
38
41
 
39
42
  export { Weekdays as default };
@@ -16,6 +16,9 @@ import linearFunction from '../global/linear-function.js';
16
16
  import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
17
17
  import units, { dateType, yearDuration, DOUBLE, HALF } from './consts.js';
18
18
  import 'core-js/modules/es.regexp.exec.js';
19
+ import 'core-js/modules/es.array.slice.js';
20
+ import 'core-js/modules/es.object.values.js';
21
+ import 'core-js/modules/es.array.index-of.js';
19
22
  import 'date-fns/add';
20
23
 
21
24
  var yearHeight = units.yearHeight,
@@ -50,7 +50,7 @@ import 'combokeys';
50
50
  import '../global/sniffer.js';
51
51
  import 'sniffr';
52
52
 
53
- var modules_6e69b0fe = {"editableHeading":"editableHeading_rui_0870","fullSize":"fullSize_rui_0870","isEditing":"isEditing_rui_0870","headingWrapperButton":"headingWrapperButton_rui_0870","disabled":"disabled_rui_0870","selectionMode":"selectionMode_rui_0870","heading":"heading_rui_0870","multiline":"multiline_rui_0870","input":"input_rui_0870","error":"error_rui_0870","textarea":"textarea_rui_0870","textareaNotOverflow":"textareaNotOverflow_rui_0870","textareaFade":"textareaFade_rui_0870","textareaWrapper":"textareaWrapper_rui_0870","button":"button_rui_0870","errorText":"errorText_rui_0870","level1":"level1_rui_0870","level2":"level2_rui_0870","level3":"level3_rui_0870","sizeS":"sizeS_rui_0870","sizeM":"sizeM_rui_0870","sizeL":"sizeL_rui_0870","sizeFULL":"sizeFULL_rui_0870"};
53
+ var modules_6e69b0fe = {"editableHeading":"editableHeading_rui_0f5a","fullSize":"fullSize_rui_0f5a","isEditing":"isEditing_rui_0f5a","headingWrapperButton":"headingWrapperButton_rui_0f5a","disabled":"disabled_rui_0f5a","selectionMode":"selectionMode_rui_0f5a","heading":"heading_rui_0f5a","multiline":"multiline_rui_0f5a","input":"input_rui_0f5a","error":"error_rui_0f5a","textarea":"textarea_rui_0f5a","textareaNotOverflow":"textareaNotOverflow_rui_0f5a","textareaFade":"textareaFade_rui_0f5a","textareaWrapper":"textareaWrapper_rui_0f5a","button":"button_rui_0f5a","errorText":"errorText_rui_0f5a","level1":"level1_rui_0f5a","level2":"level2_rui_0f5a","level3":"level3_rui_0f5a","sizeS":"sizeS_rui_0f5a","sizeM":"sizeM_rui_0f5a","sizeL":"sizeL_rui_0f5a","sizeFULL":"sizeFULL_rui_0f5a"};
54
54
 
55
55
  var _excluded = ["level", "className", "headingClassName", "inputClassName", "children", "isEditing", "isSavingPossible", "isSaving", "embedded", "size", "onEdit", "onSave", "onCancel", "autoFocus", "data-test", "error", "disabled", "multiline", "renderMenu", "onFocus", "onBlur", "onChange", "onScroll", "maxInputRows", "translations"];
56
56
  function noop() {}
@@ -40,7 +40,7 @@ import '../popup/position.js';
40
40
  import 'core-js/modules/es.array.sort.js';
41
41
  import '../popup/popup.target.js';
42
42
 
43
- var modules_ee284100 = {"light":"light_rui_2ac4","errorBubblePopup":"errorBubblePopup_rui_b075","errorBubbleWrapper":"errorBubbleWrapper_rui_b075","errorBubble":"errorBubble_rui_b075"};
43
+ var modules_ee284100 = {"light":"light_rui_2ac4","errorBubblePopup":"errorBubblePopup_rui_7233","errorBubbleWrapper":"errorBubbleWrapper_rui_7233","errorBubble":"errorBubble_rui_7233"};
44
44
 
45
45
  var _excluded = ["children", "className"];
46
46
  /**
@@ -22,7 +22,7 @@ import 'core-js/modules/es.array.reduce.js';
22
22
  import 'core-js/modules/es.object.entries.js';
23
23
  import 'core-js/modules/es.array.concat.js';
24
24
 
25
- var modules_2c5e8509 = {"light":"light_rui_2ac4","errorMessage":"errorMessage_rui_c974","title":"title_rui_c974","description":"description_rui_c974","content":"content_rui_c974","icon":"icon_rui_c974"};
25
+ var modules_2c5e8509 = {"light":"light_rui_2ac4","errorMessage":"errorMessage_rui_94a5","title":"title_rui_94a5","description":"description_rui_94a5","content":"content_rui_94a5","icon":"icon_rui_94a5"};
26
26
 
27
27
  /**
28
28
  * @name Error Message
@@ -12,7 +12,7 @@ import 'core-js/modules/es.array.concat.js';
12
12
  import '../link/clickableLink.js';
13
13
  import '../_helpers/link.js';
14
14
 
15
- var modules_7385b3fd = {"light":"light_rui_2ac4","footer":"footer_rui_fade font_rui_8bff","footerFloating":"footerFloating_rui_fade footer_rui_fade font_rui_8bff","column":"column_rui_fade","columnItem":"columnItem_rui_fade","columnLeft":"columnLeft_rui_fade column_rui_fade","columnCenter":"columnCenter_rui_fade column_rui_fade","line":"line_rui_fade","columnRight":"columnRight_rui_fade column_rui_fade","lineCenter":"lineCenter_rui_fade"};
15
+ var modules_7385b3fd = {"light":"light_rui_2ac4","footer":"footer_rui_b622 font_rui_f295","footerFloating":"footerFloating_rui_b622 footer_rui_b622 font_rui_f295","column":"column_rui_b622","columnItem":"columnItem_rui_b622","columnLeft":"columnLeft_rui_b622 column_rui_b622","columnCenter":"columnCenter_rui_b622 column_rui_b622","line":"line_rui_b622","columnRight":"columnRight_rui_b622 column_rui_b622","lineCenter":"lineCenter_rui_b622"};
16
16
 
17
17
  var FooterColumn = /*#__PURE__*/memo(function FooterColumn(_ref) {
18
18
  var position = _ref.position,
@@ -112,8 +112,7 @@ function parseQueryString(queryString) {
112
112
  return urlParams;
113
113
  }
114
114
  function customEncodeURIComponent(str) {
115
- var commaRE = /%2C/g;
116
- return encodeURIComponent(String(str)).replace(commaRE, ',');
115
+ return encodeURIComponent(String(str)).replace(/%2C/g, ',').replace(/%24/g, '$');
117
116
  }
118
117
  /**
119
118
  * Takes a URL as input and a params object.
@@ -3,7 +3,7 @@ import React, { Component } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
5
 
6
- var modules_d9da30c7 = {"light":"light_rui_2ac4","group":"group_rui_365e"};
6
+ var modules_d9da30c7 = {"light":"light_rui_2ac4","group":"group_rui_bce8"};
7
7
 
8
8
  var _excluded = ["children", "className"];
9
9
  /**
@@ -1,6 +1,7 @@
1
1
  import React, { ComponentType, HTMLAttributes, PureComponent, ReactNode } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Size } from '../avatar/avatar';
4
+ import { PopupMenuAttrs } from '../popup-menu/popup-menu';
4
5
  import { ListDataItem } from '../list/consts';
5
6
  import { AuthUser } from '../auth/auth';
6
7
  import { ClickableLinkProps } from '../link/clickableLink';
@@ -27,15 +28,19 @@ export interface ProfileProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSe
27
28
  LinkComponent?: ComponentType<ClickableLinkProps> | null | undefined;
28
29
  user?: AuthUser | null | undefined | void;
29
30
  round?: boolean | null | undefined;
31
+ showName?: boolean | null | undefined;
30
32
  showLogIn?: boolean | null | undefined;
31
33
  showLogOut?: boolean | null | undefined;
32
34
  showSwitchUser?: boolean | null | undefined;
33
35
  showApplyChangedUser?: boolean | null | undefined;
34
36
  onRevertPostponement?: (() => void) | null | undefined;
37
+ menuProps?: PopupMenuAttrs | null | undefined;
38
+ activeClassName?: string | null | undefined;
35
39
  }
36
40
  export default class Profile extends PureComponent<ProfileProps> {
37
41
  static propTypes: {
38
42
  className: PropTypes.Requireable<string>;
43
+ activeClassName: PropTypes.Requireable<string>;
39
44
  closeOnSelect: PropTypes.Requireable<boolean>;
40
45
  hasUpdates: PropTypes.Requireable<boolean>;
41
46
  loading: PropTypes.Requireable<boolean>;
@@ -59,12 +64,14 @@ export default class Profile extends PureComponent<ProfileProps> {
59
64
  }>>;
60
65
  size: PropTypes.Requireable<number>;
61
66
  round: PropTypes.Requireable<boolean>;
67
+ showName: PropTypes.Requireable<boolean>;
62
68
  showLogIn: PropTypes.Requireable<boolean>;
63
69
  showLogOut: PropTypes.Requireable<boolean>;
64
70
  showSwitchUser: PropTypes.Requireable<boolean>;
65
71
  showApplyChangedUser: PropTypes.Requireable<boolean>;
66
72
  onRevertPostponement: PropTypes.Requireable<(...args: any[]) => any>;
67
73
  renderGuest: PropTypes.Requireable<(...args: any[]) => any>;
74
+ menuProps: PropTypes.Requireable<object>;
68
75
  };
69
76
  static defaultProps: ProfileProps;
70
77
  static contextType: React.Context<import("../i18n/i18n-context").I18nContextProps>;
@@ -1,4 +1,4 @@
1
- import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, f as _createClass, g as _objectWithoutProperties, i as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
1
+ import { _ as _defineProperty, a as _inherits, b as _createSuper, c as _classCallCheck, f as _createClass, g as _objectWithoutProperties, i as _extends, h as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
2
  import 'core-js/modules/es.array.filter.js';
3
3
  import 'core-js/modules/es.object.to-string.js';
4
4
  import React, { Component, PureComponent } from 'react';
@@ -92,7 +92,7 @@ import '../popup/popup.consts.js';
92
92
  import '../popup/popup.target.js';
93
93
  import '../i18n/i18n.js';
94
94
 
95
- var _excluded = ["className", "closeOnSelect", "hasUpdates", "onLogout", "user", "profileUrl", "LinkComponent", "onSwitchUser", "renderPopupItems", "onRevertPostponement", "showApplyChangedUser", "showLogIn", "showLogOut", "showSwitchUser", "renderGuest", "translations", "size", "round", "loading", "onLogin"];
95
+ var _excluded = ["className", "activeClassName", "closeOnSelect", "hasUpdates", "onLogout", "user", "profileUrl", "LinkComponent", "onSwitchUser", "renderPopupItems", "onRevertPostponement", "showApplyChangedUser", "showName", "showLogIn", "showLogOut", "showSwitchUser", "renderGuest", "translations", "size", "round", "loading", "onLogin", "menuProps"];
96
96
  var rgItemType = PopupMenu.ListProps.Type.LINK;
97
97
  var Profile = /*#__PURE__*/function (_PureComponent) {
98
98
  _inherits(Profile, _PureComponent);
@@ -107,6 +107,7 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
107
107
  var _translations$applyCh, _translations$login, _translations$profile, _translations$switchU, _translations$logout;
108
108
  var _this$props = this.props,
109
109
  className = _this$props.className,
110
+ activeClassName = _this$props.activeClassName,
110
111
  closeOnSelect = _this$props.closeOnSelect,
111
112
  hasUpdates = _this$props.hasUpdates,
112
113
  onLogout = _this$props.onLogout,
@@ -117,6 +118,7 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
117
118
  renderPopupItems = _this$props.renderPopupItems,
118
119
  onRevertPostponement = _this$props.onRevertPostponement,
119
120
  showApplyChangedUser = _this$props.showApplyChangedUser,
121
+ showName = _this$props.showName,
120
122
  showLogIn = _this$props.showLogIn,
121
123
  showLogOut = _this$props.showLogOut,
122
124
  showSwitchUser = _this$props.showSwitchUser,
@@ -126,7 +128,8 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
126
128
  round = _this$props.round;
127
129
  _this$props.loading;
128
130
  _this$props.onLogin;
129
- var props = _objectWithoutProperties(_this$props, _excluded);
131
+ var menuProps = _this$props.menuProps,
132
+ props = _objectWithoutProperties(_this$props, _excluded);
130
133
  var translate = this.context.translate;
131
134
  if (!user) {
132
135
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
@@ -139,17 +142,19 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
139
142
  if (user.guest) {
140
143
  return renderGuest(this.props);
141
144
  }
142
- var anchorClassName = classNames(modules_47759f5e.avatarWrapper, {
145
+ var avatarWrapper = classNames(modules_47759f5e.avatarWrapper, {
143
146
  [modules_47759f5e.hasUpdates]: hasUpdates
144
147
  });
145
148
  var anchor = /*#__PURE__*/React.createElement("button", {
146
149
  type: "button",
147
- className: anchorClassName
150
+ className: modules_47759f5e.anchorClassName
151
+ }, /*#__PURE__*/React.createElement("span", {
152
+ className: avatarWrapper
148
153
  }, /*#__PURE__*/React.createElement(Avatar, {
149
154
  url: user.profile && user.profile.avatar && user.profile.avatar.url,
150
155
  size: size,
151
156
  round: round
152
- }));
157
+ })), showName && /*#__PURE__*/React.createElement("span", null, user.name));
153
158
  var items = [showApplyChangedUser && {
154
159
  rgItemType,
155
160
  label: (_translations$applyCh = translations === null || translations === void 0 ? void 0 : translations.applyChangedUser) !== null && _translations$applyCh !== void 0 ? _translations$applyCh : translate('applyChangedUser'),
@@ -183,12 +188,13 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
183
188
  data: renderPopupItems(items),
184
189
  "data-test": "ring-profile",
185
190
  className: classNames(modules_47759f5e.profile, className),
186
- menuProps: {
191
+ activeClassName: activeClassName,
192
+ menuProps: _objectSpread2({
187
193
  closeOnSelect,
188
194
  left: -2,
189
195
  top: -8,
190
196
  sidePadding: 32
191
- }
197
+ }, menuProps)
192
198
  }));
193
199
  }
194
200
  }]);
@@ -196,6 +202,7 @@ var Profile = /*#__PURE__*/function (_PureComponent) {
196
202
  }(PureComponent);
197
203
  _defineProperty(Profile, "propTypes", {
198
204
  className: PropTypes.string,
205
+ activeClassName: PropTypes.string,
199
206
  closeOnSelect: PropTypes.bool,
200
207
  hasUpdates: PropTypes.bool,
201
208
  loading: PropTypes.bool,
@@ -219,12 +226,14 @@ _defineProperty(Profile, "propTypes", {
219
226
  }),
220
227
  size: PropTypes.number,
221
228
  round: PropTypes.bool,
229
+ showName: PropTypes.bool,
222
230
  showLogIn: PropTypes.bool,
223
231
  showLogOut: PropTypes.bool,
224
232
  showSwitchUser: PropTypes.bool,
225
233
  showApplyChangedUser: PropTypes.bool,
226
234
  onRevertPostponement: PropTypes.func,
227
- renderGuest: PropTypes.func
235
+ renderGuest: PropTypes.func,
236
+ menuProps: PropTypes.object
228
237
  });
229
238
  _defineProperty(Profile, "defaultProps", {
230
239
  closeOnSelect: true,
@@ -53,9 +53,9 @@ export default class HTTP implements Partial<HTTPAuth> {
53
53
  * Usage: const {promise, abort} = http.abortify(http.get<{id: string}>)('http://test.com');
54
54
  * @param method
55
55
  */
56
- abortify: <T>(method: Method<T>) => (url: string, params?: RequestParams<boolean> | undefined) => ({
56
+ abortify: <T>(method: Method<T>) => ((...p: Parameters<Method<T>>) => ({
57
57
  promise: Promise<T>;
58
58
  abort: () => void;
59
- });
59
+ }));
60
60
  }
61
61
  export {};
@@ -3,7 +3,7 @@ export declare const PhaseContext: React.Context<number | null>;
3
3
  type ScrollHandler = (element: Element) => void;
4
4
  export declare const ScrollHandlerContext: React.Context<ScrollHandler | null>;
5
5
  export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>): {
6
- new (props: P | Readonly<P>): {
6
+ new (props: P): {
7
7
  state: {
8
8
  phase: null;
9
9
  };
@@ -8,8 +8,8 @@ var TITLE_RESIZE_THRESHOLD = 36;
8
8
  var PhaseContext = /*#__PURE__*/createContext(null);
9
9
  var ScrollHandlerContext = /*#__PURE__*/createContext(null);
10
10
  function adaptiveIslandHOC(ComposedComponent) {
11
- var _class;
12
- return _class = /*#__PURE__*/function (_Component) {
11
+ var _AdaptiveIsland;
12
+ return _AdaptiveIsland = /*#__PURE__*/function (_Component) {
13
13
  _inherits(AdaptiveIsland, _Component);
14
14
  var _super = _createSuper(AdaptiveIsland);
15
15
  function AdaptiveIsland() {
@@ -47,7 +47,7 @@ function adaptiveIslandHOC(ComposedComponent) {
47
47
  }
48
48
  }]);
49
49
  return AdaptiveIsland;
50
- }(Component), _defineProperty(_class, "propTypes", ComposedComponent.propTypes), _class;
50
+ }(Component), _defineProperty(_AdaptiveIsland, "propTypes", ComposedComponent.propTypes), _AdaptiveIsland;
51
51
  }
52
52
 
53
53
  export { PhaseContext, ScrollHandlerContext, adaptiveIslandHOC as default };
@@ -19,7 +19,7 @@ export default class Island extends Component<IslandProps> {
19
19
  render(): React.JSX.Element;
20
20
  }
21
21
  export declare const AdaptiveIsland: {
22
- new (props: IslandProps | Readonly<IslandProps>): {
22
+ new (props: IslandProps): {
23
23
  state: {
24
24
  phase: null;
25
25
  };
@@ -14,7 +14,7 @@ export interface LinkBaseProps {
14
14
  }
15
15
  export type LinkProps<P extends ClickableLinkProps = ClickableLinkProps> = Omit<P, keyof LinkBaseProps> & LinkBaseProps;
16
16
  export declare function linkHOC<P extends ClickableLinkProps>(ComposedComponent: ComponentType<P> | string): {
17
- new (props: LinkProps<P> | Readonly<LinkProps<P>>): {
17
+ new (props: LinkProps<P>): {
18
18
  render(): React.JSX.Element;
19
19
  context: unknown;
20
20
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<P>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -75,7 +75,7 @@ export declare function linkHOC<P extends ClickableLinkProps>(ComposedComponent:
75
75
  contextType?: React.Context<any> | undefined;
76
76
  };
77
77
  declare const _default: {
78
- new (props: LinkProps<ClickableLinkProps> | Readonly<LinkProps<ClickableLinkProps>>): {
78
+ new (props: LinkProps<ClickableLinkProps>): {
79
79
  render(): React.JSX.Element;
80
80
  context: unknown;
81
81
  setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<LinkProps<ClickableLinkProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
@@ -12,9 +12,9 @@ import 'core-js/modules/es.array.concat.js';
12
12
 
13
13
  var _excluded = ["active", "inherit", "pseudo", "hover", "className", "data-test", "href", "children", "onPlainLeftClick", "onClick"];
14
14
  function linkHOC(ComposedComponent) {
15
- var _class;
15
+ var _Link;
16
16
  var isCustom = typeof ComposedComponent !== 'string' && ComposedComponent !== ClickableLink;
17
- return _class = /*#__PURE__*/function (_PureComponent) {
17
+ return _Link = /*#__PURE__*/function (_PureComponent) {
18
18
  _inherits(Link, _PureComponent);
19
19
  var _super = _createSuper(Link);
20
20
  function Link() {
@@ -68,7 +68,7 @@ function linkHOC(ComposedComponent) {
68
68
  }
69
69
  }]);
70
70
  return Link;
71
- }(PureComponent), _defineProperty(_class, "propTypes", {
71
+ }(PureComponent), _defineProperty(_Link, "propTypes", {
72
72
  className: PropTypes.string,
73
73
  active: PropTypes.bool,
74
74
  inherit: PropTypes.bool,
@@ -79,7 +79,7 @@ function linkHOC(ComposedComponent) {
79
79
  href: PropTypes.string,
80
80
  onPlainLeftClick: PropTypes.func,
81
81
  onClick: PropTypes.func
82
- }), _class;
82
+ }), _Link;
83
83
  }
84
84
  var Link = linkHOC(ClickableLink);
85
85
 
@@ -44,7 +44,7 @@ import '../global/memoize.js';
44
44
  import 'core-js/modules/es.map.js';
45
45
  import 'core-js/modules/es.weak-map.js';
46
46
 
47
- var modules_5b0fb3e8 = {"footer-height":"calc(var(--ring-unit)*8)","breakpoint-small":"640px","breakpoint-middle":"960px","breakpoint-large":"1200px","extra-small-screen-media":"(max-width: 639px)","small-screen-media":"(min-width: 640px) and (max-width: 959px)","middle-screen-media":"(min-width: 960px) and (max-width: 1199px)","large-screen-media":"(min-width: 1200px)","clearfix":"clearfix_rui_8bff","font":"font_rui_8bff","font-lower":"font-lower_rui_8bff font_rui_8bff","font-smaller":"font-smaller_rui_8bff font-lower_rui_8bff font_rui_8bff","font-smaller-lower":"font-smaller-lower_rui_8bff font-smaller_rui_8bff font-lower_rui_8bff font_rui_8bff","font-larger-lower":"font-larger-lower_rui_8bff font-lower_rui_8bff font_rui_8bff","font-larger":"font-larger_rui_8bff font-larger-lower_rui_8bff font-lower_rui_8bff font_rui_8bff","thin-font":"thin-font_rui_8bff","monospace-font":"monospace-font_rui_8bff","ellipsis":"ellipsis_rui_8bff","resetButton":"resetButton_rui_8bff"};
47
+ var modules_5b0fb3e8 = {"footer-height":"calc(var(--ring-unit)*8)","breakpoint-small":"640px","breakpoint-middle":"960px","breakpoint-large":"1200px","extra-small-screen-media":"(max-width: 639px)","small-screen-media":"(min-width: 640px) and (max-width: 959px)","middle-screen-media":"(min-width: 960px) and (max-width: 1199px)","large-screen-media":"(min-width: 1200px)","clearfix":"clearfix_rui_f295","font":"font_rui_f295","font-lower":"font-lower_rui_f295 font_rui_f295","font-smaller":"font-smaller_rui_f295 font-lower_rui_f295 font_rui_f295","font-smaller-lower":"font-smaller-lower_rui_f295 font-smaller_rui_f295 font-lower_rui_f295 font_rui_f295","font-larger-lower":"font-larger-lower_rui_f295 font-lower_rui_f295 font_rui_f295","font-larger":"font-larger_rui_f295 font-larger-lower_rui_f295 font-lower_rui_f295 font_rui_f295","thin-font":"thin-font_rui_f295","monospace-font":"monospace-font_rui_f295","ellipsis":"ellipsis_rui_f295","resetButton":"resetButton_rui_f295"};
48
48
 
49
49
  var _excluded = ["scrolling", "className", "disabled", "checkbox", "avatar", "subavatar", "glyph", "icon", "rightGlyph", "description", "label", "title", "details", "hover", "rgItemType", "level", "tabIndex", "compact", "onClick", "onCheckboxChange", "onMouseOver", "onMouseDown", "onMouseUp", "rightNodes", "leftNodes", "showGeneratedAvatar", "username", "labelWrapper"];
50
50
  /**
@@ -13,7 +13,7 @@ import 'core-js/modules/es.array.iterator.js';
13
13
  import 'core-js/modules/es.set.js';
14
14
  import 'core-js/modules/web.dom-collections.iterator.js';
15
15
 
16
- var modules_00b5ad26 = {"light":"light_rui_2ac4","canvas":"canvas_rui_47a4","animate":"animate_rui_47a4","rotation-keyframes":"rotation-keyframes_rui_47a4","text":"text_rui_47a4"};
16
+ var modules_00b5ad26 = {"light":"light_rui_2ac4","canvas":"canvas_rui_eff2","animate":"animate_rui_eff2","rotation-keyframes":"rotation-keyframes_rui_eff2","text":"text_rui_eff2"};
17
17
 
18
18
  var INITIAL_TICKS = 100;
19
19
  var Particle = /*#__PURE__*/function () {