@jetbrains/ring-ui-built 8.0.0-beta.3 → 8.0.0-beta.5
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/alert.js +3 -0
- package/components/_helpers/caption.js +1 -1
- package/components/_helpers/header.js +1 -1
- package/components/_helpers/heading.js +2 -2
- package/components/_helpers/table.js +1 -1
- package/components/_helpers/theme.js +1 -1
- package/components/alert/alert-actions.d.ts +4 -0
- package/components/alert/alert-actions.js +51 -0
- package/components/alert/alert-heading.d.ts +4 -0
- package/components/alert/alert-heading.js +62 -0
- package/components/alert/alert.d.ts +14 -1
- package/components/alert/alert.js +44 -26
- package/components/alert-service/alert-service.d.ts +2 -1
- package/components/alert-service/alert-service.js +15 -5
- package/components/auth/auth-core.d.ts +5 -9
- package/components/auth/auth-core.js +71 -17
- package/components/auth/auth.js +7 -1
- package/components/auth/down-notification.js +7 -1
- package/components/auth/iframe-flow.js +1 -1
- package/components/auth/storage.js +7 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/clipboard/clipboard.js +7 -1
- package/components/collapsible-group/collapsible-group.d.ts +20 -0
- package/components/collapsible-group/collapsible-group.js +382 -0
- package/components/components/util-stories.js +63 -1
- package/components/data-list/data-list.js +1 -1
- package/components/data-list/title.js +1 -1
- package/components/date-picker/consts.d.ts +1 -0
- package/components/date-picker/date-input.js +3 -2
- package/components/date-picker/date-popup.js +3 -3
- package/components/dropdown-menu/dropdown-menu.js +6 -6
- package/components/editable-heading/editable-heading.js +122 -109
- package/components/expand/collapsible-group.d.ts +8 -20
- package/components/expand/collapsible-group.js +34 -365
- package/components/global/compose-refs.d.ts +2 -1
- package/components/global/compose-refs.js +44 -8
- package/components/global/focus-sensor-hoc.js +1 -0
- package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
- package/components/global/focus-with-temporary-tabindex.js +23 -0
- package/components/global/intersection-observer-context.d.ts +29 -9
- package/components/global/intersection-observer-context.js +50 -52
- package/components/global/is-within-interactive-element.d.ts +6 -0
- package/components/global/is-within-interactive-element.js +11 -0
- package/components/global/is-within-navigable-element.d.ts +6 -0
- package/components/global/is-within-navigable-element.js +11 -0
- package/components/global/parse-css-duration.d.ts +5 -0
- package/components/global/parse-css-duration.js +14 -0
- package/components/global/rerender-hoc.js +1 -0
- package/components/global/schedule-with-cleanup.d.ts +12 -0
- package/components/global/schedule-with-cleanup.js +36 -0
- package/components/global/table-selection.js +1 -1
- package/components/global/theme.js +1 -1
- package/components/header/header.js +8 -2
- package/components/header/smart-profile.js +7 -1
- package/components/heading/heading.js +3 -3
- package/components/http/http.d.ts +2 -2
- package/components/http/http.js +2 -2
- package/components/i18n/i18n.d.ts +1 -0
- package/components/i18n/i18n.js +2 -0
- package/components/input/input.d.ts +1 -1
- package/components/internal/reorder-animation-context.js +159 -0
- package/components/internal/reorder-handle.js +750 -0
- package/components/internal/reorder-layout-context.js +141 -0
- package/components/internal/table-header.js +685 -0
- package/components/{table/table-virtualize.js → internal/virtualization.js} +123 -84
- package/components/legacy-table/header-cell.js +2 -2
- package/components/legacy-table/row-with-focus-sensor.js +1 -1
- package/components/legacy-table/row.d.ts +1 -1
- package/components/legacy-table/simple-table.js +1 -1
- package/components/legacy-table/smart-table.js +1 -1
- package/components/legacy-table/table.js +1 -1
- package/components/markdown/markdown.js +2 -2
- package/components/message/message.js +1 -1
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/popup/popup.d.ts +2 -0
- package/components/popup/popup.js +5 -1
- package/components/select/select-popup.d.ts +1 -1
- package/components/select/select.d.ts +1 -1
- package/components/storage/storage-local.js +7 -1
- package/components/storage/storage.js +7 -1
- package/components/style.css +1 -1
- package/components/table/default-item-renderer.d.ts +29 -10
- package/components/table/default-item-renderer.js +151 -93
- package/components/table/internal/reorder-animation-context.d.ts +21 -0
- package/components/table/internal/reorder-handle.d.ts +9 -0
- package/components/table/internal/reorder-layout-context.d.ts +16 -0
- package/components/table/internal/table-header.d.ts +1 -0
- package/components/table/internal/virtualization.d.ts +41 -0
- package/components/table/item-virtualization.d.ts +37 -0
- package/components/table/item-virtualization.js +73 -0
- package/components/table/reorder-animation.d.ts +37 -0
- package/components/table/reorder-animation.js +18 -0
- package/components/table/reorder-item-layout.d.ts +32 -0
- package/components/table/reorder-item-layout.js +57 -0
- package/components/table/table-const.d.ts +8 -6
- package/components/table/table-const.js +8 -6
- package/components/table/table-primitives.d.ts +52 -16
- package/components/table/table-primitives.js +64 -207
- package/components/table/table-props.d.ts +304 -0
- package/components/table/table-props.js +1 -0
- package/components/table/table.d.ts +231 -209
- package/components/table/table.js +365 -17
- package/components/tooltip/tooltip.js +1 -1
- package/components/user-agreement/service.js +13 -7
- package/components/user-card/card.js +7 -1
- package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
- package/components/user-card/smart-user-card-tooltip.js +7 -1
- package/components/user-card/tooltip.js +7 -1
- package/components/user-card/user-card.js +7 -1
- package/components/util-stories.d.ts +26 -0
- package/package.json +3 -3
- package/components/date-picker/use-intersection-observer.d.ts +0 -6
- package/components/date-picker/use-intersection-observer.js +0 -93
- package/components/global/composeRefs.d.ts +0 -6
- package/components/global/composeRefs.js +0 -9
- package/components/table/table-component.d.ts +0 -80
- package/components/table/table-component.js +0 -290
- package/components/table/table-row-focus.d.ts +0 -4
- package/components/table/table-row-focus.js +0 -41
- package/components/table/table-virtualize.d.ts +0 -32
package/components/auth/auth.js
CHANGED
|
@@ -12,8 +12,9 @@ import '../global/get-uid.js';
|
|
|
12
12
|
import '../alert/alert.js';
|
|
13
13
|
import 'classnames';
|
|
14
14
|
import '@jetbrains/icons/exception';
|
|
15
|
-
import '@jetbrains/icons/
|
|
15
|
+
import '@jetbrains/icons/success';
|
|
16
16
|
import '@jetbrains/icons/warning';
|
|
17
|
+
import '@jetbrains/icons/info-filled';
|
|
17
18
|
import '@jetbrains/icons/close';
|
|
18
19
|
import '../icon/icon.js';
|
|
19
20
|
import 'util-deprecate';
|
|
@@ -32,6 +33,11 @@ import '../global/controls-height.js';
|
|
|
32
33
|
import '../global/configuration.js';
|
|
33
34
|
import '../_helpers/button.classes.js';
|
|
34
35
|
import '../_helpers/theme.js';
|
|
36
|
+
import '../alert/alert-heading.js';
|
|
37
|
+
import '../heading/heading.js';
|
|
38
|
+
import '../_helpers/heading.js';
|
|
39
|
+
import '../_helpers/alert.js';
|
|
40
|
+
import '../alert/alert-actions.js';
|
|
35
41
|
import '../alert/container.js';
|
|
36
42
|
import 'react-dom';
|
|
37
43
|
import '../link/link.js';
|
|
@@ -11,8 +11,9 @@ import '../alert/container.js';
|
|
|
11
11
|
import 'react-dom';
|
|
12
12
|
import 'classnames';
|
|
13
13
|
import '@jetbrains/icons/exception';
|
|
14
|
-
import '@jetbrains/icons/
|
|
14
|
+
import '@jetbrains/icons/success';
|
|
15
15
|
import '@jetbrains/icons/warning';
|
|
16
|
+
import '@jetbrains/icons/info-filled';
|
|
16
17
|
import '@jetbrains/icons/close';
|
|
17
18
|
import '../icon/icon.js';
|
|
18
19
|
import 'util-deprecate';
|
|
@@ -30,6 +31,11 @@ import '../global/controls-height.js';
|
|
|
30
31
|
import '../global/configuration.js';
|
|
31
32
|
import '../_helpers/button.classes.js';
|
|
32
33
|
import '../_helpers/theme.js';
|
|
34
|
+
import '../alert/alert-heading.js';
|
|
35
|
+
import '../heading/heading.js';
|
|
36
|
+
import '../_helpers/heading.js';
|
|
37
|
+
import '../_helpers/alert.js';
|
|
38
|
+
import '../alert/alert-actions.js';
|
|
33
39
|
import '../_helpers/link.js';
|
|
34
40
|
|
|
35
41
|
var styles = {"title":"ring-down-notification-title","error":"ring-down-notification-error"};
|
|
@@ -52,8 +52,8 @@ import '../loader-screen/loader-screen.js';
|
|
|
52
52
|
import '../loader/loader.js';
|
|
53
53
|
import '../_helpers/loader-core.js';
|
|
54
54
|
import './background-flow.js';
|
|
55
|
-
import '../global/url.js';
|
|
56
55
|
import '../_helpers/link.js';
|
|
56
|
+
import '../global/url.js';
|
|
57
57
|
|
|
58
58
|
class IFrameFlow {
|
|
59
59
|
hideDialog = null;
|
|
@@ -6,8 +6,9 @@ import '../alert/alert.js';
|
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import '@jetbrains/icons/exception';
|
|
9
|
-
import '@jetbrains/icons/
|
|
9
|
+
import '@jetbrains/icons/success';
|
|
10
10
|
import '@jetbrains/icons/warning';
|
|
11
|
+
import '@jetbrains/icons/info-filled';
|
|
11
12
|
import '@jetbrains/icons/close';
|
|
12
13
|
import '../icon/icon.js';
|
|
13
14
|
import 'util-deprecate';
|
|
@@ -27,6 +28,11 @@ import '../global/controls-height.js';
|
|
|
27
28
|
import '../global/configuration.js';
|
|
28
29
|
import '../_helpers/button.classes.js';
|
|
29
30
|
import '../_helpers/theme.js';
|
|
31
|
+
import '../alert/alert-heading.js';
|
|
32
|
+
import '../heading/heading.js';
|
|
33
|
+
import '../_helpers/heading.js';
|
|
34
|
+
import '../_helpers/alert.js';
|
|
35
|
+
import '../alert/alert-actions.js';
|
|
30
36
|
import '../alert/container.js';
|
|
31
37
|
import 'react-dom';
|
|
32
38
|
|
|
@@ -24,6 +24,6 @@ export default class Checkbox extends PureComponent<CheckboxProps> {
|
|
|
24
24
|
componentDidUpdate(prevProps: CheckboxProps): void;
|
|
25
25
|
input?: HTMLInputElement | null;
|
|
26
26
|
inputRef: (el: HTMLInputElement | null) => void;
|
|
27
|
-
composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T | null) => void>;
|
|
27
|
+
composedInputRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T | null) => () => void>;
|
|
28
28
|
render(): import("react").JSX.Element;
|
|
29
29
|
}
|
|
@@ -6,8 +6,9 @@ import '../alert/alert.js';
|
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
import '@jetbrains/icons/exception';
|
|
9
|
-
import '@jetbrains/icons/
|
|
9
|
+
import '@jetbrains/icons/success';
|
|
10
10
|
import '@jetbrains/icons/warning';
|
|
11
|
+
import '@jetbrains/icons/info-filled';
|
|
11
12
|
import '@jetbrains/icons/close';
|
|
12
13
|
import '../icon/icon.js';
|
|
13
14
|
import 'util-deprecate';
|
|
@@ -27,6 +28,11 @@ import '../global/controls-height.js';
|
|
|
27
28
|
import '../global/configuration.js';
|
|
28
29
|
import '../_helpers/button.classes.js';
|
|
29
30
|
import '../_helpers/theme.js';
|
|
31
|
+
import '../alert/alert-heading.js';
|
|
32
|
+
import '../heading/heading.js';
|
|
33
|
+
import '../_helpers/heading.js';
|
|
34
|
+
import '../_helpers/alert.js';
|
|
35
|
+
import '../alert/alert-actions.js';
|
|
30
36
|
import '../alert/container.js';
|
|
31
37
|
import 'react-dom';
|
|
32
38
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CollapsibleGroupProps {
|
|
3
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
4
|
+
avatar?: React.ReactNode;
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
subtitle?: React.ReactNode;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
className?: string | null | undefined;
|
|
9
|
+
defaultExpanded?: boolean;
|
|
10
|
+
expanded?: boolean | null | undefined;
|
|
11
|
+
onChange?: (expanded: boolean) => void;
|
|
12
|
+
disableAnimation?: boolean;
|
|
13
|
+
interactive?: boolean;
|
|
14
|
+
'data-test'?: string | null | undefined;
|
|
15
|
+
}
|
|
16
|
+
declare const CollapsibleGroup: {
|
|
17
|
+
({ ref, avatar, title, subtitle, children, className, defaultExpanded, expanded, onChange, disableAnimation, interactive, "data-test": dataTest, }: CollapsibleGroupProps): React.JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export default CollapsibleGroup;
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useState, use } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import chevronRightIcon from '@jetbrains/icons/chevron-12px-right';
|
|
5
|
+
import chevron12pxDown from '@jetbrains/icons/chevron-12px-down';
|
|
6
|
+
import Icon from '../icon/icon.js';
|
|
7
|
+
import { Collapse } from '../collapse/collapse.js';
|
|
8
|
+
import { CollapseContent } from '../collapse/collapse-content.js';
|
|
9
|
+
import { CollapseContext } from '../collapse/collapse-context.js';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
import 'util-deprecate';
|
|
12
|
+
import '../icon/icon.constants.js';
|
|
13
|
+
import '../_helpers/icon-svg.js';
|
|
14
|
+
import '../global/memoize.js';
|
|
15
|
+
import '../collapse/consts.js';
|
|
16
|
+
import '../global/data-tests.js';
|
|
17
|
+
import '../global/dom.js';
|
|
18
|
+
import '../collapse/utils.js';
|
|
19
|
+
|
|
20
|
+
var styles = {"expand":"ring-collapsible-group-expand","collapseRoot":"ring-collapsible-group-collapseRoot","hovered":"ring-collapsible-group-hovered","expanded":"ring-collapsible-group-expanded","focused":"ring-collapsible-group-focused","header":"ring-collapsible-group-header","headerButton":"ring-collapsible-group-headerButton","headerStatic":"ring-collapsible-group-headerStatic","headerContent":"ring-collapsible-group-headerContent","avatarGroup":"ring-collapsible-group-avatarGroup","title":"ring-collapsible-group-title","subtitleGroup":"ring-collapsible-group-subtitleGroup","subtitle":"ring-collapsible-group-subtitle","subtitleChevron":"ring-collapsible-group-subtitleChevron","toggle":"ring-collapsible-group-toggle","toggleIcon":"ring-collapsible-group-toggleIcon","body":"ring-collapsible-group-body"};
|
|
21
|
+
|
|
22
|
+
function CollapsibleGroupHeaderContent(t0) {
|
|
23
|
+
const $ = c(16);
|
|
24
|
+
if ($[0] !== "0b0104270833ca27f2118e72fd68547a84ef5bf33921c0d276e95941f6f80768") {
|
|
25
|
+
for (let $i = 0; $i < 16; $i += 1) {
|
|
26
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
27
|
+
}
|
|
28
|
+
$[0] = "0b0104270833ca27f2118e72fd68547a84ef5bf33921c0d276e95941f6f80768";
|
|
29
|
+
}
|
|
30
|
+
const {
|
|
31
|
+
avatar,
|
|
32
|
+
titleContent,
|
|
33
|
+
subtitle
|
|
34
|
+
} = t0;
|
|
35
|
+
const {
|
|
36
|
+
collapsed
|
|
37
|
+
} = use(CollapseContext);
|
|
38
|
+
let t1;
|
|
39
|
+
if ($[1] !== titleContent) {
|
|
40
|
+
t1 = /*#__PURE__*/jsx("span", {
|
|
41
|
+
className: styles.title,
|
|
42
|
+
children: titleContent
|
|
43
|
+
});
|
|
44
|
+
$[1] = titleContent;
|
|
45
|
+
$[2] = t1;
|
|
46
|
+
} else {
|
|
47
|
+
t1 = $[2];
|
|
48
|
+
}
|
|
49
|
+
let t2;
|
|
50
|
+
if ($[3] !== avatar || $[4] !== t1) {
|
|
51
|
+
t2 = /*#__PURE__*/jsxs("span", {
|
|
52
|
+
className: styles.avatarGroup,
|
|
53
|
+
children: [avatar, t1]
|
|
54
|
+
});
|
|
55
|
+
$[3] = avatar;
|
|
56
|
+
$[4] = t1;
|
|
57
|
+
$[5] = t2;
|
|
58
|
+
} else {
|
|
59
|
+
t2 = $[5];
|
|
60
|
+
}
|
|
61
|
+
let t3;
|
|
62
|
+
if ($[6] !== subtitle) {
|
|
63
|
+
t3 = subtitle ? /*#__PURE__*/jsxs("span", {
|
|
64
|
+
className: styles.subtitleGroup,
|
|
65
|
+
children: [/*#__PURE__*/jsx(Icon, {
|
|
66
|
+
className: styles.subtitleChevron,
|
|
67
|
+
glyph: chevronRightIcon,
|
|
68
|
+
"aria-hidden": true
|
|
69
|
+
}), /*#__PURE__*/jsx("span", {
|
|
70
|
+
className: styles.subtitle,
|
|
71
|
+
children: subtitle
|
|
72
|
+
})]
|
|
73
|
+
}) : null;
|
|
74
|
+
$[6] = subtitle;
|
|
75
|
+
$[7] = t3;
|
|
76
|
+
} else {
|
|
77
|
+
t3 = $[7];
|
|
78
|
+
}
|
|
79
|
+
let t4;
|
|
80
|
+
if ($[8] !== t2 || $[9] !== t3) {
|
|
81
|
+
t4 = /*#__PURE__*/jsxs("span", {
|
|
82
|
+
className: styles.headerContent,
|
|
83
|
+
children: [t2, t3]
|
|
84
|
+
});
|
|
85
|
+
$[8] = t2;
|
|
86
|
+
$[9] = t3;
|
|
87
|
+
$[10] = t4;
|
|
88
|
+
} else {
|
|
89
|
+
t4 = $[10];
|
|
90
|
+
}
|
|
91
|
+
const t5 = collapsed ? chevronRightIcon : chevron12pxDown;
|
|
92
|
+
let t6;
|
|
93
|
+
if ($[11] !== t5) {
|
|
94
|
+
t6 = /*#__PURE__*/jsx("span", {
|
|
95
|
+
className: styles.toggle,
|
|
96
|
+
"aria-hidden": true,
|
|
97
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
98
|
+
className: styles.toggleIcon,
|
|
99
|
+
glyph: t5
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
$[11] = t5;
|
|
103
|
+
$[12] = t6;
|
|
104
|
+
} else {
|
|
105
|
+
t6 = $[12];
|
|
106
|
+
}
|
|
107
|
+
let t7;
|
|
108
|
+
if ($[13] !== t4 || $[14] !== t6) {
|
|
109
|
+
t7 = /*#__PURE__*/jsxs("span", {
|
|
110
|
+
className: styles.header,
|
|
111
|
+
children: [t4, t6]
|
|
112
|
+
});
|
|
113
|
+
$[13] = t4;
|
|
114
|
+
$[14] = t6;
|
|
115
|
+
$[15] = t7;
|
|
116
|
+
} else {
|
|
117
|
+
t7 = $[15];
|
|
118
|
+
}
|
|
119
|
+
return t7;
|
|
120
|
+
}
|
|
121
|
+
function CollapsibleGroupHeader(t0) {
|
|
122
|
+
const $ = c(16);
|
|
123
|
+
if ($[0] !== "0b0104270833ca27f2118e72fd68547a84ef5bf33921c0d276e95941f6f80768") {
|
|
124
|
+
for (let $i = 0; $i < 16; $i += 1) {
|
|
125
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
126
|
+
}
|
|
127
|
+
$[0] = "0b0104270833ca27f2118e72fd68547a84ef5bf33921c0d276e95941f6f80768";
|
|
128
|
+
}
|
|
129
|
+
let avatar;
|
|
130
|
+
let buttonProps;
|
|
131
|
+
let subtitle;
|
|
132
|
+
let titleContent;
|
|
133
|
+
if ($[1] !== t0) {
|
|
134
|
+
({
|
|
135
|
+
avatar,
|
|
136
|
+
titleContent,
|
|
137
|
+
subtitle,
|
|
138
|
+
...buttonProps
|
|
139
|
+
} = t0);
|
|
140
|
+
$[1] = t0;
|
|
141
|
+
$[2] = avatar;
|
|
142
|
+
$[3] = buttonProps;
|
|
143
|
+
$[4] = subtitle;
|
|
144
|
+
$[5] = titleContent;
|
|
145
|
+
} else {
|
|
146
|
+
avatar = $[2];
|
|
147
|
+
buttonProps = $[3];
|
|
148
|
+
subtitle = $[4];
|
|
149
|
+
titleContent = $[5];
|
|
150
|
+
}
|
|
151
|
+
const {
|
|
152
|
+
setCollapsed,
|
|
153
|
+
collapsed,
|
|
154
|
+
id
|
|
155
|
+
} = use(CollapseContext);
|
|
156
|
+
const t1 = `collapse-content-${id}`;
|
|
157
|
+
const t2 = !collapsed;
|
|
158
|
+
let t3;
|
|
159
|
+
if ($[6] !== avatar || $[7] !== subtitle || $[8] !== titleContent) {
|
|
160
|
+
t3 = /*#__PURE__*/jsx(CollapsibleGroupHeaderContent, {
|
|
161
|
+
avatar: avatar,
|
|
162
|
+
titleContent: titleContent,
|
|
163
|
+
subtitle: subtitle
|
|
164
|
+
});
|
|
165
|
+
$[6] = avatar;
|
|
166
|
+
$[7] = subtitle;
|
|
167
|
+
$[8] = titleContent;
|
|
168
|
+
$[9] = t3;
|
|
169
|
+
} else {
|
|
170
|
+
t3 = $[9];
|
|
171
|
+
}
|
|
172
|
+
let t4;
|
|
173
|
+
if ($[10] !== buttonProps || $[11] !== setCollapsed || $[12] !== t1 || $[13] !== t2 || $[14] !== t3) {
|
|
174
|
+
t4 = /*#__PURE__*/jsx("button", {
|
|
175
|
+
type: "button",
|
|
176
|
+
...buttonProps,
|
|
177
|
+
className: styles.headerButton,
|
|
178
|
+
onClick: setCollapsed,
|
|
179
|
+
"aria-controls": t1,
|
|
180
|
+
"aria-expanded": t2,
|
|
181
|
+
children: t3
|
|
182
|
+
});
|
|
183
|
+
$[10] = buttonProps;
|
|
184
|
+
$[11] = setCollapsed;
|
|
185
|
+
$[12] = t1;
|
|
186
|
+
$[13] = t2;
|
|
187
|
+
$[14] = t3;
|
|
188
|
+
$[15] = t4;
|
|
189
|
+
} else {
|
|
190
|
+
t4 = $[15];
|
|
191
|
+
}
|
|
192
|
+
return t4;
|
|
193
|
+
}
|
|
194
|
+
function CollapsibleGroupHeaderStatic(t0) {
|
|
195
|
+
const $ = c(5);
|
|
196
|
+
if ($[0] !== "0b0104270833ca27f2118e72fd68547a84ef5bf33921c0d276e95941f6f80768") {
|
|
197
|
+
for (let $i = 0; $i < 5; $i += 1) {
|
|
198
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
199
|
+
}
|
|
200
|
+
$[0] = "0b0104270833ca27f2118e72fd68547a84ef5bf33921c0d276e95941f6f80768";
|
|
201
|
+
}
|
|
202
|
+
const {
|
|
203
|
+
avatar,
|
|
204
|
+
titleContent,
|
|
205
|
+
subtitle
|
|
206
|
+
} = t0;
|
|
207
|
+
let t1;
|
|
208
|
+
if ($[1] !== avatar || $[2] !== subtitle || $[3] !== titleContent) {
|
|
209
|
+
t1 = /*#__PURE__*/jsx("span", {
|
|
210
|
+
className: styles.headerStatic,
|
|
211
|
+
children: /*#__PURE__*/jsx(CollapsibleGroupHeaderContent, {
|
|
212
|
+
avatar: avatar,
|
|
213
|
+
titleContent: titleContent,
|
|
214
|
+
subtitle: subtitle
|
|
215
|
+
})
|
|
216
|
+
});
|
|
217
|
+
$[1] = avatar;
|
|
218
|
+
$[2] = subtitle;
|
|
219
|
+
$[3] = titleContent;
|
|
220
|
+
$[4] = t1;
|
|
221
|
+
} else {
|
|
222
|
+
t1 = $[4];
|
|
223
|
+
}
|
|
224
|
+
return t1;
|
|
225
|
+
}
|
|
226
|
+
const CollapsibleGroup = t0 => {
|
|
227
|
+
const $ = c(29);
|
|
228
|
+
if ($[0] !== "0b0104270833ca27f2118e72fd68547a84ef5bf33921c0d276e95941f6f80768") {
|
|
229
|
+
for (let $i = 0; $i < 29; $i += 1) {
|
|
230
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
231
|
+
}
|
|
232
|
+
$[0] = "0b0104270833ca27f2118e72fd68547a84ef5bf33921c0d276e95941f6f80768";
|
|
233
|
+
}
|
|
234
|
+
const {
|
|
235
|
+
ref,
|
|
236
|
+
avatar,
|
|
237
|
+
title,
|
|
238
|
+
subtitle,
|
|
239
|
+
children,
|
|
240
|
+
className,
|
|
241
|
+
defaultExpanded: t1,
|
|
242
|
+
expanded: t2,
|
|
243
|
+
onChange: t3,
|
|
244
|
+
disableAnimation: t4,
|
|
245
|
+
interactive: t5,
|
|
246
|
+
"data-test": dataTest
|
|
247
|
+
} = t0;
|
|
248
|
+
const defaultExpanded = t1 === undefined ? false : t1;
|
|
249
|
+
const expanded = t2 === undefined ? null : t2;
|
|
250
|
+
const onChange = t3 === undefined ? _temp : t3;
|
|
251
|
+
const disableAnimation = t4 === undefined ? false : t4;
|
|
252
|
+
const interactive = t5 === undefined ? true : t5;
|
|
253
|
+
const [innerExpanded, setInnerExpanded] = useState(defaultExpanded);
|
|
254
|
+
const [hovered, setHovered] = useState(false);
|
|
255
|
+
const [focused, setFocused] = useState(false);
|
|
256
|
+
const isExpanded = expanded !== null && expanded !== void 0 ? expanded : innerExpanded;
|
|
257
|
+
let t6;
|
|
258
|
+
if ($[1] !== expanded || $[2] !== onChange) {
|
|
259
|
+
t6 = collapsed => {
|
|
260
|
+
const nextExpanded = !collapsed;
|
|
261
|
+
if (expanded == null) {
|
|
262
|
+
setInnerExpanded(nextExpanded);
|
|
263
|
+
}
|
|
264
|
+
onChange(nextExpanded);
|
|
265
|
+
};
|
|
266
|
+
$[1] = expanded;
|
|
267
|
+
$[2] = onChange;
|
|
268
|
+
$[3] = t6;
|
|
269
|
+
} else {
|
|
270
|
+
t6 = $[3];
|
|
271
|
+
}
|
|
272
|
+
const handleChange = t6;
|
|
273
|
+
let t7;
|
|
274
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
275
|
+
t7 = event => {
|
|
276
|
+
const nextTarget = event.relatedTarget;
|
|
277
|
+
if (nextTarget instanceof Node && event.currentTarget.contains(nextTarget)) {
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
setFocused(false);
|
|
281
|
+
};
|
|
282
|
+
$[4] = t7;
|
|
283
|
+
} else {
|
|
284
|
+
t7 = $[4];
|
|
285
|
+
}
|
|
286
|
+
const onBlur = t7;
|
|
287
|
+
let t8;
|
|
288
|
+
if ($[5] !== className || $[6] !== focused || $[7] !== hovered || $[8] !== isExpanded) {
|
|
289
|
+
t8 = classNames(styles.expand, className, {
|
|
290
|
+
[styles.hovered]: hovered,
|
|
291
|
+
[styles.expanded]: isExpanded,
|
|
292
|
+
[styles.focused]: focused
|
|
293
|
+
});
|
|
294
|
+
$[5] = className;
|
|
295
|
+
$[6] = focused;
|
|
296
|
+
$[7] = hovered;
|
|
297
|
+
$[8] = isExpanded;
|
|
298
|
+
$[9] = t8;
|
|
299
|
+
} else {
|
|
300
|
+
t8 = $[9];
|
|
301
|
+
}
|
|
302
|
+
const classes = t8;
|
|
303
|
+
const t9 = !defaultExpanded;
|
|
304
|
+
const t10 = expanded == null ? null : !expanded;
|
|
305
|
+
let t11;
|
|
306
|
+
if ($[10] !== avatar || $[11] !== interactive || $[12] !== subtitle || $[13] !== title) {
|
|
307
|
+
t11 = interactive ? /*#__PURE__*/jsx(CollapsibleGroupHeader, {
|
|
308
|
+
avatar: avatar,
|
|
309
|
+
titleContent: title,
|
|
310
|
+
subtitle: subtitle,
|
|
311
|
+
onMouseEnter: () => setHovered(true),
|
|
312
|
+
onMouseLeave: () => setHovered(false),
|
|
313
|
+
onFocus: () => setFocused(true),
|
|
314
|
+
onBlur: onBlur
|
|
315
|
+
}) : /*#__PURE__*/jsx(CollapsibleGroupHeaderStatic, {
|
|
316
|
+
avatar: avatar,
|
|
317
|
+
titleContent: title,
|
|
318
|
+
subtitle: subtitle
|
|
319
|
+
});
|
|
320
|
+
$[10] = avatar;
|
|
321
|
+
$[11] = interactive;
|
|
322
|
+
$[12] = subtitle;
|
|
323
|
+
$[13] = title;
|
|
324
|
+
$[14] = t11;
|
|
325
|
+
} else {
|
|
326
|
+
t11 = $[14];
|
|
327
|
+
}
|
|
328
|
+
let t12;
|
|
329
|
+
if ($[15] !== children) {
|
|
330
|
+
t12 = /*#__PURE__*/jsx(CollapseContent, {
|
|
331
|
+
children: /*#__PURE__*/jsx("div", {
|
|
332
|
+
className: styles.body,
|
|
333
|
+
children: children
|
|
334
|
+
})
|
|
335
|
+
});
|
|
336
|
+
$[15] = children;
|
|
337
|
+
$[16] = t12;
|
|
338
|
+
} else {
|
|
339
|
+
t12 = $[16];
|
|
340
|
+
}
|
|
341
|
+
let t13;
|
|
342
|
+
if ($[17] !== disableAnimation || $[18] !== handleChange || $[19] !== t10 || $[20] !== t11 || $[21] !== t12 || $[22] !== t9) {
|
|
343
|
+
t13 = /*#__PURE__*/jsxs(Collapse, {
|
|
344
|
+
defaultCollapsed: t9,
|
|
345
|
+
collapsed: t10,
|
|
346
|
+
onChange: handleChange,
|
|
347
|
+
disableAnimation: disableAnimation,
|
|
348
|
+
className: styles.collapseRoot,
|
|
349
|
+
children: [t11, t12]
|
|
350
|
+
});
|
|
351
|
+
$[17] = disableAnimation;
|
|
352
|
+
$[18] = handleChange;
|
|
353
|
+
$[19] = t10;
|
|
354
|
+
$[20] = t11;
|
|
355
|
+
$[21] = t12;
|
|
356
|
+
$[22] = t9;
|
|
357
|
+
$[23] = t13;
|
|
358
|
+
} else {
|
|
359
|
+
t13 = $[23];
|
|
360
|
+
}
|
|
361
|
+
let t14;
|
|
362
|
+
if ($[24] !== classes || $[25] !== dataTest || $[26] !== ref || $[27] !== t13) {
|
|
363
|
+
t14 = /*#__PURE__*/jsx("div", {
|
|
364
|
+
ref: ref,
|
|
365
|
+
className: classes,
|
|
366
|
+
"data-test": dataTest,
|
|
367
|
+
children: t13
|
|
368
|
+
});
|
|
369
|
+
$[24] = classes;
|
|
370
|
+
$[25] = dataTest;
|
|
371
|
+
$[26] = ref;
|
|
372
|
+
$[27] = t13;
|
|
373
|
+
$[28] = t14;
|
|
374
|
+
} else {
|
|
375
|
+
t14 = $[28];
|
|
376
|
+
}
|
|
377
|
+
return t14;
|
|
378
|
+
};
|
|
379
|
+
CollapsibleGroup.displayName = 'CollapsibleGroup';
|
|
380
|
+
function _temp() {}
|
|
381
|
+
|
|
382
|
+
export { CollapsibleGroup as default };
|
|
@@ -1,3 +1,65 @@
|
|
|
1
|
+
/* eslint-disable no-magic-numbers */
|
|
1
2
|
const hideAddonsPanelParam = 'hideAddonsPanel';
|
|
3
|
+
function createRandom(seed) {
|
|
4
|
+
const u64Mask = 2n ** 64n - 1n;
|
|
5
|
+
const u64Range = 2n ** 64n;
|
|
6
|
+
const scrambleConst = 2685821657736338717n;
|
|
7
|
+
let x = seed & u64Mask;
|
|
8
|
+
if (!x) throw new Error('Seed must be non-zero');
|
|
9
|
+
function nextFractional() {
|
|
10
|
+
x ^= x >> 12n;
|
|
11
|
+
x ^= x << 25n & u64Mask;
|
|
12
|
+
x ^= x >> 27n;
|
|
13
|
+
const scrambled = x * scrambleConst & u64Mask;
|
|
14
|
+
return Number(scrambled) / Number(u64Range);
|
|
15
|
+
}
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
return (...args) => {
|
|
18
|
+
if (!args.length) {
|
|
19
|
+
return nextFractional();
|
|
20
|
+
}
|
|
21
|
+
if (args.length === 1) {
|
|
22
|
+
const [a] = args;
|
|
23
|
+
if (typeof a === 'number') {
|
|
24
|
+
return Math.floor(nextFractional() * a);
|
|
25
|
+
}
|
|
26
|
+
if (Array.isArray(a)) {
|
|
27
|
+
return a[Math.floor(nextFractional() * a.length)];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (args.length === 2) {
|
|
31
|
+
const [a, b] = args;
|
|
32
|
+
let fromNum;
|
|
33
|
+
let toNum;
|
|
34
|
+
let isDate = false;
|
|
35
|
+
if (typeof a === 'number' && typeof b === 'number') {
|
|
36
|
+
fromNum = a;
|
|
37
|
+
toNum = b;
|
|
38
|
+
}
|
|
39
|
+
if (a instanceof Date && b instanceof Date) {
|
|
40
|
+
fromNum = a.getTime();
|
|
41
|
+
toNum = b.getTime();
|
|
42
|
+
isDate = true;
|
|
43
|
+
}
|
|
44
|
+
if (fromNum != null && toNum != null && fromNum < toNum) {
|
|
45
|
+
const r = Math.floor(nextFractional() * (toNum - fromNum)) + fromNum;
|
|
46
|
+
return isDate ? new Date(r) : r;
|
|
47
|
+
}
|
|
48
|
+
if (Array.isArray(a) && typeof b === 'number') {
|
|
49
|
+
const aIndices = Array.from({
|
|
50
|
+
length: a.length
|
|
51
|
+
}, (_, i) => i);
|
|
52
|
+
const sample = [];
|
|
53
|
+
for (let i = 0; i < b && aIndices.length; i++) {
|
|
54
|
+
const indexIndex = Math.floor(nextFractional() * aIndices.length);
|
|
55
|
+
const [aIndex] = aIndices.splice(indexIndex, 1);
|
|
56
|
+
sample.push(a[aIndex]);
|
|
57
|
+
}
|
|
58
|
+
return sample;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
throw new Error(`Bad args: ${JSON.stringify(args)}`);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
2
64
|
|
|
3
|
-
export { hideAddonsPanelParam };
|
|
65
|
+
export { createRandom, hideAddonsPanelParam };
|
|
@@ -10,6 +10,7 @@ import Item, { moreLessButtonStates } from './item.js';
|
|
|
10
10
|
import { s as styles } from '../_helpers/title.js';
|
|
11
11
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
12
|
import '../global/compose-refs.js';
|
|
13
|
+
import 'react/compiler-runtime';
|
|
13
14
|
import 'memoize-one';
|
|
14
15
|
import 'core-js/modules/es.array.includes.js';
|
|
15
16
|
import '../shortcuts/core.js';
|
|
@@ -32,7 +33,6 @@ import 'util-deprecate';
|
|
|
32
33
|
import '../icon/icon.js';
|
|
33
34
|
import '../icon/icon.constants.js';
|
|
34
35
|
import '../_helpers/icon-svg.js';
|
|
35
|
-
import 'react/compiler-runtime';
|
|
36
36
|
import '../global/memoize.js';
|
|
37
37
|
import '../global/controls-height.js';
|
|
38
38
|
import '../global/configuration.js';
|
|
@@ -6,6 +6,7 @@ import '../global/get-uid.js';
|
|
|
6
6
|
export { T as default } from '../_helpers/title.js';
|
|
7
7
|
import 'react/jsx-runtime';
|
|
8
8
|
import '../global/compose-refs.js';
|
|
9
|
+
import 'react/compiler-runtime';
|
|
9
10
|
import 'memoize-one';
|
|
10
11
|
import '@jetbrains/icons/checkmark-12px';
|
|
11
12
|
import '@jetbrains/icons/remove-12px';
|
|
@@ -13,7 +14,6 @@ import '../icon/icon.js';
|
|
|
13
14
|
import 'util-deprecate';
|
|
14
15
|
import '../icon/icon.constants.js';
|
|
15
16
|
import '../_helpers/icon-svg.js';
|
|
16
|
-
import 'react/compiler-runtime';
|
|
17
17
|
import '../global/memoize.js';
|
|
18
18
|
import '../control-help/control-help.js';
|
|
19
19
|
import '../global/data-tests.js';
|
|
@@ -93,6 +93,7 @@ class DateInput extends React.PureComponent {
|
|
|
93
93
|
locale
|
|
94
94
|
} = this.props;
|
|
95
95
|
const {
|
|
96
|
+
messages,
|
|
96
97
|
translate
|
|
97
98
|
} = this.context;
|
|
98
99
|
let displayText = '';
|
|
@@ -105,7 +106,7 @@ class DateInput extends React.PureComponent {
|
|
|
105
106
|
} else if (name === 'time') {
|
|
106
107
|
displayText = time || '';
|
|
107
108
|
}
|
|
108
|
-
const placeholder = ((_translations$addFirs, _translations$addSeco, _translations$addTime, _translations$
|
|
109
|
+
const placeholder = ((_translations$addFirs, _translations$addSeco, _translations$addTime, _ref, _ref2, _ref3, _translations$selectD) => {
|
|
109
110
|
switch (name) {
|
|
110
111
|
case 'from':
|
|
111
112
|
return fromPlaceholder || ((_translations$addFirs = translations?.addFirstDate) !== null && _translations$addFirs !== void 0 ? _translations$addFirs : translate('addFirstDate'));
|
|
@@ -114,7 +115,7 @@ class DateInput extends React.PureComponent {
|
|
|
114
115
|
case 'time':
|
|
115
116
|
return timePlaceholder || ((_translations$addTime = translations?.addTime) !== null && _translations$addTime !== void 0 ? _translations$addTime : translate('addTime'));
|
|
116
117
|
default:
|
|
117
|
-
return ((_translations$
|
|
118
|
+
return ((_ref = (_ref2 = (_ref3 = (_translations$selectD = translations?.selectDate) !== null && _translations$selectD !== void 0 ? _translations$selectD : translations?.selectName) !== null && _ref3 !== void 0 ? _ref3 : messages.selectDate) !== null && _ref2 !== void 0 ? _ref2 : messages.selectName) !== null && _ref !== void 0 ? _ref : translate('selectDate')).replace('%name%', name).replace('{{name}}', name);
|
|
118
119
|
}
|
|
119
120
|
})();
|
|
120
121
|
const classes = classNames(styles.filter, name !== 'time' && styles[`${name}Input`], divider && (name === 'from' || name === 'time') && styles[`${name}InputWithDivider`], 'ring-js-shortcuts');
|
|
@@ -47,9 +47,6 @@ import 'date-fns/addDays';
|
|
|
47
47
|
import 'date-fns/getDate';
|
|
48
48
|
import 'date-fns/isSameDay';
|
|
49
49
|
import 'date-fns/isToday';
|
|
50
|
-
import 'date-fns/add';
|
|
51
|
-
import '../global/sniffer.js';
|
|
52
|
-
import 'sniffr';
|
|
53
50
|
import '../global/intersection-observer-context.js';
|
|
54
51
|
import './scroll-arith.js';
|
|
55
52
|
import './use-scroll-behavior.js';
|
|
@@ -61,6 +58,9 @@ import 'date-fns/isThisYear';
|
|
|
61
58
|
import 'date-fns/setYear';
|
|
62
59
|
import 'date-fns/startOfYear';
|
|
63
60
|
import 'date-fns/setDay';
|
|
61
|
+
import 'date-fns/add';
|
|
62
|
+
import '../global/sniffer.js';
|
|
63
|
+
import 'sniffr';
|
|
64
64
|
import 'date-fns/isThisMonth';
|
|
65
65
|
import '../global/linear-function.js';
|
|
66
66
|
import './month-slider.js';
|