@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,14 +1,15 @@
|
|
|
1
|
-
import { c } from 'react
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useRef } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
+
import { mergeRefs } from 'react-merge-refs';
|
|
4
5
|
import { IntersectionObserverContext } from '../global/intersection-observer-context.js';
|
|
5
6
|
import { useTableVirtualize, SpacerRow } from './table-virtualize.js';
|
|
6
7
|
import { DefaultItemRenderer } from './default-item-renderer.js';
|
|
7
|
-
import {
|
|
8
|
+
import { TablePropsContext, CollapseItemIntoSpacerContext, defaultMinScrollAndResizeDeltaPx, defaultLookaheadPx, defaultRetentionMarginPx, ColumnIndexContext, defaultRowHeight } from './table-const.js';
|
|
9
|
+
import { onBlurCaptureTbody, onKeyDownTbody } from './table-row-focus.js';
|
|
8
10
|
import { s as styles } from '../_helpers/table.js';
|
|
9
|
-
import {
|
|
10
|
-
import '
|
|
11
|
-
import './table-base.js';
|
|
11
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
|
+
import './table-primitives.js';
|
|
12
13
|
import '@jetbrains/icons/unsorted-12px';
|
|
13
14
|
import '@jetbrains/icons/arrow-12px-down';
|
|
14
15
|
import '@jetbrains/icons/arrow-12px-up';
|
|
@@ -20,17 +21,18 @@ import '../_helpers/icon-svg.js';
|
|
|
20
21
|
import '../global/memoize.js';
|
|
21
22
|
|
|
22
23
|
function Table(props) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
for (let $i = 0; $i < 66; $i += 1) {
|
|
24
|
+
const $ = c(56);
|
|
25
|
+
if ($[0] !== "9306af42aa8ad63ab7b8766f741b6ce2a028dd9b7f320f9f4ee30c0e95ec844f") {
|
|
26
|
+
for (let $i = 0; $i < 56; $i += 1) {
|
|
27
27
|
$[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
28
28
|
}
|
|
29
|
-
$[0] = "
|
|
29
|
+
$[0] = "9306af42aa8ad63ab7b8766f741b6ce2a028dd9b7f320f9f4ee30c0e95ec844f";
|
|
30
30
|
}
|
|
31
31
|
let className;
|
|
32
32
|
let columns;
|
|
33
33
|
let data;
|
|
34
|
+
let getKey;
|
|
35
|
+
let noHeader;
|
|
34
36
|
let renderItem;
|
|
35
37
|
let restProps;
|
|
36
38
|
let scrollerRef;
|
|
@@ -47,166 +49,134 @@ function Table(props) {
|
|
|
47
49
|
const {
|
|
48
50
|
data: t5,
|
|
49
51
|
columns: t6,
|
|
50
|
-
getKey,
|
|
51
|
-
|
|
52
|
-
isItemKeyboardFocusable,
|
|
53
|
-
onItemFocus,
|
|
52
|
+
getKey: t7,
|
|
53
|
+
noHeader: t8,
|
|
54
54
|
onItemMove,
|
|
55
55
|
onSort,
|
|
56
56
|
onColumnDelete,
|
|
57
57
|
onColumnMove,
|
|
58
|
-
renderItem:
|
|
59
|
-
virtualizeRows:
|
|
60
|
-
scrollerRef:
|
|
61
|
-
estimateHeight:
|
|
62
|
-
lookaheadPx:
|
|
63
|
-
retentionMarginPx:
|
|
64
|
-
minScrollAndResizeDeltaPx:
|
|
58
|
+
renderItem: t9,
|
|
59
|
+
virtualizeRows: t10,
|
|
60
|
+
scrollerRef: t11,
|
|
61
|
+
estimateHeight: t12,
|
|
62
|
+
lookaheadPx: t13,
|
|
63
|
+
retentionMarginPx: t14,
|
|
64
|
+
minScrollAndResizeDeltaPx: t15,
|
|
65
65
|
columnEditButton,
|
|
66
|
-
ref: t14,
|
|
67
|
-
className: t15,
|
|
68
66
|
theadClassName: t16,
|
|
69
67
|
theadTrClassName: t17,
|
|
70
68
|
tbodyClassName: t18,
|
|
71
|
-
|
|
69
|
+
ref: t19,
|
|
70
|
+
className: t20,
|
|
71
|
+
...t21
|
|
72
72
|
} = props;
|
|
73
73
|
data = t5;
|
|
74
74
|
columns = t6;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
getKey = t7;
|
|
76
|
+
noHeader = t8;
|
|
77
|
+
renderItem = t9;
|
|
78
|
+
t0 = t10;
|
|
79
|
+
scrollerRef = t11;
|
|
80
|
+
t1 = t12;
|
|
81
|
+
t2 = t13;
|
|
82
|
+
t3 = t14;
|
|
83
|
+
t4 = t15;
|
|
84
84
|
theadClassName = t16;
|
|
85
85
|
theadTrClassName = t17;
|
|
86
86
|
tbodyClassName = t18;
|
|
87
|
-
|
|
87
|
+
userRef = t19;
|
|
88
|
+
className = t20;
|
|
89
|
+
restProps = t21;
|
|
88
90
|
$[1] = props;
|
|
89
91
|
$[2] = className;
|
|
90
92
|
$[3] = columns;
|
|
91
93
|
$[4] = data;
|
|
92
|
-
$[5] =
|
|
93
|
-
$[6] =
|
|
94
|
-
$[7] =
|
|
95
|
-
$[8] =
|
|
96
|
-
$[9] =
|
|
97
|
-
$[10] =
|
|
98
|
-
$[11] =
|
|
99
|
-
$[12] =
|
|
100
|
-
$[13] =
|
|
101
|
-
$[14] =
|
|
102
|
-
$[15] =
|
|
103
|
-
$[16] =
|
|
94
|
+
$[5] = getKey;
|
|
95
|
+
$[6] = noHeader;
|
|
96
|
+
$[7] = renderItem;
|
|
97
|
+
$[8] = restProps;
|
|
98
|
+
$[9] = scrollerRef;
|
|
99
|
+
$[10] = t0;
|
|
100
|
+
$[11] = t1;
|
|
101
|
+
$[12] = t2;
|
|
102
|
+
$[13] = t3;
|
|
103
|
+
$[14] = t4;
|
|
104
|
+
$[15] = tbodyClassName;
|
|
105
|
+
$[16] = theadClassName;
|
|
106
|
+
$[17] = theadTrClassName;
|
|
107
|
+
$[18] = userRef;
|
|
104
108
|
} else {
|
|
105
109
|
className = $[2];
|
|
106
110
|
columns = $[3];
|
|
107
111
|
data = $[4];
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
getKey = $[5];
|
|
113
|
+
noHeader = $[6];
|
|
114
|
+
renderItem = $[7];
|
|
115
|
+
restProps = $[8];
|
|
116
|
+
scrollerRef = $[9];
|
|
117
|
+
t0 = $[10];
|
|
118
|
+
t1 = $[11];
|
|
119
|
+
t2 = $[12];
|
|
120
|
+
t3 = $[13];
|
|
121
|
+
t4 = $[14];
|
|
122
|
+
tbodyClassName = $[15];
|
|
123
|
+
theadClassName = $[16];
|
|
124
|
+
theadTrClassName = $[17];
|
|
125
|
+
userRef = $[18];
|
|
120
126
|
}
|
|
121
127
|
const virtualizeRows = t0 === undefined ? false : t0;
|
|
122
128
|
const estimateHeight = t1 === undefined ? _temp : t1;
|
|
123
129
|
const lookaheadPx = t2 === undefined ? defaultLookaheadPx : t2;
|
|
124
130
|
const retentionMarginPx = t3 === undefined ? defaultRetentionMarginPx : t3;
|
|
125
131
|
const minScrollAndResizeDeltaPx = t4 === undefined ? defaultMinScrollAndResizeDeltaPx : t4;
|
|
126
|
-
const
|
|
127
|
-
const tableRef = (_userRef = userRef) !== null && _userRef !== void 0 ? _userRef : selfRef;
|
|
128
|
-
let t5;
|
|
129
|
-
if ($[17] !== data.length || $[18] !== estimateHeight || $[19] !== lookaheadPx || $[20] !== minScrollAndResizeDeltaPx || $[21] !== retentionMarginPx || $[22] !== scrollerRef || $[23] !== tableRef || $[24] !== virtualizeRows) {
|
|
130
|
-
t5 = {
|
|
131
|
-
enabled: virtualizeRows,
|
|
132
|
-
length: data.length,
|
|
133
|
-
scrollerRef,
|
|
134
|
-
tableRef,
|
|
135
|
-
estimateHeight,
|
|
136
|
-
lookaheadPx,
|
|
137
|
-
retentionMarginPx,
|
|
138
|
-
minScrollAndResizeDeltaPx
|
|
139
|
-
};
|
|
140
|
-
$[17] = data.length;
|
|
141
|
-
$[18] = estimateHeight;
|
|
142
|
-
$[19] = lookaheadPx;
|
|
143
|
-
$[20] = minScrollAndResizeDeltaPx;
|
|
144
|
-
$[21] = retentionMarginPx;
|
|
145
|
-
$[22] = scrollerRef;
|
|
146
|
-
$[23] = tableRef;
|
|
147
|
-
$[24] = virtualizeRows;
|
|
148
|
-
$[25] = t5;
|
|
149
|
-
} else {
|
|
150
|
-
t5 = $[25];
|
|
151
|
-
}
|
|
132
|
+
const localRef = useRef(null);
|
|
152
133
|
const {
|
|
153
134
|
virtualItems,
|
|
154
135
|
intersectionObserverHandle,
|
|
155
136
|
collapseItemIntoSpacer
|
|
156
|
-
} = useTableVirtualize(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
137
|
+
} = useTableVirtualize({
|
|
138
|
+
enabled: virtualizeRows,
|
|
139
|
+
data,
|
|
140
|
+
scrollerRef,
|
|
141
|
+
tableRef: localRef,
|
|
142
|
+
estimateHeight,
|
|
143
|
+
lookaheadPx,
|
|
144
|
+
retentionMarginPx,
|
|
145
|
+
minScrollAndResizeDeltaPx
|
|
146
|
+
});
|
|
147
|
+
const T0 = TablePropsContext;
|
|
148
|
+
const T1 = IntersectionObserverContext;
|
|
149
|
+
let t5;
|
|
150
|
+
if ($[19] !== className) {
|
|
151
|
+
t5 = classNames(styles.table, className);
|
|
152
|
+
$[19] = className;
|
|
153
|
+
$[20] = t5;
|
|
162
154
|
} else {
|
|
163
|
-
|
|
155
|
+
t5 = $[20];
|
|
164
156
|
}
|
|
157
|
+
const t6 = mergeRefs([userRef, localRef]);
|
|
165
158
|
let t7;
|
|
166
|
-
if ($[
|
|
167
|
-
t7 =
|
|
168
|
-
$[28] = theadTrClassName;
|
|
169
|
-
$[29] = t7;
|
|
170
|
-
} else {
|
|
171
|
-
t7 = $[29];
|
|
172
|
-
}
|
|
173
|
-
let t8;
|
|
174
|
-
if ($[30] !== columns) {
|
|
175
|
-
t8 = columns.map(_temp2);
|
|
176
|
-
$[30] = columns;
|
|
177
|
-
$[31] = t8;
|
|
178
|
-
} else {
|
|
179
|
-
t8 = $[31];
|
|
180
|
-
}
|
|
181
|
-
let t9;
|
|
182
|
-
if ($[32] !== t7 || $[33] !== t8) {
|
|
183
|
-
t9 = /*#__PURE__*/jsx("tr", {
|
|
184
|
-
className: t7,
|
|
185
|
-
children: t8
|
|
186
|
-
});
|
|
187
|
-
$[32] = t7;
|
|
188
|
-
$[33] = t8;
|
|
189
|
-
$[34] = t9;
|
|
190
|
-
} else {
|
|
191
|
-
t9 = $[34];
|
|
192
|
-
}
|
|
193
|
-
let t10;
|
|
194
|
-
if ($[35] !== t9 || $[36] !== theadClassName) {
|
|
195
|
-
t10 = /*#__PURE__*/jsx("thead", {
|
|
159
|
+
if ($[21] !== columns || $[22] !== noHeader || $[23] !== theadClassName || $[24] !== theadTrClassName) {
|
|
160
|
+
t7 = !noHeader && /*#__PURE__*/jsx("thead", {
|
|
196
161
|
className: theadClassName,
|
|
197
|
-
children:
|
|
162
|
+
children: /*#__PURE__*/jsx("tr", {
|
|
163
|
+
className: classNames(styles.headerRow, theadTrClassName),
|
|
164
|
+
children: columns.map(_temp2)
|
|
165
|
+
})
|
|
198
166
|
});
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
167
|
+
$[21] = columns;
|
|
168
|
+
$[22] = noHeader;
|
|
169
|
+
$[23] = theadClassName;
|
|
170
|
+
$[24] = theadTrClassName;
|
|
171
|
+
$[25] = t7;
|
|
202
172
|
} else {
|
|
203
|
-
|
|
173
|
+
t7 = $[25];
|
|
204
174
|
}
|
|
205
|
-
let
|
|
206
|
-
if ($[
|
|
207
|
-
let
|
|
208
|
-
if ($[
|
|
209
|
-
|
|
175
|
+
let t8;
|
|
176
|
+
if ($[26] !== collapseItemIntoSpacer || $[27] !== columns || $[28] !== data || $[29] !== getKey || $[30] !== renderItem || $[31] !== virtualItems) {
|
|
177
|
+
let t9;
|
|
178
|
+
if ($[33] !== collapseItemIntoSpacer || $[34] !== columns || $[35] !== data || $[36] !== getKey || $[37] !== renderItem) {
|
|
179
|
+
t9 = virtualItem => {
|
|
210
180
|
if (virtualItem.type === "spacer") {
|
|
211
181
|
return /*#__PURE__*/jsx(SpacerRow, {
|
|
212
182
|
spacer: virtualItem,
|
|
@@ -215,95 +185,99 @@ function Table(props) {
|
|
|
215
185
|
}
|
|
216
186
|
const index = virtualItem.index;
|
|
217
187
|
const item = data[index];
|
|
218
|
-
const key =
|
|
219
|
-
return /*#__PURE__*/jsx(CollapseItemIntoSpacerContext
|
|
188
|
+
const key = getKey(item, index, data);
|
|
189
|
+
return /*#__PURE__*/jsx(CollapseItemIntoSpacerContext, {
|
|
220
190
|
value: height => collapseItemIntoSpacer(index, height),
|
|
221
191
|
children: renderItem ? renderItem(item, index, data) : /*#__PURE__*/jsx(DefaultItemRenderer, {
|
|
222
192
|
index: index
|
|
223
193
|
})
|
|
224
194
|
}, key);
|
|
225
195
|
};
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
196
|
+
$[33] = collapseItemIntoSpacer;
|
|
197
|
+
$[34] = columns;
|
|
198
|
+
$[35] = data;
|
|
199
|
+
$[36] = getKey;
|
|
200
|
+
$[37] = renderItem;
|
|
201
|
+
$[38] = t9;
|
|
232
202
|
} else {
|
|
233
|
-
|
|
203
|
+
t9 = $[38];
|
|
234
204
|
}
|
|
235
|
-
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
205
|
+
t8 = virtualItems.map(t9);
|
|
206
|
+
$[26] = collapseItemIntoSpacer;
|
|
207
|
+
$[27] = columns;
|
|
208
|
+
$[28] = data;
|
|
209
|
+
$[29] = getKey;
|
|
210
|
+
$[30] = renderItem;
|
|
211
|
+
$[31] = virtualItems;
|
|
212
|
+
$[32] = t8;
|
|
243
213
|
} else {
|
|
244
|
-
|
|
214
|
+
t8 = $[32];
|
|
245
215
|
}
|
|
246
|
-
let
|
|
247
|
-
if ($[
|
|
248
|
-
|
|
216
|
+
let t9;
|
|
217
|
+
if ($[39] !== t8 || $[40] !== tbodyClassName) {
|
|
218
|
+
t9 = /*#__PURE__*/jsx("tbody", {
|
|
249
219
|
className: tbodyClassName,
|
|
250
|
-
|
|
220
|
+
onKeyDown: onKeyDownTbody,
|
|
221
|
+
onBlurCapture: onBlurCaptureTbody,
|
|
222
|
+
children: t8
|
|
251
223
|
});
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
224
|
+
$[39] = t8;
|
|
225
|
+
$[40] = tbodyClassName;
|
|
226
|
+
$[41] = t9;
|
|
255
227
|
} else {
|
|
256
|
-
|
|
228
|
+
t9 = $[41];
|
|
257
229
|
}
|
|
258
|
-
let
|
|
259
|
-
if ($[
|
|
260
|
-
|
|
261
|
-
className:
|
|
262
|
-
ref:
|
|
230
|
+
let t10;
|
|
231
|
+
if ($[42] !== restProps || $[43] !== t5 || $[44] !== t6 || $[45] !== t7 || $[46] !== t9) {
|
|
232
|
+
t10 = /*#__PURE__*/jsxs("table", {
|
|
233
|
+
className: t5,
|
|
234
|
+
ref: t6,
|
|
263
235
|
...restProps,
|
|
264
|
-
children: [
|
|
236
|
+
children: [t7, t9]
|
|
265
237
|
});
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
238
|
+
$[42] = restProps;
|
|
239
|
+
$[43] = t5;
|
|
240
|
+
$[44] = t6;
|
|
241
|
+
$[45] = t7;
|
|
242
|
+
$[46] = t9;
|
|
243
|
+
$[47] = t10;
|
|
272
244
|
} else {
|
|
273
|
-
|
|
245
|
+
t10 = $[47];
|
|
274
246
|
}
|
|
275
|
-
let
|
|
276
|
-
if ($[
|
|
277
|
-
|
|
247
|
+
let t11;
|
|
248
|
+
if ($[48] !== T1 || $[49] !== intersectionObserverHandle || $[50] !== t10) {
|
|
249
|
+
t11 = /*#__PURE__*/jsx(T1, {
|
|
278
250
|
value: intersectionObserverHandle,
|
|
279
|
-
children:
|
|
251
|
+
children: t10
|
|
280
252
|
});
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
253
|
+
$[48] = T1;
|
|
254
|
+
$[49] = intersectionObserverHandle;
|
|
255
|
+
$[50] = t10;
|
|
256
|
+
$[51] = t11;
|
|
284
257
|
} else {
|
|
285
|
-
|
|
258
|
+
t11 = $[51];
|
|
286
259
|
}
|
|
287
|
-
let
|
|
288
|
-
if ($[
|
|
289
|
-
|
|
260
|
+
let t12;
|
|
261
|
+
if ($[52] !== T0 || $[53] !== props || $[54] !== t11) {
|
|
262
|
+
t12 = /*#__PURE__*/jsx(T0, {
|
|
290
263
|
value: props,
|
|
291
|
-
children:
|
|
264
|
+
children: t11
|
|
292
265
|
});
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
266
|
+
$[52] = T0;
|
|
267
|
+
$[53] = props;
|
|
268
|
+
$[54] = t11;
|
|
269
|
+
$[55] = t12;
|
|
296
270
|
} else {
|
|
297
|
-
|
|
271
|
+
t12 = $[55];
|
|
298
272
|
}
|
|
299
|
-
return
|
|
273
|
+
return t12;
|
|
300
274
|
}
|
|
301
275
|
function _temp2(column, columnIndex) {
|
|
302
276
|
var _ref, _column$renderHeader;
|
|
303
277
|
return /*#__PURE__*/jsx("th", {
|
|
304
278
|
className: classNames(styles.headerCell, column.thClassName),
|
|
305
279
|
"aria-sort": column.sortOrder,
|
|
306
|
-
children: /*#__PURE__*/jsx(ColumnIndexContext
|
|
280
|
+
children: /*#__PURE__*/jsx(ColumnIndexContext, {
|
|
307
281
|
value: columnIndex,
|
|
308
282
|
children: (_ref = (_column$renderHeader = column.renderHeader?.()) !== null && _column$renderHeader !== void 0 ? _column$renderHeader : column.name) !== null && _ref !== void 0 ? _ref : String(column.key)
|
|
309
283
|
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Include it in a column header to make the column sortable.
|
|
4
|
+
* Handle clicks with {@link TableProps.onSort}.
|
|
5
|
+
*/
|
|
6
|
+
export declare function SortButton<T>({ className, children, onClick, ...restProps }: ComponentPropsWithRef<'button'>): import("react").JSX.Element | null;
|
|
7
|
+
/**
|
|
8
|
+
* Include it in a column header to make the column deletable.
|
|
9
|
+
* Beware that `column.name ?? String(column.key)` is used in the aria-label.
|
|
10
|
+
* Handle clicks with {@link TableProps.onColumnDelete}.
|
|
11
|
+
*/
|
|
12
|
+
export declare function DeleteColumnButton<T>({ className, onClick, ...restProps }: ComponentPropsWithRef<'button'>): import("react").JSX.Element | null;
|
|
13
|
+
export interface TableRowProps {
|
|
14
|
+
/**
|
|
15
|
+
* @see DefaultItemRendererProps.keyboardFocusable
|
|
16
|
+
*/
|
|
17
|
+
keyboardFocusable?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A helper `<tr>` component for a custom {@link TableProps.renderItem} implementations.
|
|
21
|
+
* Applies the standard row classnames.
|
|
22
|
+
*/
|
|
23
|
+
export declare function TableRow(props: TableRowProps & ComponentPropsWithRef<'tr'>): import("react").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* A helper `<td>` component for a custom {@link TableProps.renderItem} implementations.
|
|
26
|
+
* Applies the standard cell classnames, but not data-dependent `tdClassName`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function TableCell(props: ComponentPropsWithRef<'td'>): import("react").JSX.Element;
|