@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,17 +1,29 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import { useRef, useState, useEffect } from 'react';
|
|
2
|
+
import { createContext, useRef, useState, useEffect } from 'react';
|
|
3
3
|
import { useIntersectionObserverHandle } from '../global/intersection-observer-context.js';
|
|
4
|
+
import { setTimeoutWithCleanup } from '../global/schedule-with-cleanup.js';
|
|
4
5
|
import { s as styles } from '../_helpers/table.js';
|
|
5
6
|
import { jsx } from 'react/jsx-runtime';
|
|
6
7
|
|
|
8
|
+
const VirtualizationContext = /*#__PURE__*/createContext({
|
|
9
|
+
intersectionObserverHandle: {
|
|
10
|
+
observe: () => () => {}
|
|
11
|
+
},
|
|
12
|
+
collapseItemIntoSpacer: () => {}
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* RAF is somewhat too frequent. Most updates happen on virtualization boundaries
|
|
16
|
+
* within the invisible overscroll area, so they don't require such a high update rate.
|
|
17
|
+
* Therefore, we throttle with a custom delay.
|
|
18
|
+
*/
|
|
7
19
|
const virtualizationThrottleDelay = 50;
|
|
8
|
-
function
|
|
9
|
-
const $ = c(
|
|
10
|
-
if ($[0] !== "
|
|
11
|
-
for (let $i = 0; $i <
|
|
20
|
+
function useVirtualItems(t0) {
|
|
21
|
+
const $ = c(43);
|
|
22
|
+
if ($[0] !== "22c57a068d0e63509a04fa6cf4f7cf2a8bbbdc9b615fb1a7fae4fb9998ef4721") {
|
|
23
|
+
for (let $i = 0; $i < 43; $i += 1) {
|
|
12
24
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
13
25
|
}
|
|
14
|
-
$[0] = "
|
|
26
|
+
$[0] = "22c57a068d0e63509a04fa6cf4f7cf2a8bbbdc9b615fb1a7fae4fb9998ef4721";
|
|
15
27
|
}
|
|
16
28
|
const {
|
|
17
29
|
enabled,
|
|
@@ -36,17 +48,11 @@ function useTableVirtualize(t0) {
|
|
|
36
48
|
}
|
|
37
49
|
const itemsMaterialization = useRef(t2);
|
|
38
50
|
let t3;
|
|
39
|
-
if ($[2] !== data || $[3] !==
|
|
40
|
-
t3 = () => [
|
|
41
|
-
type: "spacer",
|
|
42
|
-
from: 0,
|
|
43
|
-
to: length,
|
|
44
|
-
height: data.reduce((acc, item, index, items) => acc + estimateHeight(item, index, items), 0),
|
|
45
|
-
key: `${styles.spacerRow}-0`
|
|
46
|
-
}];
|
|
51
|
+
if ($[2] !== data || $[3] !== enabled || $[4] !== estimateHeight) {
|
|
52
|
+
t3 = () => enabled ? getAllVirtualizedItems(data, estimateHeight) : [];
|
|
47
53
|
$[2] = data;
|
|
48
|
-
$[3] =
|
|
49
|
-
$[4] =
|
|
54
|
+
$[3] = enabled;
|
|
55
|
+
$[4] = estimateHeight;
|
|
50
56
|
$[5] = t3;
|
|
51
57
|
} else {
|
|
52
58
|
t3 = $[5];
|
|
@@ -55,37 +61,36 @@ function useTableVirtualize(t0) {
|
|
|
55
61
|
let t4;
|
|
56
62
|
if ($[6] !== data || $[7] !== estimateHeight || $[8] !== lookaheadPx || $[9] !== scrollerRef || $[10] !== tableRef) {
|
|
57
63
|
t4 = () => {
|
|
58
|
-
var
|
|
64
|
+
var _scrollerRect$top;
|
|
59
65
|
if (!tableRef.current) {
|
|
60
66
|
return;
|
|
61
67
|
}
|
|
62
|
-
const
|
|
68
|
+
const scrollerRect = scrollerRef?.current?.getBoundingClientRect();
|
|
69
|
+
const visibleStart = (_scrollerRect$top = scrollerRect?.top) !== null && _scrollerRect$top !== void 0 ? _scrollerRect$top : 0;
|
|
70
|
+
const visibleEnd = scrollerRect ? Math.min(scrollerRect.bottom, window.innerHeight) : window.innerHeight;
|
|
71
|
+
const materializeStart = visibleStart - lookaheadPx;
|
|
72
|
+
const materializeEnd = visibleEnd + lookaheadPx;
|
|
63
73
|
for (const spacerRow of tableRef.current.querySelectorAll(`.${styles.spacerRow}`)) {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
if (!spacerIntersectsLookaheadArea) {
|
|
74
|
+
const spacerRect = spacerRow.getBoundingClientRect();
|
|
75
|
+
if (spacerRect.bottom < materializeStart || spacerRect.top > materializeEnd) {
|
|
67
76
|
continue;
|
|
68
77
|
}
|
|
69
|
-
const visibleOffsetStart = Math.max(0, -rect.top);
|
|
70
|
-
const visibleOffsetEnd = Math.min(rect.height, containerHeight - rect.top);
|
|
71
|
-
const materializeOffsetStart = visibleOffsetStart - lookaheadPx;
|
|
72
|
-
const materializeOffsetEnd = visibleOffsetEnd + lookaheadPx;
|
|
73
|
-
let offsetInSpacer = 0;
|
|
74
78
|
const from = Number(spacerRow.dataset.from);
|
|
75
79
|
const to = Number(spacerRow.dataset.to);
|
|
80
|
+
let currentTop = spacerRect.top;
|
|
76
81
|
for (let i = from; i < to; i++) {
|
|
77
82
|
const itemMaterialization = itemsMaterialization.current[i];
|
|
78
83
|
const itemHeight = typeof itemMaterialization === "number" ? itemMaterialization : estimateHeight(data[i], i, data);
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
84
|
+
const itemTop = currentTop;
|
|
85
|
+
const itemBottom = currentTop + itemHeight;
|
|
86
|
+
if (itemBottom >= materializeStart && itemTop <= materializeEnd) {
|
|
82
87
|
itemsMaterialization.current[i] = true;
|
|
83
88
|
} else {
|
|
84
|
-
if (
|
|
89
|
+
if (itemTop > materializeEnd) {
|
|
85
90
|
break;
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
|
-
|
|
93
|
+
currentTop = currentTop + itemHeight;
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
96
|
};
|
|
@@ -108,7 +113,7 @@ function useTableVirtualize(t0) {
|
|
|
108
113
|
const itemMaterialization_0 = itemsMaterialization.current[i_0];
|
|
109
114
|
if (itemMaterialization_0 === true) {
|
|
110
115
|
newVirtualItems.push({
|
|
111
|
-
type: "
|
|
116
|
+
type: "materialized",
|
|
112
117
|
index: i_0
|
|
113
118
|
});
|
|
114
119
|
} else {
|
|
@@ -124,7 +129,7 @@ function useTableVirtualize(t0) {
|
|
|
124
129
|
from: i_0,
|
|
125
130
|
to: i_0 + 1,
|
|
126
131
|
height,
|
|
127
|
-
key:
|
|
132
|
+
key: spacerKey(spacerCounter++)
|
|
128
133
|
});
|
|
129
134
|
}
|
|
130
135
|
}
|
|
@@ -164,10 +169,12 @@ function useTableVirtualize(t0) {
|
|
|
164
169
|
t6 = $[16];
|
|
165
170
|
}
|
|
166
171
|
const throttle = t6;
|
|
172
|
+
const prevEnabledRef = useRef(enabled);
|
|
167
173
|
let t7;
|
|
168
|
-
|
|
169
|
-
if ($[17] !== enabled || $[18] !== materializeVisibleSpacerItems || $[19] !== minScrollAndResizeDeltaPx || $[20] !== recomputeVirtualItems || $[21] !== scrollerRef) {
|
|
174
|
+
if ($[17] !== data || $[18] !== enabled || $[19] !== estimateHeight || $[20] !== materializeVisibleSpacerItems || $[21] !== minScrollAndResizeDeltaPx || $[22] !== recomputeVirtualItems || $[23] !== scrollerRef) {
|
|
170
175
|
t7 = () => {
|
|
176
|
+
const prevEnabled = prevEnabledRef.current;
|
|
177
|
+
prevEnabledRef.current = enabled;
|
|
171
178
|
if (!enabled) {
|
|
172
179
|
return;
|
|
173
180
|
}
|
|
@@ -193,88 +200,120 @@ function useTableVirtualize(t0) {
|
|
|
193
200
|
const resizeObserver = new ResizeObserver(handleViewportChange);
|
|
194
201
|
const resizeTarget = scroller !== null && scroller !== void 0 ? scroller : document.documentElement;
|
|
195
202
|
resizeObserver.observe(resizeTarget);
|
|
196
|
-
|
|
203
|
+
let timeoutCleanup;
|
|
204
|
+
if (!prevEnabled) {
|
|
205
|
+
timeoutCleanup = setTimeoutWithCleanup(() => {
|
|
206
|
+
itemsMaterialization.current = [];
|
|
207
|
+
setVirtualItems(getAllVirtualizedItems(data, estimateHeight));
|
|
208
|
+
handleViewportChange();
|
|
209
|
+
});
|
|
210
|
+
} else {
|
|
211
|
+
handleViewportChange();
|
|
212
|
+
}
|
|
197
213
|
return () => {
|
|
214
|
+
timeoutCleanup?.();
|
|
198
215
|
scrollTarget.removeEventListener("scroll", handleViewportChange);
|
|
199
216
|
resizeObserver.unobserve(resizeTarget);
|
|
200
217
|
resizeObserver.disconnect();
|
|
218
|
+
if (timerIdRef.current != null) {
|
|
219
|
+
window.clearTimeout(timerIdRef.current);
|
|
220
|
+
timerIdRef.current = null;
|
|
221
|
+
callbacksRef.current = null;
|
|
222
|
+
}
|
|
201
223
|
};
|
|
202
224
|
};
|
|
203
|
-
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
225
|
+
$[17] = data;
|
|
226
|
+
$[18] = enabled;
|
|
227
|
+
$[19] = estimateHeight;
|
|
228
|
+
$[20] = materializeVisibleSpacerItems;
|
|
229
|
+
$[21] = minScrollAndResizeDeltaPx;
|
|
230
|
+
$[22] = recomputeVirtualItems;
|
|
231
|
+
$[23] = scrollerRef;
|
|
232
|
+
$[24] = t7;
|
|
211
233
|
} else {
|
|
212
|
-
t7 = $[
|
|
213
|
-
|
|
234
|
+
t7 = $[24];
|
|
235
|
+
}
|
|
236
|
+
let t8;
|
|
237
|
+
if ($[25] !== data || $[26] !== enabled || $[27] !== estimateHeight || $[28] !== length || $[29] !== materializeVisibleSpacerItems || $[30] !== minScrollAndResizeDeltaPx || $[31] !== recomputeVirtualItems || $[32] !== scrollerRef) {
|
|
238
|
+
t8 = [data, enabled, estimateHeight, length, materializeVisibleSpacerItems, minScrollAndResizeDeltaPx, recomputeVirtualItems, scrollerRef, throttle];
|
|
239
|
+
$[25] = data;
|
|
240
|
+
$[26] = enabled;
|
|
241
|
+
$[27] = estimateHeight;
|
|
242
|
+
$[28] = length;
|
|
243
|
+
$[29] = materializeVisibleSpacerItems;
|
|
244
|
+
$[30] = minScrollAndResizeDeltaPx;
|
|
245
|
+
$[31] = recomputeVirtualItems;
|
|
246
|
+
$[32] = scrollerRef;
|
|
247
|
+
$[33] = t8;
|
|
248
|
+
} else {
|
|
249
|
+
t8 = $[33];
|
|
214
250
|
}
|
|
215
251
|
useEffect(t7, t8);
|
|
216
252
|
const intersectionObserverHandle = useIntersectionObserverHandle(scrollerRef, scrollerRef ? retentionMarginPx : undefined, !scrollerRef ? retentionMarginPx : undefined);
|
|
217
253
|
let t9;
|
|
218
|
-
if ($[
|
|
219
|
-
t9 = (
|
|
254
|
+
if ($[34] !== enabled || $[35] !== recomputeVirtualItems) {
|
|
255
|
+
t9 = function collapseItemIntoSpacer(index, height_1) {
|
|
220
256
|
if (!enabled) {
|
|
221
257
|
return;
|
|
222
258
|
}
|
|
223
|
-
itemsMaterialization.current[
|
|
259
|
+
itemsMaterialization.current[index] = height_1;
|
|
224
260
|
throttle(recomputeVirtualItems);
|
|
225
261
|
};
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
262
|
+
$[34] = enabled;
|
|
263
|
+
$[35] = recomputeVirtualItems;
|
|
264
|
+
$[36] = t9;
|
|
229
265
|
} else {
|
|
230
|
-
t9 = $[
|
|
266
|
+
t9 = $[36];
|
|
231
267
|
}
|
|
232
268
|
const collapseItemIntoSpacer = t9;
|
|
233
269
|
let t10;
|
|
234
|
-
if ($[
|
|
235
|
-
t10 =
|
|
236
|
-
length: enabled ? 0 : length
|
|
237
|
-
}, _temp2);
|
|
238
|
-
$[27] = enabled;
|
|
239
|
-
$[28] = length;
|
|
240
|
-
$[29] = t10;
|
|
241
|
-
} else {
|
|
242
|
-
t10 = $[29];
|
|
243
|
-
}
|
|
244
|
-
const allVisibleVirtualItems = t10;
|
|
245
|
-
const t11 = enabled ? virtualItems : allVisibleVirtualItems;
|
|
246
|
-
let t12;
|
|
247
|
-
if ($[30] !== collapseItemIntoSpacer || $[31] !== intersectionObserverHandle || $[32] !== t11) {
|
|
248
|
-
t12 = {
|
|
249
|
-
virtualItems: t11,
|
|
270
|
+
if ($[37] !== collapseItemIntoSpacer || $[38] !== intersectionObserverHandle) {
|
|
271
|
+
t10 = {
|
|
250
272
|
intersectionObserverHandle,
|
|
251
273
|
collapseItemIntoSpacer
|
|
252
274
|
};
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[33] = t12;
|
|
275
|
+
$[37] = collapseItemIntoSpacer;
|
|
276
|
+
$[38] = intersectionObserverHandle;
|
|
277
|
+
$[39] = t10;
|
|
257
278
|
} else {
|
|
258
|
-
|
|
279
|
+
t10 = $[39];
|
|
259
280
|
}
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
281
|
+
let t11;
|
|
282
|
+
if ($[40] !== t10 || $[41] !== virtualItems) {
|
|
283
|
+
t11 = {
|
|
284
|
+
virtualItems,
|
|
285
|
+
virtualizationContextValue: t10
|
|
286
|
+
};
|
|
287
|
+
$[40] = t10;
|
|
288
|
+
$[41] = virtualItems;
|
|
289
|
+
$[42] = t11;
|
|
290
|
+
} else {
|
|
291
|
+
t11 = $[42];
|
|
292
|
+
}
|
|
293
|
+
return t11;
|
|
267
294
|
}
|
|
268
295
|
function _temp(cb_0) {
|
|
269
296
|
return cb_0();
|
|
270
297
|
}
|
|
298
|
+
function getAllVirtualizedItems(data, estimateHeight) {
|
|
299
|
+
return [{
|
|
300
|
+
type: 'spacer',
|
|
301
|
+
from: 0,
|
|
302
|
+
to: data.length,
|
|
303
|
+
height: data.reduce((acc, item, index, items) => acc + estimateHeight(item, index, items), 0),
|
|
304
|
+
key: spacerKey(0)
|
|
305
|
+
}];
|
|
306
|
+
}
|
|
307
|
+
function spacerKey(index) {
|
|
308
|
+
return `__${styles.spacerRow}-${index}`;
|
|
309
|
+
}
|
|
271
310
|
function SpacerRow(t0) {
|
|
272
311
|
const $ = c(10);
|
|
273
|
-
if ($[0] !== "
|
|
312
|
+
if ($[0] !== "22c57a068d0e63509a04fa6cf4f7cf2a8bbbdc9b615fb1a7fae4fb9998ef4721") {
|
|
274
313
|
for (let $i = 0; $i < 10; $i += 1) {
|
|
275
314
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
276
315
|
}
|
|
277
|
-
$[0] = "
|
|
316
|
+
$[0] = "22c57a068d0e63509a04fa6cf4f7cf2a8bbbdc9b615fb1a7fae4fb9998ef4721";
|
|
278
317
|
}
|
|
279
318
|
const {
|
|
280
319
|
spacer: t1,
|
|
@@ -326,4 +365,4 @@ function SpacerRow(t0) {
|
|
|
326
365
|
return t4;
|
|
327
366
|
}
|
|
328
367
|
|
|
329
|
-
export { SpacerRow,
|
|
368
|
+
export { SpacerRow, VirtualizationContext, useVirtualItems };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import
|
|
3
|
+
import sortableIcon from '@jetbrains/icons/unsorted-12px';
|
|
4
4
|
import chevron12pxDown from '@jetbrains/icons/chevron-12px-down';
|
|
5
5
|
import Icon from '../icon/icon.js';
|
|
6
6
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
@@ -46,7 +46,7 @@ class HeaderCell extends PureComponent {
|
|
|
46
46
|
} = this.props;
|
|
47
47
|
this.sortable = column.sortable === true;
|
|
48
48
|
this.sorted = sortKey === column.id;
|
|
49
|
-
const glyph = this.sorted ? chevron12pxDown :
|
|
49
|
+
const glyph = this.sorted ? chevron12pxDown : sortableIcon;
|
|
50
50
|
const classes = classNames(className, column.headerClassName, {
|
|
51
51
|
[style.headerCell]: true,
|
|
52
52
|
[style.headerCellSortable]: this.sortable,
|
|
@@ -3,8 +3,8 @@ import focusSensorHOC from '../global/focus-sensor-hoc.js';
|
|
|
3
3
|
import Row from './row.js';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
import '../global/compose-refs.js';
|
|
6
|
-
import 'memoize-one';
|
|
7
6
|
import 'react/compiler-runtime';
|
|
7
|
+
import 'memoize-one';
|
|
8
8
|
import 'classnames';
|
|
9
9
|
import '@jetbrains/icons/chevron-right';
|
|
10
10
|
import '@jetbrains/icons/chevron-down';
|
|
@@ -55,7 +55,7 @@ export default class Row<T extends object> extends PureComponent<RowProps<T>> {
|
|
|
55
55
|
onDoubleClick: () => void;
|
|
56
56
|
row?: HTMLElement | null;
|
|
57
57
|
rowRef: (el: HTMLElement | null) => void;
|
|
58
|
-
composedRowRef: import("memoize-one").MemoizedFn<(...refs: (React.Ref<HTMLElement> | undefined)[]) => (value: T_1 | null) => void>;
|
|
58
|
+
composedRowRef: import("memoize-one").MemoizedFn<(...refs: (React.Ref<HTMLElement> | undefined)[]) => (value: T_1 | null) => () => void>;
|
|
59
59
|
render(): React.JSX.Element;
|
|
60
60
|
}
|
|
61
61
|
export type RowAttrs<T extends object> = React.JSX.LibraryManagedAttributes<typeof Row, RowProps<T>>;
|
|
@@ -7,6 +7,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
7
7
|
import 'react-movable';
|
|
8
8
|
import '../global/focus-sensor-hoc.js';
|
|
9
9
|
import '../global/compose-refs.js';
|
|
10
|
+
import 'react/compiler-runtime';
|
|
10
11
|
import 'memoize-one';
|
|
11
12
|
import '../global/get-uid.js';
|
|
12
13
|
import '../shortcuts/shortcuts.js';
|
|
@@ -26,7 +27,6 @@ import '../icon/icon.js';
|
|
|
26
27
|
import 'util-deprecate';
|
|
27
28
|
import '../icon/icon.constants.js';
|
|
28
29
|
import '../_helpers/icon-svg.js';
|
|
29
|
-
import 'react/compiler-runtime';
|
|
30
30
|
import '../global/memoize.js';
|
|
31
31
|
import '../control-help/control-help.js';
|
|
32
32
|
import '../global/data-tests.js';
|
|
@@ -6,6 +6,7 @@ import 'classnames';
|
|
|
6
6
|
import 'react-movable';
|
|
7
7
|
import '../global/focus-sensor-hoc.js';
|
|
8
8
|
import '../global/compose-refs.js';
|
|
9
|
+
import 'react/compiler-runtime';
|
|
9
10
|
import 'memoize-one';
|
|
10
11
|
import '../global/get-uid.js';
|
|
11
12
|
import '../shortcuts/shortcuts.js';
|
|
@@ -25,7 +26,6 @@ import '../icon/icon.js';
|
|
|
25
26
|
import 'util-deprecate';
|
|
26
27
|
import '../icon/icon.constants.js';
|
|
27
28
|
import '../_helpers/icon-svg.js';
|
|
28
|
-
import 'react/compiler-runtime';
|
|
29
29
|
import '../global/memoize.js';
|
|
30
30
|
import '../control-help/control-help.js';
|
|
31
31
|
import '../global/data-tests.js';
|
|
@@ -12,6 +12,7 @@ import RowWithFocusSensorCallbacks from './row-with-focus-sensor.js';
|
|
|
12
12
|
import { s as style } from '../_helpers/legacy-table.js';
|
|
13
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
14
14
|
import '../global/compose-refs.js';
|
|
15
|
+
import 'react/compiler-runtime';
|
|
15
16
|
import 'memoize-one';
|
|
16
17
|
import '../shortcuts/core.js';
|
|
17
18
|
import 'core-js/modules/es.array.includes.js';
|
|
@@ -27,7 +28,6 @@ import '../icon/icon.js';
|
|
|
27
28
|
import 'util-deprecate';
|
|
28
29
|
import '../icon/icon.constants.js';
|
|
29
30
|
import '../_helpers/icon-svg.js';
|
|
30
|
-
import 'react/compiler-runtime';
|
|
31
31
|
import '../global/memoize.js';
|
|
32
32
|
import '../control-help/control-help.js';
|
|
33
33
|
import '../global/data-tests.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import {
|
|
3
|
+
import { h as headingStyles } from '../_helpers/heading.js';
|
|
4
4
|
import { l as linkStyles } from '../_helpers/link.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ class Markdown extends PureComponent {
|
|
|
13
13
|
children,
|
|
14
14
|
inline
|
|
15
15
|
} = this.props;
|
|
16
|
-
const classes = classNames(className,
|
|
16
|
+
const classes = classNames(className, headingStyles.contentWithHeadings, linkStyles.withLinks, {
|
|
17
17
|
[styles.markdown]: !inline,
|
|
18
18
|
[styles.inline]: inline
|
|
19
19
|
});
|
|
@@ -7,7 +7,7 @@ import { Directions } from '../popup/popup.consts.js';
|
|
|
7
7
|
import Icon from '../icon/icon.js';
|
|
8
8
|
import { Button } from '../button/button.js';
|
|
9
9
|
import { I18nContext } from '../i18n/i18n-context.js';
|
|
10
|
-
import { T as Theme, d as darkStyles, W as WithThemeClasses,
|
|
10
|
+
import { T as Theme, d as darkStyles, W as WithThemeClasses, a as ThemeProvider } from '../_helpers/theme.js';
|
|
11
11
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
12
|
import 'react-dom';
|
|
13
13
|
import '../global/get-uid.js';
|
|
@@ -6,11 +6,11 @@ const MAJOR_VERSION_INDEX = 0;
|
|
|
6
6
|
/**
|
|
7
7
|
* SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
|
|
8
8
|
*/
|
|
9
|
-
if (!["and_chr
|
|
9
|
+
if (!["and_chr 149", "and_ff 151", "and_qq 14.9", "and_uc 15.5", "android 149", "chrome 149", "chrome 148", "chrome 147", "chrome 146", "chrome 145", "chrome 144", "chrome 143", "chrome 142", "chrome 141", "chrome 140", "chrome 139", "chrome 138", "chrome 137", "chrome 136", "chrome 135", "chrome 134", "chrome 133", "chrome 132", "chrome 131", "chrome 130", "chrome 129", "chrome 128", "chrome 127", "chrome 126", "chrome 125", "chrome 124", "chrome 123", "chrome 122", "chrome 121", "chrome 120", "chrome 118", "chrome 116", "chrome 112", "chrome 109", "edge 149", "edge 148", "edge 147", "edge 146", "edge 145", "edge 144", "edge 143", "edge 142", "edge 141", "edge 140", "edge 139", "edge 138", "edge 137", "edge 136", "edge 135", "edge 134", "edge 133", "edge 132", "edge 131", "edge 130", "edge 129", "edge 128", "edge 127", "edge 126", "edge 125", "edge 124", "edge 123", "edge 122", "edge 121", "edge 120", "firefox 151", "firefox 150", "firefox 149", "firefox 148", "firefox 147", "firefox 146", "firefox 145", "firefox 144", "firefox 143", "firefox 142", "firefox 141", "firefox 140", "firefox 139", "firefox 138", "firefox 137", "firefox 136", "firefox 135", "firefox 134", "firefox 133", "firefox 132", "firefox 131", "firefox 130", "firefox 129", "firefox 128", "firefox 127", "firefox 126", "firefox 125", "firefox 124", "firefox 123", "firefox 122", "ios_saf 26.5", "ios_saf 26.4", "ios_saf 26.3", "ios_saf 26.2", "ios_saf 26.1", "ios_saf 26.0", "ios_saf 18.5-18.7", "ios_saf 18.4", "ios_saf 18.3", "ios_saf 18.2", "ios_saf 18.1", "ios_saf 18.0", "ios_saf 17.6-17.7", "ios_saf 17.5", "ios_saf 17.4", "ios_saf 17.3", "ios_saf 17.2", "kaios 3.0-3.1", "kaios 2.5", "op_mini all", "op_mob 80", "opera 131", "opera 127", "safari 26.4", "safari 26.3", "safari 26.2", "safari 26.1", "safari 26.0", "safari 18.5-18.7", "safari 18.4", "safari 18.3", "safari 18.2", "safari 18.1", "safari 18.0", "safari 17.6", "safari 17.5", "safari 17.4", "safari 17.3", "safari 17.2", "samsung 30", "samsung 29"]) {
|
|
10
10
|
// eslint-disable-next-line no-console
|
|
11
11
|
console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
|
|
12
12
|
}
|
|
13
|
-
const SUPPORTED = ["and_chr
|
|
13
|
+
const SUPPORTED = ["and_chr 149", "and_ff 151", "and_qq 14.9", "and_uc 15.5", "android 149", "chrome 149", "chrome 148", "chrome 147", "chrome 146", "chrome 145", "chrome 144", "chrome 143", "chrome 142", "chrome 141", "chrome 140", "chrome 139", "chrome 138", "chrome 137", "chrome 136", "chrome 135", "chrome 134", "chrome 133", "chrome 132", "chrome 131", "chrome 130", "chrome 129", "chrome 128", "chrome 127", "chrome 126", "chrome 125", "chrome 124", "chrome 123", "chrome 122", "chrome 121", "chrome 120", "chrome 118", "chrome 116", "chrome 112", "chrome 109", "edge 149", "edge 148", "edge 147", "edge 146", "edge 145", "edge 144", "edge 143", "edge 142", "edge 141", "edge 140", "edge 139", "edge 138", "edge 137", "edge 136", "edge 135", "edge 134", "edge 133", "edge 132", "edge 131", "edge 130", "edge 129", "edge 128", "edge 127", "edge 126", "edge 125", "edge 124", "edge 123", "edge 122", "edge 121", "edge 120", "firefox 151", "firefox 150", "firefox 149", "firefox 148", "firefox 147", "firefox 146", "firefox 145", "firefox 144", "firefox 143", "firefox 142", "firefox 141", "firefox 140", "firefox 139", "firefox 138", "firefox 137", "firefox 136", "firefox 135", "firefox 134", "firefox 133", "firefox 132", "firefox 131", "firefox 130", "firefox 129", "firefox 128", "firefox 127", "firefox 126", "firefox 125", "firefox 124", "firefox 123", "firefox 122", "ios_saf 26.5", "ios_saf 26.4", "ios_saf 26.3", "ios_saf 26.2", "ios_saf 26.1", "ios_saf 26.0", "ios_saf 18.5-18.7", "ios_saf 18.4", "ios_saf 18.3", "ios_saf 18.2", "ios_saf 18.1", "ios_saf 18.0", "ios_saf 17.6-17.7", "ios_saf 17.5", "ios_saf 17.4", "ios_saf 17.3", "ios_saf 17.2", "kaios 3.0-3.1", "kaios 2.5", "op_mini all", "op_mob 80", "opera 131", "opera 127", "safari 26.4", "safari 26.3", "safari 26.2", "safari 26.1", "safari 26.0", "safari 18.5-18.7", "safari 18.4", "safari 18.3", "safari 18.2", "safari 18.1", "safari 18.0", "safari 17.6", "safari 17.5", "safari 17.4", "safari 17.3", "safari 17.2", "samsung 30", "samsung 29"] || [];
|
|
14
14
|
const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
|
15
15
|
const WHITE_LIST = SUPPORTED.reduce((acc, item) => {
|
|
16
16
|
var _item$match;
|
|
@@ -45,6 +45,8 @@ export interface BasePopupProps {
|
|
|
45
45
|
onMouseUp?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
46
46
|
onMouseOver?: ((e: React.SyntheticEvent<HTMLElement>) => void) | undefined;
|
|
47
47
|
onMouseOut?: ((e: React.SyntheticEvent<HTMLElement>) => void) | undefined;
|
|
48
|
+
onMouseEnter?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
49
|
+
onMouseLeave?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
48
50
|
onContextMenu?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
|
|
49
51
|
onDirectionChange?: ((direction: Directions) => void) | null | undefined;
|
|
50
52
|
onShow?: (() => void) | null | undefined;
|
|
@@ -12,7 +12,7 @@ import position from './position.js';
|
|
|
12
12
|
import { DEFAULT_DIRECTIONS, Display, MaxHeight, MinWidth, Dimension, Directions } from './popup.consts.js';
|
|
13
13
|
import { PopupTargetContext, normalizePopupTarget, PopupTarget } from './popup.target.js';
|
|
14
14
|
import { supportsCSSAnchorPositioning, setCSSAnchorPositioning } from './position-css.js';
|
|
15
|
-
import {
|
|
15
|
+
import { b as ThemeContext, W as WithThemeClasses } from '../_helpers/theme.js';
|
|
16
16
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
17
17
|
import '../shortcuts/core.js';
|
|
18
18
|
import 'core-js/modules/es.array.includes.js';
|
|
@@ -315,6 +315,8 @@ class Popup extends PureComponent {
|
|
|
315
315
|
onMouseUp,
|
|
316
316
|
onMouseOver,
|
|
317
317
|
onMouseOut,
|
|
318
|
+
onMouseEnter,
|
|
319
|
+
onMouseLeave,
|
|
318
320
|
onContextMenu,
|
|
319
321
|
'data-test': dataTest,
|
|
320
322
|
largeBorderRadius
|
|
@@ -349,6 +351,8 @@ class Popup extends PureComponent {
|
|
|
349
351
|
onFocus: onMouseOver,
|
|
350
352
|
onMouseOut: onMouseOut,
|
|
351
353
|
onBlur: onMouseOut,
|
|
354
|
+
onMouseEnter: onMouseEnter,
|
|
355
|
+
onMouseLeave: onMouseLeave,
|
|
352
356
|
onContextMenu: onContextMenu,
|
|
353
357
|
children: /*#__PURE__*/jsx("div", {
|
|
354
358
|
"data-test": joinDataTestAttributes('ring-popup', dataTest),
|
|
@@ -127,7 +127,7 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
|
|
|
127
127
|
list?: List<T> | null;
|
|
128
128
|
listRef: (el: List<T> | null) => void;
|
|
129
129
|
filterRef: (el: HTMLInputElement | null) => void;
|
|
130
|
-
composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => void>;
|
|
130
|
+
composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => () => void>;
|
|
131
131
|
shortcutsScope: string;
|
|
132
132
|
shortcutsMap: {
|
|
133
133
|
tab: (event: Event) => void;
|
|
@@ -264,7 +264,7 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
|
|
|
264
264
|
private _getAvatar;
|
|
265
265
|
filter?: HTMLInputElement | null;
|
|
266
266
|
filterRef: (el: HTMLInputElement | null) => void;
|
|
267
|
-
composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => void>;
|
|
267
|
+
composedFilterRef: import("memoize-one").MemoizedFn<(...refs: (Ref<HTMLInputElement> | undefined)[]) => (value: T_1 | null) => () => void>;
|
|
268
268
|
getShortcutsMap(): {
|
|
269
269
|
enter: () => true | undefined;
|
|
270
270
|
esc: (event: KeyboardEvent) => boolean | undefined;
|
|
@@ -5,8 +5,9 @@ import '../alert/alert.js';
|
|
|
5
5
|
import 'react';
|
|
6
6
|
import 'classnames';
|
|
7
7
|
import '@jetbrains/icons/exception';
|
|
8
|
-
import '@jetbrains/icons/
|
|
8
|
+
import '@jetbrains/icons/success';
|
|
9
9
|
import '@jetbrains/icons/warning';
|
|
10
|
+
import '@jetbrains/icons/info-filled';
|
|
10
11
|
import '@jetbrains/icons/close';
|
|
11
12
|
import '../icon/icon.js';
|
|
12
13
|
import 'util-deprecate';
|
|
@@ -26,6 +27,11 @@ import '../global/controls-height.js';
|
|
|
26
27
|
import '../global/configuration.js';
|
|
27
28
|
import '../_helpers/button.classes.js';
|
|
28
29
|
import '../_helpers/theme.js';
|
|
30
|
+
import '../alert/alert-heading.js';
|
|
31
|
+
import '../heading/heading.js';
|
|
32
|
+
import '../_helpers/heading.js';
|
|
33
|
+
import '../_helpers/alert.js';
|
|
34
|
+
import '../alert/alert-actions.js';
|
|
29
35
|
import '../alert/container.js';
|
|
30
36
|
import 'react-dom';
|
|
31
37
|
|
|
@@ -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
|
|