@jetbrains/ring-ui-built 8.0.0-beta.2 → 8.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/components/_helpers/anchor.js +1 -1
  2. package/components/_helpers/avatar-info.js +1 -1
  3. package/components/_helpers/heading.js +2 -2
  4. package/components/_helpers/icon-svg.js +1 -1
  5. package/components/_helpers/legacy-table.js +3 -0
  6. package/components/_helpers/tab-link.js +1 -1
  7. package/components/_helpers/table.js +1 -1
  8. package/components/_helpers/theme.js +50 -38
  9. package/components/alert/alert.js +2 -2
  10. package/components/alert-service/alert-service.js +1 -1
  11. package/components/auth/auth-core.js +1 -1
  12. package/components/auth/auth.js +1 -1
  13. package/components/auth/down-notification.js +1 -1
  14. package/components/auth/iframe-flow.js +2 -2
  15. package/components/auth/storage.js +1 -1
  16. package/components/auth-dialog/auth-dialog.js +1 -1
  17. package/components/auth-dialog-service/auth-dialog-service.js +2 -2
  18. package/components/avatar/avatar-info.js +1 -1
  19. package/components/avatar/avatar.js +1 -1
  20. package/components/avatar/fallback-avatar.js +1 -1
  21. package/components/avatar-stack/avatar-stack.js +1 -1
  22. package/components/banner/banner.js +1 -1
  23. package/components/button/button.js +1 -1
  24. package/components/button-group/button-group.js +1 -1
  25. package/components/checkbox/checkbox.d.ts +1 -1
  26. package/components/checkbox/checkbox.js +1 -1
  27. package/components/clipboard/clipboard.js +1 -1
  28. package/components/collapse/collapse-content.js +5 -5
  29. package/components/collapse/collapse-control.js +5 -5
  30. package/components/collapse/collapse.js +4 -4
  31. package/components/collapsible-group/collapsible-group.d.ts +20 -0
  32. package/components/collapsible-group/collapsible-group.js +382 -0
  33. package/components/components/util-stories.js +63 -1
  34. package/components/confirm/confirm.js +1 -1
  35. package/components/confirm-service/confirm-service.js +2 -2
  36. package/components/contenteditable/contenteditable.js +1 -1
  37. package/components/control-help/control-help.js +1 -1
  38. package/components/control-label/control-label.js +1 -1
  39. package/components/data-list/data-list.d.ts +1 -1
  40. package/components/data-list/data-list.js +1 -1
  41. package/components/data-list/data-list.mock.d.ts +1 -1
  42. package/components/data-list/data-list.mock.js +1 -1
  43. package/components/data-list/item.d.ts +1 -1
  44. package/components/data-list/item.js +1 -1
  45. package/components/data-list/selection.d.ts +1 -1
  46. package/components/data-list/selection.js +2 -2
  47. package/components/data-list/title.js +1 -1
  48. package/components/date-picker/date-input.js +1 -1
  49. package/components/date-picker/date-picker.js +1 -2
  50. package/components/date-picker/date-popup.js +4 -5
  51. package/components/date-picker/month-names.js +1 -1
  52. package/components/date-picker/month-slider.js +1 -1
  53. package/components/date-picker/month.js +1 -1
  54. package/components/date-picker/months.js +4 -5
  55. package/components/date-picker/use-scroll-behavior.js +45 -44
  56. package/components/date-picker/weekdays.js +1 -1
  57. package/components/date-picker/years.js +6 -7
  58. package/components/dialog/dialog.d.ts +2 -2
  59. package/components/dialog/dialog.js +3 -3
  60. package/components/dropdown/anchor.js +1 -1
  61. package/components/dropdown/dropdown.js +1 -1
  62. package/components/dropdown-menu/dropdown-menu.d.ts +4 -4
  63. package/components/dropdown-menu/dropdown-menu.js +68 -63
  64. package/components/editable-heading/editable-heading.d.ts +1 -2
  65. package/components/editable-heading/editable-heading.js +127 -113
  66. package/components/error-bubble/error-bubble.js +1 -1
  67. package/components/error-message/error-message.js +1 -1
  68. package/components/expand/collapsible-group.d.ts +8 -16
  69. package/components/expand/collapsible-group.js +34 -364
  70. package/components/footer/footer.js +1 -1
  71. package/components/global/compose-refs.d.ts +2 -1
  72. package/components/global/compose-refs.js +44 -8
  73. package/components/global/create-stateful-context.js +11 -11
  74. package/components/global/focus-sensor-hoc.js +1 -0
  75. package/components/global/focus-with-temporary-tabindex.d.ts +11 -0
  76. package/components/global/focus-with-temporary-tabindex.js +23 -0
  77. package/components/global/intersection-observer-context.d.ts +31 -11
  78. package/components/global/intersection-observer-context.js +55 -57
  79. package/components/global/is-within-interactive-element.d.ts +6 -0
  80. package/components/global/is-within-interactive-element.js +11 -0
  81. package/components/global/is-within-navigable-element.d.ts +6 -0
  82. package/components/global/is-within-navigable-element.js +11 -0
  83. package/components/global/parse-css-duration.d.ts +5 -0
  84. package/components/global/parse-css-duration.js +14 -0
  85. package/components/global/rerender-hoc.d.ts +4 -2
  86. package/components/global/rerender-hoc.js +11 -24
  87. package/components/global/schedule-with-cleanup.d.ts +12 -0
  88. package/components/global/schedule-with-cleanup.js +36 -0
  89. package/components/{legacy-table/selection.d.ts → global/table-selection.d.ts} +14 -14
  90. package/components/{legacy-table/selection.js → global/table-selection.js} +4 -4
  91. package/components/global/theme.d.ts +4 -3
  92. package/components/global/theme.js +2 -2
  93. package/components/header/header-icon.js +1 -1
  94. package/components/header/header.js +2 -2
  95. package/components/header/links.js +1 -1
  96. package/components/header/logo.js +1 -1
  97. package/components/header/profile.js +1 -1
  98. package/components/header/services.js +1 -1
  99. package/components/header/smart-profile.js +1 -1
  100. package/components/header/smart-services.js +1 -1
  101. package/components/heading/heading.js +4 -4
  102. package/components/i18n/i18n-context.js +4 -4
  103. package/components/icon/icon-svg.js +1 -1
  104. package/components/icon/icon.js +1 -1
  105. package/components/icon/index.js +1 -1
  106. package/components/input/input.d.ts +1 -1
  107. package/components/input/input.js +1 -1
  108. package/components/internal/column-animation.js +133 -0
  109. package/components/internal/table-header.js +1109 -0
  110. package/components/internal/virtual-items.js +353 -0
  111. package/components/island/adaptive-island-hoc.js +3 -3
  112. package/components/island/content.d.ts +7 -2
  113. package/components/island/content.js +27 -18
  114. package/components/island/header.js +1 -1
  115. package/components/island/island.js +1 -1
  116. package/components/legacy-table/cell.js +1 -1
  117. package/components/legacy-table/header-cell.js +4 -4
  118. package/components/legacy-table/header.js +2 -2
  119. package/components/legacy-table/multitable.d.ts +1 -1
  120. package/components/legacy-table/row-with-focus-sensor.js +2 -2
  121. package/components/legacy-table/row.d.ts +1 -1
  122. package/components/legacy-table/row.js +4 -4
  123. package/components/legacy-table/selection-adapter.d.ts +3 -3
  124. package/components/legacy-table/selection-shortcuts-hoc.d.ts +5 -5
  125. package/components/legacy-table/simple-table.d.ts +2 -2
  126. package/components/legacy-table/simple-table.js +4 -4
  127. package/components/legacy-table/smart-table.d.ts +5 -5
  128. package/components/legacy-table/smart-table.js +5 -5
  129. package/components/legacy-table/table.js +2 -2
  130. package/components/list/list-item.js +1 -1
  131. package/components/list/list-users-groups-source.js +1 -1
  132. package/components/list/list.js +1 -1
  133. package/components/login-dialog/login-dialog.js +1 -1
  134. package/components/login-dialog/service.js +2 -2
  135. package/components/markdown/markdown.js +2 -2
  136. package/components/message/message.js +2 -2
  137. package/components/old-browsers-message/white-list.js +2 -2
  138. package/components/pager/pager.js +1 -1
  139. package/components/popup/popup.d.ts +2 -0
  140. package/components/popup/popup.js +6 -2
  141. package/components/popup/popup.target.d.ts +3 -2
  142. package/components/popup/popup.target.js +32 -28
  143. package/components/popup-menu/popup-menu.js +1 -1
  144. package/components/query-assist/query-assist-suggestions.js +1 -1
  145. package/components/query-assist/query-assist.d.ts +3 -1
  146. package/components/query-assist/query-assist.js +2 -2
  147. package/components/radio/radio-item.d.ts +3 -3
  148. package/components/radio/radio-item.js +32 -18
  149. package/components/radio/radio.d.ts +2 -2
  150. package/components/radio/radio.js +2 -2
  151. package/components/scrollable-section/scrollable-section.js +1 -1
  152. package/components/select/chevron-button.js +1 -1
  153. package/components/select/select-filter.js +1 -1
  154. package/components/select/select-popup.d.ts +1 -1
  155. package/components/select/select-popup.js +1 -1
  156. package/components/select/select.d.ts +4 -2
  157. package/components/select/select.js +1 -1
  158. package/components/slider/slider.js +100 -96
  159. package/components/storage/storage-local.js +1 -1
  160. package/components/storage/storage.js +1 -1
  161. package/components/style.css +1 -1
  162. package/components/tab-trap/tab-trap.d.ts +3 -3
  163. package/components/tab-trap/tab-trap.js +83 -80
  164. package/components/table/default-item-renderer.d.ts +35 -11
  165. package/components/table/default-item-renderer.js +118 -171
  166. package/components/table/internal/column-animation.d.ts +16 -0
  167. package/components/table/internal/table-header.d.ts +4 -0
  168. package/components/table/internal/virtual-items.d.ts +34 -0
  169. package/components/table/item-virtualization.d.ts +35 -0
  170. package/components/table/item-virtualization.js +71 -0
  171. package/components/table/table-const.d.ts +40 -6
  172. package/components/table/table-const.js +15 -6
  173. package/components/table/table-primitives.d.ts +21 -0
  174. package/components/table/table-primitives.js +123 -0
  175. package/components/table/table-props.d.ts +280 -0
  176. package/components/table/table-props.js +1 -0
  177. package/components/table/table.d.ts +205 -224
  178. package/components/table/table.js +356 -14
  179. package/components/tabs/collapsible-more.js +1 -1
  180. package/components/tabs/collapsible-tab.js +1 -1
  181. package/components/tabs/collapsible-tabs.js +1 -1
  182. package/components/tabs/dumb-tabs.js +1 -1
  183. package/components/tabs/smart-tabs.js +1 -1
  184. package/components/tabs/tab-link.js +1 -1
  185. package/components/tabs/tabs.js +1 -1
  186. package/components/tag/tag.js +1 -1
  187. package/components/tags-input/tags-input.d.ts +3 -1
  188. package/components/tags-input/tags-input.js +1 -1
  189. package/components/tags-list/tags-list.js +1 -1
  190. package/components/toggle/toggle.js +1 -1
  191. package/components/tooltip/tooltip.js +3 -3
  192. package/components/upload/upload.d.ts +4 -3
  193. package/components/upload/upload.js +7 -29
  194. package/components/user-agreement/service.js +8 -8
  195. package/components/user-agreement/user-agreement.js +1 -1
  196. package/components/user-card/card.js +1 -1
  197. package/components/user-card/smart-user-card-tooltip.js +1 -1
  198. package/components/user-card/tooltip.js +1 -1
  199. package/components/user-card/user-card.js +1 -1
  200. package/components/util-stories.d.ts +26 -0
  201. package/package.json +7 -7
  202. package/components/_helpers/table2.js +0 -3
  203. package/components/date-picker/use-intersection-observer.d.ts +0 -6
  204. package/components/date-picker/use-intersection-observer.js +0 -93
  205. package/components/global/composeRefs.d.ts +0 -6
  206. package/components/global/composeRefs.js +0 -9
  207. package/components/global/use-event-callback.d.ts +0 -1
  208. package/components/global/use-event-callback.js +0 -44
  209. package/components/table/table-base.d.ts +0 -24
  210. package/components/table/table-base.js +0 -311
  211. package/components/table/table-component.d.ts +0 -53
  212. package/components/table/table-component.js +0 -316
  213. package/components/table/table-virtualize.d.ts +0 -32
  214. package/components/table/table-virtualize.js +0 -330
@@ -0,0 +1,353 @@
1
+ import { c } from 'react/compiler-runtime';
2
+ import { createContext, useRef, useState, useEffect } from 'react';
3
+ import { useIntersectionObserverHandle } from '../global/intersection-observer-context.js';
4
+ import { setTimeoutWithCleanup } from '../global/schedule-with-cleanup.js';
5
+ import { s as styles } from '../_helpers/table.js';
6
+ import { jsx } from 'react/jsx-runtime';
7
+
8
+ const CollapseItemIntoSpacerContext = /*#__PURE__*/createContext(() => {});
9
+ /**
10
+ * RAF is somewhat too frequent. Most updates happen on virtualization boundaries
11
+ * within the invisible overscroll area, so they don't require such a high update rate.
12
+ * Therefore, we throttle with a custom delay.
13
+ */
14
+ const virtualizationThrottleDelay = 50;
15
+ function useVirtualItems(t0) {
16
+ const $ = c(41);
17
+ if ($[0] !== "80b5c65d0516051224f2341cd07e0f80847b5a4f7e3a2576798e9173d2ec550d") {
18
+ for (let $i = 0; $i < 41; $i += 1) {
19
+ $[$i] = Symbol.for("react.memo_cache_sentinel");
20
+ }
21
+ $[0] = "80b5c65d0516051224f2341cd07e0f80847b5a4f7e3a2576798e9173d2ec550d";
22
+ }
23
+ const {
24
+ enabled,
25
+ data,
26
+ data: t1,
27
+ scrollerRef,
28
+ tableRef,
29
+ estimateHeight,
30
+ lookaheadPx,
31
+ retentionMarginPx,
32
+ minScrollAndResizeDeltaPx
33
+ } = t0;
34
+ const {
35
+ length
36
+ } = t1;
37
+ let t2;
38
+ if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
39
+ t2 = [];
40
+ $[1] = t2;
41
+ } else {
42
+ t2 = $[1];
43
+ }
44
+ const itemsMaterialization = useRef(t2);
45
+ let t3;
46
+ if ($[2] !== data || $[3] !== enabled || $[4] !== estimateHeight) {
47
+ t3 = () => enabled ? getAllVirtualizedItems(data, estimateHeight) : [];
48
+ $[2] = data;
49
+ $[3] = enabled;
50
+ $[4] = estimateHeight;
51
+ $[5] = t3;
52
+ } else {
53
+ t3 = $[5];
54
+ }
55
+ const [virtualItems, setVirtualItems] = useState(t3);
56
+ let t4;
57
+ if ($[6] !== data || $[7] !== estimateHeight || $[8] !== lookaheadPx || $[9] !== scrollerRef || $[10] !== tableRef) {
58
+ t4 = () => {
59
+ var _scrollerRect$top;
60
+ if (!tableRef.current) {
61
+ return;
62
+ }
63
+ const scrollerRect = scrollerRef?.current?.getBoundingClientRect();
64
+ const visibleStart = (_scrollerRect$top = scrollerRect?.top) !== null && _scrollerRect$top !== void 0 ? _scrollerRect$top : 0;
65
+ const visibleEnd = scrollerRect ? Math.min(scrollerRect.bottom, window.innerHeight) : window.innerHeight;
66
+ const materializeStart = visibleStart - lookaheadPx;
67
+ const materializeEnd = visibleEnd + lookaheadPx;
68
+ for (const spacerRow of tableRef.current.querySelectorAll(`.${styles.spacerRow}`)) {
69
+ const spacerRect = spacerRow.getBoundingClientRect();
70
+ if (spacerRect.bottom < materializeStart || spacerRect.top > materializeEnd) {
71
+ continue;
72
+ }
73
+ const from = Number(spacerRow.dataset.from);
74
+ const to = Number(spacerRow.dataset.to);
75
+ let currentTop = spacerRect.top;
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);
79
+ const itemTop = currentTop;
80
+ const itemBottom = currentTop + itemHeight;
81
+ if (itemBottom >= materializeStart && itemTop <= materializeEnd) {
82
+ itemsMaterialization.current[i] = true;
83
+ } else {
84
+ if (itemTop > materializeEnd) {
85
+ break;
86
+ }
87
+ }
88
+ currentTop = currentTop + itemHeight;
89
+ }
90
+ }
91
+ };
92
+ $[6] = data;
93
+ $[7] = estimateHeight;
94
+ $[8] = lookaheadPx;
95
+ $[9] = scrollerRef;
96
+ $[10] = tableRef;
97
+ $[11] = t4;
98
+ } else {
99
+ t4 = $[11];
100
+ }
101
+ const materializeVisibleSpacerItems = t4;
102
+ let t5;
103
+ if ($[12] !== data || $[13] !== estimateHeight || $[14] !== length) {
104
+ t5 = () => {
105
+ const newVirtualItems = [];
106
+ let spacerCounter = 0;
107
+ for (let i_0 = 0; i_0 < length; i_0++) {
108
+ const itemMaterialization_0 = itemsMaterialization.current[i_0];
109
+ if (itemMaterialization_0 === true) {
110
+ newVirtualItems.push({
111
+ type: "materialized",
112
+ index: i_0
113
+ });
114
+ } else {
115
+ const lastItemOrSpacer = newVirtualItems[newVirtualItems.length - 1];
116
+ const lastSpacer = lastItemOrSpacer?.type === "spacer" ? lastItemOrSpacer : undefined;
117
+ const height = typeof itemMaterialization_0 === "number" ? itemMaterialization_0 : estimateHeight(data[i_0], i_0, data);
118
+ if (lastSpacer) {
119
+ lastSpacer.to = i_0 + 1;
120
+ lastSpacer.height = lastSpacer.height + height;
121
+ } else {
122
+ newVirtualItems.push({
123
+ type: "spacer",
124
+ from: i_0,
125
+ to: i_0 + 1,
126
+ height,
127
+ key: spacerKey(spacerCounter++)
128
+ });
129
+ }
130
+ }
131
+ }
132
+ setVirtualItems(newVirtualItems);
133
+ };
134
+ $[12] = data;
135
+ $[13] = estimateHeight;
136
+ $[14] = length;
137
+ $[15] = t5;
138
+ } else {
139
+ t5 = $[15];
140
+ }
141
+ const recomputeVirtualItems = t5;
142
+ const timerIdRef = useRef(null);
143
+ const callbacksRef = useRef(null);
144
+ let t6;
145
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
146
+ t6 = (...t7) => {
147
+ const callbacks = t7;
148
+ if (timerIdRef.current != null) {
149
+ callbacks.forEach(cb => {
150
+ callbacksRef.current.delete(cb);
151
+ callbacksRef.current.add(cb);
152
+ });
153
+ return;
154
+ }
155
+ callbacksRef.current = new Set(callbacks);
156
+ timerIdRef.current = window.setTimeout(() => {
157
+ callbacksRef.current.forEach(_temp);
158
+ timerIdRef.current = null;
159
+ callbacksRef.current = null;
160
+ }, virtualizationThrottleDelay);
161
+ };
162
+ $[16] = t6;
163
+ } else {
164
+ t6 = $[16];
165
+ }
166
+ const throttle = t6;
167
+ const prevEnabledRef = useRef(enabled);
168
+ let t7;
169
+ if ($[17] !== data || $[18] !== enabled || $[19] !== estimateHeight || $[20] !== materializeVisibleSpacerItems || $[21] !== minScrollAndResizeDeltaPx || $[22] !== recomputeVirtualItems || $[23] !== scrollerRef) {
170
+ t7 = () => {
171
+ const prevEnabled = prevEnabledRef.current;
172
+ prevEnabledRef.current = enabled;
173
+ if (!enabled) {
174
+ return;
175
+ }
176
+ const scroller = scrollerRef?.current;
177
+ let lastHandledScrollTop = -Infinity;
178
+ let lastHandledHeight = -Infinity;
179
+ let lastHandledWidth = -Infinity;
180
+ const handleViewportChange = function handleViewportChange() {
181
+ const scrollTop = scroller ? scroller.scrollTop : window.scrollY;
182
+ const height_0 = scroller ? scroller.clientHeight : window.innerHeight;
183
+ const width = scroller ? scroller.clientWidth : window.innerWidth;
184
+ if (Math.abs(scrollTop - lastHandledScrollTop) >= minScrollAndResizeDeltaPx || Math.abs(height_0 - lastHandledHeight) >= minScrollAndResizeDeltaPx || Math.abs(width - lastHandledWidth) >= minScrollAndResizeDeltaPx) {
185
+ lastHandledScrollTop = scrollTop;
186
+ lastHandledHeight = height_0;
187
+ lastHandledWidth = width;
188
+ throttle(materializeVisibleSpacerItems, recomputeVirtualItems);
189
+ }
190
+ };
191
+ const scrollTarget = scroller !== null && scroller !== void 0 ? scroller : window;
192
+ scrollTarget.addEventListener("scroll", handleViewportChange, {
193
+ passive: true
194
+ });
195
+ const resizeObserver = new ResizeObserver(handleViewportChange);
196
+ const resizeTarget = scroller !== null && scroller !== void 0 ? scroller : document.documentElement;
197
+ resizeObserver.observe(resizeTarget);
198
+ let timeoutCleanup;
199
+ if (!prevEnabled) {
200
+ timeoutCleanup = setTimeoutWithCleanup(() => {
201
+ itemsMaterialization.current = [];
202
+ setVirtualItems(getAllVirtualizedItems(data, estimateHeight));
203
+ handleViewportChange();
204
+ });
205
+ } else {
206
+ handleViewportChange();
207
+ }
208
+ return () => {
209
+ timeoutCleanup?.();
210
+ scrollTarget.removeEventListener("scroll", handleViewportChange);
211
+ resizeObserver.unobserve(resizeTarget);
212
+ resizeObserver.disconnect();
213
+ if (timerIdRef.current != null) {
214
+ window.clearTimeout(timerIdRef.current);
215
+ timerIdRef.current = null;
216
+ callbacksRef.current = null;
217
+ }
218
+ };
219
+ };
220
+ $[17] = data;
221
+ $[18] = enabled;
222
+ $[19] = estimateHeight;
223
+ $[20] = materializeVisibleSpacerItems;
224
+ $[21] = minScrollAndResizeDeltaPx;
225
+ $[22] = recomputeVirtualItems;
226
+ $[23] = scrollerRef;
227
+ $[24] = t7;
228
+ } else {
229
+ t7 = $[24];
230
+ }
231
+ let t8;
232
+ if ($[25] !== data || $[26] !== enabled || $[27] !== estimateHeight || $[28] !== length || $[29] !== materializeVisibleSpacerItems || $[30] !== minScrollAndResizeDeltaPx || $[31] !== recomputeVirtualItems || $[32] !== scrollerRef) {
233
+ t8 = [data, enabled, estimateHeight, length, materializeVisibleSpacerItems, minScrollAndResizeDeltaPx, recomputeVirtualItems, scrollerRef, throttle];
234
+ $[25] = data;
235
+ $[26] = enabled;
236
+ $[27] = estimateHeight;
237
+ $[28] = length;
238
+ $[29] = materializeVisibleSpacerItems;
239
+ $[30] = minScrollAndResizeDeltaPx;
240
+ $[31] = recomputeVirtualItems;
241
+ $[32] = scrollerRef;
242
+ $[33] = t8;
243
+ } else {
244
+ t8 = $[33];
245
+ }
246
+ useEffect(t7, t8);
247
+ const intersectionObserverHandle = useIntersectionObserverHandle(scrollerRef, scrollerRef ? retentionMarginPx : undefined, !scrollerRef ? retentionMarginPx : undefined);
248
+ let t9;
249
+ if ($[34] !== enabled || $[35] !== recomputeVirtualItems) {
250
+ t9 = (index, height_1) => {
251
+ if (!enabled) {
252
+ return;
253
+ }
254
+ itemsMaterialization.current[index] = height_1;
255
+ throttle(recomputeVirtualItems);
256
+ };
257
+ $[34] = enabled;
258
+ $[35] = recomputeVirtualItems;
259
+ $[36] = t9;
260
+ } else {
261
+ t9 = $[36];
262
+ }
263
+ const collapseItemIntoSpacer = t9;
264
+ let t10;
265
+ if ($[37] !== collapseItemIntoSpacer || $[38] !== intersectionObserverHandle || $[39] !== virtualItems) {
266
+ t10 = {
267
+ virtualItems,
268
+ intersectionObserverHandle,
269
+ collapseItemIntoSpacer
270
+ };
271
+ $[37] = collapseItemIntoSpacer;
272
+ $[38] = intersectionObserverHandle;
273
+ $[39] = virtualItems;
274
+ $[40] = t10;
275
+ } else {
276
+ t10 = $[40];
277
+ }
278
+ return t10;
279
+ }
280
+ function _temp(cb_0) {
281
+ return cb_0();
282
+ }
283
+ function getAllVirtualizedItems(data, estimateHeight) {
284
+ return [{
285
+ type: 'spacer',
286
+ from: 0,
287
+ to: data.length,
288
+ height: data.reduce((acc, item, index, items) => acc + estimateHeight(item, index, items), 0),
289
+ key: spacerKey(0)
290
+ }];
291
+ }
292
+ function spacerKey(index) {
293
+ return `__${styles.spacerRow}-${index}`;
294
+ }
295
+ function SpacerRow(t0) {
296
+ const $ = c(10);
297
+ if ($[0] !== "80b5c65d0516051224f2341cd07e0f80847b5a4f7e3a2576798e9173d2ec550d") {
298
+ for (let $i = 0; $i < 10; $i += 1) {
299
+ $[$i] = Symbol.for("react.memo_cache_sentinel");
300
+ }
301
+ $[0] = "80b5c65d0516051224f2341cd07e0f80847b5a4f7e3a2576798e9173d2ec550d";
302
+ }
303
+ const {
304
+ spacer: t1,
305
+ colSpan
306
+ } = t0;
307
+ const {
308
+ from,
309
+ to,
310
+ height
311
+ } = t1;
312
+ let t2;
313
+ if ($[1] !== height) {
314
+ t2 = {
315
+ height
316
+ };
317
+ $[1] = height;
318
+ $[2] = t2;
319
+ } else {
320
+ t2 = $[2];
321
+ }
322
+ let t3;
323
+ if ($[3] !== colSpan || $[4] !== t2) {
324
+ t3 = /*#__PURE__*/jsx("td", {
325
+ className: styles.spacerCell,
326
+ colSpan: colSpan,
327
+ style: t2
328
+ });
329
+ $[3] = colSpan;
330
+ $[4] = t2;
331
+ $[5] = t3;
332
+ } else {
333
+ t3 = $[5];
334
+ }
335
+ let t4;
336
+ if ($[6] !== from || $[7] !== t3 || $[8] !== to) {
337
+ t4 = /*#__PURE__*/jsx("tr", {
338
+ className: styles.spacerRow,
339
+ "data-from": from,
340
+ "data-to": to,
341
+ children: t3
342
+ });
343
+ $[6] = from;
344
+ $[7] = t3;
345
+ $[8] = to;
346
+ $[9] = t4;
347
+ } else {
348
+ t4 = $[9];
349
+ }
350
+ return t4;
351
+ }
352
+
353
+ export { CollapseItemIntoSpacerContext, SpacerRow, useVirtualItems };
@@ -1,4 +1,4 @@
1
- import { createContext, Component } from 'react';
1
+ import { Component, createContext } from 'react';
2
2
  import { interpolateLinear } from '../global/linear-function.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -25,9 +25,9 @@ function adaptiveIslandHOC(ComposedComponent) {
25
25
  }
26
26
  };
27
27
  render() {
28
- return /*#__PURE__*/jsx(PhaseContext.Provider, {
28
+ return /*#__PURE__*/jsx(PhaseContext, {
29
29
  value: this.state.phase,
30
- children: /*#__PURE__*/jsx(ScrollHandlerContext.Provider, {
30
+ children: /*#__PURE__*/jsx(ScrollHandlerContext, {
31
31
  value: this.onContentScroll,
32
32
  children: /*#__PURE__*/jsx(ComposedComponent, {
33
33
  ...this.props
@@ -1,11 +1,13 @@
1
- import { Component, type HTMLAttributes } from 'react';
1
+ import { Component, type Ref, type HTMLAttributes } from 'react';
2
2
  import createResizeDetector from 'element-resize-detector';
3
3
  export interface IslandContentProps extends Omit<HTMLAttributes<HTMLElement>, 'onScroll'> {
4
+ ref?: Ref<Content>;
4
5
  fade?: boolean | null | undefined;
5
6
  onScrollToBottom?: (() => void) | null | undefined;
6
7
  scrollableWrapperClassName?: string | null | undefined;
7
8
  }
8
9
  export interface IslandContentInnerProps extends IslandContentProps {
10
+ ref?: Ref<Content>;
9
11
  onScroll: (node: HTMLElement) => void;
10
12
  bottomBorder: boolean;
11
13
  }
@@ -29,5 +31,8 @@ declare class Content extends Component<IslandContentInnerProps> {
29
31
  setScrollableNodeAndCalculatePosition: (node: HTMLElement | null) => void;
30
32
  render(): import("react").JSX.Element;
31
33
  }
32
- declare const ContentWrapper: import("react").ForwardRefExoticComponent<IslandContentProps & import("react").RefAttributes<Content>>;
34
+ declare const ContentWrapper: {
35
+ ({ ...props }: IslandContentProps): import("react").JSX.Element;
36
+ displayName: string;
37
+ };
33
38
  export default ContentWrapper;
@@ -1,5 +1,5 @@
1
- import { c } from 'react-compiler-runtime';
2
- import { forwardRef, Component } from 'react';
1
+ import { c } from 'react/compiler-runtime';
2
+ import { Component } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import createResizeDetector from 'element-resize-detector';
5
5
  import scheduleRAF from '../global/schedule-raf.js';
@@ -73,6 +73,7 @@ class Content extends Component {
73
73
  };
74
74
  render() {
75
75
  const {
76
+ ref,
76
77
  children,
77
78
  className,
78
79
  bottomBorder,
@@ -111,17 +112,27 @@ class Content extends Component {
111
112
  });
112
113
  }
113
114
  }
114
- const ContentWrapper = /*#__PURE__*/forwardRef((props, ref) => {
115
- const $ = c(4);
116
- if ($[0] !== "c32a71969444a48a67d8737ca30be3eaf2fe1249949706470667058a052ec377") {
117
- for (let $i = 0; $i < 4; $i += 1) {
115
+ const ContentWrapper = t0 => {
116
+ const $ = c(5);
117
+ if ($[0] !== "e4db06b946c16f75a9eac1dc4434adb1fda7cf8013533176d779915994c312c4") {
118
+ for (let $i = 0; $i < 5; $i += 1) {
118
119
  $[$i] = Symbol.for("react.memo_cache_sentinel");
119
120
  }
120
- $[0] = "c32a71969444a48a67d8737ca30be3eaf2fe1249949706470667058a052ec377";
121
+ $[0] = "e4db06b946c16f75a9eac1dc4434adb1fda7cf8013533176d779915994c312c4";
121
122
  }
122
- let t0;
123
- if ($[1] !== props || $[2] !== ref) {
124
- t0 = /*#__PURE__*/jsx(ScrollHandlerContext.Consumer, {
123
+ let props;
124
+ if ($[1] !== t0) {
125
+ ({
126
+ ...props
127
+ } = t0);
128
+ $[1] = t0;
129
+ $[2] = props;
130
+ } else {
131
+ props = $[2];
132
+ }
133
+ let t1;
134
+ if ($[3] !== props) {
135
+ t1 = /*#__PURE__*/jsx(ScrollHandlerContext.Consumer, {
125
136
  children: onScroll => {
126
137
  const addProps = onScroll ? {
127
138
  onScroll,
@@ -129,19 +140,17 @@ const ContentWrapper = /*#__PURE__*/forwardRef((props, ref) => {
129
140
  } : {};
130
141
  return /*#__PURE__*/jsx(Content, {
131
142
  ...props,
132
- ...addProps,
133
- ref: ref
143
+ ...addProps
134
144
  });
135
145
  }
136
146
  });
137
- $[1] = props;
138
- $[2] = ref;
139
- $[3] = t0;
147
+ $[3] = props;
148
+ $[4] = t1;
140
149
  } else {
141
- t0 = $[3];
150
+ t1 = $[4];
142
151
  }
143
- return t0;
144
- });
152
+ return t1;
153
+ };
145
154
  ContentWrapper.displayName = 'ContentWrapper';
146
155
 
147
156
  export { ContentWrapper as default };
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import { Component } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { interpolateLinear } from '../global/linear-function.js';
@@ -7,7 +7,7 @@ import { jsx } from 'react/jsx-runtime';
7
7
  export { default as Header } from './header.js';
8
8
  export { default as Content } from './content.js';
9
9
  import '../global/linear-function.js';
10
- import 'react-compiler-runtime';
10
+ import 'react/compiler-runtime';
11
11
  import 'element-resize-detector';
12
12
  import '../global/schedule-raf.js';
13
13
 
@@ -1,7 +1,7 @@
1
1
  import { PureComponent } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import joinDataTestAttributes from '../global/data-tests.js';
4
- import { s as style } from '../_helpers/table2.js';
4
+ import { s as style } from '../_helpers/legacy-table.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
7
7
  class Cell extends PureComponent {
@@ -1,15 +1,15 @@
1
1
  import { PureComponent } from 'react';
2
2
  import classNames from 'classnames';
3
- import unsortedIcon from '@jetbrains/icons/unsorted-12px';
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';
7
- import { s as style } from '../_helpers/table2.js';
7
+ import { s as style } from '../_helpers/legacy-table.js';
8
8
  import { jsxs, jsx } from 'react/jsx-runtime';
9
9
  import 'util-deprecate';
10
10
  import '../icon/icon.constants.js';
11
11
  import '../_helpers/icon-svg.js';
12
- import 'react-compiler-runtime';
12
+ import 'react/compiler-runtime';
13
13
  import '../global/memoize.js';
14
14
 
15
15
  class HeaderCell extends PureComponent {
@@ -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 : unsortedIcon;
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,7 +3,7 @@ import classNames from 'classnames';
3
3
  import Checkbox from '../checkbox/checkbox.js';
4
4
  import getUID from '../global/get-uid.js';
5
5
  import HeaderCell from './header-cell.js';
6
- import { s as style } from '../_helpers/table2.js';
6
+ import { s as style } from '../_helpers/legacy-table.js';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
8
8
  import '@jetbrains/icons/checkmark-12px';
9
9
  import '@jetbrains/icons/remove-12px';
@@ -11,7 +11,7 @@ import '../icon/icon.js';
11
11
  import 'util-deprecate';
12
12
  import '../icon/icon.constants.js';
13
13
  import '../_helpers/icon-svg.js';
14
- import 'react-compiler-runtime';
14
+ import 'react/compiler-runtime';
15
15
  import '../global/memoize.js';
16
16
  import '../global/compose-refs.js';
17
17
  import 'memoize-one';
@@ -1,6 +1,6 @@
1
1
  import { PureComponent, type ReactElement } from 'react';
2
2
  import { type TableAttrs } from './table';
3
- import { type SelectionItem } from './selection';
3
+ import { type SelectionItem } from '../global/table-selection';
4
4
  type TableComponent = ReactElement<TableAttrs<SelectionItem>>;
5
5
  export interface MultiTableProps {
6
6
  children: TableComponent[];
@@ -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 'react/compiler-runtime';
6
7
  import 'memoize-one';
7
- import 'react-compiler-runtime';
8
8
  import 'classnames';
9
9
  import '@jetbrains/icons/chevron-right';
10
10
  import '@jetbrains/icons/chevron-down';
@@ -44,7 +44,7 @@ import '../popup/popup.target.js';
44
44
  import '../popup/position-css.js';
45
45
  import '../_helpers/theme.js';
46
46
  import './cell.js';
47
- import '../_helpers/table2.js';
47
+ import '../_helpers/legacy-table.js';
48
48
 
49
49
  const getContainer = () => focusSensorHOC(Row);
50
50
  class RowWithFocusSensorCallbacks extends PureComponent {
@@ -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>>;
@@ -1,4 +1,4 @@
1
- import { c } from 'react-compiler-runtime';
1
+ import { c } from 'react/compiler-runtime';
2
2
  import { PureComponent } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import chevronRightIcon from '@jetbrains/icons/chevron-right';
@@ -11,7 +11,7 @@ import joinDataTestAttributes from '../global/data-tests.js';
11
11
  import getUID from '../global/get-uid.js';
12
12
  import { createComposedRef } from '../global/compose-refs.js';
13
13
  import Cell from './cell.js';
14
- import { s as style } from '../_helpers/table2.js';
14
+ import { s as style } from '../_helpers/legacy-table.js';
15
15
  import { jsxs, jsx } from 'react/jsx-runtime';
16
16
  import '@jetbrains/icons/checkmark-12px';
17
17
  import '@jetbrains/icons/remove-12px';
@@ -46,11 +46,11 @@ import 'memoize-one';
46
46
 
47
47
  const DragHandle = t0 => {
48
48
  const $ = c(6);
49
- if ($[0] !== "55dd4b764fc7ce682e91a4f9ed76700dd0c03ecdbbc71fc25d11ed30dc931312") {
49
+ if ($[0] !== "6d181a7b79d6c43c9efeb4fa43b5ac2047952f3bf582e26f319cda89e9e36280") {
50
50
  for (let $i = 0; $i < 6; $i += 1) {
51
51
  $[$i] = Symbol.for("react.memo_cache_sentinel");
52
52
  }
53
- $[0] = "55dd4b764fc7ce682e91a4f9ed76700dd0c03ecdbbc71fc25d11ed30dc931312";
53
+ $[0] = "6d181a7b79d6c43c9efeb4fa43b5ac2047952f3bf582e26f319cda89e9e36280";
54
54
  }
55
55
  const {
56
56
  alwaysShowDragHandle,
@@ -1,6 +1,6 @@
1
- import type Selection from './selection';
2
- import type { SelectionItem } from './selection';
3
- export default function selectionAdapter(getSelection: () => Selection<SelectionItem>): {
1
+ import type TableSelection from '../global/table-selection';
2
+ import type { SelectionItem } from '../global/table-selection';
3
+ export default function selectionAdapter(getSelection: () => TableSelection<SelectionItem>): {
4
4
  readonly size: number;
5
5
  readonly items: SelectionItem[];
6
6
  };
@@ -1,16 +1,16 @@
1
1
  import { type ComponentClass } from 'react';
2
2
  import { type ShortcutsMap } from '../shortcuts/core';
3
- import type Selection from './selection';
3
+ import type TableSelection from '../global/table-selection';
4
4
  export interface SelectionShortcutsOuterProps<T extends object> {
5
- selection: Selection<T>;
5
+ selection: TableSelection<T>;
6
6
  selectable?: boolean | undefined;
7
- onSelect?: ((selection: Selection<T>) => void) | undefined;
7
+ onSelect?: ((selection: TableSelection<T>) => void) | undefined;
8
8
  shortcuts?: ShortcutsMap | undefined;
9
9
  }
10
10
  export interface SelectionShortcutsAddProps<T extends object> {
11
- selection: Selection<T>;
11
+ selection: TableSelection<T>;
12
12
  selectable: boolean;
13
- onSelect: (selection: Selection<T>) => void;
13
+ onSelect: (selection: TableSelection<T>) => void;
14
14
  shortcutsMap: ShortcutsMap;
15
15
  }
16
16
  export type SelectionShortcutsProps<T extends object, P> = Omit<P, keyof SelectionShortcutsAddProps<T>> & SelectionShortcutsOuterProps<T>;
@@ -1,6 +1,6 @@
1
1
  import { PureComponent } from 'react';
2
2
  import { type TableAttrs } from './table';
3
- import Selection, { type SelectionItem } from './selection';
3
+ import TableSelection, { type SelectionItem } from '../global/table-selection';
4
4
  export interface SimpleTableProps<T extends SelectionItem> extends Omit<TableAttrs<T>, 'selection' | 'onSelect' | 'selectable'> {
5
5
  }
6
6
  declare class SimpleTable<T extends SelectionItem> extends PureComponent<SimpleTableProps<T>> {
@@ -9,7 +9,7 @@ declare class SimpleTable<T extends SelectionItem> extends PureComponent<SimpleT
9
9
  wideFirstColumn: boolean;
10
10
  };
11
11
  state: {
12
- selection: Selection<T>;
12
+ selection: TableSelection<T>;
13
13
  };
14
14
  classes: string;
15
15
  render(): import("react").JSX.Element;