@jetbrains/ring-ui-built 8.0.0-beta.3 → 8.0.0-beta.4
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/heading.js +2 -2
- package/components/_helpers/table.js +1 -1
- package/components/_helpers/theme.js +1 -1
- package/components/alert/alert.js +1 -1
- package/components/auth/iframe-flow.js +1 -1
- package/components/checkbox/checkbox.d.ts +1 -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/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 +1 -1
- package/components/heading/heading.js +3 -3
- package/components/input/input.d.ts +1 -1
- package/components/internal/column-animation.js +133 -0
- package/components/internal/table-header.js +1109 -0
- package/components/{table/table-virtualize.js → internal/virtual-items.js} +108 -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/style.css +1 -1
- package/components/table/default-item-renderer.d.ts +23 -10
- package/components/table/default-item-renderer.js +104 -98
- package/components/table/internal/column-animation.d.ts +16 -0
- package/components/table/internal/table-header.d.ts +4 -0
- package/components/table/internal/virtual-items.d.ts +34 -0
- package/components/table/item-virtualization.d.ts +35 -0
- package/components/table/item-virtualization.js +71 -0
- package/components/table/table-const.d.ts +40 -6
- package/components/table/table-const.js +15 -6
- package/components/table/table-primitives.d.ts +9 -16
- package/components/table/table-primitives.js +11 -211
- package/components/table/table-props.d.ts +280 -0
- package/components/table/table-props.js +1 -0
- package/components/table/table.d.ts +205 -209
- package/components/table/table.js +356 -15
- package/components/tooltip/tooltip.js +1 -1
- package/components/user-agreement/service.js +6 -6
- package/components/util-stories.d.ts +26 -0
- package/package.json +2 -2
- 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
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var headingStyles = {"contentWithHeadings":"ring-heading-contentWithHeadings","heading":"ring-heading-heading ring-global-font ring-heading-contentWithHeadings","caps":"ring-heading-caps","bold":"ring-heading-bold"};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { headingStyles as h };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"table":"ring-table-
|
|
1
|
+
var styles = {"headerCell":"ring-table-headerCell","columnReorderHandleMirror":"ring-table-columnReorderHandleMirror","columnReorderHandle":"ring-table-columnReorderHandle","table":"ring-table-table","stickyHeader":"ring-table-stickyHeader","animatedColumnInitial":"ring-table-animatedColumnInitial","animatedColumnFadeOut":"ring-table-animatedColumnFadeOut","headerCellInnerWrapper":"ring-table-headerCellInnerWrapper","sortAndHeader":"ring-table-sortAndHeader","rightButtons":"ring-table-rightButtons","headerButton":"ring-table-headerButton","deleteColumnButton":"ring-table-deleteColumnButton","theadColumnEditing":"ring-table-theadColumnEditing","editColumnsButton":"ring-table-editColumnsButton","columnDragFrame":"ring-table-columnDragFrame","columnInsertionIndicator":"ring-table-columnInsertionIndicator","spacerRow":"ring-table-spacerRow","spacerCell":"ring-table-spacerCell","row":"ring-table-row","clickableRow":"ring-table-clickableRow","selectedRow":"ring-table-selectedRow","cell":"ring-table-cell"};
|
|
2
2
|
|
|
3
3
|
export { styles as s };
|
|
@@ -291,4 +291,4 @@ function ThemeProvider(t0) {
|
|
|
291
291
|
}
|
|
292
292
|
var Theme$1 = Theme;
|
|
293
293
|
|
|
294
|
-
export { GLOBAL_DARK_CLASS_NAME as G, Theme$1 as T, WithThemeClasses as W,
|
|
294
|
+
export { GLOBAL_DARK_CLASS_NAME as G, Theme$1 as T, WithThemeClasses as W, ThemeProvider as a, ThemeContext as b, applyTheme as c, darkStyles as d, useThemeClasses as e, useTheme as u };
|
|
@@ -9,7 +9,7 @@ import LoaderInline from '../loader-inline/loader-inline.js';
|
|
|
9
9
|
import { getRect } from '../global/dom.js';
|
|
10
10
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
11
11
|
import { Button } from '../button/button.js';
|
|
12
|
-
import { T as Theme,
|
|
12
|
+
import { T as Theme, a as ThemeProvider } from '../_helpers/theme.js';
|
|
13
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
14
|
export { default as Container } from './container.js';
|
|
15
15
|
import { Color } from '../icon/icon.constants.js';
|
|
@@ -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;
|
|
@@ -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
|
}
|
|
@@ -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';
|
|
@@ -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';
|
|
@@ -50,20 +50,20 @@ import '../global/get-event-key.js';
|
|
|
50
50
|
import '../list/list-title.js';
|
|
51
51
|
import '../list/list-separator.js';
|
|
52
52
|
import '../list/list-hint.js';
|
|
53
|
-
import '../button/button.js';
|
|
54
|
-
import '@jetbrains/icons/chevron-down';
|
|
55
|
-
import '@jetbrains/icons/chevron-12px-down';
|
|
56
|
-
import '../global/controls-height.js';
|
|
57
|
-
import '../global/configuration.js';
|
|
58
|
-
import '../_helpers/button.classes.js';
|
|
59
53
|
import '../popup/popup.js';
|
|
60
54
|
import 'react-dom';
|
|
61
55
|
import '../tab-trap/tab-trap.js';
|
|
56
|
+
import '../global/configuration.js';
|
|
62
57
|
import '../popup/position.js';
|
|
63
58
|
import '../popup/popup.consts.js';
|
|
64
59
|
import '../popup/popup.target.js';
|
|
65
60
|
import '../popup/position-css.js';
|
|
66
61
|
import '../_helpers/theme.js';
|
|
62
|
+
import '../button/button.js';
|
|
63
|
+
import '@jetbrains/icons/chevron-down';
|
|
64
|
+
import '@jetbrains/icons/chevron-12px-down';
|
|
65
|
+
import '../global/controls-height.js';
|
|
66
|
+
import '../_helpers/button.classes.js';
|
|
67
67
|
|
|
68
68
|
const defaultAriaLabel = 'Dropdown menu';
|
|
69
69
|
function DropdownAnchorWrapper(t0) {
|