@optimum-intelligence/opti-ui 0.7.2 → 0.7.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/CHANGELOG.md +39 -0
- package/dist/components/app-shell/AppShell.d.ts +12 -3
- package/dist/components/app-shell/AppShell.js +45 -26
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +25 -4
- package/dist/components/data-table/DataTable.js +238 -90
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.d.ts +6 -1
- package/dist/components/data-table/DataTableContent.js +306 -409
- package/dist/components/data-table/DataTableContent.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +6 -1
- package/dist/components/data-table/DataTableFilters.js +65 -45
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/DataTableRow.js +2 -0
- package/dist/components/data-table/DataTableRow.js.map +1 -1
- package/dist/components/data-table/types.d.ts +14 -1
- package/dist/components/data-table/useDataTable.js +2 -0
- package/dist/components/data-table/useDataTable.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +7 -4
- package/dist/components/drawer/Drawer.js +2 -1
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/map/Map.d.ts +30 -6
- package/dist/components/map/Map.js +387 -271
- package/dist/components/map/Map.js.map +1 -1
- package/dist/components/stat-card/StatCard.d.ts +2 -2
- package/dist/components/stat-card/StatCard.js +1 -1
- package/dist/components/stat-card/StatCard.js.map +1 -1
- package/dist/components/stepper/Stepper.d.ts +7 -1
- package/dist/components/stepper/Stepper.js +46 -27
- package/dist/components/stepper/Stepper.js.map +1 -1
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/Table.js +3 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +4 -1
- package/dist/components/tabs/Tabs.js +33 -23
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/toggle/Toggle.d.ts +1 -1
- package/dist/components/toggle/Toggle.js.map +1 -1
- package/dist/components.json +101 -29
- package/dist/icons/index.d.ts +8 -0
- package/dist/icons/index.js +11 -1
- package/dist/icons/index.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/llms-full.txt +48 -19
- package/dist/llms.txt +7 -7
- package/dist/opti-ui.css +380 -29
- package/dist/utils/media.d.ts +4 -0
- package/dist/utils/media.js +34 -0
- package/dist/utils/media.js.map +1 -0
- package/dist/utils/scroll-fade.d.ts +9 -0
- package/dist/utils/scroll-fade.js +45 -0
- package/dist/utils/scroll-fade.js.map +1 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { Skeleton } from "../skeleton/Skeleton.js";
|
|
|
4
4
|
import { Button } from "../button/Button.js";
|
|
5
5
|
import { Checkbox } from "../choice/Choice.js";
|
|
6
6
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../table/Table.js";
|
|
7
|
+
import { useMediaQuery } from "../../utils/media.js";
|
|
7
8
|
import { useDataTableContext } from "./context.js";
|
|
8
9
|
import { EmptyState } from "../empty-state/EmptyState.js";
|
|
9
10
|
import { DataTableRow, SizerRow, isTextEditor } from "./DataTableRow.js";
|
|
@@ -19,262 +20,241 @@ var ROW_ESTIMATE = {
|
|
|
19
20
|
};
|
|
20
21
|
/** The table itself, with its loading, empty and error states. */
|
|
21
22
|
function DataTableContent(t0) {
|
|
22
|
-
const $ = c(
|
|
23
|
-
const { density: t1, striped, stickyHeader, layout: t2, maxHeight, virtualized: t3, onEndReached, empty, tableProps } = t0;
|
|
23
|
+
const $ = c(94);
|
|
24
|
+
const { density: t1, striped, stickyHeader, layout: t2, maxHeight, virtualized: t3, onEndReached, stickyFirstColumn: t4, empty, tableProps } = t0;
|
|
24
25
|
const density = t1 === void 0 ? "normal" : t1;
|
|
25
26
|
const layout = t2 === void 0 ? "stable" : t2;
|
|
26
27
|
const virtualized = t3 === void 0 ? false : t3;
|
|
28
|
+
const stickyFirstColumn = t4 === void 0 ? false : t4;
|
|
27
29
|
const table = useDataTableContext();
|
|
28
|
-
const { labels: text,
|
|
30
|
+
const { labels: text, loading, error } = table;
|
|
31
|
+
const columns = useMediaQuery("(max-width: 640px)") ? table.visibleColumns.filter(_temp) : table.visibleColumns;
|
|
29
32
|
const [anchor, setAnchor] = React.useState(null);
|
|
30
33
|
const reported = React.useRef(-1);
|
|
31
34
|
const virtual = virtualized !== false;
|
|
32
|
-
let
|
|
35
|
+
let t5;
|
|
33
36
|
if ($[0] !== virtualized) {
|
|
34
|
-
|
|
37
|
+
t5 = typeof virtualized === "object" ? virtualized : {};
|
|
35
38
|
$[0] = virtualized;
|
|
36
|
-
$[1] =
|
|
37
|
-
} else
|
|
38
|
-
const { rowHeight, overscan:
|
|
39
|
-
const overscan =
|
|
39
|
+
$[1] = t5;
|
|
40
|
+
} else t5 = $[1];
|
|
41
|
+
const { rowHeight, overscan: t6 } = t5;
|
|
42
|
+
const overscan = t6 === void 0 ? 8 : t6;
|
|
40
43
|
const height = maxHeight ?? (virtual ? "32rem" : void 0);
|
|
41
44
|
const scrolls = height !== void 0;
|
|
42
45
|
const stable = layout === "stable" || virtual;
|
|
43
46
|
const hasActions = Boolean(table.rowActions) || table.editable || table.deletable;
|
|
44
47
|
const placeholders = table.pending ? Math.min(table.paginated ? table.pageSize : 5, 10) : 0;
|
|
45
48
|
const noMatch = table.mode === "server" ? table.filtered : table.totalCount > 0;
|
|
46
|
-
|
|
47
|
-
if ($[2] !== columns) {
|
|
48
|
-
t6 = columns.find(isTextEditor)?.id;
|
|
49
|
-
$[2] = columns;
|
|
50
|
-
$[3] = t6;
|
|
51
|
-
} else t6 = $[3];
|
|
52
|
-
const focused = t6;
|
|
49
|
+
const focused = columns.find(isTextEditor)?.id;
|
|
53
50
|
let t7;
|
|
54
|
-
if ($[
|
|
51
|
+
if ($[2] !== error || $[3] !== table.pageRows) {
|
|
55
52
|
t7 = error ? [] : table.pageRows;
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
59
|
-
} else t7 = $[
|
|
53
|
+
$[2] = error;
|
|
54
|
+
$[3] = table.pageRows;
|
|
55
|
+
$[4] = t7;
|
|
56
|
+
} else t7 = $[4];
|
|
60
57
|
const shown = t7;
|
|
61
58
|
const span = columns.length + Number(table.selectable) + Number(hasActions);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
...columns.map(_temp)
|
|
69
|
-
];
|
|
70
|
-
$[7] = columns;
|
|
71
|
-
$[8] = density;
|
|
72
|
-
$[9] = hasActions;
|
|
73
|
-
$[10] = table.selectable;
|
|
74
|
-
$[11] = t8;
|
|
75
|
-
} else t8 = $[11];
|
|
76
|
-
const columnKey = t8.join("|");
|
|
59
|
+
const columnKey = [
|
|
60
|
+
density,
|
|
61
|
+
table.selectable,
|
|
62
|
+
hasActions,
|
|
63
|
+
...columns.map(_temp2)
|
|
64
|
+
].join("|");
|
|
77
65
|
const { lock, measuring } = useColumnLock(anchor, stable, columnKey, shown.length > 0);
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
let
|
|
81
|
-
if ($[
|
|
82
|
-
|
|
66
|
+
const t8 = ROW_ESTIMATE[density];
|
|
67
|
+
const t9 = typeof maxHeight === "number" ? maxHeight : 512;
|
|
68
|
+
let t10;
|
|
69
|
+
if ($[5] !== density || $[6] !== overscan || $[7] !== rowHeight || $[8] !== shown.length || $[9] !== t8 || $[10] !== t9 || $[11] !== virtual) {
|
|
70
|
+
t10 = {
|
|
83
71
|
enabled: virtual,
|
|
84
72
|
count: shown.length,
|
|
85
73
|
rowHeight,
|
|
86
74
|
overscan,
|
|
87
|
-
estimate:
|
|
88
|
-
viewport:
|
|
75
|
+
estimate: t8,
|
|
76
|
+
viewport: t9,
|
|
89
77
|
key: density
|
|
90
78
|
};
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[
|
|
99
|
-
} else
|
|
100
|
-
const rows = useVirtualRows(anchor,
|
|
101
|
-
let
|
|
102
|
-
if ($[
|
|
103
|
-
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
109
|
-
} else
|
|
110
|
-
const rendered =
|
|
79
|
+
$[5] = density;
|
|
80
|
+
$[6] = overscan;
|
|
81
|
+
$[7] = rowHeight;
|
|
82
|
+
$[8] = shown.length;
|
|
83
|
+
$[9] = t8;
|
|
84
|
+
$[10] = t9;
|
|
85
|
+
$[11] = virtual;
|
|
86
|
+
$[12] = t10;
|
|
87
|
+
} else t10 = $[12];
|
|
88
|
+
const rows = useVirtualRows(anchor, t10);
|
|
89
|
+
let t11;
|
|
90
|
+
if ($[13] !== rows.end || $[14] !== rows.start || $[15] !== shown || $[16] !== virtual) {
|
|
91
|
+
t11 = virtual ? shown.slice(rows.start, rows.end) : shown;
|
|
92
|
+
$[13] = rows.end;
|
|
93
|
+
$[14] = rows.start;
|
|
94
|
+
$[15] = shown;
|
|
95
|
+
$[16] = virtual;
|
|
96
|
+
$[17] = t11;
|
|
97
|
+
} else t11 = $[17];
|
|
98
|
+
const rendered = t11;
|
|
111
99
|
const sizers = measuring && table.allRows.length > rendered.length ? pickSizerRows(table.allRows, columns) : [];
|
|
112
100
|
const holdsPage = stable && table.paginated && !scrolls;
|
|
113
101
|
const pageHeight = usePageHeight(anchor, holdsPage, shown.length === table.pageSize, `${density}|${table.pageSize}`);
|
|
114
102
|
const shortPage = table.page > 1 && shown.length > 0 && shown.length < table.pageSize;
|
|
115
|
-
let
|
|
116
|
-
if ($[
|
|
117
|
-
|
|
103
|
+
let t12;
|
|
104
|
+
if ($[18] !== density || $[19] !== loading || $[20] !== onEndReached || $[21] !== scrolls || $[22] !== shown.length) {
|
|
105
|
+
t12 = (wrapper) => {
|
|
118
106
|
if (!onEndReached || !scrolls || loading || !shown.length || reported.current === shown.length) return;
|
|
119
107
|
if (wrapper.scrollHeight - wrapper.scrollTop - wrapper.clientHeight > 4 * ROW_ESTIMATE[density]) return;
|
|
120
108
|
reported.current = shown.length;
|
|
121
109
|
onEndReached();
|
|
122
110
|
};
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
} else
|
|
130
|
-
const reportEnd =
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
const
|
|
111
|
+
$[18] = density;
|
|
112
|
+
$[19] = loading;
|
|
113
|
+
$[20] = onEndReached;
|
|
114
|
+
$[21] = scrolls;
|
|
115
|
+
$[22] = shown.length;
|
|
116
|
+
$[23] = t12;
|
|
117
|
+
} else t12 = $[23];
|
|
118
|
+
const reportEnd = t12;
|
|
119
|
+
const t13 = table.page;
|
|
120
|
+
const t14 = table.search;
|
|
121
|
+
const t15 = table.sort?.id;
|
|
122
|
+
const t16 = table.sort?.direction;
|
|
123
|
+
let t17;
|
|
124
|
+
if ($[24] !== table.filterValues) {
|
|
125
|
+
t17 = JSON.stringify(table.filterValues);
|
|
126
|
+
$[24] = table.filterValues;
|
|
127
|
+
$[25] = t17;
|
|
128
|
+
} else t17 = $[25];
|
|
135
129
|
let t18;
|
|
136
|
-
if ($[
|
|
137
|
-
t18 =
|
|
138
|
-
|
|
139
|
-
$[32] = t18;
|
|
140
|
-
} else t18 = $[32];
|
|
141
|
-
let t19;
|
|
142
|
-
if ($[33] !== t16 || $[34] !== t17 || $[35] !== t18 || $[36] !== table.page || $[37] !== table.search) {
|
|
143
|
-
t19 = [
|
|
130
|
+
if ($[26] !== t15 || $[27] !== t16 || $[28] !== t17 || $[29] !== table.page || $[30] !== table.search) {
|
|
131
|
+
t18 = [
|
|
132
|
+
t13,
|
|
144
133
|
t14,
|
|
145
134
|
t15,
|
|
146
135
|
t16,
|
|
147
|
-
t17
|
|
148
|
-
t18
|
|
136
|
+
t17
|
|
149
137
|
];
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
} else
|
|
157
|
-
const view =
|
|
158
|
-
let
|
|
159
|
-
if ($[
|
|
160
|
-
|
|
138
|
+
$[26] = t15;
|
|
139
|
+
$[27] = t16;
|
|
140
|
+
$[28] = t17;
|
|
141
|
+
$[29] = table.page;
|
|
142
|
+
$[30] = table.search;
|
|
143
|
+
$[31] = t18;
|
|
144
|
+
} else t18 = $[31];
|
|
145
|
+
const view = t18.join("|");
|
|
146
|
+
let t19;
|
|
147
|
+
if ($[32] !== anchor || $[33] !== scrolls) {
|
|
148
|
+
t19 = () => {
|
|
161
149
|
if (scrolls) anchor?.closest("table")?.parentElement?.scrollTo({ top: 0 });
|
|
162
150
|
};
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
} else
|
|
167
|
-
let
|
|
168
|
-
if ($[
|
|
169
|
-
|
|
151
|
+
$[32] = anchor;
|
|
152
|
+
$[33] = scrolls;
|
|
153
|
+
$[34] = t19;
|
|
154
|
+
} else t19 = $[34];
|
|
155
|
+
let t20;
|
|
156
|
+
if ($[35] !== anchor || $[36] !== scrolls || $[37] !== view) {
|
|
157
|
+
t20 = [
|
|
170
158
|
anchor,
|
|
171
159
|
scrolls,
|
|
172
160
|
view
|
|
173
161
|
];
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
} else
|
|
179
|
-
React.useEffect(
|
|
180
|
-
let
|
|
181
|
-
if ($[
|
|
182
|
-
|
|
162
|
+
$[35] = anchor;
|
|
163
|
+
$[36] = scrolls;
|
|
164
|
+
$[37] = view;
|
|
165
|
+
$[38] = t20;
|
|
166
|
+
} else t20 = $[38];
|
|
167
|
+
React.useEffect(t19, t20);
|
|
168
|
+
let t21;
|
|
169
|
+
if ($[39] !== anchor || $[40] !== reportEnd) {
|
|
170
|
+
t21 = () => {
|
|
183
171
|
const wrapper_0 = anchor?.closest("table")?.parentElement;
|
|
184
172
|
if (wrapper_0) reportEnd(wrapper_0);
|
|
185
173
|
};
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
189
|
-
} else
|
|
190
|
-
React.useEffect(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
const t25 = virtual ? shown.length + 1 : void 0;
|
|
195
|
-
const t26 = stable ? "stable" : void 0;
|
|
196
|
-
const t27 = lock ? "" : void 0;
|
|
197
|
-
const t28 = virtual ? "" : void 0;
|
|
198
|
-
let t29;
|
|
199
|
-
if ($[49] !== lock || $[50] !== tableProps?.style) {
|
|
200
|
-
t29 = lock ? {
|
|
174
|
+
$[39] = anchor;
|
|
175
|
+
$[40] = reportEnd;
|
|
176
|
+
$[41] = t21;
|
|
177
|
+
} else t21 = $[41];
|
|
178
|
+
React.useEffect(t21);
|
|
179
|
+
let t22;
|
|
180
|
+
if ($[42] !== lock || $[43] !== tableProps?.style) {
|
|
181
|
+
t22 = lock ? {
|
|
201
182
|
width: lock.table,
|
|
202
183
|
minWidth: "100%",
|
|
203
184
|
...tableProps?.style
|
|
204
185
|
} : tableProps?.style;
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
} else
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
-
const
|
|
212
|
-
let
|
|
213
|
-
if ($[
|
|
214
|
-
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
} else
|
|
219
|
-
const
|
|
220
|
-
const
|
|
221
|
-
let
|
|
222
|
-
if ($[
|
|
223
|
-
|
|
186
|
+
$[42] = lock;
|
|
187
|
+
$[43] = tableProps?.style;
|
|
188
|
+
$[44] = t22;
|
|
189
|
+
} else t22 = $[44];
|
|
190
|
+
const t23 = tableProps?.wrapperProps;
|
|
191
|
+
const t24 = scrolls && "oui-data-table__scroll";
|
|
192
|
+
const t25 = tableProps?.wrapperProps?.className;
|
|
193
|
+
let t26;
|
|
194
|
+
if ($[45] !== t24 || $[46] !== t25) {
|
|
195
|
+
t26 = cx(t24, t25);
|
|
196
|
+
$[45] = t24;
|
|
197
|
+
$[46] = t25;
|
|
198
|
+
$[47] = t26;
|
|
199
|
+
} else t26 = $[47];
|
|
200
|
+
const t27 = holdsPage && shortPage ? pageHeight : void 0;
|
|
201
|
+
const t28 = tableProps?.wrapperProps?.style;
|
|
202
|
+
let t29;
|
|
203
|
+
if ($[48] !== height || $[49] !== t27 || $[50] !== t28) {
|
|
204
|
+
t29 = {
|
|
224
205
|
maxHeight: height,
|
|
225
|
-
minHeight:
|
|
226
|
-
...
|
|
206
|
+
minHeight: t27,
|
|
207
|
+
...t28
|
|
227
208
|
};
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
} else
|
|
233
|
-
let
|
|
234
|
-
if ($[
|
|
235
|
-
|
|
209
|
+
$[48] = height;
|
|
210
|
+
$[49] = t27;
|
|
211
|
+
$[50] = t28;
|
|
212
|
+
$[51] = t29;
|
|
213
|
+
} else t29 = $[51];
|
|
214
|
+
let t30;
|
|
215
|
+
if ($[52] !== reportEnd || $[53] !== rows || $[54] !== tableProps?.wrapperProps) {
|
|
216
|
+
t30 = (event) => {
|
|
236
217
|
tableProps?.wrapperProps?.onScroll?.(event);
|
|
237
218
|
rows.onScroll(event);
|
|
238
219
|
reportEnd(event.currentTarget);
|
|
239
220
|
};
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
} else
|
|
245
|
-
let
|
|
246
|
-
if ($[
|
|
247
|
-
|
|
248
|
-
...
|
|
249
|
-
className:
|
|
250
|
-
style:
|
|
251
|
-
onScroll:
|
|
221
|
+
$[52] = reportEnd;
|
|
222
|
+
$[53] = rows;
|
|
223
|
+
$[54] = tableProps?.wrapperProps;
|
|
224
|
+
$[55] = t30;
|
|
225
|
+
} else t30 = $[55];
|
|
226
|
+
let t31;
|
|
227
|
+
if ($[56] !== t23 || $[57] !== t26 || $[58] !== t29 || $[59] !== t30) {
|
|
228
|
+
t31 = {
|
|
229
|
+
...t23,
|
|
230
|
+
className: t26,
|
|
231
|
+
style: t29,
|
|
232
|
+
onScroll: t30
|
|
252
233
|
};
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
} else
|
|
259
|
-
let
|
|
260
|
-
if ($[
|
|
261
|
-
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
} else
|
|
265
|
-
let
|
|
266
|
-
if ($[
|
|
267
|
-
|
|
234
|
+
$[56] = t23;
|
|
235
|
+
$[57] = t26;
|
|
236
|
+
$[58] = t29;
|
|
237
|
+
$[59] = t30;
|
|
238
|
+
$[60] = t31;
|
|
239
|
+
} else t31 = $[60];
|
|
240
|
+
let t32;
|
|
241
|
+
if ($[61] !== lock?.widths) {
|
|
242
|
+
t32 = lock?.widths.map(_temp3);
|
|
243
|
+
$[61] = lock?.widths;
|
|
244
|
+
$[62] = t32;
|
|
245
|
+
} else t32 = $[62];
|
|
246
|
+
let t33;
|
|
247
|
+
if ($[63] !== t32) {
|
|
248
|
+
t33 = /* @__PURE__ */ jsx("colgroup", {
|
|
268
249
|
ref: setAnchor,
|
|
269
|
-
children:
|
|
250
|
+
children: t32
|
|
270
251
|
});
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
} else
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
t42 = table.selectable && /* @__PURE__ */ jsx(TableHead, {
|
|
252
|
+
$[63] = t32;
|
|
253
|
+
$[64] = t33;
|
|
254
|
+
} else t33 = $[64];
|
|
255
|
+
let t34;
|
|
256
|
+
if ($[65] !== table || $[66] !== text) {
|
|
257
|
+
t34 = table.selectable && /* @__PURE__ */ jsx(TableHead, {
|
|
278
258
|
className: "oui-data-table__check",
|
|
279
259
|
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
280
260
|
size: "sm",
|
|
@@ -285,66 +265,43 @@ function DataTableContent(t0) {
|
|
|
285
265
|
onCheckedChange: (checked) => table.toggleAll(checked)
|
|
286
266
|
})
|
|
287
267
|
});
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
} else
|
|
292
|
-
let
|
|
293
|
-
if ($[
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
$[76] = lock;
|
|
313
|
-
$[77] = table;
|
|
314
|
-
$[78] = t43;
|
|
315
|
-
} else t43 = $[78];
|
|
316
|
-
let t44;
|
|
317
|
-
if ($[82] !== hasActions || $[83] !== text) {
|
|
318
|
-
t44 = hasActions && /* @__PURE__ */ jsx(TableHead, {
|
|
268
|
+
$[65] = table;
|
|
269
|
+
$[66] = text;
|
|
270
|
+
$[67] = t34;
|
|
271
|
+
} else t34 = $[67];
|
|
272
|
+
let t35;
|
|
273
|
+
if ($[68] !== lock || $[69] !== table) {
|
|
274
|
+
t35 = (column_0) => /* @__PURE__ */ jsx(TableHead, {
|
|
275
|
+
align: column_0.align ?? (column_0.numeric ? "end" : "start"),
|
|
276
|
+
style: !lock && (column_0.width !== void 0 || column_0.minWidth !== void 0) ? {
|
|
277
|
+
width: column_0.width,
|
|
278
|
+
minWidth: column_0.minWidth
|
|
279
|
+
} : void 0,
|
|
280
|
+
"data-nowrap": column_0.nowrap || void 0,
|
|
281
|
+
sort: table.isSortable(column_0) ? table.sort?.id === column_0.id ? table.sort.direction : false : void 0,
|
|
282
|
+
onSort: () => table.toggleSort(column_0.id),
|
|
283
|
+
children: column_0.header
|
|
284
|
+
}, column_0.id);
|
|
285
|
+
$[68] = lock;
|
|
286
|
+
$[69] = table;
|
|
287
|
+
$[70] = t35;
|
|
288
|
+
} else t35 = $[70];
|
|
289
|
+
let t36;
|
|
290
|
+
if ($[71] !== hasActions || $[72] !== text) {
|
|
291
|
+
t36 = hasActions && /* @__PURE__ */ jsx(TableHead, {
|
|
319
292
|
className: "oui-data-table__row-actions",
|
|
320
293
|
children: /* @__PURE__ */ jsx("span", {
|
|
321
294
|
className: "oui-visually-hidden",
|
|
322
295
|
children: text.actions
|
|
323
296
|
})
|
|
324
297
|
});
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
} else
|
|
329
|
-
let
|
|
330
|
-
if ($[
|
|
331
|
-
|
|
332
|
-
"aria-rowindex": t41,
|
|
333
|
-
children: [
|
|
334
|
-
t42,
|
|
335
|
-
t43,
|
|
336
|
-
t44
|
|
337
|
-
]
|
|
338
|
-
}) });
|
|
339
|
-
$[85] = t41;
|
|
340
|
-
$[86] = t42;
|
|
341
|
-
$[87] = t43;
|
|
342
|
-
$[88] = t44;
|
|
343
|
-
$[89] = t45;
|
|
344
|
-
} else t45 = $[89];
|
|
345
|
-
let t46;
|
|
346
|
-
if ($[90] !== rows.before || $[91] !== span) {
|
|
347
|
-
t46 = rows.before > 0 && /* @__PURE__ */ jsx("tbody", {
|
|
298
|
+
$[71] = hasActions;
|
|
299
|
+
$[72] = text;
|
|
300
|
+
$[73] = t36;
|
|
301
|
+
} else t36 = $[73];
|
|
302
|
+
let t37;
|
|
303
|
+
if ($[74] !== rows.before || $[75] !== span) {
|
|
304
|
+
t37 = rows.before > 0 && /* @__PURE__ */ jsx("tbody", {
|
|
348
305
|
className: "oui-data-table__spacer",
|
|
349
306
|
"aria-hidden": true,
|
|
350
307
|
children: /* @__PURE__ */ jsx("tr", {
|
|
@@ -352,84 +309,44 @@ function DataTableContent(t0) {
|
|
|
352
309
|
children: /* @__PURE__ */ jsx("td", { colSpan: span })
|
|
353
310
|
})
|
|
354
311
|
});
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
} else
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
} else
|
|
390
|
-
let
|
|
391
|
-
if ($[
|
|
392
|
-
|
|
393
|
-
if ($[111] !== columns || $[112] !== focused || $[113] !== hasActions || $[114] !== rows.rowHeight || $[115] !== rows.start || $[116] !== table || $[117] !== virtual) {
|
|
394
|
-
t49 = (entry, index_1) => /* @__PURE__ */ jsx(DataTableRow, {
|
|
395
|
-
table,
|
|
396
|
-
entry,
|
|
397
|
-
columns,
|
|
398
|
-
hasActions,
|
|
399
|
-
focused,
|
|
400
|
-
index: virtual ? rows.start + index_1 : void 0,
|
|
401
|
-
height: rows.rowHeight
|
|
402
|
-
}, entry.id);
|
|
403
|
-
$[111] = columns;
|
|
404
|
-
$[112] = focused;
|
|
405
|
-
$[113] = hasActions;
|
|
406
|
-
$[114] = rows.rowHeight;
|
|
407
|
-
$[115] = rows.start;
|
|
408
|
-
$[116] = table;
|
|
409
|
-
$[117] = virtual;
|
|
410
|
-
$[118] = t49;
|
|
411
|
-
} else t49 = $[118];
|
|
412
|
-
t48 = rendered.map(t49);
|
|
413
|
-
$[102] = columns;
|
|
414
|
-
$[103] = focused;
|
|
415
|
-
$[104] = hasActions;
|
|
416
|
-
$[105] = rendered;
|
|
417
|
-
$[106] = rows.rowHeight;
|
|
418
|
-
$[107] = rows.start;
|
|
419
|
-
$[108] = table;
|
|
420
|
-
$[109] = virtual;
|
|
421
|
-
$[110] = t48;
|
|
422
|
-
} else t48 = $[110];
|
|
423
|
-
let t49;
|
|
424
|
-
if ($[119] !== t47 || $[120] !== t48) {
|
|
425
|
-
t49 = /* @__PURE__ */ jsxs(TableBody, { children: [t47, t48] });
|
|
426
|
-
$[119] = t47;
|
|
427
|
-
$[120] = t48;
|
|
428
|
-
$[121] = t49;
|
|
429
|
-
} else t49 = $[121];
|
|
430
|
-
let t50;
|
|
431
|
-
if ($[122] !== rows.after || $[123] !== span) {
|
|
432
|
-
t50 = rows.after > 0 && /* @__PURE__ */ jsx("tbody", {
|
|
312
|
+
$[74] = rows.before;
|
|
313
|
+
$[75] = span;
|
|
314
|
+
$[76] = t37;
|
|
315
|
+
} else t37 = $[76];
|
|
316
|
+
const t38 = Array.from({ length: placeholders }, (_, index_0) => /* @__PURE__ */ jsxs(TableRow, {
|
|
317
|
+
"aria-hidden": true,
|
|
318
|
+
children: [
|
|
319
|
+
table.selectable && /* @__PURE__ */ jsx(TableCell, { className: "oui-data-table__check" }),
|
|
320
|
+
columns.map((column_1, position) => /* @__PURE__ */ jsx(TableCell, {
|
|
321
|
+
align: column_1.align,
|
|
322
|
+
numeric: column_1.numeric,
|
|
323
|
+
children: /* @__PURE__ */ jsx(Skeleton, {
|
|
324
|
+
className: "oui-data-table__skeleton",
|
|
325
|
+
width: `${45 + (index_0 * 3 + position * 5) % 7 * 8}%`
|
|
326
|
+
})
|
|
327
|
+
}, column_1.id)),
|
|
328
|
+
hasActions && /* @__PURE__ */ jsx(TableCell, { className: "oui-data-table__row-actions" })
|
|
329
|
+
]
|
|
330
|
+
}, index_0));
|
|
331
|
+
const t39 = rendered.map((entry, index_1) => /* @__PURE__ */ jsx(DataTableRow, {
|
|
332
|
+
table,
|
|
333
|
+
entry,
|
|
334
|
+
columns,
|
|
335
|
+
hasActions,
|
|
336
|
+
focused,
|
|
337
|
+
index: virtual ? rows.start + index_1 : void 0,
|
|
338
|
+
height: rows.rowHeight
|
|
339
|
+
}, entry.id));
|
|
340
|
+
let t40;
|
|
341
|
+
if ($[77] !== t38 || $[78] !== t39) {
|
|
342
|
+
t40 = /* @__PURE__ */ jsxs(TableBody, { children: [t38, t39] });
|
|
343
|
+
$[77] = t38;
|
|
344
|
+
$[78] = t39;
|
|
345
|
+
$[79] = t40;
|
|
346
|
+
} else t40 = $[79];
|
|
347
|
+
let t41;
|
|
348
|
+
if ($[80] !== rows.after || $[81] !== span) {
|
|
349
|
+
t41 = rows.after > 0 && /* @__PURE__ */ jsx("tbody", {
|
|
433
350
|
className: "oui-data-table__spacer",
|
|
434
351
|
"aria-hidden": true,
|
|
435
352
|
children: /* @__PURE__ */ jsx("tr", {
|
|
@@ -437,67 +354,13 @@ function DataTableContent(t0) {
|
|
|
437
354
|
children: /* @__PURE__ */ jsx("td", { colSpan: span })
|
|
438
355
|
})
|
|
439
356
|
});
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
} else
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
inert: true,
|
|
448
|
-
children: sizers.map((entry_0) => /* @__PURE__ */ jsx(SizerRow, {
|
|
449
|
-
table,
|
|
450
|
-
entry: entry_0,
|
|
451
|
-
columns,
|
|
452
|
-
hasActions
|
|
453
|
-
}, entry_0.id))
|
|
454
|
-
});
|
|
455
|
-
let t52;
|
|
456
|
-
if ($[125] !== T0 || $[126] !== density || $[127] !== striped || $[128] !== t23 || $[129] !== t24 || $[130] !== t25 || $[131] !== t26 || $[132] !== t27 || $[133] !== t28 || $[134] !== t29 || $[135] !== t38 || $[136] !== t40 || $[137] !== t45 || $[138] !== t46 || $[139] !== t49 || $[140] !== t50 || $[141] !== t51 || $[142] !== tableProps) {
|
|
457
|
-
t52 = /* @__PURE__ */ jsxs(T0, {
|
|
458
|
-
density,
|
|
459
|
-
striped,
|
|
460
|
-
stickyHeader: t23,
|
|
461
|
-
"aria-busy": t24,
|
|
462
|
-
"aria-rowcount": t25,
|
|
463
|
-
...tableProps,
|
|
464
|
-
"data-layout": t26,
|
|
465
|
-
"data-locked": t27,
|
|
466
|
-
"data-virtualized": t28,
|
|
467
|
-
style: t29,
|
|
468
|
-
wrapperProps: t38,
|
|
469
|
-
children: [
|
|
470
|
-
t40,
|
|
471
|
-
t45,
|
|
472
|
-
t46,
|
|
473
|
-
t49,
|
|
474
|
-
t50,
|
|
475
|
-
t51
|
|
476
|
-
]
|
|
477
|
-
});
|
|
478
|
-
$[125] = T0;
|
|
479
|
-
$[126] = density;
|
|
480
|
-
$[127] = striped;
|
|
481
|
-
$[128] = t23;
|
|
482
|
-
$[129] = t24;
|
|
483
|
-
$[130] = t25;
|
|
484
|
-
$[131] = t26;
|
|
485
|
-
$[132] = t27;
|
|
486
|
-
$[133] = t28;
|
|
487
|
-
$[134] = t29;
|
|
488
|
-
$[135] = t38;
|
|
489
|
-
$[136] = t40;
|
|
490
|
-
$[137] = t45;
|
|
491
|
-
$[138] = t46;
|
|
492
|
-
$[139] = t49;
|
|
493
|
-
$[140] = t50;
|
|
494
|
-
$[141] = t51;
|
|
495
|
-
$[142] = tableProps;
|
|
496
|
-
$[143] = t52;
|
|
497
|
-
} else t52 = $[143];
|
|
498
|
-
let t53;
|
|
499
|
-
if ($[144] !== empty || $[145] !== error || $[146] !== loading || $[147] !== noMatch || $[148] !== table.activeFilterCount || $[149] !== table.filtered || $[150] !== table.onRetry || $[151] !== table.reset || $[152] !== table.rows || $[153] !== text) {
|
|
500
|
-
t53 = error ? /* @__PURE__ */ jsx(EmptyState, {
|
|
357
|
+
$[80] = rows.after;
|
|
358
|
+
$[81] = span;
|
|
359
|
+
$[82] = t41;
|
|
360
|
+
} else t41 = $[82];
|
|
361
|
+
let t42;
|
|
362
|
+
if ($[83] !== empty || $[84] !== error || $[85] !== loading || $[86] !== noMatch || $[87] !== table.activeFilterCount || $[88] !== table.filtered || $[89] !== table.onRetry || $[90] !== table.reset || $[91] !== table.rows || $[92] !== text) {
|
|
363
|
+
t42 = error ? /* @__PURE__ */ jsx(EmptyState, {
|
|
501
364
|
role: "alert",
|
|
502
365
|
title: text.errorTitle,
|
|
503
366
|
description: error,
|
|
@@ -517,33 +380,67 @@ function DataTableContent(t0) {
|
|
|
517
380
|
children: table.activeFilterCount ? text.clearFilters : text.clearSearch
|
|
518
381
|
}) : void 0
|
|
519
382
|
}));
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
525
|
-
$[
|
|
526
|
-
$[
|
|
527
|
-
$[
|
|
528
|
-
$[
|
|
529
|
-
$[
|
|
530
|
-
$[
|
|
531
|
-
} else
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
383
|
+
$[83] = empty;
|
|
384
|
+
$[84] = error;
|
|
385
|
+
$[85] = loading;
|
|
386
|
+
$[86] = noMatch;
|
|
387
|
+
$[87] = table.activeFilterCount;
|
|
388
|
+
$[88] = table.filtered;
|
|
389
|
+
$[89] = table.onRetry;
|
|
390
|
+
$[90] = table.reset;
|
|
391
|
+
$[91] = table.rows;
|
|
392
|
+
$[92] = text;
|
|
393
|
+
$[93] = t42;
|
|
394
|
+
} else t42 = $[93];
|
|
395
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Table, {
|
|
396
|
+
density,
|
|
397
|
+
striped,
|
|
398
|
+
stickyHeader: stickyHeader ?? scrolls,
|
|
399
|
+
"aria-busy": loading || void 0,
|
|
400
|
+
"aria-rowcount": virtual ? shown.length + 1 : void 0,
|
|
401
|
+
...tableProps,
|
|
402
|
+
"data-layout": stable ? "stable" : void 0,
|
|
403
|
+
"data-locked": lock ? "" : void 0,
|
|
404
|
+
"data-virtualized": virtual ? "" : void 0,
|
|
405
|
+
"data-sticky-column": stickyFirstColumn || void 0,
|
|
406
|
+
style: t22,
|
|
407
|
+
wrapperProps: t31,
|
|
408
|
+
children: [
|
|
409
|
+
t33,
|
|
410
|
+
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, {
|
|
411
|
+
"aria-rowindex": virtual ? 1 : void 0,
|
|
412
|
+
children: [
|
|
413
|
+
t34,
|
|
414
|
+
columns.map(t35),
|
|
415
|
+
t36
|
|
416
|
+
]
|
|
417
|
+
}) }),
|
|
418
|
+
t37,
|
|
419
|
+
t40,
|
|
420
|
+
t41,
|
|
421
|
+
sizers.length > 0 && /* @__PURE__ */ jsx("tbody", {
|
|
422
|
+
className: "oui-data-table__sizer",
|
|
423
|
+
"aria-hidden": true,
|
|
424
|
+
inert: true,
|
|
425
|
+
children: sizers.map((entry_0) => /* @__PURE__ */ jsx(SizerRow, {
|
|
426
|
+
table,
|
|
427
|
+
entry: entry_0,
|
|
428
|
+
columns,
|
|
429
|
+
hasActions
|
|
430
|
+
}, entry_0.id))
|
|
431
|
+
})
|
|
432
|
+
]
|
|
433
|
+
}), t42] });
|
|
540
434
|
}
|
|
541
|
-
function
|
|
435
|
+
function _temp3(width, index) {
|
|
542
436
|
return /* @__PURE__ */ jsx("col", { style: { width } }, index);
|
|
543
437
|
}
|
|
544
|
-
function
|
|
438
|
+
function _temp2(c) {
|
|
545
439
|
return `${c.id}:${c.width ?? ""}:${c.minWidth ?? ""}`;
|
|
546
440
|
}
|
|
441
|
+
function _temp(column) {
|
|
442
|
+
return column.priority !== "low";
|
|
443
|
+
}
|
|
547
444
|
//#endregion
|
|
548
445
|
export { DataTableContent };
|
|
549
446
|
|