@optimum-intelligence/opti-ui 0.9.1 → 1.0.0
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 +99 -0
- package/README.md +5 -1
- package/dist/components/app-shell/AppShell.d.ts +30 -1
- package/dist/components/app-shell/AppShell.js +387 -236
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/avatar/Avatar.d.ts +1 -1
- package/dist/components/avatar/Avatar.js +64 -52
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/calendar/Calendar.js +6 -4
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/calendar/date-utils.js +1 -1
- package/dist/components/calendar/date-utils.js.map +1 -1
- package/dist/components/card/Card.d.ts +24 -5
- package/dist/components/card/Card.js +36 -23
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/collapsible/Collapsible.d.ts +8 -1
- package/dist/components/collapsible/Collapsible.js +32 -25
- package/dist/components/collapsible/Collapsible.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +21 -4
- package/dist/components/data-table/DataTable.js +310 -100
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.d.ts +1 -7
- package/dist/components/data-table/DataTableContent.js +209 -243
- package/dist/components/data-table/DataTableContent.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.js +47 -57
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/DataTableRow.js +105 -90
- package/dist/components/data-table/DataTableRow.js.map +1 -1
- package/dist/components/data-table/layout.d.ts +0 -5
- package/dist/components/data-table/layout.js +1 -23
- package/dist/components/data-table/layout.js.map +1 -1
- package/dist/components/data-table/types.d.ts +5 -2
- package/dist/components/data-table/useDataTable.js +249 -221
- package/dist/components/data-table/useDataTable.js.map +1 -1
- package/dist/components/date-picker/DateRangePicker.js +1 -0
- package/dist/components/date-picker/DateRangePicker.js.map +1 -1
- package/dist/components/date-picker/PickerField.js +98 -101
- package/dist/components/date-picker/PickerField.js.map +1 -1
- package/dist/components/description-list/DescriptionList.d.ts +3 -1
- package/dist/components/description-list/DescriptionList.js +3 -1
- package/dist/components/description-list/DescriptionList.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +1 -1
- package/dist/components/drawer/Drawer.js +173 -87
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/file-upload/FileUpload.js +7 -0
- package/dist/components/file-upload/FileUpload.js.map +1 -1
- package/dist/components/link/Link.d.ts +1 -1
- package/dist/components/link/Link.js +57 -74
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/map/Map.d.ts +14 -2
- package/dist/components/map/Map.js +194 -153
- package/dist/components/map/Map.js.map +1 -1
- package/dist/components/pagination/Pagination.js +2 -0
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/scroll-area/ScrollArea.d.ts +18 -2
- package/dist/components/scroll-area/ScrollArea.js +89 -61
- package/dist/components/scroll-area/ScrollArea.js.map +1 -1
- package/dist/components/spinner/Spinner.js +34 -26
- package/dist/components/spinner/Spinner.js.map +1 -1
- package/dist/components/stat-card/StatCard.js +36 -22
- package/dist/components/stat-card/StatCard.js.map +1 -1
- package/dist/components/table/Table.d.ts +9 -2
- package/dist/components/table/Table.js +87 -63
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/tag/Tag.js +79 -103
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/toolbar/Toolbar.d.ts +2 -1
- package/dist/components/toolbar/Toolbar.js +23 -15
- package/dist/components/toolbar/Toolbar.js.map +1 -1
- package/dist/components/typography/Typography.d.ts +7 -1
- package/dist/components/typography/Typography.js +21 -18
- package/dist/components/typography/Typography.js.map +1 -1
- package/dist/components.json +134 -26
- package/dist/fonts/Montserrat-OFL.txt +93 -0
- package/dist/fonts/Poppins-OFL.txt +93 -0
- package/dist/fonts/montserrat-latin-ext.woff2 +0 -0
- package/dist/fonts/montserrat-latin.woff2 +0 -0
- package/dist/fonts/poppins-latin-400.woff2 +0 -0
- package/dist/fonts/poppins-latin-500.woff2 +0 -0
- package/dist/fonts/poppins-latin-600.woff2 +0 -0
- package/dist/fonts/poppins-latin-700.woff2 +0 -0
- package/dist/fonts/poppins-latin-ext-400.woff2 +0 -0
- package/dist/fonts/poppins-latin-ext-500.woff2 +0 -0
- package/dist/fonts/poppins-latin-ext-600.woff2 +0 -0
- package/dist/fonts/poppins-latin-ext-700.woff2 +0 -0
- package/dist/fonts.css +104 -4
- package/dist/index.js +2 -2
- package/dist/labels/Labels.d.ts +12 -0
- package/dist/labels/Labels.js +6 -0
- package/dist/labels/Labels.js.map +1 -1
- package/dist/labels/hu.js +9 -3
- package/dist/labels/hu.js.map +1 -1
- package/dist/llms-full.txt +103 -20
- package/dist/llms.txt +15 -10
- package/dist/opti-ui.css +567 -197
- package/dist/reset.css +33 -0
- package/dist/utils/focus.d.ts +8 -0
- package/dist/utils/focus.js +39 -0
- package/dist/utils/focus.js.map +1 -0
- package/package.json +2 -1
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cx } from "../../utils/cx.js";
|
|
3
|
-
import { XIcon } from "../../icons/index.js";
|
|
4
3
|
import { Skeleton } from "../skeleton/Skeleton.js";
|
|
5
|
-
import { Button
|
|
4
|
+
import { Button } from "../button/Button.js";
|
|
6
5
|
import { Checkbox } from "../choice/Choice.js";
|
|
7
6
|
import { useMediaQuery } from "../../utils/media.js";
|
|
8
|
-
import { Tooltip } from "../tooltip/Tooltip.js";
|
|
9
7
|
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../table/Table.js";
|
|
10
8
|
import { useDataTableContext } from "./context.js";
|
|
11
9
|
import { EmptyState } from "../empty-state/EmptyState.js";
|
|
12
10
|
import { DataTableRow, SizerRow, isTextEditor } from "./DataTableRow.js";
|
|
13
|
-
import { pickSizerRows, useColumnLock,
|
|
11
|
+
import { pickSizerRows, useColumnLock, usePageHeight, useVirtualRows } from "./layout.js";
|
|
14
12
|
import { c } from "react/compiler-runtime";
|
|
15
13
|
import * as React from "react";
|
|
16
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -22,8 +20,8 @@ var ROW_ESTIMATE = {
|
|
|
22
20
|
};
|
|
23
21
|
/** The table itself, with its loading, empty and error states. */
|
|
24
22
|
function DataTableContent(t0) {
|
|
25
|
-
const $ = c(
|
|
26
|
-
const { density: t1, striped, stickyHeader, layout: t2, maxHeight, virtualized: t3, onEndReached, stickyFirstColumn: t4, empty, tableProps
|
|
23
|
+
const $ = c(95);
|
|
24
|
+
const { density: t1, striped, stickyHeader, layout: t2, maxHeight, virtualized: t3, onEndReached, stickyFirstColumn: t4, empty, tableProps } = t0;
|
|
27
25
|
const density = t1 === void 0 ? "normal" : t1;
|
|
28
26
|
const layout = t2 === void 0 ? "stable" : t2;
|
|
29
27
|
const virtualized = t3 === void 0 ? false : t3;
|
|
@@ -58,216 +56,207 @@ function DataTableContent(t0) {
|
|
|
58
56
|
} else t7 = $[4];
|
|
59
57
|
const shown = t7;
|
|
60
58
|
const span = columns.length + Number(table.selectable) + Number(hasActions);
|
|
61
|
-
let t8;
|
|
62
|
-
if ($[5] !== table.selectable || $[6] !== table.selection) {
|
|
63
|
-
t8 = table.selectable ? new Set(table.selection).size : 0;
|
|
64
|
-
$[5] = table.selectable;
|
|
65
|
-
$[6] = table.selection;
|
|
66
|
-
$[7] = t8;
|
|
67
|
-
} else t8 = $[7];
|
|
68
|
-
const selected = t8;
|
|
69
59
|
const columnKey = [
|
|
70
60
|
density,
|
|
71
61
|
table.selectable,
|
|
72
62
|
hasActions,
|
|
73
63
|
...columns.map(_temp2)
|
|
74
64
|
].join("|");
|
|
75
|
-
const { lock, measuring } = useColumnLock(anchor, stable, columnKey, shown.length > 0
|
|
76
|
-
const
|
|
77
|
-
const t9 =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
t11 = {
|
|
65
|
+
const { lock, measuring } = useColumnLock(anchor, stable, columnKey, shown.length > 0);
|
|
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 = {
|
|
82
71
|
enabled: virtual,
|
|
83
72
|
count: shown.length,
|
|
84
73
|
rowHeight,
|
|
85
74
|
overscan,
|
|
86
|
-
estimate:
|
|
87
|
-
viewport:
|
|
75
|
+
estimate: t8,
|
|
76
|
+
viewport: t9,
|
|
88
77
|
key: density
|
|
89
78
|
};
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
79
|
+
$[5] = density;
|
|
80
|
+
$[6] = overscan;
|
|
81
|
+
$[7] = rowHeight;
|
|
82
|
+
$[8] = shown.length;
|
|
83
|
+
$[9] = t8;
|
|
84
|
+
$[10] = t9;
|
|
85
|
+
$[11] = virtual;
|
|
94
86
|
$[12] = t10;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
$[16] =
|
|
104
|
-
$[17] =
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
$[20] = t12;
|
|
108
|
-
} else t12 = $[20];
|
|
109
|
-
const rendered = t12;
|
|
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;
|
|
110
99
|
const sizers = measuring && table.allRows.length > rendered.length ? pickSizerRows(table.allRows, columns) : [];
|
|
111
100
|
const holdsPage = stable && table.paginated && !scrolls;
|
|
112
101
|
const pageHeight = usePageHeight(anchor, holdsPage, shown.length === table.pageSize, `${density}|${table.pageSize}`);
|
|
113
102
|
const shortPage = table.page > 1 && shown.length > 0 && shown.length < table.pageSize;
|
|
114
|
-
let
|
|
115
|
-
if ($[
|
|
116
|
-
|
|
103
|
+
let t12;
|
|
104
|
+
if ($[18] !== density || $[19] !== loading || $[20] !== onEndReached || $[21] !== scrolls || $[22] !== shown.length) {
|
|
105
|
+
t12 = (wrapper) => {
|
|
117
106
|
if (!onEndReached || !scrolls || loading || !shown.length || reported.current === shown.length) return;
|
|
118
107
|
if (wrapper.scrollHeight - wrapper.scrollTop - wrapper.clientHeight > 4 * ROW_ESTIMATE[density]) return;
|
|
119
108
|
reported.current = shown.length;
|
|
120
109
|
onEndReached();
|
|
121
110
|
};
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
125
|
-
$[
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
} else
|
|
129
|
-
const reportEnd =
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
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];
|
|
134
129
|
let t18;
|
|
135
|
-
if ($[27] !== table.
|
|
136
|
-
t18 =
|
|
137
|
-
|
|
138
|
-
$[28] = t18;
|
|
139
|
-
} else t18 = $[28];
|
|
140
|
-
let t19;
|
|
141
|
-
if ($[29] !== t16 || $[30] !== t17 || $[31] !== t18 || $[32] !== table.page || $[33] !== table.search) {
|
|
142
|
-
t19 = [
|
|
130
|
+
if ($[26] !== t15 || $[27] !== t16 || $[28] !== t17 || $[29] !== table.page || $[30] !== table.search) {
|
|
131
|
+
t18 = [
|
|
132
|
+
t13,
|
|
143
133
|
t14,
|
|
144
134
|
t15,
|
|
145
135
|
t16,
|
|
146
|
-
t17
|
|
147
|
-
t18
|
|
136
|
+
t17
|
|
148
137
|
];
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
138
|
+
$[26] = t15;
|
|
139
|
+
$[27] = t16;
|
|
140
|
+
$[28] = t17;
|
|
141
|
+
$[29] = table.page;
|
|
142
|
+
$[30] = table.search;
|
|
151
143
|
$[31] = t18;
|
|
152
|
-
|
|
153
|
-
|
|
144
|
+
} else t18 = $[31];
|
|
145
|
+
const view = t18.join("|");
|
|
146
|
+
let t19;
|
|
147
|
+
if ($[32] !== anchor || $[33] !== scrolls) {
|
|
148
|
+
t19 = () => {
|
|
149
|
+
if (scrolls) anchor?.closest("table")?.parentElement?.scrollTo({ top: 0 });
|
|
150
|
+
};
|
|
151
|
+
$[32] = anchor;
|
|
152
|
+
$[33] = scrolls;
|
|
154
153
|
$[34] = t19;
|
|
155
154
|
} else t19 = $[34];
|
|
156
|
-
const view = t19.join("|");
|
|
157
155
|
let t20;
|
|
158
|
-
if ($[35] !== anchor || $[36] !== scrolls) {
|
|
159
|
-
t20 =
|
|
160
|
-
if (scrolls) anchor?.closest("table")?.parentElement?.scrollTo({ top: 0 });
|
|
161
|
-
};
|
|
162
|
-
$[35] = anchor;
|
|
163
|
-
$[36] = scrolls;
|
|
164
|
-
$[37] = t20;
|
|
165
|
-
} else t20 = $[37];
|
|
166
|
-
let t21;
|
|
167
|
-
if ($[38] !== anchor || $[39] !== scrolls || $[40] !== view) {
|
|
168
|
-
t21 = [
|
|
156
|
+
if ($[35] !== anchor || $[36] !== scrolls || $[37] !== view) {
|
|
157
|
+
t20 = [
|
|
169
158
|
anchor,
|
|
170
159
|
scrolls,
|
|
171
160
|
view
|
|
172
161
|
];
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
} else
|
|
178
|
-
React.useEffect(
|
|
179
|
-
let
|
|
180
|
-
if ($[
|
|
181
|
-
|
|
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 = () => {
|
|
182
171
|
const wrapper_0 = anchor?.closest("table")?.parentElement;
|
|
183
172
|
if (wrapper_0) reportEnd(wrapper_0);
|
|
184
173
|
};
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
} else
|
|
189
|
-
React.useEffect(
|
|
190
|
-
let
|
|
191
|
-
if ($[
|
|
192
|
-
|
|
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] !== table.selectable || $[44] !== tableProps?.style) {
|
|
181
|
+
t22 = lock ? {
|
|
193
182
|
width: lock.table,
|
|
194
183
|
minWidth: "100%",
|
|
195
184
|
...table.selectable && { "--_check-width": `${lock.widths[0]}px` },
|
|
196
185
|
...tableProps?.style
|
|
197
186
|
} : tableProps?.style;
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
} else
|
|
203
|
-
const
|
|
204
|
-
const
|
|
205
|
-
const
|
|
206
|
-
let
|
|
207
|
-
if ($[
|
|
208
|
-
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
} else
|
|
213
|
-
const
|
|
214
|
-
const
|
|
215
|
-
let
|
|
216
|
-
if ($[
|
|
217
|
-
|
|
187
|
+
$[42] = lock;
|
|
188
|
+
$[43] = table.selectable;
|
|
189
|
+
$[44] = tableProps?.style;
|
|
190
|
+
$[45] = t22;
|
|
191
|
+
} else t22 = $[45];
|
|
192
|
+
const t23 = tableProps?.wrapperProps;
|
|
193
|
+
const t24 = scrolls && "oui-data-table__scroll";
|
|
194
|
+
const t25 = tableProps?.wrapperProps?.className;
|
|
195
|
+
let t26;
|
|
196
|
+
if ($[46] !== t24 || $[47] !== t25) {
|
|
197
|
+
t26 = cx(t24, t25);
|
|
198
|
+
$[46] = t24;
|
|
199
|
+
$[47] = t25;
|
|
200
|
+
$[48] = t26;
|
|
201
|
+
} else t26 = $[48];
|
|
202
|
+
const t27 = holdsPage && shortPage ? pageHeight : void 0;
|
|
203
|
+
const t28 = tableProps?.wrapperProps?.style;
|
|
204
|
+
let t29;
|
|
205
|
+
if ($[49] !== height || $[50] !== t27 || $[51] !== t28) {
|
|
206
|
+
t29 = {
|
|
218
207
|
maxHeight: height,
|
|
219
|
-
minHeight:
|
|
220
|
-
...
|
|
208
|
+
minHeight: t27,
|
|
209
|
+
...t28
|
|
221
210
|
};
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
} else
|
|
227
|
-
let
|
|
228
|
-
if ($[
|
|
229
|
-
|
|
211
|
+
$[49] = height;
|
|
212
|
+
$[50] = t27;
|
|
213
|
+
$[51] = t28;
|
|
214
|
+
$[52] = t29;
|
|
215
|
+
} else t29 = $[52];
|
|
216
|
+
let t30;
|
|
217
|
+
if ($[53] !== reportEnd || $[54] !== rows || $[55] !== tableProps?.wrapperProps) {
|
|
218
|
+
t30 = (event) => {
|
|
230
219
|
tableProps?.wrapperProps?.onScroll?.(event);
|
|
231
220
|
rows.onScroll(event);
|
|
232
221
|
reportEnd(event.currentTarget);
|
|
233
222
|
};
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
} else
|
|
239
|
-
let
|
|
240
|
-
if ($[
|
|
241
|
-
|
|
242
|
-
...
|
|
243
|
-
className:
|
|
244
|
-
style:
|
|
245
|
-
onScroll:
|
|
223
|
+
$[53] = reportEnd;
|
|
224
|
+
$[54] = rows;
|
|
225
|
+
$[55] = tableProps?.wrapperProps;
|
|
226
|
+
$[56] = t30;
|
|
227
|
+
} else t30 = $[56];
|
|
228
|
+
let t31;
|
|
229
|
+
if ($[57] !== t23 || $[58] !== t26 || $[59] !== t29 || $[60] !== t30) {
|
|
230
|
+
t31 = {
|
|
231
|
+
...t23,
|
|
232
|
+
className: t26,
|
|
233
|
+
style: t29,
|
|
234
|
+
onScroll: t30
|
|
246
235
|
};
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
} else
|
|
236
|
+
$[57] = t23;
|
|
237
|
+
$[58] = t26;
|
|
238
|
+
$[59] = t29;
|
|
239
|
+
$[60] = t30;
|
|
240
|
+
$[61] = t31;
|
|
241
|
+
} else t31 = $[61];
|
|
242
|
+
let t32;
|
|
243
|
+
if ($[62] !== lock?.widths) {
|
|
244
|
+
t32 = lock?.widths.map(_temp3);
|
|
245
|
+
$[62] = lock?.widths;
|
|
246
|
+
$[63] = t32;
|
|
247
|
+
} else t32 = $[63];
|
|
253
248
|
let t33;
|
|
254
|
-
if ($[
|
|
255
|
-
t33 =
|
|
256
|
-
$[65] = lock?.widths;
|
|
257
|
-
$[66] = t33;
|
|
258
|
-
} else t33 = $[66];
|
|
259
|
-
let t34;
|
|
260
|
-
if ($[67] !== t33) {
|
|
261
|
-
t34 = /* @__PURE__ */ jsx("colgroup", {
|
|
249
|
+
if ($[64] !== t32) {
|
|
250
|
+
t33 = /* @__PURE__ */ jsx("colgroup", {
|
|
262
251
|
ref: setAnchor,
|
|
263
|
-
children:
|
|
252
|
+
children: t32
|
|
264
253
|
});
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
} else
|
|
268
|
-
let
|
|
269
|
-
if ($[
|
|
270
|
-
|
|
254
|
+
$[64] = t32;
|
|
255
|
+
$[65] = t33;
|
|
256
|
+
} else t33 = $[65];
|
|
257
|
+
let t34;
|
|
258
|
+
if ($[66] !== table || $[67] !== text) {
|
|
259
|
+
t34 = table.selectable && /* @__PURE__ */ jsx(TableHead, {
|
|
271
260
|
className: "oui-data-table__check",
|
|
272
261
|
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
273
262
|
size: "sm",
|
|
@@ -278,13 +267,30 @@ function DataTableContent(t0) {
|
|
|
278
267
|
onCheckedChange: (checked) => table.toggleAll(checked)
|
|
279
268
|
})
|
|
280
269
|
});
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
270
|
+
$[66] = table;
|
|
271
|
+
$[67] = text;
|
|
272
|
+
$[68] = t34;
|
|
273
|
+
} else t34 = $[68];
|
|
274
|
+
let t35;
|
|
275
|
+
if ($[69] !== lock || $[70] !== table) {
|
|
276
|
+
t35 = (column_0) => /* @__PURE__ */ jsx(TableHead, {
|
|
277
|
+
align: column_0.align ?? (column_0.numeric ? "end" : "start"),
|
|
278
|
+
style: !lock && (column_0.width !== void 0 || column_0.minWidth !== void 0) ? {
|
|
279
|
+
width: column_0.width,
|
|
280
|
+
minWidth: column_0.minWidth
|
|
281
|
+
} : void 0,
|
|
282
|
+
"data-nowrap": column_0.nowrap || void 0,
|
|
283
|
+
sort: table.isSortable(column_0) ? table.sort?.id === column_0.id ? table.sort.direction : false : void 0,
|
|
284
|
+
onSort: () => table.toggleSort(column_0.id),
|
|
285
|
+
children: column_0.header
|
|
286
|
+
}, column_0.id);
|
|
287
|
+
$[69] = lock;
|
|
288
|
+
$[70] = table;
|
|
283
289
|
$[71] = t35;
|
|
284
290
|
} else t35 = $[71];
|
|
285
291
|
let t36;
|
|
286
|
-
if ($[72] !== hasActions || $[73] !==
|
|
287
|
-
t36 =
|
|
292
|
+
if ($[72] !== hasActions || $[73] !== text) {
|
|
293
|
+
t36 = hasActions && /* @__PURE__ */ jsx(TableHead, {
|
|
288
294
|
className: "oui-data-table__row-actions",
|
|
289
295
|
children: /* @__PURE__ */ jsx("span", {
|
|
290
296
|
className: "oui-visually-hidden",
|
|
@@ -292,12 +298,11 @@ function DataTableContent(t0) {
|
|
|
292
298
|
})
|
|
293
299
|
});
|
|
294
300
|
$[72] = hasActions;
|
|
295
|
-
$[73] =
|
|
296
|
-
$[74] =
|
|
297
|
-
|
|
298
|
-
} else t36 = $[75];
|
|
301
|
+
$[73] = text;
|
|
302
|
+
$[74] = t36;
|
|
303
|
+
} else t36 = $[74];
|
|
299
304
|
let t37;
|
|
300
|
-
if ($[
|
|
305
|
+
if ($[75] !== rows.before || $[76] !== span) {
|
|
301
306
|
t37 = rows.before > 0 && /* @__PURE__ */ jsx("tbody", {
|
|
302
307
|
className: "oui-data-table__spacer",
|
|
303
308
|
"aria-hidden": true,
|
|
@@ -306,10 +311,10 @@ function DataTableContent(t0) {
|
|
|
306
311
|
children: /* @__PURE__ */ jsx("td", { colSpan: span })
|
|
307
312
|
})
|
|
308
313
|
});
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
} else t37 = $[
|
|
314
|
+
$[75] = rows.before;
|
|
315
|
+
$[76] = span;
|
|
316
|
+
$[77] = t37;
|
|
317
|
+
} else t37 = $[77];
|
|
313
318
|
const t38 = Array.from({ length: placeholders }, (_, index_0) => /* @__PURE__ */ jsxs(TableRow, {
|
|
314
319
|
"aria-hidden": true,
|
|
315
320
|
children: [
|
|
@@ -335,14 +340,14 @@ function DataTableContent(t0) {
|
|
|
335
340
|
height: rows.rowHeight
|
|
336
341
|
}, entry.id));
|
|
337
342
|
let t40;
|
|
338
|
-
if ($[
|
|
343
|
+
if ($[78] !== t38 || $[79] !== t39) {
|
|
339
344
|
t40 = /* @__PURE__ */ jsxs(TableBody, { children: [t38, t39] });
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
} else t40 = $[
|
|
345
|
+
$[78] = t38;
|
|
346
|
+
$[79] = t39;
|
|
347
|
+
$[80] = t40;
|
|
348
|
+
} else t40 = $[80];
|
|
344
349
|
let t41;
|
|
345
|
-
if ($[
|
|
350
|
+
if ($[81] !== rows.after || $[82] !== span) {
|
|
346
351
|
t41 = rows.after > 0 && /* @__PURE__ */ jsx("tbody", {
|
|
347
352
|
className: "oui-data-table__spacer",
|
|
348
353
|
"aria-hidden": true,
|
|
@@ -351,12 +356,12 @@ function DataTableContent(t0) {
|
|
|
351
356
|
children: /* @__PURE__ */ jsx("td", { colSpan: span })
|
|
352
357
|
})
|
|
353
358
|
});
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
} else t41 = $[
|
|
359
|
+
$[81] = rows.after;
|
|
360
|
+
$[82] = span;
|
|
361
|
+
$[83] = t41;
|
|
362
|
+
} else t41 = $[83];
|
|
358
363
|
let t42;
|
|
359
|
-
if ($[
|
|
364
|
+
if ($[84] !== empty || $[85] !== error || $[86] !== loading || $[87] !== noMatch || $[88] !== table.activeFilterCount || $[89] !== table.filtered || $[90] !== table.onRetry || $[91] !== table.reset || $[92] !== table.rows || $[93] !== text) {
|
|
360
365
|
t42 = error ? /* @__PURE__ */ jsx(EmptyState, {
|
|
361
366
|
role: "alert",
|
|
362
367
|
title: text.errorTitle,
|
|
@@ -377,18 +382,18 @@ function DataTableContent(t0) {
|
|
|
377
382
|
children: table.activeFilterCount ? text.clearFilters : text.clearSearch
|
|
378
383
|
}) : void 0
|
|
379
384
|
}));
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
} else t42 = $[
|
|
385
|
+
$[84] = empty;
|
|
386
|
+
$[85] = error;
|
|
387
|
+
$[86] = loading;
|
|
388
|
+
$[87] = noMatch;
|
|
389
|
+
$[88] = table.activeFilterCount;
|
|
390
|
+
$[89] = table.filtered;
|
|
391
|
+
$[90] = table.onRetry;
|
|
392
|
+
$[91] = table.reset;
|
|
393
|
+
$[92] = table.rows;
|
|
394
|
+
$[93] = text;
|
|
395
|
+
$[94] = t42;
|
|
396
|
+
} else t42 = $[94];
|
|
392
397
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Table, {
|
|
393
398
|
density,
|
|
394
399
|
striped,
|
|
@@ -400,54 +405,15 @@ function DataTableContent(t0) {
|
|
|
400
405
|
"data-locked": lock ? "" : void 0,
|
|
401
406
|
"data-virtualized": virtual ? "" : void 0,
|
|
402
407
|
"data-sticky-column": stickyFirstColumn || void 0,
|
|
403
|
-
style:
|
|
404
|
-
wrapperProps:
|
|
408
|
+
style: t22,
|
|
409
|
+
wrapperProps: t31,
|
|
405
410
|
children: [
|
|
406
|
-
|
|
411
|
+
t33,
|
|
407
412
|
/* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, {
|
|
408
413
|
"aria-rowindex": virtual ? 1 : void 0,
|
|
409
|
-
"data-selecting": selected > 0 || void 0,
|
|
410
414
|
children: [
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
colSpan: columns.length + Number(hasActions),
|
|
414
|
-
scope: "colgroup",
|
|
415
|
-
className: "oui-data-table__selection-head",
|
|
416
|
-
style: { height: headerHeight },
|
|
417
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
418
|
-
className: "oui-data-table__selection-bar",
|
|
419
|
-
children: [
|
|
420
|
-
/* @__PURE__ */ jsx("span", {
|
|
421
|
-
className: "oui-data-table__selection-count",
|
|
422
|
-
"aria-live": "polite",
|
|
423
|
-
children: text.selected(selected)
|
|
424
|
-
}),
|
|
425
|
-
/* @__PURE__ */ jsx(Tooltip, {
|
|
426
|
-
content: text.clearSelection,
|
|
427
|
-
children: /* @__PURE__ */ jsx(IconButton, {
|
|
428
|
-
size: "sm",
|
|
429
|
-
"aria-label": text.clearSelection,
|
|
430
|
-
onClick: table.clearSelection,
|
|
431
|
-
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
432
|
-
})
|
|
433
|
-
}),
|
|
434
|
-
selectionActions && /* @__PURE__ */ jsx("div", {
|
|
435
|
-
className: "oui-data-table__selection-actions",
|
|
436
|
-
children: selectionActions
|
|
437
|
-
})
|
|
438
|
-
]
|
|
439
|
-
})
|
|
440
|
-
}) : columns.map((column_0) => /* @__PURE__ */ jsx(TableHead, {
|
|
441
|
-
align: column_0.align ?? (column_0.numeric ? "end" : "start"),
|
|
442
|
-
style: !lock && (column_0.width !== void 0 || column_0.minWidth !== void 0) ? {
|
|
443
|
-
width: column_0.width,
|
|
444
|
-
minWidth: column_0.minWidth
|
|
445
|
-
} : void 0,
|
|
446
|
-
"data-nowrap": column_0.nowrap || void 0,
|
|
447
|
-
sort: table.isSortable(column_0) ? table.sort?.id === column_0.id ? table.sort.direction : false : void 0,
|
|
448
|
-
onSort: () => table.toggleSort(column_0.id),
|
|
449
|
-
children: column_0.header
|
|
450
|
-
}, column_0.id)),
|
|
415
|
+
t34,
|
|
416
|
+
columns.map(t35),
|
|
451
417
|
t36
|
|
452
418
|
]
|
|
453
419
|
}) }),
|