@jetbrains/ring-ui-built 7.0.71 → 7.0.73
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/anchor.js +55 -13
- package/components/_helpers/avatar-info.js +44 -11
- package/components/_helpers/caption.js +2 -2
- package/components/_helpers/card.js +21 -21
- package/components/_helpers/icon-svg.js +75 -17
- package/components/_helpers/input.js +13 -13
- package/components/_helpers/query-assist-suggestions.js +5 -5
- package/components/_helpers/select-filter.js +5 -5
- package/components/_helpers/services-link.js +5 -5
- package/components/_helpers/sidebar.js +6 -6
- package/components/_helpers/tab-link.js +69 -17
- package/components/_helpers/theme.js +231 -54
- package/components/_helpers/title.js +5 -5
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +12 -10
- package/components/alert/container.js +4 -4
- package/components/alert-service/alert-service.d.ts +1 -1
- package/components/alert-service/alert-service.js +5 -4
- package/components/auth/auth-core.js +8 -8
- package/components/auth/auth.js +3 -2
- package/components/auth/down-notification.js +61 -17
- package/components/auth/iframe-flow.js +7 -6
- package/components/auth/storage.js +3 -2
- package/components/auth/token-validator.js +1 -1
- package/components/auth/window-flow.js +2 -2
- package/components/auth-dialog/auth-dialog.d.ts +1 -1
- package/components/auth-dialog/auth-dialog.js +15 -14
- package/components/auth-dialog-service/auth-dialog-service.js +4 -6
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/avatar-info.js +3 -2
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.js +16 -15
- package/components/avatar/fallback-avatar.d.ts +1 -1
- package/components/avatar/fallback-avatar.js +183 -59
- package/components/avatar-stack/avatar-stack.d.ts +1 -1
- package/components/avatar-stack/avatar-stack.js +115 -29
- package/components/banner/banner.d.ts +1 -1
- package/components/banner/banner.js +11 -10
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.js +3 -2
- package/components/button/button.d.ts +1 -1
- package/components/button/button.js +11 -10
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +6 -8
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-group/caption.js +1 -1
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-set/button-set.js +2 -5
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.js +2 -5
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +12 -17
- package/components/clipboard/clipboard.js +2 -1
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +5 -5
- package/components/collapse/collapse-content.js +161 -77
- package/components/collapse/collapse-control.js +69 -22
- package/components/collapse/collapse.js +83 -31
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +11 -13
- package/components/confirm-service/confirm-service.js +4 -3
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +4 -7
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/content-layout/sidebar.js +1 -1
- package/components/contenteditable/contenteditable.d.ts +2 -2
- package/components/contenteditable/contenteditable.js +50 -14
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-help/control-help.js +45 -9
- package/components/control-label/control-label.js +62 -13
- package/components/data-list/data-list.d.ts +1 -1
- package/components/data-list/data-list.js +10 -9
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +79 -78
- package/components/data-list/item.d.ts +2 -2
- package/components/data-list/item.js +18 -17
- package/components/data-list/title.d.ts +1 -1
- package/components/data-list/title.js +2 -1
- package/components/date-picker/consts.js +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +4 -3
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/date-picker.js +97 -31
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +11 -10
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/day.js +4 -3
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +98 -22
- package/components/date-picker/month-slider.d.ts +1 -1
- package/components/date-picker/month-slider.js +4 -4
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/month.js +79 -18
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +163 -53
- package/components/date-picker/weekdays.d.ts +1 -1
- package/components/date-picker/weekdays.js +56 -16
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +5 -5
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +21 -23
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +2 -1
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/dropdown.js +7 -8
- package/components/dropdown-menu/dropdown-menu.js +299 -83
- package/components/editable-heading/editable-heading.d.ts +2 -2
- package/components/editable-heading/editable-heading.js +523 -174
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.js +7 -9
- package/components/error-message/error-message.d.ts +1 -1
- package/components/error-message/error-message.js +8 -10
- package/components/footer/footer.js +205 -61
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/create-stateful-context.js +73 -18
- package/components/global/focus-sensor-hoc.js +2 -2
- package/components/global/get-uid.js +1 -1
- package/components/global/react-dom-renderer.d.ts +1 -1
- package/components/global/react-dom-renderer.js +2 -2
- package/components/global/rerender-hoc.js +23 -6
- package/components/global/theme.js +3 -2
- package/components/global/use-event-callback.js +37 -13
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +3 -3
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +3 -6
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +3 -3
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +3 -6
- package/components/header/header-icon.d.ts +1 -1
- package/components/header/header-icon.js +3 -2
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +7 -12
- package/components/header/links.d.ts +1 -1
- package/components/header/links.js +45 -10
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +4 -3
- package/components/header/profile.js +17 -16
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +1 -1
- package/components/header/services.d.ts +1 -1
- package/components/header/services.js +35 -16
- package/components/header/smart-profile.d.ts +1 -1
- package/components/header/smart-profile.js +6 -5
- package/components/header/smart-services.d.ts +1 -1
- package/components/header/smart-services.js +3 -2
- package/components/header/tray.d.ts +1 -1
- package/components/header/tray.js +3 -3
- package/components/heading/heading.js +188 -44
- package/components/i18n/i18n-context.js +51 -13
- package/components/icon/icon-svg.d.ts +1 -1
- package/components/icon/icon-svg.js +2 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.js +6 -5
- package/components/icon/index.js +2 -1
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +2 -1
- package/components/island/adaptive-island-hoc.js +4 -4
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +36 -17
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +32 -14
- package/components/island/island.d.ts +1 -1
- package/components/island/island.js +3 -5
- package/components/link/clickable-link.d.ts +1 -1
- package/components/link/clickable-link.js +2 -2
- package/components/link/link.js +4 -4
- package/components/list/list-custom.d.ts +1 -1
- package/components/list/list-custom.js +2 -2
- package/components/list/list-hint.d.ts +1 -1
- package/components/list/list-hint.js +3 -7
- package/components/list/list-item.d.ts +1 -1
- package/components/list/list-item.js +23 -26
- package/components/list/list-separator.d.ts +1 -1
- package/components/list/list-separator.js +3 -3
- package/components/list/list-title.d.ts +1 -1
- package/components/list/list-title.js +7 -7
- package/components/list/list-users-groups-source.js +6 -5
- package/components/list/list.d.ts +6 -6
- package/components/list/list.js +33 -31
- package/components/loader/loader.d.ts +1 -1
- package/components/loader/loader.js +8 -14
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-inline/loader-inline.js +4 -7
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +3 -6
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +10 -9
- package/components/login-dialog/service.js +4 -3
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +3 -6
- package/components/message/message.d.ts +1 -1
- package/components/message/message.js +13 -15
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.d.ts +5 -5
- package/components/pager/pager.js +28 -27
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +3 -6
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +14 -11
- package/components/popup/popup.target.js +68 -16
- package/components/popup-menu/popup-menu.d.ts +1 -1
- package/components/popup-menu/popup-menu.js +7 -9
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +4 -7
- package/components/query-assist/query-assist-suggestions.d.ts +1 -1
- package/components/query-assist/query-assist-suggestions.js +5 -4
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/query-assist/query-assist.js +37 -34
- package/components/radio/radio-item.d.ts +1 -1
- package/components/radio/radio-item.js +40 -20
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/radio.js +3 -5
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +100 -38
- package/components/select/select-filter.d.ts +1 -1
- package/components/select/select-filter.js +5 -4
- package/components/select/select-popup.d.ts +7 -7
- package/components/select/select-popup.js +26 -25
- package/components/select/select.d.ts +3 -3
- package/components/select/select.js +52 -52
- package/components/shortcuts/shortcuts-hoc.js +3 -3
- package/components/slider/slider.js +591 -196
- package/components/storage/storage-local.js +2 -1
- package/components/storage/storage.js +2 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +247 -102
- package/components/table/cell.d.ts +1 -1
- package/components/table/cell.js +2 -2
- package/components/table/disable-hover-hoc.js +3 -3
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +7 -6
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +14 -13
- package/components/table/multitable.d.ts +1 -1
- package/components/table/multitable.js +3 -3
- package/components/table/row-with-focus-sensor.d.ts +1 -1
- package/components/table/row-with-focus-sensor.js +3 -2
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +51 -24
- package/components/table/selection-shortcuts-hoc.js +2 -2
- package/components/table/simple-table.d.ts +1 -1
- package/components/table/simple-table.js +4 -3
- package/components/table/smart-table.d.ts +1 -1
- package/components/table/smart-table.js +4 -3
- package/components/table/table.d.ts +2 -2
- package/components/table/table.js +21 -23
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +253 -83
- package/components/tabs/collapsible-tab.d.ts +1 -1
- package/components/tabs/collapsible-tab.js +4 -3
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +450 -188
- package/components/tabs/dumb-tabs.d.ts +2 -2
- package/components/tabs/dumb-tabs.js +10 -9
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +6 -5
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab-link.js +2 -1
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/tab.js +2 -2
- package/components/tabs/tabs.js +5 -4
- package/components/tag/tag.d.ts +5 -5
- package/components/tag/tag.js +14 -13
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/tags-input.js +10 -9
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +4 -3
- package/components/text/text.d.ts +1 -1
- package/components/text/text.js +2 -2
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +12 -11
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tooltip/tooltip.js +7 -6
- package/components/upload/upload.js +10 -9
- package/components/user-agreement/service.js +11 -10
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +19 -18
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +3 -2
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +7 -6
- package/components/user-card/tooltip.d.ts +2 -2
- package/components/user-card/tooltip.js +7 -6
- package/components/user-card/user-card.js +4 -3
- package/package.json +3 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { format } from 'date-fns/format';
|
|
@@ -19,8 +19,9 @@ import Link from '../link/link.js';
|
|
|
19
19
|
import { S as Size } from '../_helpers/input.js';
|
|
20
20
|
import { I18nContext } from '../i18n/i18n-context.js';
|
|
21
21
|
import DatePopup from './date-popup.js';
|
|
22
|
-
import { s as styles } from '../_helpers/date-picker.js';
|
|
23
22
|
import formats from './formats.js';
|
|
23
|
+
import { s as styles } from '../_helpers/date-picker.js';
|
|
24
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
24
25
|
import 'react-dom';
|
|
25
26
|
import '../global/get-uid.js';
|
|
26
27
|
import '../global/schedule-raf.js';
|
|
@@ -87,27 +88,92 @@ import 'date-fns/isThisYear';
|
|
|
87
88
|
import 'date-fns/setYear';
|
|
88
89
|
import './weekdays.js';
|
|
89
90
|
|
|
90
|
-
const PopupComponent =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
91
|
+
const PopupComponent = t0 => {
|
|
92
|
+
const $ = c(20);
|
|
93
|
+
if ($[0] !== "33db58a6327d40ad4b7bf91a7fec9f9c197da5c37e0c1c6775581fe962cb7d9d") {
|
|
94
|
+
for (let $i = 0; $i < 20; $i += 1) {
|
|
95
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
96
|
+
}
|
|
97
|
+
$[0] = "33db58a6327d40ad4b7bf91a7fec9f9c197da5c37e0c1c6775581fe962cb7d9d";
|
|
98
|
+
}
|
|
99
|
+
let className;
|
|
100
|
+
let datePopupProps;
|
|
101
|
+
let onClear;
|
|
102
|
+
let onComplete;
|
|
103
|
+
let popupRef;
|
|
104
|
+
let restProps;
|
|
105
|
+
let t1;
|
|
106
|
+
if ($[1] !== t0) {
|
|
107
|
+
({
|
|
108
|
+
hidden: t1,
|
|
109
|
+
className,
|
|
110
|
+
popupRef,
|
|
111
|
+
onClear,
|
|
112
|
+
datePopupProps,
|
|
113
|
+
onComplete,
|
|
114
|
+
...restProps
|
|
115
|
+
} = t0);
|
|
116
|
+
$[1] = t0;
|
|
117
|
+
$[2] = className;
|
|
118
|
+
$[3] = datePopupProps;
|
|
119
|
+
$[4] = onClear;
|
|
120
|
+
$[5] = onComplete;
|
|
121
|
+
$[6] = popupRef;
|
|
122
|
+
$[7] = restProps;
|
|
123
|
+
$[8] = t1;
|
|
124
|
+
} else {
|
|
125
|
+
className = $[2];
|
|
126
|
+
datePopupProps = $[3];
|
|
127
|
+
onClear = $[4];
|
|
128
|
+
onComplete = $[5];
|
|
129
|
+
popupRef = $[6];
|
|
130
|
+
restProps = $[7];
|
|
131
|
+
t1 = $[8];
|
|
132
|
+
}
|
|
133
|
+
const hidden = t1 === undefined ? false : t1;
|
|
134
|
+
let t2;
|
|
135
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
136
|
+
t2 = [Popup.PopupProps.Directions.BOTTOM_RIGHT, Popup.PopupProps.Directions.BOTTOM_LEFT, Popup.PopupProps.Directions.TOP_LEFT, Popup.PopupProps.Directions.TOP_RIGHT];
|
|
137
|
+
$[9] = t2;
|
|
138
|
+
} else {
|
|
139
|
+
t2 = $[9];
|
|
140
|
+
}
|
|
141
|
+
let t3;
|
|
142
|
+
if ($[10] !== datePopupProps || $[11] !== onClear || $[12] !== onComplete) {
|
|
143
|
+
t3 = /*#__PURE__*/jsx(DatePopup, {
|
|
144
|
+
onClear: onClear,
|
|
145
|
+
...datePopupProps,
|
|
146
|
+
onComplete: onComplete
|
|
147
|
+
});
|
|
148
|
+
$[10] = datePopupProps;
|
|
149
|
+
$[11] = onClear;
|
|
150
|
+
$[12] = onComplete;
|
|
151
|
+
$[13] = t3;
|
|
152
|
+
} else {
|
|
153
|
+
t3 = $[13];
|
|
154
|
+
}
|
|
155
|
+
let t4;
|
|
156
|
+
if ($[14] !== className || $[15] !== hidden || $[16] !== popupRef || $[17] !== restProps || $[18] !== t3) {
|
|
157
|
+
t4 = /*#__PURE__*/jsx(Popup, {
|
|
158
|
+
hidden: hidden,
|
|
159
|
+
className: className,
|
|
160
|
+
ref: popupRef,
|
|
161
|
+
directions: t2,
|
|
162
|
+
...restProps,
|
|
163
|
+
trapFocus: true,
|
|
164
|
+
children: t3
|
|
165
|
+
});
|
|
166
|
+
$[14] = className;
|
|
167
|
+
$[15] = hidden;
|
|
168
|
+
$[16] = popupRef;
|
|
169
|
+
$[17] = restProps;
|
|
170
|
+
$[18] = t3;
|
|
171
|
+
$[19] = t4;
|
|
172
|
+
} else {
|
|
173
|
+
t4 = $[19];
|
|
174
|
+
}
|
|
175
|
+
return t4;
|
|
176
|
+
};
|
|
111
177
|
/**
|
|
112
178
|
* @name Date Picker
|
|
113
179
|
*/
|
|
@@ -265,12 +331,12 @@ class DatePicker extends PureComponent {
|
|
|
265
331
|
};
|
|
266
332
|
render() {
|
|
267
333
|
var _this$props$disabled, _this$props$disabled2;
|
|
268
|
-
const anchorContent = jsxs("div", {
|
|
334
|
+
const anchorContent = /*#__PURE__*/jsxs("div", {
|
|
269
335
|
className: styles.anchorContent,
|
|
270
|
-
children: [jsx(Icon, {
|
|
336
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
271
337
|
glyph: calendarIcon,
|
|
272
338
|
className: styles.calendarIcon
|
|
273
|
-
}), this.getAnchorText(), jsx(Icon, {
|
|
339
|
+
}), this.getAnchorText(), /*#__PURE__*/jsx(Icon, {
|
|
274
340
|
glyph: chevronDownIcon,
|
|
275
341
|
className: styles.chevronDownIcon
|
|
276
342
|
})]
|
|
@@ -287,17 +353,17 @@ class DatePicker extends PureComponent {
|
|
|
287
353
|
const classes = classNames(styles.datePicker, className, styles[`size${this.props.size}`], {
|
|
288
354
|
[styles.inline]: inline
|
|
289
355
|
});
|
|
290
|
-
return jsx(Dropdown, {
|
|
356
|
+
return /*#__PURE__*/jsx(Dropdown, {
|
|
291
357
|
className: classes,
|
|
292
358
|
disabled: this.props.disabled,
|
|
293
|
-
"data-test":
|
|
294
|
-
anchor: inline ? jsx(Link, {
|
|
359
|
+
"data-test": "ring-date-picker",
|
|
360
|
+
anchor: inline ? /*#__PURE__*/jsx(Link, {
|
|
295
361
|
"data-test-ring-dropdown-anchor": true,
|
|
296
362
|
className: styles.anchor,
|
|
297
363
|
disabled: (_this$props$disabled = this.props.disabled) !== null && _this$props$disabled !== void 0 ? _this$props$disabled : false,
|
|
298
364
|
pseudo: true,
|
|
299
365
|
children: this.getAnchorText()
|
|
300
|
-
}) : jsx(Button, {
|
|
366
|
+
}) : /*#__PURE__*/jsx(Button, {
|
|
301
367
|
"data-test-ring-dropdown-anchor": true,
|
|
302
368
|
className: styles.anchor,
|
|
303
369
|
inline: false,
|
|
@@ -306,7 +372,7 @@ class DatePicker extends PureComponent {
|
|
|
306
372
|
children: anchorContent
|
|
307
373
|
}),
|
|
308
374
|
...dropdownProps,
|
|
309
|
-
children: jsx(PopupComponent, {
|
|
375
|
+
children: /*#__PURE__*/jsx(PopupComponent, {
|
|
310
376
|
className: popupClassName,
|
|
311
377
|
popupRef: this.popupRef,
|
|
312
378
|
onClear: clear ? this.clear : null,
|
|
@@ -30,5 +30,5 @@ export default class DatePopup extends Component<DatePopupProps, DatePopupState>
|
|
|
30
30
|
selectHandler: (date: Date) => void;
|
|
31
31
|
handleScroll: (scrollDate: number) => void;
|
|
32
32
|
onClear: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
33
|
-
render():
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
34
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Component, createElement } from 'react';
|
|
4
3
|
import { isAfter } from 'date-fns/isAfter';
|
|
@@ -13,6 +12,7 @@ import Years from './years.js';
|
|
|
13
12
|
import Weekdays from './weekdays.js';
|
|
14
13
|
import { parseTime } from './consts.js';
|
|
15
14
|
import { s as styles } from '../_helpers/date-picker.js';
|
|
15
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
16
16
|
import 'classnames';
|
|
17
17
|
import '../_helpers/input.js';
|
|
18
18
|
import '@jetbrains/icons/close-12px';
|
|
@@ -23,6 +23,7 @@ import 'util-deprecate';
|
|
|
23
23
|
import '../icon/icon.js';
|
|
24
24
|
import '../icon/icon.constants.js';
|
|
25
25
|
import '../_helpers/icon-svg.js';
|
|
26
|
+
import 'react-compiler-runtime';
|
|
26
27
|
import '../link/clickable-link.js';
|
|
27
28
|
import '../global/controls-height.js';
|
|
28
29
|
import '../global/configuration.js';
|
|
@@ -374,11 +375,11 @@ class DatePopup extends Component {
|
|
|
374
375
|
onScrollChange: this.scrollTo
|
|
375
376
|
};
|
|
376
377
|
const clearable = Boolean(this.props.onClear);
|
|
377
|
-
return jsxs("div", {
|
|
378
|
+
return /*#__PURE__*/jsxs("div", {
|
|
378
379
|
className: styles.datePopup,
|
|
379
|
-
"data-test":
|
|
380
|
+
"data-test": "ring-date-popup",
|
|
380
381
|
ref: this.componentRef,
|
|
381
|
-
children: [jsxs("div", {
|
|
382
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
382
383
|
className: styles.filterWrapper,
|
|
383
384
|
children: [names.map(name => {
|
|
384
385
|
let onClear;
|
|
@@ -399,7 +400,7 @@ class DatePopup extends Component {
|
|
|
399
400
|
onClear: onClear,
|
|
400
401
|
locale: locale
|
|
401
402
|
});
|
|
402
|
-
}), this.isInTimeMode() ?
|
|
403
|
+
}), this.isInTimeMode() ? /*#__PURE__*/createElement(DateInput, {
|
|
403
404
|
...this.props,
|
|
404
405
|
text: this.state.text,
|
|
405
406
|
divider: !!parsedDate,
|
|
@@ -414,17 +415,17 @@ class DatePopup extends Component {
|
|
|
414
415
|
onConfirm: this.handleConfirm('time'),
|
|
415
416
|
onClear: clearable && this.onClear || undefined,
|
|
416
417
|
locale: locale
|
|
417
|
-
})
|
|
418
|
-
}), jsx(Weekdays, {
|
|
418
|
+
}) : '']
|
|
419
|
+
}), /*#__PURE__*/jsx(Weekdays, {
|
|
419
420
|
locale: locale
|
|
420
|
-
}), jsxs("div", {
|
|
421
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
421
422
|
className: styles.calendar,
|
|
422
|
-
children: [jsx(Months, {
|
|
423
|
+
children: [/*#__PURE__*/jsx(Months, {
|
|
423
424
|
...calendarProps,
|
|
424
425
|
onHover: this.hoverHandler,
|
|
425
426
|
onSelect: this.selectHandler,
|
|
426
427
|
locale: locale
|
|
427
|
-
}), jsx(Years, {
|
|
428
|
+
}), /*#__PURE__*/jsx(Years, {
|
|
428
429
|
...calendarProps
|
|
429
430
|
})]
|
|
430
431
|
}), this.props.renderAfterCalendar && this.props.renderAfterCalendar(this.state)]
|
|
@@ -13,5 +13,5 @@ export default class Day extends Component<DayProps> {
|
|
|
13
13
|
inRange: (range: [Date, Date] | null) => boolean | null;
|
|
14
14
|
isDisabled: (date: Date) => boolean;
|
|
15
15
|
parse(text: string | null | undefined): Date | null;
|
|
16
|
-
render(): import("react
|
|
16
|
+
render(): import("react").JSX.Element;
|
|
17
17
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import { Component } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import { addDays } from 'date-fns/addDays';
|
|
@@ -12,6 +11,7 @@ import { isToday } from 'date-fns/isToday';
|
|
|
12
11
|
import { startOfDay } from 'date-fns/startOfDay';
|
|
13
12
|
import { getDayNumInWeek, weekdays } from './consts.js';
|
|
14
13
|
import { s as styles } from '../_helpers/date-picker.js';
|
|
14
|
+
import { jsx } from 'react/jsx-runtime';
|
|
15
15
|
import 'date-fns/add';
|
|
16
16
|
|
|
17
17
|
let hoverTO;
|
|
@@ -59,9 +59,10 @@ class Day extends Component {
|
|
|
59
59
|
const disabled = this.isDisabled(day);
|
|
60
60
|
const activeSpreadRange = makeSpreadRange(activeRange);
|
|
61
61
|
return (
|
|
62
|
+
/*#__PURE__*/
|
|
62
63
|
// TODO make keyboard navigation actually work
|
|
63
64
|
jsx("button", {
|
|
64
|
-
type:
|
|
65
|
+
type: "button",
|
|
65
66
|
className: classNames(styles.day, styles[`Day${dayInWeek}`], {
|
|
66
67
|
[styles.current]: ['date', 'from', 'to'].some(this.is),
|
|
67
68
|
[styles.active]: !disabled && this.is('activeDate'),
|
|
@@ -82,7 +83,7 @@ class Day extends Component {
|
|
|
82
83
|
onMouseOut: this.handleMouseOut,
|
|
83
84
|
onBlur: this.handleMouseOut,
|
|
84
85
|
disabled: disabled,
|
|
85
|
-
children: empty || jsx("span", {
|
|
86
|
+
children: empty || /*#__PURE__*/jsx("span", {
|
|
86
87
|
className: classNames({
|
|
87
88
|
[styles.today]: isToday(day)
|
|
88
89
|
}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type MonthsProps } from './consts';
|
|
2
|
-
export default function MonthNames(props: MonthsProps): import("react
|
|
2
|
+
export default function MonthNames(props: MonthsProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { endOfMonth } from 'date-fns/endOfMonth';
|
|
@@ -11,6 +11,7 @@ import linearFunction from '../global/linear-function.js';
|
|
|
11
11
|
import MonthSlider from './month-slider.js';
|
|
12
12
|
import { YEAR, MIDDLE_DAY, yearScrollSpeed } from './consts.js';
|
|
13
13
|
import { s as styles } from '../_helpers/date-picker.js';
|
|
14
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
15
|
import 'date-fns/addYears';
|
|
15
16
|
import 'date-fns/subYears';
|
|
16
17
|
import 'date-fns/add';
|
|
@@ -25,8 +26,8 @@ class MonthName extends PureComponent {
|
|
|
25
26
|
month,
|
|
26
27
|
locale
|
|
27
28
|
} = this.props;
|
|
28
|
-
return jsx("button", {
|
|
29
|
-
type:
|
|
29
|
+
return /*#__PURE__*/jsx("button", {
|
|
30
|
+
type: "button",
|
|
30
31
|
className: classNames(styles.monthName, {
|
|
31
32
|
[styles.today]: isThisMonth(month)
|
|
32
33
|
}),
|
|
@@ -38,41 +39,116 @@ class MonthName extends PureComponent {
|
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
function MonthNames(props) {
|
|
42
|
+
const $ = c(25);
|
|
43
|
+
if ($[0] !== "bc2d18bdf292acf1ee5e9f58d8bdc0707131612de3d6a30b9b3c175a40cf30a9") {
|
|
44
|
+
for (let $i = 0; $i < 25; $i += 1) {
|
|
45
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
46
|
+
}
|
|
47
|
+
$[0] = "bc2d18bdf292acf1ee5e9f58d8bdc0707131612de3d6a30b9b3c175a40cf30a9";
|
|
48
|
+
}
|
|
41
49
|
const {
|
|
42
50
|
scrollDate,
|
|
43
51
|
locale
|
|
44
52
|
} = props;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
let months;
|
|
54
|
+
if ($[1] !== scrollDate) {
|
|
55
|
+
months = [];
|
|
56
|
+
for (let i = 0; i < YEAR; i++) {
|
|
57
|
+
const middleDay = set(scrollDate, {
|
|
58
|
+
month: i,
|
|
59
|
+
date: MIDDLE_DAY
|
|
60
|
+
});
|
|
61
|
+
months.push(startOfDay(middleDay));
|
|
62
|
+
}
|
|
63
|
+
$[1] = scrollDate;
|
|
64
|
+
$[2] = months;
|
|
65
|
+
} else {
|
|
66
|
+
months = $[2];
|
|
52
67
|
}
|
|
53
|
-
|
|
54
|
-
let
|
|
55
|
-
let
|
|
56
|
-
if (props.currentRange) {
|
|
57
|
-
|
|
68
|
+
let bottom;
|
|
69
|
+
let pxToDate;
|
|
70
|
+
let top;
|
|
71
|
+
if ($[3] !== props.currentRange || $[4] !== scrollDate) {
|
|
72
|
+
let t0;
|
|
73
|
+
if ($[8] !== scrollDate) {
|
|
74
|
+
t0 = startOfYear(scrollDate);
|
|
75
|
+
$[8] = scrollDate;
|
|
76
|
+
$[9] = t0;
|
|
77
|
+
} else {
|
|
78
|
+
t0 = $[9];
|
|
79
|
+
}
|
|
80
|
+
pxToDate = linearFunction(0, Number(t0), yearScrollSpeed);
|
|
81
|
+
top = 0;
|
|
82
|
+
bottom = 0;
|
|
83
|
+
if (props.currentRange) {
|
|
84
|
+
[top, bottom] = props.currentRange.map(date => Math.floor(pxToDate.x(Number(date))));
|
|
85
|
+
}
|
|
86
|
+
$[3] = props.currentRange;
|
|
87
|
+
$[4] = scrollDate;
|
|
88
|
+
$[5] = bottom;
|
|
89
|
+
$[6] = pxToDate;
|
|
90
|
+
$[7] = top;
|
|
91
|
+
} else {
|
|
92
|
+
bottom = $[5];
|
|
93
|
+
pxToDate = $[6];
|
|
94
|
+
top = $[7];
|
|
58
95
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
96
|
+
let t0;
|
|
97
|
+
if ($[10] !== locale || $[11] !== months || $[12] !== props.onScrollChange) {
|
|
98
|
+
t0 = months.map(month => /*#__PURE__*/jsx(MonthName, {
|
|
62
99
|
month: month,
|
|
63
100
|
onScrollChange: props.onScrollChange,
|
|
64
101
|
locale: locale
|
|
65
|
-
}, +month))
|
|
102
|
+
}, +month));
|
|
103
|
+
$[10] = locale;
|
|
104
|
+
$[11] = months;
|
|
105
|
+
$[12] = props.onScrollChange;
|
|
106
|
+
$[13] = t0;
|
|
107
|
+
} else {
|
|
108
|
+
t0 = $[13];
|
|
109
|
+
}
|
|
110
|
+
let t1;
|
|
111
|
+
if ($[14] !== bottom || $[15] !== props.currentRange || $[16] !== top) {
|
|
112
|
+
t1 = props.currentRange && /*#__PURE__*/jsx("div", {
|
|
66
113
|
className: styles.range,
|
|
67
114
|
style: {
|
|
68
115
|
top: top - 1,
|
|
69
116
|
height: bottom + 1 - (top - 1)
|
|
70
117
|
}
|
|
71
|
-
})
|
|
118
|
+
});
|
|
119
|
+
$[14] = bottom;
|
|
120
|
+
$[15] = props.currentRange;
|
|
121
|
+
$[16] = top;
|
|
122
|
+
$[17] = t1;
|
|
123
|
+
} else {
|
|
124
|
+
t1 = $[17];
|
|
125
|
+
}
|
|
126
|
+
let t2;
|
|
127
|
+
if ($[18] !== props || $[19] !== pxToDate) {
|
|
128
|
+
t2 = /*#__PURE__*/jsx(MonthSlider, {
|
|
72
129
|
...props,
|
|
73
130
|
pxToDate: pxToDate
|
|
74
|
-
})
|
|
75
|
-
|
|
131
|
+
});
|
|
132
|
+
$[18] = props;
|
|
133
|
+
$[19] = pxToDate;
|
|
134
|
+
$[20] = t2;
|
|
135
|
+
} else {
|
|
136
|
+
t2 = $[20];
|
|
137
|
+
}
|
|
138
|
+
let t3;
|
|
139
|
+
if ($[21] !== t0 || $[22] !== t1 || $[23] !== t2) {
|
|
140
|
+
t3 = /*#__PURE__*/jsxs("div", {
|
|
141
|
+
className: styles.monthNames,
|
|
142
|
+
children: [t0, t1, t2]
|
|
143
|
+
});
|
|
144
|
+
$[21] = t0;
|
|
145
|
+
$[22] = t1;
|
|
146
|
+
$[23] = t2;
|
|
147
|
+
$[24] = t3;
|
|
148
|
+
} else {
|
|
149
|
+
t3 = $[24];
|
|
150
|
+
}
|
|
151
|
+
return t3;
|
|
76
152
|
}
|
|
77
153
|
|
|
78
154
|
export { MonthNames as default };
|
|
@@ -15,6 +15,6 @@ export default class MonthSlider extends PureComponent<MonthSliderProps> {
|
|
|
15
15
|
onMouseDown: () => void;
|
|
16
16
|
onMouseUp: () => void;
|
|
17
17
|
onMouseMove: (e: MouseEvent) => void;
|
|
18
|
-
render(): import("react
|
|
18
|
+
render(): import("react").JSX.Element;
|
|
19
19
|
}
|
|
20
20
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import { addYears } from 'date-fns/addYears';
|
|
@@ -7,6 +6,7 @@ import { subYears } from 'date-fns/subYears';
|
|
|
7
6
|
import linearFunction from '../global/linear-function.js';
|
|
8
7
|
import units, { yearScrollSpeed } from './consts.js';
|
|
9
8
|
import { s as styles } from '../_helpers/date-picker.js';
|
|
9
|
+
import { jsx } from 'react/jsx-runtime';
|
|
10
10
|
import 'date-fns/add';
|
|
11
11
|
|
|
12
12
|
const COVERYEARS = 3;
|
|
@@ -46,9 +46,9 @@ class MonthSlider extends PureComponent {
|
|
|
46
46
|
const classes = classNames(styles.monthSlider, {
|
|
47
47
|
[styles.dragging]: this.state.dragging
|
|
48
48
|
});
|
|
49
|
-
return jsx("div", {
|
|
50
|
-
children: years.map(date => jsx("button", {
|
|
51
|
-
type:
|
|
49
|
+
return /*#__PURE__*/jsx("div", {
|
|
50
|
+
children: years.map(date => /*#__PURE__*/jsx("button", {
|
|
51
|
+
type: "button",
|
|
52
52
|
className: classes,
|
|
53
53
|
style: {
|
|
54
54
|
top: Math.floor(this.props.pxToDate.x(Number(date)) - units.cellSize)
|
|
@@ -2,4 +2,4 @@ import { type MonthsProps } from './consts';
|
|
|
2
2
|
export interface MonthProps extends MonthsProps {
|
|
3
3
|
month: Date;
|
|
4
4
|
}
|
|
5
|
-
export default function Month(props: MonthProps): import("react
|
|
5
|
+
export default function Month(props: MonthProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
3
2
|
import { addDays } from 'date-fns/addDays';
|
|
4
3
|
import { endOfMonth } from 'date-fns/endOfMonth';
|
|
5
4
|
import { format } from 'date-fns/format';
|
|
@@ -8,6 +7,8 @@ import { setDay } from 'date-fns/setDay';
|
|
|
8
7
|
import Day from './day.js';
|
|
9
8
|
import { shiftWeekArray, getWeekStartsOn, weekdays, FIFTH_DAY, WEEK } from './consts.js';
|
|
10
9
|
import { s as styles } from '../_helpers/date-picker.js';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
import { createElement } from 'react';
|
|
11
12
|
import 'classnames';
|
|
12
13
|
import 'date-fns/getDate';
|
|
13
14
|
import 'date-fns/isAfter';
|
|
@@ -18,35 +19,95 @@ import 'date-fns/startOfDay';
|
|
|
18
19
|
import 'date-fns/add';
|
|
19
20
|
|
|
20
21
|
function Month(props) {
|
|
22
|
+
const $ = c(20);
|
|
23
|
+
if ($[0] !== "14b913afec6a0e367382e049e14b38f0432cb1747486488d23fa5601f7987406") {
|
|
24
|
+
for (let $i = 0; $i < 20; $i += 1) {
|
|
25
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
26
|
+
}
|
|
27
|
+
$[0] = "14b913afec6a0e367382e049e14b38f0432cb1747486488d23fa5601f7987406";
|
|
28
|
+
}
|
|
21
29
|
const start = props.month;
|
|
22
30
|
const end = endOfMonth(start);
|
|
23
31
|
const {
|
|
24
32
|
locale
|
|
25
33
|
} = props;
|
|
26
|
-
// pad with empty cells starting from last friday
|
|
27
34
|
const weekday = getDay(start);
|
|
28
|
-
|
|
35
|
+
let t0;
|
|
36
|
+
if ($[1] !== props.locale) {
|
|
37
|
+
t0 = shiftWeekArray(Object.values(weekdays), getWeekStartsOn(props.locale));
|
|
38
|
+
$[1] = props.locale;
|
|
39
|
+
$[2] = t0;
|
|
40
|
+
} else {
|
|
41
|
+
t0 = $[2];
|
|
42
|
+
}
|
|
43
|
+
const weekDays = t0;
|
|
29
44
|
const fifthDayOfWeek = weekDays[FIFTH_DAY];
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
days
|
|
34
|
-
|
|
45
|
+
let days;
|
|
46
|
+
if ($[3] !== end || $[4] !== fifthDayOfWeek || $[5] !== start || $[6] !== weekday) {
|
|
47
|
+
let day = setDay(start, weekday >= fifthDayOfWeek ? fifthDayOfWeek : fifthDayOfWeek - WEEK);
|
|
48
|
+
days = [];
|
|
49
|
+
while (day < end) {
|
|
50
|
+
days.push(day);
|
|
51
|
+
day = addDays(day, 1);
|
|
52
|
+
}
|
|
53
|
+
$[3] = end;
|
|
54
|
+
$[4] = fifthDayOfWeek;
|
|
55
|
+
$[5] = start;
|
|
56
|
+
$[6] = weekday;
|
|
57
|
+
$[7] = days;
|
|
58
|
+
} else {
|
|
59
|
+
days = $[7];
|
|
35
60
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
61
|
+
let t1;
|
|
62
|
+
if ($[8] !== locale || $[9] !== props.month) {
|
|
63
|
+
t1 = format(props.month, "LLLL", {
|
|
64
|
+
locale
|
|
65
|
+
});
|
|
66
|
+
$[8] = locale;
|
|
67
|
+
$[9] = props.month;
|
|
68
|
+
$[10] = t1;
|
|
69
|
+
} else {
|
|
70
|
+
t1 = $[10];
|
|
71
|
+
}
|
|
72
|
+
let t2;
|
|
73
|
+
if ($[11] !== t1) {
|
|
74
|
+
t2 = /*#__PURE__*/jsx("span", {
|
|
39
75
|
className: styles.monthTitle,
|
|
40
|
-
children:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
76
|
+
children: t1
|
|
77
|
+
});
|
|
78
|
+
$[11] = t1;
|
|
79
|
+
$[12] = t2;
|
|
80
|
+
} else {
|
|
81
|
+
t2 = $[12];
|
|
82
|
+
}
|
|
83
|
+
let t3;
|
|
84
|
+
if ($[13] !== days || $[14] !== props || $[15] !== start) {
|
|
85
|
+
t3 = days.map(date => /*#__PURE__*/createElement(Day, {
|
|
44
86
|
...props,
|
|
45
87
|
day: date,
|
|
46
88
|
empty: date < start,
|
|
47
89
|
key: +date
|
|
48
|
-
}))
|
|
49
|
-
|
|
90
|
+
}));
|
|
91
|
+
$[13] = days;
|
|
92
|
+
$[14] = props;
|
|
93
|
+
$[15] = start;
|
|
94
|
+
$[16] = t3;
|
|
95
|
+
} else {
|
|
96
|
+
t3 = $[16];
|
|
97
|
+
}
|
|
98
|
+
let t4;
|
|
99
|
+
if ($[17] !== t2 || $[18] !== t3) {
|
|
100
|
+
t4 = /*#__PURE__*/jsxs("div", {
|
|
101
|
+
className: styles.month,
|
|
102
|
+
children: [t2, t3]
|
|
103
|
+
});
|
|
104
|
+
$[17] = t2;
|
|
105
|
+
$[18] = t3;
|
|
106
|
+
$[19] = t4;
|
|
107
|
+
} else {
|
|
108
|
+
t4 = $[19];
|
|
109
|
+
}
|
|
110
|
+
return t4;
|
|
50
111
|
}
|
|
51
112
|
|
|
52
113
|
export { Month as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type MonthsProps } from './consts';
|
|
2
|
-
export default function Months(props: MonthsProps): import("react
|
|
2
|
+
export default function Months(props: MonthsProps): import("react").JSX.Element;
|