@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
|
@@ -1,26 +1,374 @@
|
|
|
1
|
-
import
|
|
2
|
-
import 'react
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
|
+
import { useRef, Fragment } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useVirtualItems, SpacerRow, VirtualizationContext } from '../internal/virtualization.js';
|
|
5
|
+
import { DefaultItemRenderer } from './default-item-renderer.js';
|
|
6
|
+
import { TablePropsContext, defaultRowHeight } from './table-const.js';
|
|
7
|
+
import { focusWithTemporaryTabIndex } from '../global/focus-with-temporary-tabindex.js';
|
|
8
|
+
import { useReorderAnimationContextValue, ReorderAnimationContext } from '../internal/reorder-animation-context.js';
|
|
9
|
+
import { useComposedRef } from '../global/compose-refs.js';
|
|
10
|
+
import { TableHeader } from '../internal/table-header.js';
|
|
11
|
+
import { keyboardFocusableAttrName } from './table-primitives.js';
|
|
12
|
+
import { isWithinNavigableElement } from '../global/is-within-navigable-element.js';
|
|
13
|
+
import { useReorderLayoutContextValue, ReorderLayoutContext } from '../internal/reorder-layout-context.js';
|
|
14
|
+
import { s as styles } from '../_helpers/table.js';
|
|
15
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
16
|
import '../global/intersection-observer-context.js';
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
import '
|
|
12
|
-
import '
|
|
13
|
-
import '@jetbrains/icons/unsorted-12px';
|
|
14
|
-
import '@jetbrains/icons/arrow-12px-down';
|
|
15
|
-
import '@jetbrains/icons/arrow-12px-up';
|
|
16
|
-
import '@jetbrains/icons/trash-12px';
|
|
17
|
+
import '../global/schedule-with-cleanup.js';
|
|
18
|
+
import './item-virtualization.js';
|
|
19
|
+
import './reorder-item-layout.js';
|
|
20
|
+
import 'memoize-one';
|
|
21
|
+
import '../internal/reorder-handle.js';
|
|
22
|
+
import '@jetbrains/icons/drag-12px';
|
|
17
23
|
import '../icon/icon.js';
|
|
18
24
|
import 'util-deprecate';
|
|
19
25
|
import '../icon/icon.constants.js';
|
|
20
26
|
import '../_helpers/icon-svg.js';
|
|
21
27
|
import '../global/memoize.js';
|
|
22
|
-
import '
|
|
23
|
-
|
|
28
|
+
import '../global/parse-css-duration.js';
|
|
29
|
+
import '@jetbrains/icons/arrow-12px-down';
|
|
30
|
+
import '@jetbrains/icons/arrow-12px-up';
|
|
31
|
+
import '@jetbrains/icons/settings-12px';
|
|
32
|
+
import '@jetbrains/icons/trash-12px';
|
|
33
|
+
import '@jetbrains/icons/unsorted-12px';
|
|
34
|
+
import '../global/is-within-interactive-element.js';
|
|
24
35
|
|
|
36
|
+
function Table(props) {
|
|
37
|
+
const $ = c(68);
|
|
38
|
+
if ($[0] !== "0b2671256cf6184450b7f5a987c20b706c8cb7e8a0bf848df36efecc0eb647dc") {
|
|
39
|
+
for (let $i = 0; $i < 68; $i += 1) {
|
|
40
|
+
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
41
|
+
}
|
|
42
|
+
$[0] = "0b2671256cf6184450b7f5a987c20b706c8cb7e8a0bf848df36efecc0eb647dc";
|
|
43
|
+
}
|
|
44
|
+
let className;
|
|
45
|
+
let columns;
|
|
46
|
+
let data;
|
|
47
|
+
let getKey;
|
|
48
|
+
let noColumnReorderAnimation;
|
|
49
|
+
let noItemReorderAnimation;
|
|
50
|
+
let renderItem;
|
|
51
|
+
let restProps;
|
|
52
|
+
let scrollerRef;
|
|
53
|
+
let t0;
|
|
54
|
+
let t1;
|
|
55
|
+
let t2;
|
|
56
|
+
let t3;
|
|
57
|
+
let t4;
|
|
58
|
+
let tbodyClassName;
|
|
59
|
+
let userRef;
|
|
60
|
+
if ($[1] !== props) {
|
|
61
|
+
const {
|
|
62
|
+
data: t5,
|
|
63
|
+
columns: t6,
|
|
64
|
+
getKey: t7,
|
|
65
|
+
noHeader,
|
|
66
|
+
stickyHeader,
|
|
67
|
+
onSort,
|
|
68
|
+
onColumnDelete,
|
|
69
|
+
onColumnReorder,
|
|
70
|
+
noColumnReorderAnimation: t8,
|
|
71
|
+
canReorderItem,
|
|
72
|
+
onItemReorder,
|
|
73
|
+
noItemReorderAnimation: t9,
|
|
74
|
+
renderItem: t10,
|
|
75
|
+
virtualizeRows: t11,
|
|
76
|
+
scrollerRef: t12,
|
|
77
|
+
estimateHeight: t13,
|
|
78
|
+
lookaheadPx: t14,
|
|
79
|
+
retentionMarginPx: t15,
|
|
80
|
+
minScrollAndResizeDeltaPx: t16,
|
|
81
|
+
columnEditing,
|
|
82
|
+
onColumnEditingRequest,
|
|
83
|
+
columnEditButton,
|
|
84
|
+
theadClassName,
|
|
85
|
+
theadTrClassName,
|
|
86
|
+
tbodyClassName: t17,
|
|
87
|
+
ref: t18,
|
|
88
|
+
className: t19,
|
|
89
|
+
...t20
|
|
90
|
+
} = props;
|
|
91
|
+
data = t5;
|
|
92
|
+
columns = t6;
|
|
93
|
+
getKey = t7;
|
|
94
|
+
noColumnReorderAnimation = t8;
|
|
95
|
+
noItemReorderAnimation = t9;
|
|
96
|
+
renderItem = t10;
|
|
97
|
+
t0 = t11;
|
|
98
|
+
scrollerRef = t12;
|
|
99
|
+
t1 = t13;
|
|
100
|
+
t2 = t14;
|
|
101
|
+
t3 = t15;
|
|
102
|
+
t4 = t16;
|
|
103
|
+
tbodyClassName = t17;
|
|
104
|
+
userRef = t18;
|
|
105
|
+
className = t19;
|
|
106
|
+
restProps = t20;
|
|
107
|
+
$[1] = props;
|
|
108
|
+
$[2] = className;
|
|
109
|
+
$[3] = columns;
|
|
110
|
+
$[4] = data;
|
|
111
|
+
$[5] = getKey;
|
|
112
|
+
$[6] = noColumnReorderAnimation;
|
|
113
|
+
$[7] = noItemReorderAnimation;
|
|
114
|
+
$[8] = renderItem;
|
|
115
|
+
$[9] = restProps;
|
|
116
|
+
$[10] = scrollerRef;
|
|
117
|
+
$[11] = t0;
|
|
118
|
+
$[12] = t1;
|
|
119
|
+
$[13] = t2;
|
|
120
|
+
$[14] = t3;
|
|
121
|
+
$[15] = t4;
|
|
122
|
+
$[16] = tbodyClassName;
|
|
123
|
+
$[17] = userRef;
|
|
124
|
+
} else {
|
|
125
|
+
className = $[2];
|
|
126
|
+
columns = $[3];
|
|
127
|
+
data = $[4];
|
|
128
|
+
getKey = $[5];
|
|
129
|
+
noColumnReorderAnimation = $[6];
|
|
130
|
+
noItemReorderAnimation = $[7];
|
|
131
|
+
renderItem = $[8];
|
|
132
|
+
restProps = $[9];
|
|
133
|
+
scrollerRef = $[10];
|
|
134
|
+
t0 = $[11];
|
|
135
|
+
t1 = $[12];
|
|
136
|
+
t2 = $[13];
|
|
137
|
+
t3 = $[14];
|
|
138
|
+
t4 = $[15];
|
|
139
|
+
tbodyClassName = $[16];
|
|
140
|
+
userRef = $[17];
|
|
141
|
+
}
|
|
142
|
+
const virtualizeRows = t0 === undefined ? false : t0;
|
|
143
|
+
const estimateHeight = t1 === undefined ? _temp : t1;
|
|
144
|
+
const lookaheadPx = t2 === undefined ? 400 : t2;
|
|
145
|
+
const retentionMarginPx = t3 === undefined ? 450 : t3;
|
|
146
|
+
const minScrollAndResizeDeltaPx = t4 === undefined ? 50 : t4;
|
|
147
|
+
const localRef = useRef(null);
|
|
148
|
+
let t5;
|
|
149
|
+
if ($[18] !== columns || $[19] !== data || $[20] !== noColumnReorderAnimation || $[21] !== noItemReorderAnimation) {
|
|
150
|
+
t5 = {
|
|
151
|
+
noColumnReorderAnimation,
|
|
152
|
+
noItemReorderAnimation,
|
|
153
|
+
tableRef: localRef,
|
|
154
|
+
data,
|
|
155
|
+
columns
|
|
156
|
+
};
|
|
157
|
+
$[18] = columns;
|
|
158
|
+
$[19] = data;
|
|
159
|
+
$[20] = noColumnReorderAnimation;
|
|
160
|
+
$[21] = noItemReorderAnimation;
|
|
161
|
+
$[22] = t5;
|
|
162
|
+
} else {
|
|
163
|
+
t5 = $[22];
|
|
164
|
+
}
|
|
165
|
+
const reorderAnimationContextValue = useReorderAnimationContextValue(t5);
|
|
166
|
+
let t6;
|
|
167
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
168
|
+
t6 = function handleRowNavigation(e) {
|
|
169
|
+
if (e.defaultPrevented || isWithinNavigableElement(e.target)) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
const arrowUp = e.key === "ArrowUp";
|
|
173
|
+
const arrowDown = e.key === "ArrowDown";
|
|
174
|
+
if (!arrowUp && !arrowDown) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const currentRow = e.target.closest("tr");
|
|
178
|
+
if (currentRow?.parentElement?.parentElement !== localRef.current) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
let candidate = currentRow;
|
|
182
|
+
while (candidate) {
|
|
183
|
+
candidate = arrowUp ? candidate.previousElementSibling : candidate.nextElementSibling;
|
|
184
|
+
if (candidate?.hasAttribute(keyboardFocusableAttrName)) {
|
|
185
|
+
focusWithTemporaryTabIndex(candidate);
|
|
186
|
+
e.preventDefault();
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
$[23] = t6;
|
|
192
|
+
} else {
|
|
193
|
+
t6 = $[23];
|
|
194
|
+
}
|
|
195
|
+
const handleRowNavigation = t6;
|
|
196
|
+
let t7;
|
|
197
|
+
if ($[24] !== data || $[25] !== estimateHeight || $[26] !== lookaheadPx || $[27] !== minScrollAndResizeDeltaPx || $[28] !== retentionMarginPx || $[29] !== scrollerRef || $[30] !== virtualizeRows) {
|
|
198
|
+
t7 = {
|
|
199
|
+
enabled: virtualizeRows,
|
|
200
|
+
data,
|
|
201
|
+
scrollerRef,
|
|
202
|
+
tableRef: localRef,
|
|
203
|
+
estimateHeight,
|
|
204
|
+
lookaheadPx,
|
|
205
|
+
retentionMarginPx,
|
|
206
|
+
minScrollAndResizeDeltaPx
|
|
207
|
+
};
|
|
208
|
+
$[24] = data;
|
|
209
|
+
$[25] = estimateHeight;
|
|
210
|
+
$[26] = lookaheadPx;
|
|
211
|
+
$[27] = minScrollAndResizeDeltaPx;
|
|
212
|
+
$[28] = retentionMarginPx;
|
|
213
|
+
$[29] = scrollerRef;
|
|
214
|
+
$[30] = virtualizeRows;
|
|
215
|
+
$[31] = t7;
|
|
216
|
+
} else {
|
|
217
|
+
t7 = $[31];
|
|
218
|
+
}
|
|
219
|
+
const {
|
|
220
|
+
virtualItems,
|
|
221
|
+
virtualizationContextValue
|
|
222
|
+
} = useVirtualItems(t7);
|
|
223
|
+
const itemReorderLayoutContextValue = useReorderLayoutContextValue();
|
|
224
|
+
let t8;
|
|
225
|
+
if ($[32] !== className) {
|
|
226
|
+
t8 = classNames(styles.table, className);
|
|
227
|
+
$[32] = className;
|
|
228
|
+
$[33] = t8;
|
|
229
|
+
} else {
|
|
230
|
+
t8 = $[33];
|
|
231
|
+
}
|
|
232
|
+
const t9 = useComposedRef(userRef, localRef);
|
|
233
|
+
let t10;
|
|
234
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
235
|
+
t10 = /*#__PURE__*/jsx(TableHeader, {});
|
|
236
|
+
$[34] = t10;
|
|
237
|
+
} else {
|
|
238
|
+
t10 = $[34];
|
|
239
|
+
}
|
|
240
|
+
const t11 = virtualizeRows ? virtualItems : data;
|
|
241
|
+
let t12;
|
|
242
|
+
if ($[35] !== columns || $[36] !== data || $[37] !== getKey || $[38] !== renderItem || $[39] !== t11 || $[40] !== virtualizeRows) {
|
|
243
|
+
let t13;
|
|
244
|
+
if ($[42] !== columns || $[43] !== data || $[44] !== getKey || $[45] !== renderItem || $[46] !== virtualizeRows) {
|
|
245
|
+
t13 = (item, index) => {
|
|
246
|
+
let dataItem;
|
|
247
|
+
let dataItemIndex;
|
|
248
|
+
if (virtualizeRows) {
|
|
249
|
+
const virtualItem = item;
|
|
250
|
+
if (virtualItem.type === "spacer") {
|
|
251
|
+
return /*#__PURE__*/jsx(SpacerRow, {
|
|
252
|
+
spacer: virtualItem,
|
|
253
|
+
colSpan: columns.length
|
|
254
|
+
}, virtualItem.key);
|
|
255
|
+
}
|
|
256
|
+
dataItemIndex = virtualItem.index;
|
|
257
|
+
if (dataItemIndex < 0 || dataItemIndex >= data.length) {
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
dataItem = data[dataItemIndex];
|
|
261
|
+
} else {
|
|
262
|
+
dataItem = item;
|
|
263
|
+
dataItemIndex = index;
|
|
264
|
+
}
|
|
265
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
266
|
+
children: renderItem ? renderItem(dataItem, dataItemIndex, data) : /*#__PURE__*/jsx(DefaultItemRenderer, {
|
|
267
|
+
index: dataItemIndex
|
|
268
|
+
})
|
|
269
|
+
}, getKey(dataItem, dataItemIndex, data));
|
|
270
|
+
};
|
|
271
|
+
$[42] = columns;
|
|
272
|
+
$[43] = data;
|
|
273
|
+
$[44] = getKey;
|
|
274
|
+
$[45] = renderItem;
|
|
275
|
+
$[46] = virtualizeRows;
|
|
276
|
+
$[47] = t13;
|
|
277
|
+
} else {
|
|
278
|
+
t13 = $[47];
|
|
279
|
+
}
|
|
280
|
+
t12 = t11.map(t13);
|
|
281
|
+
$[35] = columns;
|
|
282
|
+
$[36] = data;
|
|
283
|
+
$[37] = getKey;
|
|
284
|
+
$[38] = renderItem;
|
|
285
|
+
$[39] = t11;
|
|
286
|
+
$[40] = virtualizeRows;
|
|
287
|
+
$[41] = t12;
|
|
288
|
+
} else {
|
|
289
|
+
t12 = $[41];
|
|
290
|
+
}
|
|
291
|
+
let t13;
|
|
292
|
+
if ($[48] !== itemReorderLayoutContextValue || $[49] !== t12) {
|
|
293
|
+
t13 = /*#__PURE__*/jsx(ReorderLayoutContext, {
|
|
294
|
+
value: itemReorderLayoutContextValue,
|
|
295
|
+
children: t12
|
|
296
|
+
});
|
|
297
|
+
$[48] = itemReorderLayoutContextValue;
|
|
298
|
+
$[49] = t12;
|
|
299
|
+
$[50] = t13;
|
|
300
|
+
} else {
|
|
301
|
+
t13 = $[50];
|
|
302
|
+
}
|
|
303
|
+
let t14;
|
|
304
|
+
if ($[51] !== t13 || $[52] !== virtualizationContextValue) {
|
|
305
|
+
t14 = /*#__PURE__*/jsx(VirtualizationContext, {
|
|
306
|
+
value: virtualizationContextValue,
|
|
307
|
+
children: t13
|
|
308
|
+
});
|
|
309
|
+
$[51] = t13;
|
|
310
|
+
$[52] = virtualizationContextValue;
|
|
311
|
+
$[53] = t14;
|
|
312
|
+
} else {
|
|
313
|
+
t14 = $[53];
|
|
314
|
+
}
|
|
315
|
+
let t15;
|
|
316
|
+
if ($[54] !== t14 || $[55] !== tbodyClassName) {
|
|
317
|
+
t15 = /*#__PURE__*/jsx("tbody", {
|
|
318
|
+
className: tbodyClassName,
|
|
319
|
+
onKeyDown: handleRowNavigation,
|
|
320
|
+
children: t14
|
|
321
|
+
});
|
|
322
|
+
$[54] = t14;
|
|
323
|
+
$[55] = tbodyClassName;
|
|
324
|
+
$[56] = t15;
|
|
325
|
+
} else {
|
|
326
|
+
t15 = $[56];
|
|
327
|
+
}
|
|
328
|
+
let t16;
|
|
329
|
+
if ($[57] !== restProps || $[58] !== t15 || $[59] !== t8 || $[60] !== t9) {
|
|
330
|
+
t16 = /*#__PURE__*/jsxs("table", {
|
|
331
|
+
className: t8,
|
|
332
|
+
ref: t9,
|
|
333
|
+
...restProps,
|
|
334
|
+
children: [t10, t15]
|
|
335
|
+
});
|
|
336
|
+
$[57] = restProps;
|
|
337
|
+
$[58] = t15;
|
|
338
|
+
$[59] = t8;
|
|
339
|
+
$[60] = t9;
|
|
340
|
+
$[61] = t16;
|
|
341
|
+
} else {
|
|
342
|
+
t16 = $[61];
|
|
343
|
+
}
|
|
344
|
+
let t17;
|
|
345
|
+
if ($[62] !== reorderAnimationContextValue || $[63] !== t16) {
|
|
346
|
+
t17 = /*#__PURE__*/jsx(ReorderAnimationContext, {
|
|
347
|
+
value: reorderAnimationContextValue,
|
|
348
|
+
children: t16
|
|
349
|
+
});
|
|
350
|
+
$[62] = reorderAnimationContextValue;
|
|
351
|
+
$[63] = t16;
|
|
352
|
+
$[64] = t17;
|
|
353
|
+
} else {
|
|
354
|
+
t17 = $[64];
|
|
355
|
+
}
|
|
356
|
+
let t18;
|
|
357
|
+
if ($[65] !== props || $[66] !== t17) {
|
|
358
|
+
t18 = /*#__PURE__*/jsx(TablePropsContext, {
|
|
359
|
+
value: props,
|
|
360
|
+
children: t17
|
|
361
|
+
});
|
|
362
|
+
$[65] = props;
|
|
363
|
+
$[66] = t17;
|
|
364
|
+
$[67] = t18;
|
|
365
|
+
} else {
|
|
366
|
+
t18 = $[67];
|
|
367
|
+
}
|
|
368
|
+
return t18;
|
|
369
|
+
}
|
|
370
|
+
function _temp() {
|
|
371
|
+
return defaultRowHeight;
|
|
372
|
+
}
|
|
25
373
|
|
|
26
374
|
export { Table as default };
|
|
@@ -4,7 +4,7 @@ import Popup from '../popup/popup.js';
|
|
|
4
4
|
import { Listeners } from '../global/dom.js';
|
|
5
5
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
6
6
|
import scheduleRAF from '../global/schedule-raf.js';
|
|
7
|
-
import { T as Theme,
|
|
7
|
+
import { T as Theme, a as ThemeProvider } from '../_helpers/theme.js';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
import 'react-dom';
|
|
10
10
|
import '../global/get-uid.js';
|
|
@@ -8,16 +8,12 @@ import { ControlsHeightContext, getGlobalControlsHeight } from '../global/contro
|
|
|
8
8
|
import UserAgreement from './user-agreement.js';
|
|
9
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
10
|
import '../global/get-uid.js';
|
|
11
|
-
import '../alert/container.js';
|
|
12
11
|
import 'react';
|
|
13
|
-
import 'react-dom';
|
|
14
12
|
import 'classnames';
|
|
15
|
-
import '../global/data-tests.js';
|
|
16
|
-
import '../link/clickable-link.js';
|
|
17
|
-
import '../_helpers/link.js';
|
|
18
13
|
import '@jetbrains/icons/exception';
|
|
19
|
-
import '@jetbrains/icons/
|
|
14
|
+
import '@jetbrains/icons/success';
|
|
20
15
|
import '@jetbrains/icons/warning';
|
|
16
|
+
import '@jetbrains/icons/info-filled';
|
|
21
17
|
import '@jetbrains/icons/close';
|
|
22
18
|
import '../icon/icon.js';
|
|
23
19
|
import 'util-deprecate';
|
|
@@ -26,13 +22,23 @@ import '../_helpers/icon-svg.js';
|
|
|
26
22
|
import 'react/compiler-runtime';
|
|
27
23
|
import '../global/memoize.js';
|
|
28
24
|
import '../loader-inline/loader-inline.js';
|
|
25
|
+
import '../global/data-tests.js';
|
|
29
26
|
import '../global/dom.js';
|
|
30
27
|
import '../button/button.js';
|
|
31
28
|
import '@jetbrains/icons/chevron-down';
|
|
32
29
|
import '@jetbrains/icons/chevron-12px-down';
|
|
30
|
+
import '../link/clickable-link.js';
|
|
33
31
|
import '../_helpers/button.classes.js';
|
|
34
|
-
import '../_helpers/theme.js';
|
|
35
32
|
import '../global/configuration.js';
|
|
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';
|
|
39
|
+
import '../alert/container.js';
|
|
40
|
+
import 'react-dom';
|
|
41
|
+
import '../_helpers/link.js';
|
|
36
42
|
import '../dialog/dialog.js';
|
|
37
43
|
import '../island/island.js';
|
|
38
44
|
import '../island/adaptive-island-hoc.js';
|
|
@@ -28,8 +28,9 @@ import '../alert-service/alert-service.js';
|
|
|
28
28
|
import 'react-dom/client';
|
|
29
29
|
import '../alert/alert.js';
|
|
30
30
|
import '@jetbrains/icons/exception';
|
|
31
|
-
import '@jetbrains/icons/
|
|
31
|
+
import '@jetbrains/icons/success';
|
|
32
32
|
import '@jetbrains/icons/warning';
|
|
33
|
+
import '@jetbrains/icons/info-filled';
|
|
33
34
|
import '@jetbrains/icons/close';
|
|
34
35
|
import '../loader-inline/loader-inline.js';
|
|
35
36
|
import '../button/button.js';
|
|
@@ -40,6 +41,11 @@ import '../global/configuration.js';
|
|
|
40
41
|
import '../_helpers/button.classes.js';
|
|
41
42
|
import '../_helpers/icon-svg.js';
|
|
42
43
|
import '../_helpers/theme.js';
|
|
44
|
+
import '../alert/alert-heading.js';
|
|
45
|
+
import '../heading/heading.js';
|
|
46
|
+
import '../_helpers/heading.js';
|
|
47
|
+
import '../_helpers/alert.js';
|
|
48
|
+
import '../alert/alert-actions.js';
|
|
43
49
|
import '../alert/container.js';
|
|
44
50
|
import 'react-dom';
|
|
45
51
|
import '../clipboard/clipboard-fallback.js';
|
|
@@ -10,6 +10,6 @@ export default class SmartUserCardTooltip extends Component<SmartUserCardTooltip
|
|
|
10
10
|
loading: boolean;
|
|
11
11
|
};
|
|
12
12
|
loadUser: () => Promise<void>;
|
|
13
|
-
renderNoUser: () =>
|
|
13
|
+
renderNoUser: () => import("react").JSX.Element | "";
|
|
14
14
|
render(): import("react").JSX.Element;
|
|
15
15
|
}
|
|
@@ -51,9 +51,15 @@ import '../alert-service/alert-service.js';
|
|
|
51
51
|
import 'react-dom/client';
|
|
52
52
|
import '../alert/alert.js';
|
|
53
53
|
import '@jetbrains/icons/exception';
|
|
54
|
-
import '@jetbrains/icons/
|
|
54
|
+
import '@jetbrains/icons/success';
|
|
55
55
|
import '@jetbrains/icons/warning';
|
|
56
|
+
import '@jetbrains/icons/info-filled';
|
|
56
57
|
import '@jetbrains/icons/close';
|
|
58
|
+
import '../alert/alert-heading.js';
|
|
59
|
+
import '../heading/heading.js';
|
|
60
|
+
import '../_helpers/heading.js';
|
|
61
|
+
import '../_helpers/alert.js';
|
|
62
|
+
import '../alert/alert-actions.js';
|
|
57
63
|
import '../alert/container.js';
|
|
58
64
|
import '../clipboard/clipboard-fallback.js';
|
|
59
65
|
import '../tag/tag.js';
|
|
@@ -49,10 +49,16 @@ import '../alert-service/alert-service.js';
|
|
|
49
49
|
import 'react-dom/client';
|
|
50
50
|
import '../alert/alert.js';
|
|
51
51
|
import '@jetbrains/icons/exception';
|
|
52
|
-
import '@jetbrains/icons/
|
|
52
|
+
import '@jetbrains/icons/success';
|
|
53
53
|
import '@jetbrains/icons/warning';
|
|
54
|
+
import '@jetbrains/icons/info-filled';
|
|
54
55
|
import '@jetbrains/icons/close';
|
|
55
56
|
import '../loader-inline/loader-inline.js';
|
|
57
|
+
import '../alert/alert-heading.js';
|
|
58
|
+
import '../heading/heading.js';
|
|
59
|
+
import '../_helpers/heading.js';
|
|
60
|
+
import '../_helpers/alert.js';
|
|
61
|
+
import '../alert/alert-actions.js';
|
|
56
62
|
import '../alert/container.js';
|
|
57
63
|
import '../clipboard/clipboard-fallback.js';
|
|
58
64
|
import '../tag/tag.js';
|
|
@@ -25,8 +25,9 @@ import '../alert-service/alert-service.js';
|
|
|
25
25
|
import 'react-dom/client';
|
|
26
26
|
import '../alert/alert.js';
|
|
27
27
|
import '@jetbrains/icons/exception';
|
|
28
|
-
import '@jetbrains/icons/
|
|
28
|
+
import '@jetbrains/icons/success';
|
|
29
29
|
import '@jetbrains/icons/warning';
|
|
30
|
+
import '@jetbrains/icons/info-filled';
|
|
30
31
|
import '@jetbrains/icons/close';
|
|
31
32
|
import '../icon/icon.js';
|
|
32
33
|
import '../icon/icon.constants.js';
|
|
@@ -39,6 +40,11 @@ import '../global/controls-height.js';
|
|
|
39
40
|
import '../global/configuration.js';
|
|
40
41
|
import '../_helpers/button.classes.js';
|
|
41
42
|
import '../_helpers/theme.js';
|
|
43
|
+
import '../alert/alert-heading.js';
|
|
44
|
+
import '../heading/heading.js';
|
|
45
|
+
import '../_helpers/heading.js';
|
|
46
|
+
import '../_helpers/alert.js';
|
|
47
|
+
import '../alert/alert-actions.js';
|
|
42
48
|
import '../alert/container.js';
|
|
43
49
|
import 'react-dom';
|
|
44
50
|
import '../clipboard/clipboard-fallback.js';
|
|
@@ -1 +1,27 @@
|
|
|
1
1
|
export declare const hideAddonsPanelParam = "hideAddonsPanel";
|
|
2
|
+
export declare function createRandom(seed: bigint): {
|
|
3
|
+
/**
|
|
4
|
+
* Fractional in [0, 1)
|
|
5
|
+
*/
|
|
6
|
+
(): number;
|
|
7
|
+
/**
|
|
8
|
+
* Integer in [0, to)
|
|
9
|
+
*/
|
|
10
|
+
(to: number): number;
|
|
11
|
+
/**
|
|
12
|
+
* Integer in [from, to)
|
|
13
|
+
*/
|
|
14
|
+
(from: number, to: number): number;
|
|
15
|
+
/**
|
|
16
|
+
* Date in [from, to)
|
|
17
|
+
*/
|
|
18
|
+
(from: Date, to: Date): Date;
|
|
19
|
+
/**
|
|
20
|
+
* Up to random n items (in random order) from the array
|
|
21
|
+
*/
|
|
22
|
+
<T>(array: readonly T[], n: number): T[];
|
|
23
|
+
/**
|
|
24
|
+
* Random item from the array
|
|
25
|
+
*/
|
|
26
|
+
<T>(array: readonly T[]): T;
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui-built",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.5",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
114
|
"dependencies": {
|
|
115
|
-
"@jetbrains/icons": "^5.
|
|
115
|
+
"@jetbrains/icons": "^5.23.0",
|
|
116
116
|
"change-case": "^4.1.1",
|
|
117
117
|
"classnames": "^2.5.1",
|
|
118
118
|
"combokeys": "^3.0.1",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"dequal": "^2.0.3",
|
|
121
121
|
"element-resize-detector": "^1.2.4",
|
|
122
122
|
"fastdom": "^1.0.12",
|
|
123
|
-
"focus-trap": "^8.2.
|
|
123
|
+
"focus-trap": "^8.2.2",
|
|
124
124
|
"highlight.js": "^10.7.2",
|
|
125
125
|
"just-debounce-it": "^3.2.0",
|
|
126
126
|
"memoize-one": "^6.0.0",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type RefObject } from 'react';
|
|
2
|
-
export declare function useIntersectionObserver(containerRef: RefObject<HTMLElement | null>, scrollMargin?: number): IntersectionObserverHandle | null;
|
|
3
|
-
export interface IntersectionObserverHandle {
|
|
4
|
-
observeVisibility(element: Element, setVisible: (isVisible: boolean) => void): () => void;
|
|
5
|
-
}
|
|
6
|
-
export declare function useVisibility(handle: IntersectionObserverHandle | null, elementRef: RefObject<Element | null>): boolean;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
3
|
-
|
|
4
|
-
function useIntersectionObserver(containerRef, t0) {
|
|
5
|
-
const $ = c(5);
|
|
6
|
-
if ($[0] !== "85eea0b6bda17bfb5987776c879da3db3d1a41e1157672102d3b021b57efb05a") {
|
|
7
|
-
for (let $i = 0; $i < 5; $i += 1) {
|
|
8
|
-
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
9
|
-
}
|
|
10
|
-
$[0] = "85eea0b6bda17bfb5987776c879da3db3d1a41e1157672102d3b021b57efb05a";
|
|
11
|
-
}
|
|
12
|
-
const scrollMargin = t0 === undefined ? 0 : t0;
|
|
13
|
-
const [handle, setHandle] = useState(null);
|
|
14
|
-
let t1;
|
|
15
|
-
let t2;
|
|
16
|
-
if ($[1] !== containerRef || $[2] !== scrollMargin) {
|
|
17
|
-
t1 = () => {
|
|
18
|
-
const container = containerRef.current;
|
|
19
|
-
if (!container) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const elementToSetVisible = new Map();
|
|
23
|
-
const observer = new IntersectionObserver(entries => {
|
|
24
|
-
for (const entry of entries) {
|
|
25
|
-
const setVisible = elementToSetVisible.get(entry.target);
|
|
26
|
-
setVisible?.(entry.isIntersecting);
|
|
27
|
-
}
|
|
28
|
-
}, {
|
|
29
|
-
root: container,
|
|
30
|
-
...(scrollMargin ? {
|
|
31
|
-
scrollMargin: `${scrollMargin}px`
|
|
32
|
-
} : {})
|
|
33
|
-
});
|
|
34
|
-
setHandle({
|
|
35
|
-
observeVisibility(element, setVisible_0) {
|
|
36
|
-
elementToSetVisible.set(element, setVisible_0);
|
|
37
|
-
observer.observe(element);
|
|
38
|
-
return () => {
|
|
39
|
-
elementToSetVisible.delete(element);
|
|
40
|
-
observer.unobserve(element);
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
return () => {
|
|
45
|
-
observer.disconnect();
|
|
46
|
-
setHandle(null);
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
t2 = [containerRef, scrollMargin];
|
|
50
|
-
$[1] = containerRef;
|
|
51
|
-
$[2] = scrollMargin;
|
|
52
|
-
$[3] = t1;
|
|
53
|
-
$[4] = t2;
|
|
54
|
-
} else {
|
|
55
|
-
t1 = $[3];
|
|
56
|
-
t2 = $[4];
|
|
57
|
-
}
|
|
58
|
-
useEffect(t1, t2);
|
|
59
|
-
return handle;
|
|
60
|
-
}
|
|
61
|
-
function useVisibility(handle, elementRef) {
|
|
62
|
-
const $ = c(5);
|
|
63
|
-
if ($[0] !== "85eea0b6bda17bfb5987776c879da3db3d1a41e1157672102d3b021b57efb05a") {
|
|
64
|
-
for (let $i = 0; $i < 5; $i += 1) {
|
|
65
|
-
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
66
|
-
}
|
|
67
|
-
$[0] = "85eea0b6bda17bfb5987776c879da3db3d1a41e1157672102d3b021b57efb05a";
|
|
68
|
-
}
|
|
69
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
70
|
-
let t0;
|
|
71
|
-
let t1;
|
|
72
|
-
if ($[1] !== elementRef || $[2] !== handle) {
|
|
73
|
-
t0 = () => {
|
|
74
|
-
const element = elementRef.current;
|
|
75
|
-
if (!element || !handle) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
return handle.observeVisibility(element, setIsVisible);
|
|
79
|
-
};
|
|
80
|
-
t1 = [handle, elementRef, setIsVisible];
|
|
81
|
-
$[1] = elementRef;
|
|
82
|
-
$[2] = handle;
|
|
83
|
-
$[3] = t0;
|
|
84
|
-
$[4] = t1;
|
|
85
|
-
} else {
|
|
86
|
-
t0 = $[3];
|
|
87
|
-
t1 = $[4];
|
|
88
|
-
}
|
|
89
|
-
useEffect(t0, t1);
|
|
90
|
-
return isVisible;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { useIntersectionObserver, useVisibility };
|