@jetbrains/ring-ui-built 8.0.0-beta.2 → 8.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_helpers/anchor.js +1 -1
- package/components/_helpers/avatar-info.js +1 -1
- package/components/_helpers/icon-svg.js +1 -1
- package/components/_helpers/legacy-table.js +3 -0
- package/components/_helpers/tab-link.js +1 -1
- package/components/_helpers/theme.js +49 -37
- package/components/alert/alert.js +1 -1
- package/components/alert-service/alert-service.js +1 -1
- package/components/auth/auth-core.js +1 -1
- package/components/auth/auth.js +1 -1
- package/components/auth/down-notification.js +1 -1
- package/components/auth/iframe-flow.js +1 -1
- package/components/auth/storage.js +1 -1
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/auth-dialog-service/auth-dialog-service.js +2 -2
- package/components/avatar/avatar-info.js +1 -1
- package/components/avatar/avatar.js +1 -1
- package/components/avatar/fallback-avatar.js +1 -1
- package/components/avatar-stack/avatar-stack.js +1 -1
- package/components/banner/banner.js +1 -1
- package/components/button/button.js +1 -1
- package/components/button-group/button-group.js +1 -1
- package/components/checkbox/checkbox.js +1 -1
- package/components/clipboard/clipboard.js +1 -1
- package/components/collapse/collapse-content.js +5 -5
- package/components/collapse/collapse-control.js +5 -5
- package/components/collapse/collapse.js +4 -4
- package/components/confirm/confirm.js +1 -1
- package/components/confirm-service/confirm-service.js +2 -2
- package/components/contenteditable/contenteditable.js +1 -1
- package/components/control-help/control-help.js +1 -1
- package/components/control-label/control-label.js +1 -1
- package/components/data-list/data-list.d.ts +1 -1
- package/components/data-list/data-list.js +1 -1
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +1 -1
- package/components/data-list/item.d.ts +1 -1
- package/components/data-list/item.js +1 -1
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +2 -2
- package/components/data-list/title.js +1 -1
- package/components/date-picker/date-input.js +1 -1
- package/components/date-picker/date-picker.js +1 -2
- package/components/date-picker/date-popup.js +1 -2
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.js +1 -1
- package/components/date-picker/months.js +4 -5
- package/components/date-picker/use-intersection-observer.js +1 -1
- package/components/date-picker/use-scroll-behavior.js +45 -44
- package/components/date-picker/weekdays.js +1 -1
- package/components/date-picker/years.js +6 -7
- package/components/dialog/dialog.d.ts +2 -2
- package/components/dialog/dialog.js +3 -3
- package/components/dropdown/anchor.js +1 -1
- package/components/dropdown/dropdown.js +1 -1
- package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
- package/components/dropdown-menu/dropdown-menu.js +62 -57
- package/components/editable-heading/editable-heading.d.ts +1 -2
- package/components/editable-heading/editable-heading.js +13 -12
- package/components/error-bubble/error-bubble.js +1 -1
- package/components/error-message/error-message.js +1 -1
- package/components/expand/collapsible-group.d.ts +5 -1
- package/components/expand/collapsible-group.js +15 -14
- package/components/footer/footer.js +1 -1
- package/components/global/create-stateful-context.js +11 -11
- package/components/global/intersection-observer-context.d.ts +2 -2
- package/components/global/intersection-observer-context.js +12 -12
- package/components/global/rerender-hoc.d.ts +4 -2
- package/components/global/rerender-hoc.js +10 -24
- package/components/{legacy-table/selection.d.ts → global/table-selection.d.ts} +14 -14
- package/components/{legacy-table/selection.js → global/table-selection.js} +3 -3
- package/components/global/theme.d.ts +4 -3
- package/components/global/theme.js +1 -1
- package/components/header/header-icon.js +1 -1
- package/components/header/header.js +1 -1
- package/components/header/links.js +1 -1
- package/components/header/logo.js +1 -1
- package/components/header/profile.js +1 -1
- package/components/header/services.js +1 -1
- package/components/header/smart-profile.js +1 -1
- package/components/header/smart-services.js +1 -1
- package/components/heading/heading.js +1 -1
- package/components/i18n/i18n-context.js +4 -4
- package/components/icon/icon-svg.js +1 -1
- package/components/icon/icon.js +1 -1
- package/components/icon/index.js +1 -1
- package/components/input/input.js +1 -1
- package/components/island/adaptive-island-hoc.js +3 -3
- package/components/island/content.d.ts +7 -2
- package/components/island/content.js +27 -18
- package/components/island/header.js +1 -1
- package/components/island/island.js +1 -1
- package/components/legacy-table/cell.js +1 -1
- package/components/legacy-table/header-cell.js +2 -2
- package/components/legacy-table/header.js +2 -2
- package/components/legacy-table/multitable.d.ts +1 -1
- package/components/legacy-table/row-with-focus-sensor.js +2 -2
- package/components/legacy-table/row.js +4 -4
- package/components/legacy-table/selection-adapter.d.ts +3 -3
- package/components/legacy-table/selection-shortcuts-hoc.d.ts +5 -5
- package/components/legacy-table/simple-table.d.ts +2 -2
- package/components/legacy-table/simple-table.js +4 -4
- package/components/legacy-table/smart-table.d.ts +5 -5
- package/components/legacy-table/smart-table.js +5 -5
- package/components/legacy-table/table.js +2 -2
- package/components/list/list-item.js +1 -1
- package/components/list/list-users-groups-source.js +1 -1
- package/components/list/list.js +1 -1
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/login-dialog/service.js +2 -2
- package/components/message/message.js +1 -1
- package/components/pager/pager.js +1 -1
- package/components/popup/popup.js +1 -1
- package/components/popup/popup.target.d.ts +3 -2
- package/components/popup/popup.target.js +32 -28
- package/components/popup-menu/popup-menu.js +1 -1
- package/components/query-assist/query-assist-suggestions.js +1 -1
- package/components/query-assist/query-assist.d.ts +3 -1
- package/components/query-assist/query-assist.js +2 -2
- package/components/radio/radio-item.d.ts +3 -3
- package/components/radio/radio-item.js +32 -18
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +2 -2
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/chevron-button.js +1 -1
- package/components/select/select-filter.js +1 -1
- package/components/select/select-popup.js +1 -1
- package/components/select/select.d.ts +3 -1
- package/components/select/select.js +1 -1
- package/components/slider/slider.js +100 -96
- package/components/storage/storage-local.js +1 -1
- package/components/storage/storage.js +1 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +3 -3
- package/components/tab-trap/tab-trap.js +83 -80
- package/components/table/default-item-renderer.d.ts +20 -9
- package/components/table/default-item-renderer.js +83 -142
- package/components/table/table-component.d.ts +43 -16
- package/components/table/table-component.js +162 -188
- package/components/table/table-primitives.d.ts +28 -0
- package/components/table/{table-base.js → table-primitives.js} +110 -98
- package/components/table/table-row-focus.d.ts +4 -0
- package/components/table/table-row-focus.js +41 -0
- package/components/table/table-virtualize.d.ts +3 -3
- package/components/table/table-virtualize.js +111 -112
- package/components/table/table.d.ts +9 -24
- package/components/table/table.js +4 -3
- package/components/tabs/collapsible-more.js +1 -1
- package/components/tabs/collapsible-tab.js +1 -1
- package/components/tabs/collapsible-tabs.js +1 -1
- package/components/tabs/dumb-tabs.js +1 -1
- package/components/tabs/smart-tabs.js +1 -1
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tabs.js +1 -1
- package/components/tag/tag.js +1 -1
- package/components/tags-input/tags-input.d.ts +3 -1
- package/components/tags-input/tags-input.js +1 -1
- package/components/tags-list/tags-list.js +1 -1
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.js +2 -2
- package/components/upload/upload.d.ts +4 -3
- package/components/upload/upload.js +7 -29
- package/components/user-agreement/service.js +2 -2
- package/components/user-agreement/user-agreement.js +1 -1
- package/components/user-card/card.js +1 -1
- package/components/user-card/smart-user-card-tooltip.js +1 -1
- package/components/user-card/tooltip.js +1 -1
- package/components/user-card/user-card.js +1 -1
- package/package.json +6 -6
- package/components/_helpers/table2.js +0 -3
- package/components/global/use-event-callback.d.ts +0 -1
- package/components/global/use-event-callback.js +0 -44
- package/components/table/table-base.d.ts +0 -24
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useRef, useState, useEffect } from 'react';
|
|
3
|
-
import useEventCallback from '../global/use-event-callback.js';
|
|
4
3
|
import { useIntersectionObserverHandle } from '../global/intersection-observer-context.js';
|
|
5
4
|
import { s as styles } from '../_helpers/table.js';
|
|
6
5
|
import { jsx } from 'react/jsx-runtime';
|
|
7
6
|
|
|
8
7
|
const virtualizationThrottleDelay = 50;
|
|
9
8
|
function useTableVirtualize(t0) {
|
|
10
|
-
const $ = c(
|
|
11
|
-
if ($[0] !== "
|
|
12
|
-
for (let $i = 0; $i <
|
|
9
|
+
const $ = c(34);
|
|
10
|
+
if ($[0] !== "4b7f7b12eb2c9ae3487ce5d00c7be96dc9b8807a6bbfe2c9b314700f443d7188") {
|
|
11
|
+
for (let $i = 0; $i < 34; $i += 1) {
|
|
13
12
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
14
13
|
}
|
|
15
|
-
$[0] = "
|
|
14
|
+
$[0] = "4b7f7b12eb2c9ae3487ce5d00c7be96dc9b8807a6bbfe2c9b314700f443d7188";
|
|
16
15
|
}
|
|
17
16
|
const {
|
|
18
17
|
enabled,
|
|
19
|
-
|
|
18
|
+
data,
|
|
19
|
+
data: t1,
|
|
20
20
|
scrollerRef,
|
|
21
21
|
tableRef,
|
|
22
22
|
estimateHeight,
|
|
@@ -24,35 +24,37 @@ function useTableVirtualize(t0) {
|
|
|
24
24
|
retentionMarginPx,
|
|
25
25
|
minScrollAndResizeDeltaPx
|
|
26
26
|
} = t0;
|
|
27
|
-
|
|
27
|
+
const {
|
|
28
|
+
length
|
|
29
|
+
} = t1;
|
|
30
|
+
let t2;
|
|
28
31
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
29
|
-
|
|
30
|
-
$[1] =
|
|
32
|
+
t2 = [];
|
|
33
|
+
$[1] = t2;
|
|
31
34
|
} else {
|
|
32
|
-
|
|
35
|
+
t2 = $[1];
|
|
33
36
|
}
|
|
34
|
-
const itemsMaterialization = useRef(
|
|
35
|
-
let
|
|
36
|
-
if ($[2] !==
|
|
37
|
-
|
|
37
|
+
const itemsMaterialization = useRef(t2);
|
|
38
|
+
let t3;
|
|
39
|
+
if ($[2] !== data || $[3] !== estimateHeight || $[4] !== length) {
|
|
40
|
+
t3 = () => [{
|
|
38
41
|
type: "spacer",
|
|
39
42
|
from: 0,
|
|
40
43
|
to: length,
|
|
41
|
-
height:
|
|
42
|
-
length
|
|
43
|
-
}, (_, i) => estimateHeight(i)).reduce(_temp, 0),
|
|
44
|
+
height: data.reduce((acc, item, index, items) => acc + estimateHeight(item, index, items), 0),
|
|
44
45
|
key: `${styles.spacerRow}-0`
|
|
45
46
|
}];
|
|
46
|
-
$[2] =
|
|
47
|
-
$[3] =
|
|
48
|
-
$[4] =
|
|
47
|
+
$[2] = data;
|
|
48
|
+
$[3] = estimateHeight;
|
|
49
|
+
$[4] = length;
|
|
50
|
+
$[5] = t3;
|
|
49
51
|
} else {
|
|
50
|
-
|
|
52
|
+
t3 = $[5];
|
|
51
53
|
}
|
|
52
|
-
const [virtualItems, setVirtualItems] = useState(
|
|
53
|
-
let
|
|
54
|
-
if ($[
|
|
55
|
-
|
|
54
|
+
const [virtualItems, setVirtualItems] = useState(t3);
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[6] !== data || $[7] !== estimateHeight || $[8] !== lookaheadPx || $[9] !== scrollerRef || $[10] !== tableRef) {
|
|
57
|
+
t4 = () => {
|
|
56
58
|
var _scrollerRef$current$;
|
|
57
59
|
if (!tableRef.current) {
|
|
58
60
|
return;
|
|
@@ -71,13 +73,13 @@ function useTableVirtualize(t0) {
|
|
|
71
73
|
let offsetInSpacer = 0;
|
|
72
74
|
const from = Number(spacerRow.dataset.from);
|
|
73
75
|
const to = Number(spacerRow.dataset.to);
|
|
74
|
-
for (let
|
|
75
|
-
const itemMaterialization = itemsMaterialization.current[
|
|
76
|
-
const itemHeight = typeof itemMaterialization === "number" ? itemMaterialization : estimateHeight(
|
|
76
|
+
for (let i = from; i < to; i++) {
|
|
77
|
+
const itemMaterialization = itemsMaterialization.current[i];
|
|
78
|
+
const itemHeight = typeof itemMaterialization === "number" ? itemMaterialization : estimateHeight(data[i], i, data);
|
|
77
79
|
const itemOffsetStart = offsetInSpacer;
|
|
78
80
|
const itemOffsetEnd = offsetInSpacer + itemHeight;
|
|
79
81
|
if (itemOffsetStart < materializeOffsetEnd && itemOffsetEnd > materializeOffsetStart) {
|
|
80
|
-
itemsMaterialization.current[
|
|
82
|
+
itemsMaterialization.current[i] = true;
|
|
81
83
|
} else {
|
|
82
84
|
if (itemOffsetStart > materializeOffsetEnd) {
|
|
83
85
|
break;
|
|
@@ -87,39 +89,40 @@ function useTableVirtualize(t0) {
|
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
};
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
92
|
+
$[6] = data;
|
|
93
|
+
$[7] = estimateHeight;
|
|
94
|
+
$[8] = lookaheadPx;
|
|
95
|
+
$[9] = scrollerRef;
|
|
96
|
+
$[10] = tableRef;
|
|
97
|
+
$[11] = t4;
|
|
95
98
|
} else {
|
|
96
|
-
|
|
99
|
+
t4 = $[11];
|
|
97
100
|
}
|
|
98
|
-
const materializeVisibleSpacerItems =
|
|
99
|
-
let
|
|
100
|
-
if ($[
|
|
101
|
-
|
|
101
|
+
const materializeVisibleSpacerItems = t4;
|
|
102
|
+
let t5;
|
|
103
|
+
if ($[12] !== data || $[13] !== estimateHeight || $[14] !== length) {
|
|
104
|
+
t5 = () => {
|
|
102
105
|
const newVirtualItems = [];
|
|
103
106
|
let spacerCounter = 0;
|
|
104
|
-
for (let
|
|
105
|
-
const itemMaterialization_0 = itemsMaterialization.current[
|
|
107
|
+
for (let i_0 = 0; i_0 < length; i_0++) {
|
|
108
|
+
const itemMaterialization_0 = itemsMaterialization.current[i_0];
|
|
106
109
|
if (itemMaterialization_0 === true) {
|
|
107
110
|
newVirtualItems.push({
|
|
108
111
|
type: "rendered",
|
|
109
|
-
index:
|
|
112
|
+
index: i_0
|
|
110
113
|
});
|
|
111
114
|
} else {
|
|
112
115
|
const lastItemOrSpacer = newVirtualItems[newVirtualItems.length - 1];
|
|
113
116
|
const lastSpacer = lastItemOrSpacer?.type === "spacer" ? lastItemOrSpacer : undefined;
|
|
114
|
-
const height = typeof itemMaterialization_0 === "number" ? itemMaterialization_0 : estimateHeight(
|
|
117
|
+
const height = typeof itemMaterialization_0 === "number" ? itemMaterialization_0 : estimateHeight(data[i_0], i_0, data);
|
|
115
118
|
if (lastSpacer) {
|
|
116
|
-
lastSpacer.to =
|
|
119
|
+
lastSpacer.to = i_0 + 1;
|
|
117
120
|
lastSpacer.height = lastSpacer.height + height;
|
|
118
121
|
} else {
|
|
119
122
|
newVirtualItems.push({
|
|
120
123
|
type: "spacer",
|
|
121
|
-
from:
|
|
122
|
-
to:
|
|
124
|
+
from: i_0,
|
|
125
|
+
to: i_0 + 1,
|
|
123
126
|
height,
|
|
124
127
|
key: `${styles.spacerRow}-${spacerCounter++}`
|
|
125
128
|
});
|
|
@@ -128,19 +131,20 @@ function useTableVirtualize(t0) {
|
|
|
128
131
|
}
|
|
129
132
|
setVirtualItems(newVirtualItems);
|
|
130
133
|
};
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
+
$[12] = data;
|
|
135
|
+
$[13] = estimateHeight;
|
|
136
|
+
$[14] = length;
|
|
137
|
+
$[15] = t5;
|
|
134
138
|
} else {
|
|
135
|
-
|
|
139
|
+
t5 = $[15];
|
|
136
140
|
}
|
|
137
|
-
const recomputeVirtualItems =
|
|
141
|
+
const recomputeVirtualItems = t5;
|
|
138
142
|
const timerIdRef = useRef(null);
|
|
139
143
|
const callbacksRef = useRef(null);
|
|
140
|
-
let
|
|
141
|
-
if ($[
|
|
142
|
-
|
|
143
|
-
const callbacks =
|
|
144
|
+
let t6;
|
|
145
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
146
|
+
t6 = (...t7) => {
|
|
147
|
+
const callbacks = t7;
|
|
144
148
|
if (timerIdRef.current != null) {
|
|
145
149
|
callbacks.forEach(cb => {
|
|
146
150
|
callbacksRef.current.delete(cb);
|
|
@@ -150,20 +154,20 @@ function useTableVirtualize(t0) {
|
|
|
150
154
|
}
|
|
151
155
|
callbacksRef.current = new Set(callbacks);
|
|
152
156
|
timerIdRef.current = window.setTimeout(() => {
|
|
153
|
-
callbacksRef.current.forEach(
|
|
157
|
+
callbacksRef.current.forEach(_temp);
|
|
154
158
|
timerIdRef.current = null;
|
|
155
159
|
callbacksRef.current = null;
|
|
156
160
|
}, virtualizationThrottleDelay);
|
|
157
161
|
};
|
|
158
|
-
$[
|
|
162
|
+
$[16] = t6;
|
|
159
163
|
} else {
|
|
160
|
-
|
|
164
|
+
t6 = $[16];
|
|
161
165
|
}
|
|
162
|
-
const throttle =
|
|
163
|
-
let t6;
|
|
166
|
+
const throttle = t6;
|
|
164
167
|
let t7;
|
|
165
|
-
|
|
166
|
-
|
|
168
|
+
let t8;
|
|
169
|
+
if ($[17] !== enabled || $[18] !== materializeVisibleSpacerItems || $[19] !== minScrollAndResizeDeltaPx || $[20] !== recomputeVirtualItems || $[21] !== scrollerRef) {
|
|
170
|
+
t7 = () => {
|
|
167
171
|
if (!enabled) {
|
|
168
172
|
return;
|
|
169
173
|
}
|
|
@@ -196,86 +200,81 @@ function useTableVirtualize(t0) {
|
|
|
196
200
|
resizeObserver.disconnect();
|
|
197
201
|
};
|
|
198
202
|
};
|
|
199
|
-
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[21] = t7;
|
|
203
|
+
t8 = [enabled, materializeVisibleSpacerItems, minScrollAndResizeDeltaPx, recomputeVirtualItems, scrollerRef, throttle];
|
|
204
|
+
$[17] = enabled;
|
|
205
|
+
$[18] = materializeVisibleSpacerItems;
|
|
206
|
+
$[19] = minScrollAndResizeDeltaPx;
|
|
207
|
+
$[20] = recomputeVirtualItems;
|
|
208
|
+
$[21] = scrollerRef;
|
|
209
|
+
$[22] = t7;
|
|
210
|
+
$[23] = t8;
|
|
208
211
|
} else {
|
|
209
|
-
|
|
210
|
-
|
|
212
|
+
t7 = $[22];
|
|
213
|
+
t8 = $[23];
|
|
211
214
|
}
|
|
212
|
-
useEffect(
|
|
215
|
+
useEffect(t7, t8);
|
|
213
216
|
const intersectionObserverHandle = useIntersectionObserverHandle(scrollerRef, scrollerRef ? retentionMarginPx : undefined, !scrollerRef ? retentionMarginPx : undefined);
|
|
214
|
-
let
|
|
215
|
-
if ($[
|
|
216
|
-
|
|
217
|
+
let t9;
|
|
218
|
+
if ($[24] !== enabled || $[25] !== recomputeVirtualItems) {
|
|
219
|
+
t9 = (index_0, height_1) => {
|
|
217
220
|
if (!enabled) {
|
|
218
221
|
return;
|
|
219
222
|
}
|
|
220
|
-
itemsMaterialization.current[
|
|
223
|
+
itemsMaterialization.current[index_0] = height_1;
|
|
221
224
|
throttle(recomputeVirtualItems);
|
|
222
225
|
};
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[25] = t8;
|
|
226
|
+
$[24] = enabled;
|
|
227
|
+
$[25] = recomputeVirtualItems;
|
|
228
|
+
$[26] = t9;
|
|
227
229
|
} else {
|
|
228
|
-
|
|
230
|
+
t9 = $[26];
|
|
229
231
|
}
|
|
230
|
-
const collapseItemIntoSpacer =
|
|
231
|
-
let
|
|
232
|
-
if ($[
|
|
233
|
-
|
|
232
|
+
const collapseItemIntoSpacer = t9;
|
|
233
|
+
let t10;
|
|
234
|
+
if ($[27] !== enabled || $[28] !== length) {
|
|
235
|
+
t10 = Array.from({
|
|
234
236
|
length: enabled ? 0 : length
|
|
235
|
-
},
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
237
|
+
}, _temp2);
|
|
238
|
+
$[27] = enabled;
|
|
239
|
+
$[28] = length;
|
|
240
|
+
$[29] = t10;
|
|
239
241
|
} else {
|
|
240
|
-
|
|
242
|
+
t10 = $[29];
|
|
241
243
|
}
|
|
242
|
-
const allVisibleVirtualItems =
|
|
243
|
-
const
|
|
244
|
-
let
|
|
245
|
-
if ($[
|
|
246
|
-
|
|
247
|
-
virtualItems:
|
|
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,
|
|
248
250
|
intersectionObserverHandle,
|
|
249
251
|
collapseItemIntoSpacer
|
|
250
252
|
};
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[31] = t10;
|
|
253
|
+
$[30] = collapseItemIntoSpacer;
|
|
254
|
+
$[31] = intersectionObserverHandle;
|
|
254
255
|
$[32] = t11;
|
|
256
|
+
$[33] = t12;
|
|
255
257
|
} else {
|
|
256
|
-
|
|
258
|
+
t12 = $[33];
|
|
257
259
|
}
|
|
258
|
-
return
|
|
260
|
+
return t12;
|
|
259
261
|
}
|
|
260
|
-
function
|
|
262
|
+
function _temp2(_, index_1) {
|
|
261
263
|
return {
|
|
262
264
|
type: "rendered",
|
|
263
|
-
index:
|
|
265
|
+
index: index_1
|
|
264
266
|
};
|
|
265
267
|
}
|
|
266
|
-
function
|
|
268
|
+
function _temp(cb_0) {
|
|
267
269
|
return cb_0();
|
|
268
270
|
}
|
|
269
|
-
function _temp(a, b) {
|
|
270
|
-
return a + b;
|
|
271
|
-
}
|
|
272
271
|
function SpacerRow(t0) {
|
|
273
272
|
const $ = c(10);
|
|
274
|
-
if ($[0] !== "
|
|
273
|
+
if ($[0] !== "4b7f7b12eb2c9ae3487ce5d00c7be96dc9b8807a6bbfe2c9b314700f443d7188") {
|
|
275
274
|
for (let $i = 0; $i < 10; $i += 1) {
|
|
276
275
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
277
276
|
}
|
|
278
|
-
$[0] = "
|
|
277
|
+
$[0] = "4b7f7b12eb2c9ae3487ce5d00c7be96dc9b8807a6bbfe2c9b314700f443d7188";
|
|
279
278
|
}
|
|
280
279
|
const {
|
|
281
280
|
spacer: t1,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Table from './table-component';
|
|
2
2
|
import type { ReactNode, RefObject } from 'react';
|
|
3
|
-
import type Selection from '../legacy-table/selection';
|
|
4
3
|
export default Table;
|
|
5
4
|
export interface TableProps<T> {
|
|
6
5
|
/**
|
|
@@ -15,21 +14,11 @@ export interface TableProps<T> {
|
|
|
15
14
|
/**
|
|
16
15
|
* Used to render a row key, e.g. `<tr key={getKey(item, index)}>`.
|
|
17
16
|
*/
|
|
18
|
-
getKey: (item: T, index: number) => React.Key;
|
|
17
|
+
getKey: (item: T, index: number, items: T[]) => React.Key;
|
|
19
18
|
/**
|
|
20
|
-
*
|
|
19
|
+
* If true, the table header will not be rendered.
|
|
21
20
|
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* If true, the item can be focused by keyboard up/down arrows.
|
|
25
|
-
* Note that `false` doesn't prevent from `selection.focus()`.
|
|
26
|
-
*/
|
|
27
|
-
isItemKeyboardFocusable?: (item: T, index: number, items: T[]) => boolean;
|
|
28
|
-
/**
|
|
29
|
-
* When the item should get focused by keyboard navigation.
|
|
30
|
-
* The client is expected to update `selection`.
|
|
31
|
-
*/
|
|
32
|
-
onItemFocus?: (item: T | null, index: number, items: T[]) => void;
|
|
21
|
+
noHeader?: boolean;
|
|
33
22
|
/**
|
|
34
23
|
* Called when the client moves a row by dragging it.
|
|
35
24
|
*/
|
|
@@ -37,15 +26,15 @@ export interface TableProps<T> {
|
|
|
37
26
|
/**
|
|
38
27
|
* Called when the client clicks on SortButton in a column header.
|
|
39
28
|
*/
|
|
40
|
-
onSort?: (columnIndex: number, newOrder: SortOrder) => void;
|
|
29
|
+
onSort?: (columnIndex: number, newOrder: SortOrder, columns: Column<T>[]) => void;
|
|
41
30
|
/**
|
|
42
31
|
* Called when the client clicks on a column delete button in the header.
|
|
43
32
|
*/
|
|
44
|
-
onColumnDelete?: (columnIndex: number) => void;
|
|
33
|
+
onColumnDelete?: (columnIndex: number, columns: Column<T>[]) => void;
|
|
45
34
|
/**
|
|
46
35
|
* Called when the client moves a column.
|
|
47
36
|
*/
|
|
48
|
-
onColumnMove?: (fromIndex: number, toIndex: number) => void;
|
|
37
|
+
onColumnMove?: (fromIndex: number, toIndex: number, columns: Column<T>[]) => void;
|
|
49
38
|
/**
|
|
50
39
|
* Implement to specify props like `clickable`, handlers like `onClick`,
|
|
51
40
|
* a custom `className`, a `ref` etc., or to provide a custom renderer.
|
|
@@ -89,7 +78,7 @@ export interface TableProps<T> {
|
|
|
89
78
|
* - ResizeObserver observes `document.body`
|
|
90
79
|
* - IntersectionObserver has no root (i.e. the viewport is used)
|
|
91
80
|
*/
|
|
92
|
-
scrollerRef?:
|
|
81
|
+
scrollerRef?: RefObject<HTMLElement | null>;
|
|
93
82
|
/**
|
|
94
83
|
* Used with `virtualizeRows` to estimate the height of items that have not been rendered yet.
|
|
95
84
|
* The function should be fast and side-effect free. Do not measure the DOM here.
|
|
@@ -105,7 +94,7 @@ export interface TableProps<T> {
|
|
|
105
94
|
*
|
|
106
95
|
* Default: 37px = 16px padding + 20px line height + 1px border.
|
|
107
96
|
*/
|
|
108
|
-
estimateHeight?: (index: number) => number;
|
|
97
|
+
estimateHeight?: (item: T, index: number, items: T[]) => number;
|
|
109
98
|
/**
|
|
110
99
|
* When using `virtualizeRows`, the number of pixels above and below the viewport
|
|
111
100
|
* to materialize in advance.
|
|
@@ -151,10 +140,6 @@ export interface TableProps<T> {
|
|
|
151
140
|
* Whether to show a small gear button at the top right corner.
|
|
152
141
|
*/
|
|
153
142
|
columnEditButton?: 'everywhere' | 'mobileOnly';
|
|
154
|
-
/**
|
|
155
|
-
* Optional ref to install on the table element.
|
|
156
|
-
*/
|
|
157
|
-
ref?: RefObject<HTMLTableElement | null>;
|
|
158
143
|
/**
|
|
159
144
|
* Applied to the `<thead>` element.
|
|
160
145
|
*/
|
|
@@ -174,7 +159,7 @@ export type SortOrder = 'none' | 'ascending' | 'descending';
|
|
|
174
159
|
*/
|
|
175
160
|
export interface Column<T> {
|
|
176
161
|
/**
|
|
177
|
-
* Used to render a row key, e.g. `<thead><tr><td key={getKey(item, index)}...</td></tr></thead>`.
|
|
162
|
+
* Used to render a row key, e.g. `<thead><tr><td key={getKey(item, index, items)}...</td></tr></thead>`.
|
|
178
163
|
*/
|
|
179
164
|
key: React.Key;
|
|
180
165
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import Table from './table-component.js';
|
|
2
|
-
import 'react
|
|
2
|
+
import 'react/compiler-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'classnames';
|
|
5
|
+
import 'react-merge-refs';
|
|
5
6
|
import '../global/intersection-observer-context.js';
|
|
6
7
|
import './table-virtualize.js';
|
|
7
|
-
import '../global/use-event-callback.js';
|
|
8
8
|
import '../_helpers/table.js';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
10
|
import './default-item-renderer.js';
|
|
11
11
|
import './table-const.js';
|
|
12
|
-
import './table-
|
|
12
|
+
import './table-primitives.js';
|
|
13
13
|
import '@jetbrains/icons/unsorted-12px';
|
|
14
14
|
import '@jetbrains/icons/arrow-12px-down';
|
|
15
15
|
import '@jetbrains/icons/arrow-12px-up';
|
|
@@ -19,6 +19,7 @@ import 'util-deprecate';
|
|
|
19
19
|
import '../icon/icon.constants.js';
|
|
20
20
|
import '../_helpers/icon-svg.js';
|
|
21
21
|
import '../global/memoize.js';
|
|
22
|
+
import './table-row-focus.js';
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
|
|
@@ -8,7 +8,7 @@ import CollapsibleTabs from './collapsible-tabs.js';
|
|
|
8
8
|
import { CustomItem } from './custom-item.js';
|
|
9
9
|
import { getTabId } from './tabs.utils.js';
|
|
10
10
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
-
import 'react
|
|
11
|
+
import 'react/compiler-runtime';
|
|
12
12
|
import '../link/link.js';
|
|
13
13
|
import '../link/clickable-link.js';
|
|
14
14
|
import '../_helpers/link.js';
|
|
@@ -5,7 +5,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
5
5
|
import 'classnames';
|
|
6
6
|
import '../global/memoize.js';
|
|
7
7
|
import '../_helpers/tab-link.js';
|
|
8
|
-
import 'react
|
|
8
|
+
import 'react/compiler-runtime';
|
|
9
9
|
import '../link/link.js';
|
|
10
10
|
import '../link/clickable-link.js';
|
|
11
11
|
import '../_helpers/link.js';
|
package/components/tabs/tabs.js
CHANGED
|
@@ -7,7 +7,7 @@ import 'classnames';
|
|
|
7
7
|
import '../global/memoize.js';
|
|
8
8
|
import '../global/data-tests.js';
|
|
9
9
|
import '../_helpers/tab-link.js';
|
|
10
|
-
import 'react
|
|
10
|
+
import 'react/compiler-runtime';
|
|
11
11
|
import '../link/link.js';
|
|
12
12
|
import '../link/clickable-link.js';
|
|
13
13
|
import 'react/jsx-runtime';
|
package/components/tag/tag.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ControlsHeight } from '../global/configuration.js';
|
|
|
10
10
|
import 'util-deprecate';
|
|
11
11
|
import '../icon/icon.constants.js';
|
|
12
12
|
import '../_helpers/icon-svg.js';
|
|
13
|
-
import 'react
|
|
13
|
+
import 'react/compiler-runtime';
|
|
14
14
|
import '../global/memoize.js';
|
|
15
15
|
import '@jetbrains/icons/chevron-down';
|
|
16
16
|
import '@jetbrains/icons/chevron-12px-down';
|
|
@@ -110,6 +110,8 @@ export default class TagsInput extends PureComponent<TagsInputProps, TagsInputSt
|
|
|
110
110
|
selectRef: (el: Select | null) => void;
|
|
111
111
|
render(): React.JSX.Element;
|
|
112
112
|
}
|
|
113
|
-
export declare const RerenderableTagsInput:
|
|
113
|
+
export declare const RerenderableTagsInput: ({ ref, ...props }: TagsInputProps & {
|
|
114
|
+
ref?: React.Ref<TagsInput> | undefined;
|
|
115
|
+
}) => React.JSX.Element;
|
|
114
116
|
export type TagsInputAttrs = React.JSX.LibraryManagedAttributes<typeof TagsInput, TagsInputProps>;
|
|
115
117
|
export {};
|
|
@@ -17,7 +17,7 @@ import 'dequal';
|
|
|
17
17
|
import '../global/data-tests.js';
|
|
18
18
|
import '../global/typescript-utils.js';
|
|
19
19
|
import '../_helpers/anchor.js';
|
|
20
|
-
import 'react
|
|
20
|
+
import 'react/compiler-runtime';
|
|
21
21
|
import '../button/button.js';
|
|
22
22
|
import '@jetbrains/icons/chevron-down';
|
|
23
23
|
import '@jetbrains/icons/chevron-12px-down';
|
|
@@ -7,7 +7,7 @@ import '../icon/icon.js';
|
|
|
7
7
|
import 'util-deprecate';
|
|
8
8
|
import '../icon/icon.constants.js';
|
|
9
9
|
import '../_helpers/icon-svg.js';
|
|
10
|
-
import 'react
|
|
10
|
+
import 'react/compiler-runtime';
|
|
11
11
|
import '../global/memoize.js';
|
|
12
12
|
import '../button/button.js';
|
|
13
13
|
import '@jetbrains/icons/chevron-down';
|
|
@@ -3,7 +3,7 @@ import classNames from 'classnames';
|
|
|
3
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
4
4
|
import ControlHelp from '../control-help/control-help.js';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
-
import 'react
|
|
6
|
+
import 'react/compiler-runtime';
|
|
7
7
|
|
|
8
8
|
var styles = {"toggle":"ring-toggle-toggle","switch":"ring-toggle-switch","disabled":"ring-toggle-disabled","label":"ring-toggle-label","help":"ring-toggle-help","leftLabel":"ring-toggle-leftLabel","switchWrapper":"ring-toggle-switchWrapper","input":"ring-toggle-input","size16":"ring-toggle-size16","size14":"ring-toggle-size14","size20":"ring-toggle-size20"};
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ import 'combokeys';
|
|
|
15
15
|
import '../global/sniffer.js';
|
|
16
16
|
import 'sniffr';
|
|
17
17
|
import '../tab-trap/tab-trap.js';
|
|
18
|
-
import 'react
|
|
18
|
+
import 'react/compiler-runtime';
|
|
19
19
|
import '../global/configuration.js';
|
|
20
20
|
import '../popup/position.js';
|
|
21
21
|
import '../popup/popup.consts.js';
|
|
@@ -200,7 +200,7 @@ class Tooltip extends Component {
|
|
|
200
200
|
}, popupProps?.className),
|
|
201
201
|
children: title
|
|
202
202
|
});
|
|
203
|
-
return /*#__PURE__*/jsx(TooltipContext
|
|
203
|
+
return /*#__PURE__*/jsx(TooltipContext, {
|
|
204
204
|
value: {
|
|
205
205
|
onNestedTooltipShow,
|
|
206
206
|
onNestedTooltipHide
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ReactNode, type Ref } from 'react';
|
|
2
2
|
export type UploadVariant = 'empty' | 'error' | 'success';
|
|
3
3
|
interface Props {
|
|
4
4
|
className?: string;
|
|
@@ -10,10 +10,11 @@ interface Props {
|
|
|
10
10
|
accept?: HTMLInputElement['accept'];
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
variant?: UploadVariant;
|
|
13
|
+
ref?: Ref<UploadHandle>;
|
|
13
14
|
children?: ReactNode;
|
|
14
15
|
}
|
|
15
16
|
export interface UploadHandle {
|
|
16
17
|
openFilePicker: () => void;
|
|
17
18
|
}
|
|
18
|
-
export
|
|
19
|
-
export
|
|
19
|
+
export default function UploadInner({ children, className, onFilesSelected, onFilesRejected, validate, variant, multiple, renderIcon, accept, disabled, ref, }: Props): import("react").JSX.Element;
|
|
20
|
+
export {};
|