@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.
Files changed (53) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/app-shell/AppShell.d.ts +12 -3
  3. package/dist/components/app-shell/AppShell.js +45 -26
  4. package/dist/components/app-shell/AppShell.js.map +1 -1
  5. package/dist/components/data-table/DataTable.d.ts +25 -4
  6. package/dist/components/data-table/DataTable.js +238 -90
  7. package/dist/components/data-table/DataTable.js.map +1 -1
  8. package/dist/components/data-table/DataTableContent.d.ts +6 -1
  9. package/dist/components/data-table/DataTableContent.js +306 -409
  10. package/dist/components/data-table/DataTableContent.js.map +1 -1
  11. package/dist/components/data-table/DataTableFilters.d.ts +6 -1
  12. package/dist/components/data-table/DataTableFilters.js +65 -45
  13. package/dist/components/data-table/DataTableFilters.js.map +1 -1
  14. package/dist/components/data-table/DataTableRow.js +2 -0
  15. package/dist/components/data-table/DataTableRow.js.map +1 -1
  16. package/dist/components/data-table/types.d.ts +14 -1
  17. package/dist/components/data-table/useDataTable.js +2 -0
  18. package/dist/components/data-table/useDataTable.js.map +1 -1
  19. package/dist/components/drawer/Drawer.d.ts +7 -4
  20. package/dist/components/drawer/Drawer.js +2 -1
  21. package/dist/components/drawer/Drawer.js.map +1 -1
  22. package/dist/components/map/Map.d.ts +30 -6
  23. package/dist/components/map/Map.js +387 -271
  24. package/dist/components/map/Map.js.map +1 -1
  25. package/dist/components/stat-card/StatCard.d.ts +2 -2
  26. package/dist/components/stat-card/StatCard.js +1 -1
  27. package/dist/components/stat-card/StatCard.js.map +1 -1
  28. package/dist/components/stepper/Stepper.d.ts +7 -1
  29. package/dist/components/stepper/Stepper.js +46 -27
  30. package/dist/components/stepper/Stepper.js.map +1 -1
  31. package/dist/components/table/Table.d.ts +1 -1
  32. package/dist/components/table/Table.js +3 -1
  33. package/dist/components/table/Table.js.map +1 -1
  34. package/dist/components/tabs/Tabs.d.ts +4 -1
  35. package/dist/components/tabs/Tabs.js +33 -23
  36. package/dist/components/tabs/Tabs.js.map +1 -1
  37. package/dist/components/toggle/Toggle.d.ts +1 -1
  38. package/dist/components/toggle/Toggle.js.map +1 -1
  39. package/dist/components.json +101 -29
  40. package/dist/icons/index.d.ts +8 -0
  41. package/dist/icons/index.js +11 -1
  42. package/dist/icons/index.js.map +1 -1
  43. package/dist/index.js +2 -2
  44. package/dist/llms-full.txt +48 -19
  45. package/dist/llms.txt +7 -7
  46. package/dist/opti-ui.css +380 -29
  47. package/dist/utils/media.d.ts +4 -0
  48. package/dist/utils/media.js +34 -0
  49. package/dist/utils/media.js.map +1 -0
  50. package/dist/utils/scroll-fade.d.ts +9 -0
  51. package/dist/utils/scroll-fade.js +45 -0
  52. package/dist/utils/scroll-fade.js.map +1 -0
  53. 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(158);
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, visibleColumns: columns, loading, error } = table;
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 t4;
35
+ let t5;
33
36
  if ($[0] !== virtualized) {
34
- t4 = typeof virtualized === "object" ? virtualized : {};
37
+ t5 = typeof virtualized === "object" ? virtualized : {};
35
38
  $[0] = virtualized;
36
- $[1] = t4;
37
- } else t4 = $[1];
38
- const { rowHeight, overscan: t5 } = t4;
39
- const overscan = t5 === void 0 ? 8 : t5;
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
- let t6;
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 ($[4] !== error || $[5] !== table.pageRows) {
51
+ if ($[2] !== error || $[3] !== table.pageRows) {
55
52
  t7 = error ? [] : table.pageRows;
56
- $[4] = error;
57
- $[5] = table.pageRows;
58
- $[6] = t7;
59
- } else t7 = $[6];
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
- let t8;
63
- if ($[7] !== columns || $[8] !== density || $[9] !== hasActions || $[10] !== table.selectable) {
64
- t8 = [
65
- density,
66
- table.selectable,
67
- hasActions,
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 t9 = ROW_ESTIMATE[density];
79
- const t10 = typeof maxHeight === "number" ? maxHeight : 512;
80
- let t11;
81
- if ($[12] !== density || $[13] !== overscan || $[14] !== rowHeight || $[15] !== shown.length || $[16] !== t10 || $[17] !== t9 || $[18] !== virtual) {
82
- t11 = {
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: t9,
88
- viewport: t10,
75
+ estimate: t8,
76
+ viewport: t9,
89
77
  key: density
90
78
  };
91
- $[12] = density;
92
- $[13] = overscan;
93
- $[14] = rowHeight;
94
- $[15] = shown.length;
95
- $[16] = t10;
96
- $[17] = t9;
97
- $[18] = virtual;
98
- $[19] = t11;
99
- } else t11 = $[19];
100
- const rows = useVirtualRows(anchor, t11);
101
- let t12;
102
- if ($[20] !== rows.end || $[21] !== rows.start || $[22] !== shown || $[23] !== virtual) {
103
- t12 = virtual ? shown.slice(rows.start, rows.end) : shown;
104
- $[20] = rows.end;
105
- $[21] = rows.start;
106
- $[22] = shown;
107
- $[23] = virtual;
108
- $[24] = t12;
109
- } else t12 = $[24];
110
- const rendered = t12;
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 t13;
116
- if ($[25] !== density || $[26] !== loading || $[27] !== onEndReached || $[28] !== scrolls || $[29] !== shown.length) {
117
- t13 = (wrapper) => {
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
- $[25] = density;
124
- $[26] = loading;
125
- $[27] = onEndReached;
126
- $[28] = scrolls;
127
- $[29] = shown.length;
128
- $[30] = t13;
129
- } else t13 = $[30];
130
- const reportEnd = t13;
131
- const t14 = table.page;
132
- const t15 = table.search;
133
- const t16 = table.sort?.id;
134
- const t17 = table.sort?.direction;
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 ($[31] !== table.filterValues) {
137
- t18 = JSON.stringify(table.filterValues);
138
- $[31] = table.filterValues;
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
- $[33] = t16;
151
- $[34] = t17;
152
- $[35] = t18;
153
- $[36] = table.page;
154
- $[37] = table.search;
155
- $[38] = t19;
156
- } else t19 = $[38];
157
- const view = t19.join("|");
158
- let t20;
159
- if ($[39] !== anchor || $[40] !== scrolls) {
160
- t20 = () => {
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
- $[39] = anchor;
164
- $[40] = scrolls;
165
- $[41] = t20;
166
- } else t20 = $[41];
167
- let t21;
168
- if ($[42] !== anchor || $[43] !== scrolls || $[44] !== view) {
169
- t21 = [
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
- $[42] = anchor;
175
- $[43] = scrolls;
176
- $[44] = view;
177
- $[45] = t21;
178
- } else t21 = $[45];
179
- React.useEffect(t20, t21);
180
- let t22;
181
- if ($[46] !== anchor || $[47] !== reportEnd) {
182
- t22 = () => {
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
- $[46] = anchor;
187
- $[47] = reportEnd;
188
- $[48] = t22;
189
- } else t22 = $[48];
190
- React.useEffect(t22);
191
- const T0 = Table;
192
- const t23 = stickyHeader ?? scrolls;
193
- const t24 = loading || void 0;
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
- $[49] = lock;
206
- $[50] = tableProps?.style;
207
- $[51] = t29;
208
- } else t29 = $[51];
209
- const t30 = tableProps?.wrapperProps;
210
- const t31 = scrolls && "oui-data-table__scroll";
211
- const t32 = tableProps?.wrapperProps?.className;
212
- let t33;
213
- if ($[52] !== t31 || $[53] !== t32) {
214
- t33 = cx(t31, t32);
215
- $[52] = t31;
216
- $[53] = t32;
217
- $[54] = t33;
218
- } else t33 = $[54];
219
- const t34 = holdsPage && shortPage ? pageHeight : void 0;
220
- const t35 = tableProps?.wrapperProps?.style;
221
- let t36;
222
- if ($[55] !== height || $[56] !== t34 || $[57] !== t35) {
223
- t36 = {
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: t34,
226
- ...t35
206
+ minHeight: t27,
207
+ ...t28
227
208
  };
228
- $[55] = height;
229
- $[56] = t34;
230
- $[57] = t35;
231
- $[58] = t36;
232
- } else t36 = $[58];
233
- let t37;
234
- if ($[59] !== reportEnd || $[60] !== rows || $[61] !== tableProps?.wrapperProps) {
235
- t37 = (event) => {
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
- $[59] = reportEnd;
241
- $[60] = rows;
242
- $[61] = tableProps?.wrapperProps;
243
- $[62] = t37;
244
- } else t37 = $[62];
245
- let t38;
246
- if ($[63] !== t30 || $[64] !== t33 || $[65] !== t36 || $[66] !== t37) {
247
- t38 = {
248
- ...t30,
249
- className: t33,
250
- style: t36,
251
- onScroll: t37
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
- $[63] = t30;
254
- $[64] = t33;
255
- $[65] = t36;
256
- $[66] = t37;
257
- $[67] = t38;
258
- } else t38 = $[67];
259
- let t39;
260
- if ($[68] !== lock?.widths) {
261
- t39 = lock?.widths.map(_temp2);
262
- $[68] = lock?.widths;
263
- $[69] = t39;
264
- } else t39 = $[69];
265
- let t40;
266
- if ($[70] !== t39) {
267
- t40 = /* @__PURE__ */ jsx("colgroup", {
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: t39
250
+ children: t32
270
251
  });
271
- $[70] = t39;
272
- $[71] = t40;
273
- } else t40 = $[71];
274
- const t41 = virtual ? 1 : void 0;
275
- let t42;
276
- if ($[72] !== table || $[73] !== text) {
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
- $[72] = table;
289
- $[73] = text;
290
- $[74] = t42;
291
- } else t42 = $[74];
292
- let t43;
293
- if ($[75] !== columns || $[76] !== lock || $[77] !== table) {
294
- let t44;
295
- if ($[79] !== lock || $[80] !== table) {
296
- t44 = (column) => /* @__PURE__ */ jsx(TableHead, {
297
- align: column.align ?? (column.numeric ? "end" : "start"),
298
- style: !lock && (column.width !== void 0 || column.minWidth !== void 0) ? {
299
- width: column.width,
300
- minWidth: column.minWidth
301
- } : void 0,
302
- sort: table.isSortable(column) ? table.sort?.id === column.id ? table.sort.direction : false : void 0,
303
- onSort: () => table.toggleSort(column.id),
304
- children: column.header
305
- }, column.id);
306
- $[79] = lock;
307
- $[80] = table;
308
- $[81] = t44;
309
- } else t44 = $[81];
310
- t43 = columns.map(t44);
311
- $[75] = columns;
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
- $[82] = hasActions;
326
- $[83] = text;
327
- $[84] = t44;
328
- } else t44 = $[84];
329
- let t45;
330
- if ($[85] !== t41 || $[86] !== t42 || $[87] !== t43 || $[88] !== t44) {
331
- t45 = /* @__PURE__ */ jsx(TableHeader, { children: /* @__PURE__ */ jsxs(TableRow, {
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
- $[90] = rows.before;
356
- $[91] = span;
357
- $[92] = t46;
358
- } else t46 = $[92];
359
- let t47;
360
- if ($[93] !== columns || $[94] !== hasActions || $[95] !== placeholders || $[96] !== table.selectable) {
361
- let t48;
362
- if ($[98] !== columns || $[99] !== hasActions || $[100] !== table.selectable) {
363
- t48 = (_, index_0) => /* @__PURE__ */ jsxs(TableRow, {
364
- "aria-hidden": true,
365
- children: [
366
- table.selectable && /* @__PURE__ */ jsx(TableCell, { className: "oui-data-table__check" }),
367
- columns.map((column_0, position) => /* @__PURE__ */ jsx(TableCell, {
368
- align: column_0.align,
369
- numeric: column_0.numeric,
370
- children: /* @__PURE__ */ jsx(Skeleton, {
371
- className: "oui-data-table__skeleton",
372
- width: `${45 + (index_0 * 3 + position * 5) % 7 * 8}%`
373
- })
374
- }, column_0.id)),
375
- hasActions && /* @__PURE__ */ jsx(TableCell, { className: "oui-data-table__row-actions" })
376
- ]
377
- }, index_0);
378
- $[98] = columns;
379
- $[99] = hasActions;
380
- $[100] = table.selectable;
381
- $[101] = t48;
382
- } else t48 = $[101];
383
- t47 = Array.from({ length: placeholders }, t48);
384
- $[93] = columns;
385
- $[94] = hasActions;
386
- $[95] = placeholders;
387
- $[96] = table.selectable;
388
- $[97] = t47;
389
- } else t47 = $[97];
390
- let t48;
391
- if ($[102] !== columns || $[103] !== focused || $[104] !== hasActions || $[105] !== rendered || $[106] !== rows.rowHeight || $[107] !== rows.start || $[108] !== table || $[109] !== virtual) {
392
- let t49;
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
- $[122] = rows.after;
441
- $[123] = span;
442
- $[124] = t50;
443
- } else t50 = $[124];
444
- const t51 = sizers.length > 0 && /* @__PURE__ */ jsx("tbody", {
445
- className: "oui-data-table__sizer",
446
- "aria-hidden": true,
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
- $[144] = empty;
521
- $[145] = error;
522
- $[146] = loading;
523
- $[147] = noMatch;
524
- $[148] = table.activeFilterCount;
525
- $[149] = table.filtered;
526
- $[150] = table.onRetry;
527
- $[151] = table.reset;
528
- $[152] = table.rows;
529
- $[153] = text;
530
- $[154] = t53;
531
- } else t53 = $[154];
532
- let t54;
533
- if ($[155] !== t52 || $[156] !== t53) {
534
- t54 = /* @__PURE__ */ jsxs(Fragment, { children: [t52, t53] });
535
- $[155] = t52;
536
- $[156] = t53;
537
- $[157] = t54;
538
- } else t54 = $[157];
539
- return t54;
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 _temp2(width, index) {
435
+ function _temp3(width, index) {
542
436
  return /* @__PURE__ */ jsx("col", { style: { width } }, index);
543
437
  }
544
- function _temp(c) {
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