@jetbrains/ring-ui-built 6.0.11 → 6.0.13
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.
- package/components/_helpers/_rollupPluginBabelHelpers.js +4 -4
- package/components/_helpers/date-picker.js +1 -1
- package/components/_helpers/header.js +1 -1
- package/components/date-picker/consts.d.ts +4 -0
- package/components/date-picker/consts.js +18 -1
- package/components/date-picker/date-input.js +2 -0
- package/components/date-picker/date-picker.js +1 -0
- package/components/date-picker/date-popup.js +2 -0
- package/components/date-picker/day.d.ts +1 -0
- package/components/date-picker/day.js +9 -3
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +5 -2
- package/components/date-picker/month-slider.js +3 -0
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/month.js +8 -3
- package/components/date-picker/months.js +3 -0
- package/components/date-picker/weekdays.d.ts +1 -1
- package/components/date-picker/weekdays.js +6 -3
- package/components/date-picker/years.js +3 -0
- package/components/header/profile.d.ts +7 -0
- package/components/header/profile.js +18 -9
- package/components/island/adaptive-island-hoc.js +3 -3
- package/components/link/link.js +4 -4
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/query-assist/query-assist.js +2 -2
- package/components/shortcuts/shortcuts-hoc.js +4 -4
- package/components/style.css +1 -1
- package/components/table/disable-hover-hoc.js +3 -3
- package/package.json +3 -3
@@ -162,7 +162,7 @@ function _regeneratorRuntime() {
|
|
162
162
|
function makeInvokeMethod(e, r, n) {
|
163
163
|
var o = h;
|
164
164
|
return function (i, a) {
|
165
|
-
if (o === f) throw
|
165
|
+
if (o === f) throw Error("Generator is already running");
|
166
166
|
if (o === s) {
|
167
167
|
if ("throw" === i) throw a;
|
168
168
|
return {
|
@@ -304,7 +304,7 @@ function _regeneratorRuntime() {
|
|
304
304
|
} else if (c) {
|
305
305
|
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
306
306
|
} else {
|
307
|
-
if (!u) throw
|
307
|
+
if (!u) throw Error("try statement without catch or finally");
|
308
308
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
309
309
|
}
|
310
310
|
}
|
@@ -344,7 +344,7 @@ function _regeneratorRuntime() {
|
|
344
344
|
return o;
|
345
345
|
}
|
346
346
|
}
|
347
|
-
throw
|
347
|
+
throw Error("illegal catch attempt");
|
348
348
|
},
|
349
349
|
delegateYield: function (e, r, n) {
|
350
350
|
return this.delegate = {
|
@@ -367,7 +367,7 @@ function _toPrimitive(t, r) {
|
|
367
367
|
}
|
368
368
|
function _toPropertyKey(t) {
|
369
369
|
var i = _toPrimitive(t, "string");
|
370
|
-
return "symbol" == typeof i ? i :
|
370
|
+
return "symbol" == typeof i ? i : i + "";
|
371
371
|
}
|
372
372
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
373
373
|
try {
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var modules_0c7b7d96 = {"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)","cellSize":"calc(var(--ring-unit)*3)","calHeight":"calc(var(--ring-unit)*36)","calWidth":"calc(var(--ring-unit)*37)","yearHeight":"calc(var(--ring-unit)*4)","yearWidth":"calc(var(--ring-unit)*6)","light":"light_rui_2ac4","clearfix":"clearfix_rui_e0bd","font":"font_rui_e0bd","font-lower":"font-lower_rui_e0bd font_rui_e0bd","font-smaller":"font-smaller_rui_e0bd font-lower_rui_e0bd font_rui_e0bd","font-smaller-lower":"font-smaller-lower_rui_e0bd font-smaller_rui_e0bd font-lower_rui_e0bd font_rui_e0bd","font-larger-lower":"font-larger-lower_rui_e0bd font-lower_rui_e0bd font_rui_e0bd","font-larger":"font-larger_rui_e0bd font-larger-lower_rui_e0bd font-lower_rui_e0bd font_rui_e0bd","thin-font":"thin-font_rui_e0bd","monospace-font":"monospace-font_rui_e0bd","ellipsis":"ellipsis_rui_e0bd","resetButton":"resetButton_rui_e0bd","container":"container_rui_e0bd","hoverable":"hoverable_rui_e0bd","datePicker":"datePicker_rui_e0bd","inline":"inline_rui_e0bd","sizeS":"sizeS_rui_e0bd","sizeM":"sizeM_rui_e0bd","sizeL":"sizeL_rui_e0bd","sizeFULL":"sizeFULL_rui_e0bd","sizeAUTO":"sizeAUTO_rui_e0bd","displayDate":"displayDate_rui_e0bd","displayRange":"displayRange_rui_e0bd","clear":"clear_rui_e0bd","datePopup":"datePopup_rui_e0bd","filterWrapper":"filterWrapper_rui_e0bd filterWrapper_rui_531d","filter":"filter_rui_e0bd filter_rui_531d","calendarIcon":"calendarIcon_rui_e0bd","anchor":"anchor_rui_e0bd","anchorContent":"anchorContent_rui_e0bd","chevronDownIcon":"chevronDownIcon_rui_e0bd","fromInput":"fromInput_rui_e0bd","fromInputWithDivider":"fromInputWithDivider_rui_e0bd","toInput":"toInput_rui_e0bd","dateInput":"dateInput_rui_e0bd","timeInputWithDivider":"timeInputWithDivider_rui_e0bd","weekdays":"weekdays_rui_e0bd","weekday":"weekday_rui_e0bd","weekend":"weekend_rui_e0bd","calendar":"calendar_rui_e0bd","months":"months_rui_e0bd","days":"days_rui_e0bd","month":"month_rui_e0bd","monthTitle":"monthTitle_rui_e0bd","day":"day_rui_e0bd resetButton_rui_8bff","between":"between_rui_e0bd","activeBetween":"activeBetween_rui_e0bd","current":"current_rui_e0bd","active":"active_rui_e0bd","disabled":"disabled_rui_e0bd","from":"from_rui_e0bd","to":"to_rui_e0bd","
|
1
|
+
var modules_0c7b7d96 = {"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)","cellSize":"calc(var(--ring-unit)*3)","calHeight":"calc(var(--ring-unit)*36)","calWidth":"calc(var(--ring-unit)*37)","yearHeight":"calc(var(--ring-unit)*4)","yearWidth":"calc(var(--ring-unit)*6)","light":"light_rui_2ac4","clearfix":"clearfix_rui_e0bd","font":"font_rui_e0bd","font-lower":"font-lower_rui_e0bd font_rui_e0bd","font-smaller":"font-smaller_rui_e0bd font-lower_rui_e0bd font_rui_e0bd","font-smaller-lower":"font-smaller-lower_rui_e0bd font-smaller_rui_e0bd font-lower_rui_e0bd font_rui_e0bd","font-larger-lower":"font-larger-lower_rui_e0bd font-lower_rui_e0bd font_rui_e0bd","font-larger":"font-larger_rui_e0bd font-larger-lower_rui_e0bd font-lower_rui_e0bd font_rui_e0bd","thin-font":"thin-font_rui_e0bd","monospace-font":"monospace-font_rui_e0bd","ellipsis":"ellipsis_rui_e0bd","resetButton":"resetButton_rui_e0bd","container":"container_rui_e0bd","hoverable":"hoverable_rui_e0bd","datePicker":"datePicker_rui_e0bd","inline":"inline_rui_e0bd","sizeS":"sizeS_rui_e0bd","sizeM":"sizeM_rui_e0bd","sizeL":"sizeL_rui_e0bd","sizeFULL":"sizeFULL_rui_e0bd","sizeAUTO":"sizeAUTO_rui_e0bd","displayDate":"displayDate_rui_e0bd","displayRange":"displayRange_rui_e0bd","clear":"clear_rui_e0bd","datePopup":"datePopup_rui_e0bd","filterWrapper":"filterWrapper_rui_e0bd filterWrapper_rui_531d","filter":"filter_rui_e0bd filter_rui_531d","calendarIcon":"calendarIcon_rui_e0bd","anchor":"anchor_rui_e0bd","anchorContent":"anchorContent_rui_e0bd","chevronDownIcon":"chevronDownIcon_rui_e0bd","fromInput":"fromInput_rui_e0bd","fromInputWithDivider":"fromInputWithDivider_rui_e0bd","toInput":"toInput_rui_e0bd","dateInput":"dateInput_rui_e0bd","timeInputWithDivider":"timeInputWithDivider_rui_e0bd","weekdays":"weekdays_rui_e0bd","weekday":"weekday_rui_e0bd","weekend":"weekend_rui_e0bd","calendar":"calendar_rui_e0bd","months":"months_rui_e0bd","days":"days_rui_e0bd","month":"month_rui_e0bd","monthTitle":"monthTitle_rui_e0bd","day":"day_rui_e0bd resetButton_rui_8bff","between":"between_rui_e0bd","activeBetween":"activeBetween_rui_e0bd","current":"current_rui_e0bd","active":"active_rui_e0bd","disabled":"disabled_rui_e0bd","from":"from_rui_e0bd","to":"to_rui_e0bd","Day1":"Day1_rui_e0bd","spread":"spread_rui_e0bd","activeSpread":"activeSpread_rui_e0bd","first":"first_rui_e0bd","Day2":"Day2_rui_e0bd","Day5":"Day5_rui_e0bd","Day6":"Day6_rui_e0bd","Day7":"Day7_rui_e0bd","empty":"empty_rui_e0bd","today":"today_rui_e0bd","year":"year_rui_e0bd hoverable_rui_e0bd resetButton_rui_8bff","monthNames":"monthNames_rui_e0bd","monthName":"monthName_rui_e0bd hoverable_rui_e0bd resetButton_rui_8bff","monthSlider":"monthSlider_rui_e0bd resetButton_rui_8bff","dragging":"dragging_rui_e0bd","range":"range_rui_e0bd","years":"years_rui_e0bd","currentYear":"currentYear_rui_e0bd"};
|
2
2
|
|
3
3
|
export { modules_0c7b7d96 as m };
|
@@ -1,3 +1,3 @@
|
|
1
|
-
var modules_47759f5e = {"dark":"dark_rui_eb55","link":"link_rui_d382","active":"active_rui_d382","compensate":"3px","compensated":"calc(var(--ring-unit)*8 - 3px)","light":"light_rui_2ac4","header":"header_rui_1238","headerSpaced":"headerSpaced_rui_1238","logo":"logo_rui_1238","tray":"tray_rui_1238","trayItemContent":"trayItemContent_rui_1238","icon":"icon_rui_1238","main":"main_rui_1238","rotatable":"rotatable_rui_1238","rotated":"rotated_rui_1238","profileEmpty":"profileEmpty_rui_1238","profile":"profile_rui_1238 profileEmpty_rui_1238","
|
1
|
+
var modules_47759f5e = {"dark":"dark_rui_eb55","link":"link_rui_d382","active":"active_rui_d382","compensate":"3px","compensated":"calc(var(--ring-unit)*8 - 3px)","light":"light_rui_2ac4","header":"header_rui_1238","headerSpaced":"headerSpaced_rui_1238","logo":"logo_rui_1238","tray":"tray_rui_1238","trayItemContent":"trayItemContent_rui_1238","icon":"icon_rui_1238","main":"main_rui_1238","rotatable":"rotatable_rui_1238","rotated":"rotated_rui_1238","profileEmpty":"profileEmpty_rui_1238","profile":"profile_rui_1238 profileEmpty_rui_1238","anchorClassName":"anchorClassName_rui_1238 resetButton_rui_8bff","avatarWrapper":"avatarWrapper_rui_1238","hasUpdates":"hasUpdates_rui_1238"};
|
2
2
|
|
3
3
|
export { modules_47759f5e as m };
|
@@ -10,6 +10,7 @@ declare const units: {
|
|
10
10
|
export default units;
|
11
11
|
export declare const YEAR = 12;
|
12
12
|
export declare const WEEK = 7;
|
13
|
+
export declare const FIFTH_DAY = 4;
|
13
14
|
export declare const weekdays: {
|
14
15
|
MO: number;
|
15
16
|
TU: number;
|
@@ -26,6 +27,9 @@ export declare const DOUBLE = 2;
|
|
26
27
|
export declare const HALF = 0.5;
|
27
28
|
export declare const dateType: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
|
28
29
|
export declare function parseTime(time: string): string | null;
|
30
|
+
export declare function shiftWeekArray<T>(arr: T[], startOfWeek: number): T[];
|
31
|
+
export declare function getWeekStartsOn(locale: Locale | undefined): number;
|
32
|
+
export declare function getDayNumInWeek(locale: Locale | undefined, day: number): number;
|
29
33
|
export interface DateInputTranslations {
|
30
34
|
addFirstDate?: string;
|
31
35
|
addSecondDate?: string;
|
@@ -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) {
|
@@ -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[
|
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<
|
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.
|
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.
|
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<
|
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
|
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.
|
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<
|
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.
|
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,
|
@@ -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
|
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
|
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
|
-
|
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,
|
@@ -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
|
12
|
-
return
|
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(
|
50
|
+
}(Component), _defineProperty(_AdaptiveIsland, "propTypes", ComposedComponent.propTypes), _AdaptiveIsland;
|
51
51
|
}
|
52
52
|
|
53
53
|
export { PhaseContext, ScrollHandlerContext, adaptiveIslandHOC as default };
|
package/components/link/link.js
CHANGED
@@ -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
|
15
|
+
var _Link;
|
16
16
|
var isCustom = typeof ComposedComponent !== 'string' && ComposedComponent !== ClickableLink;
|
17
|
-
return
|
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(
|
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
|
-
}),
|
82
|
+
}), _Link;
|
83
83
|
}
|
84
84
|
var Link = linkHOC(ClickableLink);
|
85
85
|
|
@@ -11,11 +11,11 @@ var MAJOR_VERSION_INDEX = 0;
|
|
11
11
|
/**
|
12
12
|
* SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
|
13
13
|
*/
|
14
|
-
if (!["and_chr 122", "chrome 122", "chrome 121", "chrome 120", "chrome 119", "chrome 109", "edge 121", "firefox 122", "ios_saf 17.3", "ios_saf 17.2", "ios_saf 16.6-16.7", "op_mob
|
14
|
+
if (!["and_chr 122", "chrome 122", "chrome 121", "chrome 120", "chrome 119", "chrome 109", "edge 121", "firefox 122", "ios_saf 17.3", "ios_saf 17.2", "ios_saf 16.6-16.7", "op_mob 80", "samsung 23"]) {
|
15
15
|
// eslint-disable-next-line no-console
|
16
16
|
console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
|
17
17
|
}
|
18
|
-
var SUPPORTED = ["and_chr 122", "chrome 122", "chrome 121", "chrome 120", "chrome 119", "chrome 109", "edge 121", "firefox 122", "ios_saf 17.3", "ios_saf 17.2", "ios_saf 16.6-16.7", "op_mob
|
18
|
+
var SUPPORTED = ["and_chr 122", "chrome 122", "chrome 121", "chrome 120", "chrome 119", "chrome 109", "edge 121", "firefox 122", "ios_saf 17.3", "ios_saf 17.2", "ios_saf 16.6-16.7", "op_mob 80", "samsung 23"] || [];
|
19
19
|
var WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
20
20
|
var WHITE_LIST = SUPPORTED.reduce(function (acc, item) {
|
21
21
|
var _item$match;
|
@@ -151,7 +151,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
151
151
|
_inherits(QueryAssist, _Component);
|
152
152
|
var _super = _createSuper(QueryAssist);
|
153
153
|
function QueryAssist(_props) {
|
154
|
-
var
|
154
|
+
var _this;
|
155
155
|
_classCallCheck(this, QueryAssist);
|
156
156
|
_this = _super.call(this, _props);
|
157
157
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
@@ -295,7 +295,7 @@ var QueryAssist = /*#__PURE__*/function (_Component) {
|
|
295
295
|
return true;
|
296
296
|
});
|
297
297
|
_defineProperty(_assertThisInitialized(_this), "setState", function (state, resolve) {
|
298
|
-
_get((
|
298
|
+
_get((_assertThisInitialized(_this), _getPrototypeOf(QueryAssist.prototype)), "setState", _assertThisInitialized(_this)).call(_assertThisInitialized(_this), state, function () {
|
299
299
|
_this._pushHistory(state);
|
300
300
|
resolve === null || resolve === void 0 || resolve();
|
301
301
|
});
|
@@ -22,8 +22,8 @@ import 'sniffr';
|
|
22
22
|
|
23
23
|
var _excluded = ["rgShortcutsOptions", "rgShortcutsMap"];
|
24
24
|
function shortcutsHOC(ComposedComponent) {
|
25
|
-
var
|
26
|
-
return
|
25
|
+
var _WithShortcuts;
|
26
|
+
return _WithShortcuts = /*#__PURE__*/function (_React$Component) {
|
27
27
|
_inherits(WithShortcuts, _React$Component);
|
28
28
|
var _super = _createSuper(WithShortcuts);
|
29
29
|
function WithShortcuts() {
|
@@ -52,10 +52,10 @@ function shortcutsHOC(ComposedComponent) {
|
|
52
52
|
}
|
53
53
|
}]);
|
54
54
|
return WithShortcuts;
|
55
|
-
}(React.Component), _defineProperty(
|
55
|
+
}(React.Component), _defineProperty(_WithShortcuts, "propTypes", {
|
56
56
|
rgShortcutsOptions: PropTypes.object,
|
57
57
|
rgShortcutsMap: PropTypes.object
|
58
|
-
}),
|
58
|
+
}), _WithShortcuts;
|
59
59
|
}
|
60
60
|
|
61
61
|
export { shortcutsHOC as default };
|