@krak-stack/registry 0.10.0 → 0.10.2
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 +17 -0
- package/README.md +50 -0
- package/dist/components/ui/app-brand.d.ts +2 -0
- package/dist/components/ui/app-brand.js +24 -9
- package/dist/components/ui/{secret-value.d.ts → copy-value.d.ts} +6 -4
- package/dist/components/ui/copy-value.js +319 -0
- package/dist/components/ui/data-table.d.ts +12 -0
- package/dist/components/ui/data-table.js +195 -137
- package/dist/components/ui/effect-form.d.ts +2 -0
- package/dist/components/ui/effect-form.js +3 -0
- package/dist/components/ui/pagination.d.ts +3 -1
- package/dist/components/ui/pagination.js +5 -1
- package/dist/components/ui/sidebar-layout.js +12 -9
- package/dist/lib/docs.integrations.server.d.ts +56 -0
- package/dist/lib/docs.integrations.server.js +945 -0
- package/dist/lib/docs.js +36 -23
- package/dist/lib/docs.server.js +3 -5
- package/dist/lib/docs.webhook-reference.server.d.ts +21 -0
- package/dist/lib/documentation-toolkit.js +3 -5
- package/dist/services/events/client/audit-log-table.js +195 -137
- package/dist/services/webhooks/client/delivery-table.js +195 -137
- package/package.json +9 -5
- package/dist/components/ui/secret-value.js +0 -222
|
@@ -750,6 +750,8 @@ var paginationMessages = (locale = "en", translations) => ({
|
|
|
750
750
|
...translations?.[locale]
|
|
751
751
|
});
|
|
752
752
|
function Pagination({
|
|
753
|
+
className,
|
|
754
|
+
pageSizeContentClassName,
|
|
753
755
|
compact = false,
|
|
754
756
|
locale: localeOverride,
|
|
755
757
|
messages: messageOverrides,
|
|
@@ -769,7 +771,8 @@ function Pagination({
|
|
|
769
771
|
const canGoBack = page > 0;
|
|
770
772
|
const canGoForward = page + 1 < pageCount;
|
|
771
773
|
return /* @__PURE__ */ jsxs6("div", {
|
|
772
|
-
|
|
774
|
+
"data-slot": "pagination",
|
|
775
|
+
className: cn("flex flex-col gap-3 px-2 sm:flex-row sm:items-center sm:justify-between", compact && "gap-2 px-0 sm:flex-col sm:items-stretch", className),
|
|
773
776
|
children: [
|
|
774
777
|
showResults ? /* @__PURE__ */ jsxs6("div", {
|
|
775
778
|
className: "text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",
|
|
@@ -810,6 +813,7 @@ function Pagination({
|
|
|
810
813
|
}),
|
|
811
814
|
/* @__PURE__ */ jsx11(SelectContent, {
|
|
812
815
|
side: "top",
|
|
816
|
+
className: pageSizeContentClassName,
|
|
813
817
|
children: pageSizes.map((size) => /* @__PURE__ */ jsx11(SelectItem, {
|
|
814
818
|
value: `${size}`,
|
|
815
819
|
children: size
|
|
@@ -1208,6 +1212,45 @@ var PaginationMeta = Schema.Struct({
|
|
|
1208
1212
|
// ../../src/components/ui/data-table.tsx
|
|
1209
1213
|
import { useKrakstackLocale as useKrakstackLocale3 } from "@krak-stack/registry/krakstack-provider";
|
|
1210
1214
|
import { jsx as jsx15, jsxs as jsxs9, Fragment } from "react/jsx-runtime";
|
|
1215
|
+
var DataTableStylesContext = createContext(undefined);
|
|
1216
|
+
var styledTablePart = (Part, slot, style) => {
|
|
1217
|
+
const StyledPart = (props) => {
|
|
1218
|
+
const styles = useContext(DataTableStylesContext);
|
|
1219
|
+
const className = cn(props.className, style(styles));
|
|
1220
|
+
return /* @__PURE__ */ jsx15(Part, {
|
|
1221
|
+
"data-table-slot": slot,
|
|
1222
|
+
...props,
|
|
1223
|
+
className
|
|
1224
|
+
});
|
|
1225
|
+
};
|
|
1226
|
+
return StyledPart;
|
|
1227
|
+
};
|
|
1228
|
+
var Table2 = styledTablePart(Table, "table", (s) => s?.table?.content);
|
|
1229
|
+
var TableHeader2 = styledTablePart(TableHeader, "header", (s) => s?.table?.header);
|
|
1230
|
+
var TableBody2 = styledTablePart(TableBody, "body", (s) => s?.table?.body);
|
|
1231
|
+
var TableRow2 = styledTablePart(TableRow, "row", (s) => s?.table?.row);
|
|
1232
|
+
var TableHead2 = styledTablePart(TableHead, "head", (s) => s?.table?.head);
|
|
1233
|
+
var TableCell2 = styledTablePart(TableCell, "cell", (s) => s?.table?.cell);
|
|
1234
|
+
var Input2 = styledTablePart(Input, "input", (s) => s?.toolbar?.search);
|
|
1235
|
+
var Menubar2 = styledTablePart(Menubar, "menubar", (s) => s?.toolbar?.content);
|
|
1236
|
+
var MenubarTrigger2 = styledTablePart(MenubarTrigger, "menu-trigger", (s) => s?.toolbar?.trigger);
|
|
1237
|
+
var MenubarContent2 = styledTablePart(MenubarContent, "menu", (s) => s?.menu?.content);
|
|
1238
|
+
var MenubarSubContent2 = styledTablePart(MenubarSubContent, "submenu", (s) => s?.menu?.subContent);
|
|
1239
|
+
var MenubarSubTrigger2 = styledTablePart(MenubarSubTrigger, "submenu-trigger", (s) => s?.menu?.subTrigger);
|
|
1240
|
+
var MenubarItem2 = styledTablePart(MenubarItem, "menu-item", (s) => s?.menu?.item);
|
|
1241
|
+
var MenubarCheckboxItem2 = styledTablePart(MenubarCheckboxItem, "menu-checkbox-item", (s) => s?.menu?.item);
|
|
1242
|
+
var MenubarRadioItem2 = styledTablePart(MenubarRadioItem, "menu-radio-item", (s) => s?.menu?.item);
|
|
1243
|
+
var MenubarLabel2 = styledTablePart(MenubarLabel, "menu-label", (s) => s?.menu?.label);
|
|
1244
|
+
var MenubarSeparator2 = styledTablePart(MenubarSeparator, "menu-separator", (s) => s?.menu?.separator);
|
|
1245
|
+
var DropdownMenuTrigger2 = styledTablePart(DropdownMenuTrigger, "row-menu-trigger", (s) => s?.toolbar?.trigger);
|
|
1246
|
+
var DropdownMenuContent2 = styledTablePart(DropdownMenuContent, "row-menu", (s) => s?.menu?.content);
|
|
1247
|
+
var DropdownMenuSubContent2 = styledTablePart(DropdownMenuSubContent, "row-submenu", (s) => s?.menu?.subContent);
|
|
1248
|
+
var DropdownMenuSubTrigger2 = styledTablePart(DropdownMenuSubTrigger, "row-submenu-trigger", (s) => s?.menu?.subTrigger);
|
|
1249
|
+
var DropdownMenuItem2 = styledTablePart(DropdownMenuItem, "row-menu-item", (s) => s?.menu?.item);
|
|
1250
|
+
var DropdownMenuLabel2 = styledTablePart(DropdownMenuLabel, "row-menu-label", (s) => s?.menu?.label);
|
|
1251
|
+
var DropdownMenuSeparator2 = styledTablePart(DropdownMenuSeparator, "row-menu-separator", (s) => s?.menu?.separator);
|
|
1252
|
+
var SelectContent2 = styledTablePart(SelectContent, "select-popup", (s) => s?.popup?.select);
|
|
1253
|
+
var TooltipContent2 = styledTablePart(TooltipContent, "tooltip", (s) => s?.popup?.tooltip);
|
|
1211
1254
|
var DataTablePersistedUiStateSchema = Schema2.Struct({
|
|
1212
1255
|
columnVisibility: Schema2.Record(Schema2.String, Schema2.Boolean),
|
|
1213
1256
|
columnSizing: Schema2.Record(Schema2.String, Schema2.Finite),
|
|
@@ -1971,7 +2014,7 @@ var DataTableRowActions = ({
|
|
|
1971
2014
|
return null;
|
|
1972
2015
|
return /* @__PURE__ */ jsxs9(DropdownMenu, {
|
|
1973
2016
|
children: [
|
|
1974
|
-
/* @__PURE__ */ jsx15(
|
|
2017
|
+
/* @__PURE__ */ jsx15(DropdownMenuTrigger2, {
|
|
1975
2018
|
onClick: (event) => event.stopPropagation(),
|
|
1976
2019
|
render: /* @__PURE__ */ jsxs9(Button, {
|
|
1977
2020
|
className: "size-8 focus-visible:ring-inset [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -1986,16 +2029,16 @@ var DataTableRowActions = ({
|
|
|
1986
2029
|
]
|
|
1987
2030
|
})
|
|
1988
2031
|
}),
|
|
1989
|
-
/* @__PURE__ */ jsx15(
|
|
2032
|
+
/* @__PURE__ */ jsx15(DropdownMenuContent2, {
|
|
1990
2033
|
align: "end",
|
|
1991
2034
|
className: "w-max",
|
|
1992
2035
|
children: /* @__PURE__ */ jsxs9(DropdownMenuGroup, {
|
|
1993
2036
|
children: [
|
|
1994
|
-
/* @__PURE__ */ jsx15(
|
|
2037
|
+
/* @__PURE__ */ jsx15(DropdownMenuLabel2, {
|
|
1995
2038
|
children: title
|
|
1996
2039
|
}),
|
|
1997
|
-
/* @__PURE__ */ jsx15(
|
|
1998
|
-
visible.map((action) => /* @__PURE__ */ jsxs9(
|
|
2040
|
+
/* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}),
|
|
2041
|
+
visible.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
|
|
1999
2042
|
onClick: (event) => {
|
|
2000
2043
|
event.stopPropagation();
|
|
2001
2044
|
action.onClick(row);
|
|
@@ -2101,7 +2144,7 @@ var DataTableToolbar = ({
|
|
|
2101
2144
|
/* @__PURE__ */ jsx15(Search, {
|
|
2102
2145
|
className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2"
|
|
2103
2146
|
}),
|
|
2104
|
-
/* @__PURE__ */ jsx15(
|
|
2147
|
+
/* @__PURE__ */ jsx15(Input2, {
|
|
2105
2148
|
className: "px-9",
|
|
2106
2149
|
onChange: (event) => update((state) => ({
|
|
2107
2150
|
...state,
|
|
@@ -2127,12 +2170,12 @@ var DataTableToolbar = ({
|
|
|
2127
2170
|
}) : null,
|
|
2128
2171
|
/* @__PURE__ */ jsx15("div", {
|
|
2129
2172
|
className: "-m-1 flex overflow-x-auto p-1",
|
|
2130
|
-
children: /* @__PURE__ */ jsxs9(
|
|
2173
|
+
children: /* @__PURE__ */ jsxs9(Menubar2, {
|
|
2131
2174
|
className: "h-auto w-max min-w-full justify-start bg-transparent shadow-none [&_[data-slot=menubar-trigger]]:gap-2 [&_[data-slot=menubar-trigger]_svg]:size-4",
|
|
2132
2175
|
children: [
|
|
2133
2176
|
visibleBulkActions.length ? /* @__PURE__ */ jsxs9(MenubarMenu, {
|
|
2134
2177
|
children: [
|
|
2135
|
-
/* @__PURE__ */ jsxs9(
|
|
2178
|
+
/* @__PURE__ */ jsxs9(MenubarTrigger2, {
|
|
2136
2179
|
className: "bg-primary text-primary-foreground hover:bg-primary/90 aria-expanded:bg-primary/90",
|
|
2137
2180
|
children: [
|
|
2138
2181
|
labels.selected,
|
|
@@ -2143,16 +2186,16 @@ var DataTableToolbar = ({
|
|
|
2143
2186
|
/* @__PURE__ */ jsx15(ChevronDown, {})
|
|
2144
2187
|
]
|
|
2145
2188
|
}),
|
|
2146
|
-
/* @__PURE__ */ jsx15(
|
|
2189
|
+
/* @__PURE__ */ jsx15(MenubarContent2, {
|
|
2147
2190
|
align: "end",
|
|
2148
2191
|
className: "w-max",
|
|
2149
2192
|
children: /* @__PURE__ */ jsxs9(MenubarGroup, {
|
|
2150
2193
|
children: [
|
|
2151
|
-
/* @__PURE__ */ jsx15(
|
|
2194
|
+
/* @__PURE__ */ jsx15(MenubarLabel2, {
|
|
2152
2195
|
children: bulkActions && bulkActions.label ? bulkActions.label : labels.actions
|
|
2153
2196
|
}),
|
|
2154
|
-
/* @__PURE__ */ jsx15(
|
|
2155
|
-
visibleBulkActions.map((action) => /* @__PURE__ */ jsxs9(
|
|
2197
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2198
|
+
visibleBulkActions.map((action) => /* @__PURE__ */ jsxs9(MenubarItem2, {
|
|
2156
2199
|
onClick: () => action.onClick(selectedRows),
|
|
2157
2200
|
variant: action.variant ?? "default",
|
|
2158
2201
|
children: [
|
|
@@ -2171,7 +2214,7 @@ var DataTableToolbar = ({
|
|
|
2171
2214
|
}) : null,
|
|
2172
2215
|
grouping ? /* @__PURE__ */ jsxs9(MenubarMenu, {
|
|
2173
2216
|
children: [
|
|
2174
|
-
/* @__PURE__ */ jsxs9(
|
|
2217
|
+
/* @__PURE__ */ jsxs9(MenubarTrigger2, {
|
|
2175
2218
|
"aria-label": labels.groupBy,
|
|
2176
2219
|
children: [
|
|
2177
2220
|
/* @__PURE__ */ jsx15(Rows3, {}),
|
|
@@ -2181,15 +2224,15 @@ var DataTableToolbar = ({
|
|
|
2181
2224
|
})
|
|
2182
2225
|
]
|
|
2183
2226
|
}),
|
|
2184
|
-
/* @__PURE__ */ jsx15(
|
|
2227
|
+
/* @__PURE__ */ jsx15(MenubarContent2, {
|
|
2185
2228
|
align: "end",
|
|
2186
2229
|
children: /* @__PURE__ */ jsxs9(MenubarGroup, {
|
|
2187
2230
|
children: [
|
|
2188
|
-
/* @__PURE__ */ jsx15(
|
|
2231
|
+
/* @__PURE__ */ jsx15(MenubarLabel2, {
|
|
2189
2232
|
children: labels.groupBy
|
|
2190
2233
|
}),
|
|
2191
|
-
/* @__PURE__ */ jsx15(
|
|
2192
|
-
grouping.fields.map((field) => /* @__PURE__ */ jsx15(
|
|
2234
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2235
|
+
grouping.fields.map((field) => /* @__PURE__ */ jsx15(MenubarCheckboxItem2, {
|
|
2193
2236
|
checked: store.state.grouping.includes(field.id),
|
|
2194
2237
|
onCheckedChange: (checked) => update((state) => ({
|
|
2195
2238
|
...state,
|
|
@@ -2212,7 +2255,7 @@ var DataTableToolbar = ({
|
|
|
2212
2255
|
tableAtom
|
|
2213
2256
|
}) : null,
|
|
2214
2257
|
features.refresh ? /* @__PURE__ */ jsx15(MenubarMenu, {
|
|
2215
|
-
children: /* @__PURE__ */ jsxs9(
|
|
2258
|
+
children: /* @__PURE__ */ jsxs9(MenubarTrigger2, {
|
|
2216
2259
|
"aria-label": labels.refresh,
|
|
2217
2260
|
onClick: features.refresh,
|
|
2218
2261
|
children: [
|
|
@@ -2226,7 +2269,7 @@ var DataTableToolbar = ({
|
|
|
2226
2269
|
}) : null,
|
|
2227
2270
|
features.export ? /* @__PURE__ */ jsxs9(MenubarMenu, {
|
|
2228
2271
|
children: [
|
|
2229
|
-
/* @__PURE__ */ jsxs9(
|
|
2272
|
+
/* @__PURE__ */ jsxs9(MenubarTrigger2, {
|
|
2230
2273
|
"aria-label": labels.export,
|
|
2231
2274
|
"aria-busy": exporting,
|
|
2232
2275
|
disabled: exporting || !canExport,
|
|
@@ -2240,17 +2283,17 @@ var DataTableToolbar = ({
|
|
|
2240
2283
|
})
|
|
2241
2284
|
]
|
|
2242
2285
|
}),
|
|
2243
|
-
/* @__PURE__ */ jsx15(
|
|
2286
|
+
/* @__PURE__ */ jsx15(MenubarContent2, {
|
|
2244
2287
|
align: "end",
|
|
2245
2288
|
children: /* @__PURE__ */ jsxs9(MenubarGroup, {
|
|
2246
2289
|
children: [
|
|
2247
|
-
/* @__PURE__ */ jsx15(
|
|
2290
|
+
/* @__PURE__ */ jsx15(MenubarLabel2, {
|
|
2248
2291
|
children: labels.export
|
|
2249
2292
|
}),
|
|
2250
|
-
/* @__PURE__ */ jsx15(
|
|
2293
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2251
2294
|
builtInExport ? /* @__PURE__ */ jsxs9(Fragment, {
|
|
2252
2295
|
children: [
|
|
2253
|
-
/* @__PURE__ */ jsxs9(
|
|
2296
|
+
/* @__PURE__ */ jsxs9(MenubarItem2, {
|
|
2254
2297
|
disabled: exporting || !exportRows.length,
|
|
2255
2298
|
onClick: () => downloadCsv(exportColumns.map(columnLabel), exportRows.map((row) => exportColumns.map((column) => dataTableValueText(getDataTableExportValue(row, column, store.config.locale) ?? ""))), features.export ? features.export.baseName : "table"),
|
|
2256
2299
|
children: [
|
|
@@ -2258,7 +2301,7 @@ var DataTableToolbar = ({
|
|
|
2258
2301
|
labels.exportCsv
|
|
2259
2302
|
]
|
|
2260
2303
|
}),
|
|
2261
|
-
/* @__PURE__ */ jsxs9(
|
|
2304
|
+
/* @__PURE__ */ jsxs9(MenubarItem2, {
|
|
2262
2305
|
disabled: exporting || !exportRows.length,
|
|
2263
2306
|
onClick: () => downloadJson(exportRows.map((row) => Object.fromEntries(exportColumns.map((column) => [
|
|
2264
2307
|
column.id,
|
|
@@ -2271,8 +2314,8 @@ var DataTableToolbar = ({
|
|
|
2271
2314
|
})
|
|
2272
2315
|
]
|
|
2273
2316
|
}) : null,
|
|
2274
|
-
builtInExport && exportActions.length ? /* @__PURE__ */ jsx15(
|
|
2275
|
-
exportActions.map((action) => /* @__PURE__ */ jsxs9(
|
|
2317
|
+
builtInExport && exportActions.length ? /* @__PURE__ */ jsx15(MenubarSeparator2, {}) : null,
|
|
2318
|
+
exportActions.map((action) => /* @__PURE__ */ jsxs9(MenubarItem2, {
|
|
2276
2319
|
disabled: exporting || action.disabled,
|
|
2277
2320
|
onClick: () => void runExport(action),
|
|
2278
2321
|
children: [
|
|
@@ -2338,20 +2381,20 @@ var FilterEditor = ({
|
|
|
2338
2381
|
value: current?.kind === "boolean" ? String(current.value) : "",
|
|
2339
2382
|
onValueChange: (value) => apply({ id: column.id, kind, value: value === "true" }),
|
|
2340
2383
|
children: [
|
|
2341
|
-
/* @__PURE__ */ jsx15(
|
|
2384
|
+
/* @__PURE__ */ jsx15(MenubarRadioItem2, {
|
|
2342
2385
|
value: "true",
|
|
2343
2386
|
closeOnClick: false,
|
|
2344
2387
|
children: column.colDef.type === "boolean" ? column.colDef.typeOptions?.trueLabel ?? labels.filterTrue : labels.filterTrue
|
|
2345
2388
|
}),
|
|
2346
|
-
/* @__PURE__ */ jsx15(
|
|
2389
|
+
/* @__PURE__ */ jsx15(MenubarRadioItem2, {
|
|
2347
2390
|
value: "false",
|
|
2348
2391
|
closeOnClick: false,
|
|
2349
2392
|
children: column.colDef.type === "boolean" ? column.colDef.typeOptions?.falseLabel ?? labels.filterFalse : labels.filterFalse
|
|
2350
2393
|
})
|
|
2351
2394
|
]
|
|
2352
2395
|
}),
|
|
2353
|
-
/* @__PURE__ */ jsx15(
|
|
2354
|
-
/* @__PURE__ */ jsx15(
|
|
2396
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2397
|
+
/* @__PURE__ */ jsx15(MenubarItem2, {
|
|
2355
2398
|
closeOnClick: false,
|
|
2356
2399
|
onClick: () => onChange(undefined),
|
|
2357
2400
|
children: labels.filterClear
|
|
@@ -2367,7 +2410,7 @@ var FilterEditor = ({
|
|
|
2367
2410
|
children: [
|
|
2368
2411
|
options.length > 8 ? /* @__PURE__ */ jsx15("div", {
|
|
2369
2412
|
className: "p-1",
|
|
2370
|
-
children: /* @__PURE__ */ jsx15(
|
|
2413
|
+
children: /* @__PURE__ */ jsx15(Input2, {
|
|
2371
2414
|
"aria-label": labels.filter,
|
|
2372
2415
|
placeholder: labels.filter,
|
|
2373
2416
|
value: optionSearch,
|
|
@@ -2378,7 +2421,7 @@ var FilterEditor = ({
|
|
|
2378
2421
|
}
|
|
2379
2422
|
})
|
|
2380
2423
|
}) : null,
|
|
2381
|
-
filteredOptions.map((option) => /* @__PURE__ */ jsxs9(
|
|
2424
|
+
filteredOptions.map((option) => /* @__PURE__ */ jsxs9(MenubarCheckboxItem2, {
|
|
2382
2425
|
checked: selected.includes(option.value),
|
|
2383
2426
|
closeOnClick: false,
|
|
2384
2427
|
onCheckedChange: (checked) => {
|
|
@@ -2404,8 +2447,8 @@ var FilterEditor = ({
|
|
|
2404
2447
|
className: "text-muted-foreground px-2 py-1.5 text-sm",
|
|
2405
2448
|
children: labels.empty
|
|
2406
2449
|
}) : null,
|
|
2407
|
-
/* @__PURE__ */ jsx15(
|
|
2408
|
-
/* @__PURE__ */ jsx15(
|
|
2450
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2451
|
+
/* @__PURE__ */ jsx15(MenubarItem2, {
|
|
2409
2452
|
closeOnClick: false,
|
|
2410
2453
|
onClick: () => onChange(undefined),
|
|
2411
2454
|
children: labels.filterClear
|
|
@@ -2467,7 +2510,7 @@ var FilterEditor = ({
|
|
|
2467
2510
|
id: `${inputId}-operator`,
|
|
2468
2511
|
children: /* @__PURE__ */ jsx15(SelectValue, {})
|
|
2469
2512
|
}),
|
|
2470
|
-
/* @__PURE__ */ jsx15(
|
|
2513
|
+
/* @__PURE__ */ jsx15(SelectContent2, {
|
|
2471
2514
|
children: /* @__PURE__ */ jsx15(SelectGroup, {
|
|
2472
2515
|
children: operatorOptions.map((option) => /* @__PURE__ */ jsx15(SelectItem, {
|
|
2473
2516
|
value: option.value,
|
|
@@ -2486,7 +2529,7 @@ var FilterEditor = ({
|
|
|
2486
2529
|
htmlFor: `${inputId}-primary`,
|
|
2487
2530
|
children: kind === "text" ? labels.filterValue : kind === "date" ? labels.filterFrom : labels.filterMin
|
|
2488
2531
|
}),
|
|
2489
|
-
/* @__PURE__ */ jsx15(
|
|
2532
|
+
/* @__PURE__ */ jsx15(Input2, {
|
|
2490
2533
|
id: `${inputId}-primary`,
|
|
2491
2534
|
type: kind === "text" ? "text" : kind === "date" ? "date" : "number",
|
|
2492
2535
|
step: kind === "number" ? "any" : undefined,
|
|
@@ -2506,7 +2549,7 @@ var FilterEditor = ({
|
|
|
2506
2549
|
htmlFor: `${inputId}-secondary`,
|
|
2507
2550
|
children: kind === "date" ? labels.filterTo : labels.filterMax
|
|
2508
2551
|
}),
|
|
2509
|
-
/* @__PURE__ */ jsx15(
|
|
2552
|
+
/* @__PURE__ */ jsx15(Input2, {
|
|
2510
2553
|
id: `${inputId}-secondary`,
|
|
2511
2554
|
type: kind === "date" ? "date" : "number",
|
|
2512
2555
|
step: kind === "number" ? "any" : undefined,
|
|
@@ -2566,7 +2609,7 @@ var FilterMenu = ({
|
|
|
2566
2609
|
const update = (id, filter) => changeState(setStore, (state) => withColumnFilter(state, id, filter));
|
|
2567
2610
|
return /* @__PURE__ */ jsxs9(MenubarMenu, {
|
|
2568
2611
|
children: [
|
|
2569
|
-
/* @__PURE__ */ jsxs9(
|
|
2612
|
+
/* @__PURE__ */ jsxs9(MenubarTrigger2, {
|
|
2570
2613
|
"aria-label": store.config.labels.filters,
|
|
2571
2614
|
children: [
|
|
2572
2615
|
/* @__PURE__ */ jsx15(ListFilter, {}),
|
|
@@ -2579,18 +2622,18 @@ var FilterMenu = ({
|
|
|
2579
2622
|
}) : null
|
|
2580
2623
|
]
|
|
2581
2624
|
}),
|
|
2582
|
-
/* @__PURE__ */ jsx15(
|
|
2625
|
+
/* @__PURE__ */ jsx15(MenubarContent2, {
|
|
2583
2626
|
align: "end",
|
|
2584
2627
|
className: "w-80 max-w-[calc(100vw-2rem)]",
|
|
2585
2628
|
children: /* @__PURE__ */ jsxs9(MenubarGroup, {
|
|
2586
2629
|
children: [
|
|
2587
|
-
/* @__PURE__ */ jsx15(
|
|
2630
|
+
/* @__PURE__ */ jsx15(MenubarLabel2, {
|
|
2588
2631
|
children: store.config.labels.filters
|
|
2589
2632
|
}),
|
|
2590
|
-
/* @__PURE__ */ jsx15(
|
|
2633
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2591
2634
|
columns.map(({ column, label }) => /* @__PURE__ */ jsxs9(MenubarSub, {
|
|
2592
2635
|
children: [
|
|
2593
|
-
/* @__PURE__ */ jsxs9(
|
|
2636
|
+
/* @__PURE__ */ jsxs9(MenubarSubTrigger2, {
|
|
2594
2637
|
children: [
|
|
2595
2638
|
/* @__PURE__ */ jsx15("span", {
|
|
2596
2639
|
className: "min-w-0 flex-1 truncate",
|
|
@@ -2599,7 +2642,7 @@ var FilterMenu = ({
|
|
|
2599
2642
|
filters.some((filter) => filter.id === column.id) ? /* @__PURE__ */ jsx15(Check, {}) : null
|
|
2600
2643
|
]
|
|
2601
2644
|
}),
|
|
2602
|
-
/* @__PURE__ */ jsx15(
|
|
2645
|
+
/* @__PURE__ */ jsx15(MenubarSubContent2, {
|
|
2603
2646
|
className: "w-80 max-w-[calc(100vw-2rem)]",
|
|
2604
2647
|
children: /* @__PURE__ */ jsx15(FilterEditor, {
|
|
2605
2648
|
column,
|
|
@@ -2613,8 +2656,8 @@ var FilterMenu = ({
|
|
|
2613
2656
|
}, column.id)),
|
|
2614
2657
|
filters.length ? /* @__PURE__ */ jsxs9(Fragment, {
|
|
2615
2658
|
children: [
|
|
2616
|
-
/* @__PURE__ */ jsx15(
|
|
2617
|
-
/* @__PURE__ */ jsxs9(
|
|
2659
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2660
|
+
/* @__PURE__ */ jsxs9(MenubarItem2, {
|
|
2618
2661
|
onClick: () => changeState(setStore, (state) => ({
|
|
2619
2662
|
...state,
|
|
2620
2663
|
page: 0,
|
|
@@ -2654,7 +2697,7 @@ var SortMenu = ({
|
|
|
2654
2697
|
}));
|
|
2655
2698
|
return /* @__PURE__ */ jsxs9(MenubarMenu, {
|
|
2656
2699
|
children: [
|
|
2657
|
-
/* @__PURE__ */ jsxs9(
|
|
2700
|
+
/* @__PURE__ */ jsxs9(MenubarTrigger2, {
|
|
2658
2701
|
"aria-label": store.config.labels.sortBy,
|
|
2659
2702
|
children: [
|
|
2660
2703
|
current ? current.direction === "desc" ? /* @__PURE__ */ jsx15(ArrowDown, {}) : /* @__PURE__ */ jsx15(ArrowUp, {}) : /* @__PURE__ */ jsx15(ChevronsUpDown, {}),
|
|
@@ -2664,28 +2707,28 @@ var SortMenu = ({
|
|
|
2664
2707
|
})
|
|
2665
2708
|
]
|
|
2666
2709
|
}),
|
|
2667
|
-
/* @__PURE__ */ jsx15(
|
|
2710
|
+
/* @__PURE__ */ jsx15(MenubarContent2, {
|
|
2668
2711
|
align: "end",
|
|
2669
2712
|
className: "w-52",
|
|
2670
2713
|
children: /* @__PURE__ */ jsxs9(MenubarGroup, {
|
|
2671
2714
|
children: [
|
|
2672
|
-
/* @__PURE__ */ jsx15(
|
|
2715
|
+
/* @__PURE__ */ jsx15(MenubarLabel2, {
|
|
2673
2716
|
children: store.config.labels.sortBy
|
|
2674
2717
|
}),
|
|
2675
|
-
/* @__PURE__ */ jsx15(
|
|
2718
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2676
2719
|
columns.map((column) => {
|
|
2677
2720
|
const sortState = store.state.sort?.find(({ id }) => id === column.id);
|
|
2678
2721
|
return /* @__PURE__ */ jsxs9(MenubarSub, {
|
|
2679
2722
|
children: [
|
|
2680
|
-
/* @__PURE__ */ jsxs9(
|
|
2723
|
+
/* @__PURE__ */ jsxs9(MenubarSubTrigger2, {
|
|
2681
2724
|
children: [
|
|
2682
2725
|
sortState ? sortState.direction === "desc" ? /* @__PURE__ */ jsx15(ArrowDown, {}) : /* @__PURE__ */ jsx15(ArrowUp, {}) : null,
|
|
2683
2726
|
columnLabel(column)
|
|
2684
2727
|
]
|
|
2685
2728
|
}),
|
|
2686
|
-
/* @__PURE__ */ jsxs9(
|
|
2729
|
+
/* @__PURE__ */ jsxs9(MenubarSubContent2, {
|
|
2687
2730
|
children: [
|
|
2688
|
-
/* @__PURE__ */ jsxs9(
|
|
2731
|
+
/* @__PURE__ */ jsxs9(MenubarItem2, {
|
|
2689
2732
|
onClick: () => sort(column.id, "asc"),
|
|
2690
2733
|
children: [
|
|
2691
2734
|
/* @__PURE__ */ jsx15(ArrowUp, {}),
|
|
@@ -2693,7 +2736,7 @@ var SortMenu = ({
|
|
|
2693
2736
|
store.config.labels.sortAsc
|
|
2694
2737
|
]
|
|
2695
2738
|
}),
|
|
2696
|
-
/* @__PURE__ */ jsxs9(
|
|
2739
|
+
/* @__PURE__ */ jsxs9(MenubarItem2, {
|
|
2697
2740
|
onClick: () => sort(column.id, "desc"),
|
|
2698
2741
|
children: [
|
|
2699
2742
|
/* @__PURE__ */ jsx15(ArrowDown, {}),
|
|
@@ -2703,8 +2746,8 @@ var SortMenu = ({
|
|
|
2703
2746
|
}),
|
|
2704
2747
|
sortState ? /* @__PURE__ */ jsxs9(Fragment, {
|
|
2705
2748
|
children: [
|
|
2706
|
-
/* @__PURE__ */ jsx15(
|
|
2707
|
-
/* @__PURE__ */ jsxs9(
|
|
2749
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2750
|
+
/* @__PURE__ */ jsxs9(MenubarItem2, {
|
|
2708
2751
|
onClick: () => changeState(setStore, (state) => ({
|
|
2709
2752
|
...state,
|
|
2710
2753
|
sort: state.sort?.filter(({ id }) => id !== column.id)
|
|
@@ -2734,7 +2777,7 @@ var ViewMenu = ({
|
|
|
2734
2777
|
const [store, setStore] = useTableAtom(tableAtom);
|
|
2735
2778
|
return /* @__PURE__ */ jsxs9(MenubarMenu, {
|
|
2736
2779
|
children: [
|
|
2737
|
-
/* @__PURE__ */ jsxs9(
|
|
2780
|
+
/* @__PURE__ */ jsxs9(MenubarTrigger2, {
|
|
2738
2781
|
"aria-label": store.config.labels.view,
|
|
2739
2782
|
children: [
|
|
2740
2783
|
store.state.view === "gallery" ? /* @__PURE__ */ jsx15(LayoutGrid, {}) : /* @__PURE__ */ jsx15(Rows3, {}),
|
|
@@ -2744,14 +2787,14 @@ var ViewMenu = ({
|
|
|
2744
2787
|
})
|
|
2745
2788
|
]
|
|
2746
2789
|
}),
|
|
2747
|
-
/* @__PURE__ */ jsx15(
|
|
2790
|
+
/* @__PURE__ */ jsx15(MenubarContent2, {
|
|
2748
2791
|
align: "end",
|
|
2749
2792
|
children: /* @__PURE__ */ jsxs9(MenubarGroup, {
|
|
2750
2793
|
children: [
|
|
2751
|
-
/* @__PURE__ */ jsx15(
|
|
2794
|
+
/* @__PURE__ */ jsx15(MenubarLabel2, {
|
|
2752
2795
|
children: store.config.labels.view
|
|
2753
2796
|
}),
|
|
2754
|
-
/* @__PURE__ */ jsx15(
|
|
2797
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2755
2798
|
/* @__PURE__ */ jsxs9(MenubarRadioGroup, {
|
|
2756
2799
|
onValueChange: (view) => {
|
|
2757
2800
|
if (view === "table" || view === "gallery") {
|
|
@@ -2760,7 +2803,7 @@ var ViewMenu = ({
|
|
|
2760
2803
|
},
|
|
2761
2804
|
value: store.state.view,
|
|
2762
2805
|
children: [
|
|
2763
|
-
/* @__PURE__ */ jsxs9(
|
|
2806
|
+
/* @__PURE__ */ jsxs9(MenubarRadioItem2, {
|
|
2764
2807
|
value: "table",
|
|
2765
2808
|
children: [
|
|
2766
2809
|
/* @__PURE__ */ jsx15(Rows3, {}),
|
|
@@ -2768,7 +2811,7 @@ var ViewMenu = ({
|
|
|
2768
2811
|
store.config.labels.tableView
|
|
2769
2812
|
]
|
|
2770
2813
|
}),
|
|
2771
|
-
/* @__PURE__ */ jsxs9(
|
|
2814
|
+
/* @__PURE__ */ jsxs9(MenubarRadioItem2, {
|
|
2772
2815
|
value: "gallery",
|
|
2773
2816
|
children: [
|
|
2774
2817
|
/* @__PURE__ */ jsx15(LayoutGrid, {}),
|
|
@@ -2793,7 +2836,7 @@ var ColumnMenu = ({
|
|
|
2793
2836
|
return null;
|
|
2794
2837
|
return /* @__PURE__ */ jsxs9(MenubarMenu, {
|
|
2795
2838
|
children: [
|
|
2796
|
-
/* @__PURE__ */ jsxs9(
|
|
2839
|
+
/* @__PURE__ */ jsxs9(MenubarTrigger2, {
|
|
2797
2840
|
"aria-label": store.config.labels.columns,
|
|
2798
2841
|
children: [
|
|
2799
2842
|
/* @__PURE__ */ jsx15(Settings2, {}),
|
|
@@ -2803,15 +2846,15 @@ var ColumnMenu = ({
|
|
|
2803
2846
|
})
|
|
2804
2847
|
]
|
|
2805
2848
|
}),
|
|
2806
|
-
/* @__PURE__ */ jsx15(
|
|
2849
|
+
/* @__PURE__ */ jsx15(MenubarContent2, {
|
|
2807
2850
|
align: "end",
|
|
2808
2851
|
children: /* @__PURE__ */ jsxs9(MenubarGroup, {
|
|
2809
2852
|
children: [
|
|
2810
|
-
/* @__PURE__ */ jsx15(
|
|
2853
|
+
/* @__PURE__ */ jsx15(MenubarLabel2, {
|
|
2811
2854
|
children: store.config.labels.columns
|
|
2812
2855
|
}),
|
|
2813
|
-
/* @__PURE__ */ jsx15(
|
|
2814
|
-
columns.map((column) => /* @__PURE__ */ jsx15(
|
|
2856
|
+
/* @__PURE__ */ jsx15(MenubarSeparator2, {}),
|
|
2857
|
+
columns.map((column) => /* @__PURE__ */ jsx15(MenubarCheckboxItem2, {
|
|
2815
2858
|
checked: store.state.columnVisibility[column.id] !== false,
|
|
2816
2859
|
onCheckedChange: (visible) => changeState(setStore, (state) => ({
|
|
2817
2860
|
...state,
|
|
@@ -3038,7 +3081,7 @@ var TableDataRow = ({
|
|
|
3038
3081
|
const selection = store.config.features.selection;
|
|
3039
3082
|
const selectable = !!selection && (selection.isRowSelectable?.(row.data) ?? true);
|
|
3040
3083
|
const draggable = canDragRows(store);
|
|
3041
|
-
return /* @__PURE__ */ jsxs9(
|
|
3084
|
+
return /* @__PURE__ */ jsxs9(TableRow2, {
|
|
3042
3085
|
className: cn("group/row data-[drop-position=before]:[&>td]:border-primary data-[drop-position=after]:[&>td]:border-primary h-16 data-[drag-source=true]:opacity-40 data-[drop-position=after]:[&>td]:border-b-2 data-[drop-position=before]:[&>td]:border-t-2", store.config.onRowClicked && "cursor-pointer"),
|
|
3043
3086
|
"data-state": store.state.rowSelection[row.id] && "selected",
|
|
3044
3087
|
"data-table-row": row.id,
|
|
@@ -3051,7 +3094,7 @@ var TableDataRow = ({
|
|
|
3051
3094
|
},
|
|
3052
3095
|
tabIndex: store.config.onRowClicked ? 0 : undefined,
|
|
3053
3096
|
children: [
|
|
3054
|
-
selection ? /* @__PURE__ */ jsx15(
|
|
3097
|
+
selection ? /* @__PURE__ */ jsx15(TableCell2, {
|
|
3055
3098
|
className: "w-10 pr-0",
|
|
3056
3099
|
onClick: (event) => event.stopPropagation(),
|
|
3057
3100
|
children: /* @__PURE__ */ jsx15(Checkbox, {
|
|
@@ -3061,13 +3104,13 @@ var TableDataRow = ({
|
|
|
3061
3104
|
onCheckedChange: (checked) => toggleRow(store, setStore, row.id, checked)
|
|
3062
3105
|
})
|
|
3063
3106
|
}) : null,
|
|
3064
|
-
draggable ? /* @__PURE__ */ jsx15(
|
|
3107
|
+
draggable ? /* @__PURE__ */ jsx15(TableCell2, {
|
|
3065
3108
|
className: "w-10 pr-0",
|
|
3066
3109
|
children: /* @__PURE__ */ jsx15(DragHandle, {
|
|
3067
3110
|
tableAtom
|
|
3068
3111
|
})
|
|
3069
3112
|
}) : null,
|
|
3070
|
-
model.visibleColumns.map((column) => /* @__PURE__ */ jsx15(
|
|
3113
|
+
model.visibleColumns.map((column) => /* @__PURE__ */ jsx15(TableCell2, {
|
|
3071
3114
|
className: cn("min-w-24 overflow-hidden has-[[data-slot=data-table-boolean-cell]]:relative has-[[data-slot=data-table-boolean-cell]]:p-0 has-[[data-slot=data-table-list-cell]]:relative has-[[data-slot=data-table-list-cell]]:p-0", column.colDef.truncate ? "whitespace-nowrap" : "whitespace-normal"),
|
|
3072
3115
|
style: { width: column.width },
|
|
3073
3116
|
children: /* @__PURE__ */ jsx15("div", {
|
|
@@ -3075,7 +3118,7 @@ var TableDataRow = ({
|
|
|
3075
3118
|
children: renderCell(row, column, store.config.locale, store.config.labels)
|
|
3076
3119
|
})
|
|
3077
3120
|
}, column.id)),
|
|
3078
|
-
hasRowActionMenu(store) ? /* @__PURE__ */ jsx15(
|
|
3121
|
+
hasRowActionMenu(store) ? /* @__PURE__ */ jsx15(TableCell2, {
|
|
3079
3122
|
className: "bg-background group-data-[state=selected]/row:bg-muted sticky right-0 z-20 w-10 min-w-10 cursor-default p-0 transition-colors group-hover/row:bg-[color-mix(in_oklab,var(--muted)_50%,var(--background))]",
|
|
3080
3123
|
onClick: (event) => event.stopPropagation(),
|
|
3081
3124
|
children: /* @__PURE__ */ jsx15("div", {
|
|
@@ -3098,7 +3141,7 @@ var GroupActions = ({
|
|
|
3098
3141
|
return null;
|
|
3099
3142
|
return /* @__PURE__ */ jsxs9(DropdownMenu, {
|
|
3100
3143
|
children: [
|
|
3101
|
-
/* @__PURE__ */ jsx15(
|
|
3144
|
+
/* @__PURE__ */ jsx15(DropdownMenuTrigger2, {
|
|
3102
3145
|
onClick: (event) => event.stopPropagation(),
|
|
3103
3146
|
render: /* @__PURE__ */ jsxs9(Button, {
|
|
3104
3147
|
size: "icon",
|
|
@@ -3112,10 +3155,10 @@ var GroupActions = ({
|
|
|
3112
3155
|
]
|
|
3113
3156
|
})
|
|
3114
3157
|
}),
|
|
3115
|
-
/* @__PURE__ */ jsx15(
|
|
3158
|
+
/* @__PURE__ */ jsx15(DropdownMenuContent2, {
|
|
3116
3159
|
align: "end",
|
|
3117
3160
|
children: /* @__PURE__ */ jsx15(DropdownMenuGroup, {
|
|
3118
|
-
children: visible.map((action) => /* @__PURE__ */ jsxs9(
|
|
3161
|
+
children: visible.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
|
|
3119
3162
|
onClick: () => action.onClick(groupId),
|
|
3120
3163
|
variant: action.variant ?? "default",
|
|
3121
3164
|
children: [
|
|
@@ -3146,14 +3189,14 @@ var GroupedTable = ({
|
|
|
3146
3189
|
[section.key]: !collapsed
|
|
3147
3190
|
}
|
|
3148
3191
|
}));
|
|
3149
|
-
const body = /* @__PURE__ */ jsxs9(
|
|
3192
|
+
const body = /* @__PURE__ */ jsxs9(TableBody2, {
|
|
3150
3193
|
className: "data-[drop-target=true]:outline-primary relative data-[drop-target=true]:z-30 data-[drop-target=true]:outline-2 data-[drop-target=true]:-outline-offset-2 data-[drop-target=true]:[&>tr]:border-transparent data-[drop-target=true]:[&>tr>td:last-child]:z-0",
|
|
3151
3194
|
"data-table-group": section.field.onMoveToGroup ? targetKey : undefined,
|
|
3152
3195
|
children: [
|
|
3153
|
-
/* @__PURE__ */ jsx15(
|
|
3196
|
+
/* @__PURE__ */ jsx15(TableRow2, {
|
|
3154
3197
|
className: "bg-muted/40 hover:bg-accent! cursor-pointer",
|
|
3155
3198
|
onClick: toggleCollapsed,
|
|
3156
|
-
children: /* @__PURE__ */ jsx15(
|
|
3199
|
+
children: /* @__PURE__ */ jsx15(TableCell2, {
|
|
3157
3200
|
colSpan: model.visibleColumns.length + extra,
|
|
3158
3201
|
children: /* @__PURE__ */ jsxs9("div", {
|
|
3159
3202
|
className: "flex items-center gap-2",
|
|
@@ -3194,8 +3237,8 @@ var GroupedTable = ({
|
|
|
3194
3237
|
tableAtom
|
|
3195
3238
|
})
|
|
3196
3239
|
}, `${section.key}:${row.id}`)) : [
|
|
3197
|
-
/* @__PURE__ */ jsx15(
|
|
3198
|
-
children: /* @__PURE__ */ jsx15(
|
|
3240
|
+
/* @__PURE__ */ jsx15(TableRow2, {
|
|
3241
|
+
children: /* @__PURE__ */ jsx15(TableCell2, {
|
|
3199
3242
|
className: "text-muted-foreground h-16",
|
|
3200
3243
|
colSpan: model.visibleColumns.length + extra,
|
|
3201
3244
|
children: section.field.renderEmptyGroup?.(section.groupId) ?? store.config.labels.empty
|
|
@@ -3244,7 +3287,7 @@ var ColumnHeaderMenu = ({
|
|
|
3244
3287
|
const label = columnLabel(column);
|
|
3245
3288
|
const sortItems = (field) => /* @__PURE__ */ jsxs9(Fragment, {
|
|
3246
3289
|
children: [
|
|
3247
|
-
/* @__PURE__ */ jsxs9(
|
|
3290
|
+
/* @__PURE__ */ jsxs9(DropdownMenuItem2, {
|
|
3248
3291
|
onClick: () => setSort(field.id, "asc"),
|
|
3249
3292
|
children: [
|
|
3250
3293
|
/* @__PURE__ */ jsx15(ArrowUp, {}),
|
|
@@ -3252,7 +3295,7 @@ var ColumnHeaderMenu = ({
|
|
|
3252
3295
|
store.config.labels.sortAsc
|
|
3253
3296
|
]
|
|
3254
3297
|
}),
|
|
3255
|
-
/* @__PURE__ */ jsxs9(
|
|
3298
|
+
/* @__PURE__ */ jsxs9(DropdownMenuItem2, {
|
|
3256
3299
|
onClick: () => setSort(field.id, "desc"),
|
|
3257
3300
|
children: [
|
|
3258
3301
|
/* @__PURE__ */ jsx15(ArrowDown, {}),
|
|
@@ -3270,7 +3313,7 @@ var ColumnHeaderMenu = ({
|
|
|
3270
3313
|
}
|
|
3271
3314
|
return /* @__PURE__ */ jsxs9(DropdownMenu, {
|
|
3272
3315
|
children: [
|
|
3273
|
-
/* @__PURE__ */ jsx15(
|
|
3316
|
+
/* @__PURE__ */ jsx15(DropdownMenuTrigger2, {
|
|
3274
3317
|
render: /* @__PURE__ */ jsxs9(Button, {
|
|
3275
3318
|
"aria-label": label,
|
|
3276
3319
|
"aria-description": activeFilters.length ? `${store.config.labels.filters}: ${activeFilters.length}` : undefined,
|
|
@@ -3286,7 +3329,7 @@ var ColumnHeaderMenu = ({
|
|
|
3286
3329
|
]
|
|
3287
3330
|
})
|
|
3288
3331
|
}),
|
|
3289
|
-
/* @__PURE__ */ jsx15(
|
|
3332
|
+
/* @__PURE__ */ jsx15(DropdownMenuContent2, {
|
|
3290
3333
|
align: "start",
|
|
3291
3334
|
className: "w-48",
|
|
3292
3335
|
children: /* @__PURE__ */ jsxs9(DropdownMenuGroup, {
|
|
@@ -3295,17 +3338,17 @@ var ColumnHeaderMenu = ({
|
|
|
3295
3338
|
children: [
|
|
3296
3339
|
column.colDef.fields?.length ? sortColumns.map((field) => /* @__PURE__ */ jsxs9(DropdownMenuSub, {
|
|
3297
3340
|
children: [
|
|
3298
|
-
/* @__PURE__ */ jsx15(
|
|
3341
|
+
/* @__PURE__ */ jsx15(DropdownMenuSubTrigger2, {
|
|
3299
3342
|
children: columnLabel(field)
|
|
3300
3343
|
}),
|
|
3301
|
-
/* @__PURE__ */ jsx15(
|
|
3344
|
+
/* @__PURE__ */ jsx15(DropdownMenuSubContent2, {
|
|
3302
3345
|
children: /* @__PURE__ */ jsx15(DropdownMenuGroup, {
|
|
3303
3346
|
children: sortItems(field)
|
|
3304
3347
|
})
|
|
3305
3348
|
})
|
|
3306
3349
|
]
|
|
3307
3350
|
}, field.id)) : sortItems(column),
|
|
3308
|
-
sort ? /* @__PURE__ */ jsxs9(
|
|
3351
|
+
sort ? /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
|
|
3309
3352
|
onClick: () => update((state) => ({
|
|
3310
3353
|
...state,
|
|
3311
3354
|
sort: state.sort?.filter(({ id }) => !ownsSort(id))
|
|
@@ -3318,29 +3361,29 @@ var ColumnHeaderMenu = ({
|
|
|
3318
3361
|
}) : null
|
|
3319
3362
|
]
|
|
3320
3363
|
}) : null,
|
|
3321
|
-
sortingEnabled && filteringEnabled ? /* @__PURE__ */ jsx15(
|
|
3364
|
+
sortingEnabled && filteringEnabled ? /* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}) : null,
|
|
3322
3365
|
filteringEnabled ? /* @__PURE__ */ jsxs9(Fragment, {
|
|
3323
3366
|
children: [
|
|
3324
3367
|
/* @__PURE__ */ jsxs9(DropdownMenuSub, {
|
|
3325
3368
|
children: [
|
|
3326
|
-
/* @__PURE__ */ jsxs9(
|
|
3369
|
+
/* @__PURE__ */ jsxs9(DropdownMenuSubTrigger2, {
|
|
3327
3370
|
children: [
|
|
3328
3371
|
/* @__PURE__ */ jsx15(ListFilter, {}),
|
|
3329
3372
|
store.config.labels.filters
|
|
3330
3373
|
]
|
|
3331
3374
|
}),
|
|
3332
|
-
/* @__PURE__ */ jsx15(
|
|
3375
|
+
/* @__PURE__ */ jsx15(DropdownMenuSubContent2, {
|
|
3333
3376
|
className: "w-80 max-w-[calc(100vw-2rem)]",
|
|
3334
3377
|
children: column.colDef.fields?.length ? /* @__PURE__ */ jsx15(DropdownMenuGroup, {
|
|
3335
3378
|
children: filterColumns.map((field) => /* @__PURE__ */ jsxs9(DropdownMenuSub, {
|
|
3336
3379
|
children: [
|
|
3337
|
-
/* @__PURE__ */ jsxs9(
|
|
3380
|
+
/* @__PURE__ */ jsxs9(DropdownMenuSubTrigger2, {
|
|
3338
3381
|
children: [
|
|
3339
3382
|
columnLabel(field),
|
|
3340
3383
|
activeFilters.some((filter) => filter.id === field.id) ? /* @__PURE__ */ jsx15(Check, {}) : null
|
|
3341
3384
|
]
|
|
3342
3385
|
}),
|
|
3343
|
-
/* @__PURE__ */ jsx15(
|
|
3386
|
+
/* @__PURE__ */ jsx15(DropdownMenuSubContent2, {
|
|
3344
3387
|
className: "w-80 max-w-[calc(100vw-2rem)]",
|
|
3345
3388
|
children: filterEditor(field)
|
|
3346
3389
|
})
|
|
@@ -3350,7 +3393,7 @@ var ColumnHeaderMenu = ({
|
|
|
3350
3393
|
})
|
|
3351
3394
|
]
|
|
3352
3395
|
}),
|
|
3353
|
-
activeFilters.length ? /* @__PURE__ */ jsxs9(
|
|
3396
|
+
activeFilters.length ? /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
|
|
3354
3397
|
onClick: () => update((state) => {
|
|
3355
3398
|
const filters = state.filters?.filter(({ id }) => !ownsFilter(id));
|
|
3356
3399
|
return {
|
|
@@ -3366,8 +3409,8 @@ var ColumnHeaderMenu = ({
|
|
|
3366
3409
|
}) : null
|
|
3367
3410
|
]
|
|
3368
3411
|
}) : null,
|
|
3369
|
-
(sortingEnabled || filteringEnabled) && hidingEnabled ? /* @__PURE__ */ jsx15(
|
|
3370
|
-
hidingEnabled ? /* @__PURE__ */ jsxs9(
|
|
3412
|
+
(sortingEnabled || filteringEnabled) && hidingEnabled ? /* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}) : null,
|
|
3413
|
+
hidingEnabled ? /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
|
|
3371
3414
|
onClick: () => update((state) => ({
|
|
3372
3415
|
...state,
|
|
3373
3416
|
columnVisibility: {
|
|
@@ -3398,10 +3441,10 @@ var DataTableHeader = ({
|
|
|
3398
3441
|
const selectableRows = getDataTableSelectableRows(model, grouped, selection ? selection.isRowSelectable : undefined);
|
|
3399
3442
|
const allSelected = selectableRows.length > 0 && selectableRows.every((row) => store.state.rowSelection[row.id]);
|
|
3400
3443
|
const someSelected = selectableRows.some((row) => store.state.rowSelection[row.id]);
|
|
3401
|
-
return /* @__PURE__ */ jsx15(
|
|
3402
|
-
children: /* @__PURE__ */ jsxs9(
|
|
3444
|
+
return /* @__PURE__ */ jsx15(TableHeader2, {
|
|
3445
|
+
children: /* @__PURE__ */ jsxs9(TableRow2, {
|
|
3403
3446
|
children: [
|
|
3404
|
-
selection ? /* @__PURE__ */ jsx15(
|
|
3447
|
+
selection ? /* @__PURE__ */ jsx15(TableHead2, {
|
|
3405
3448
|
className: "w-10 pr-0",
|
|
3406
3449
|
children: /* @__PURE__ */ jsx15(Checkbox, {
|
|
3407
3450
|
"aria-label": store.config.labels.selectAllRows,
|
|
@@ -3417,12 +3460,12 @@ var DataTableHeader = ({
|
|
|
3417
3460
|
}
|
|
3418
3461
|
})
|
|
3419
3462
|
}) : null,
|
|
3420
|
-
draggable ? /* @__PURE__ */ jsx15(
|
|
3463
|
+
draggable ? /* @__PURE__ */ jsx15(TableHead2, {
|
|
3421
3464
|
className: "w-10"
|
|
3422
3465
|
}) : null,
|
|
3423
3466
|
model.visibleColumns.map((column) => {
|
|
3424
3467
|
const direction = store.state.sort?.find(({ id }) => id === column.id)?.direction;
|
|
3425
|
-
return /* @__PURE__ */ jsx15(
|
|
3468
|
+
return /* @__PURE__ */ jsx15(TableHead2, {
|
|
3426
3469
|
"aria-sort": direction === "asc" ? "ascending" : direction === "desc" ? "descending" : undefined,
|
|
3427
3470
|
className: "relative h-12 p-0",
|
|
3428
3471
|
scope: "col",
|
|
@@ -3440,7 +3483,7 @@ var DataTableHeader = ({
|
|
|
3440
3483
|
})
|
|
3441
3484
|
}, column.id);
|
|
3442
3485
|
}),
|
|
3443
|
-
hasRowActionMenu(store) ? /* @__PURE__ */ jsx15(
|
|
3486
|
+
hasRowActionMenu(store) ? /* @__PURE__ */ jsx15(TableHead2, {
|
|
3444
3487
|
className: "w-10"
|
|
3445
3488
|
}) : null
|
|
3446
3489
|
]
|
|
@@ -3450,6 +3493,7 @@ var DataTableHeader = ({
|
|
|
3450
3493
|
var DataTableBody = ({
|
|
3451
3494
|
tableAtom
|
|
3452
3495
|
}) => {
|
|
3496
|
+
const styles = useContext(DataTableStylesContext);
|
|
3453
3497
|
const [store] = useTableAtom(tableAtom);
|
|
3454
3498
|
const model = deriveModel(store);
|
|
3455
3499
|
const fields = getActiveGrouping(store);
|
|
@@ -3463,16 +3507,18 @@ var DataTableBody = ({
|
|
|
3463
3507
|
sections
|
|
3464
3508
|
});
|
|
3465
3509
|
}
|
|
3466
|
-
return /* @__PURE__ */ jsx15(
|
|
3467
|
-
children: store.config.status.error || !rows.length && !store.config.status.loading ? /* @__PURE__ */ jsx15(
|
|
3468
|
-
children: /* @__PURE__ */ jsx15(
|
|
3469
|
-
|
|
3510
|
+
return /* @__PURE__ */ jsx15(TableBody2, {
|
|
3511
|
+
children: store.config.status.error || !rows.length && !store.config.status.loading ? /* @__PURE__ */ jsx15(TableRow2, {
|
|
3512
|
+
children: /* @__PURE__ */ jsx15(TableCell2, {
|
|
3513
|
+
"data-table-slot": store.config.status.error ? "error" : "empty",
|
|
3514
|
+
className: cn("h-24 text-center", store.config.status.error ? styles?.feedback?.error : styles?.feedback?.empty),
|
|
3470
3515
|
colSpan: Math.max(colSpan, 1),
|
|
3471
3516
|
children: store.config.status.error ?? store.config.status.empty ?? store.config.labels.empty
|
|
3472
3517
|
})
|
|
3473
|
-
}) : store.config.status.loading && !rows.length ? /* @__PURE__ */ jsx15(
|
|
3474
|
-
children: /* @__PURE__ */ jsx15(
|
|
3475
|
-
|
|
3518
|
+
}) : store.config.status.loading && !rows.length ? /* @__PURE__ */ jsx15(TableRow2, {
|
|
3519
|
+
children: /* @__PURE__ */ jsx15(TableCell2, {
|
|
3520
|
+
"data-table-slot": "loading",
|
|
3521
|
+
className: cn("h-24 text-center", styles?.feedback?.loading),
|
|
3476
3522
|
colSpan: Math.max(colSpan, 1),
|
|
3477
3523
|
children: /* @__PURE__ */ jsx15(Loading, {
|
|
3478
3524
|
label: store.config.labels.loading
|
|
@@ -3560,6 +3606,7 @@ var GalleryCard = ({
|
|
|
3560
3606
|
var DataTableGallery = ({
|
|
3561
3607
|
tableAtom
|
|
3562
3608
|
}) => {
|
|
3609
|
+
const styles = useContext(DataTableStylesContext);
|
|
3563
3610
|
const [store, setStore] = useTableAtom(tableAtom);
|
|
3564
3611
|
const model = deriveModel(store);
|
|
3565
3612
|
const fields = getActiveGrouping(store);
|
|
@@ -3567,13 +3614,15 @@ var DataTableGallery = ({
|
|
|
3567
3614
|
const sections = groupDataTableRows(rows, fields);
|
|
3568
3615
|
if (store.config.status.error) {
|
|
3569
3616
|
return /* @__PURE__ */ jsx15("div", {
|
|
3570
|
-
|
|
3617
|
+
"data-table-slot": "error",
|
|
3618
|
+
className: cn("text-destructive rounded-lg border border-dashed p-10 text-center", styles?.feedback?.error),
|
|
3571
3619
|
children: store.config.status.error
|
|
3572
3620
|
});
|
|
3573
3621
|
}
|
|
3574
3622
|
if (store.config.status.loading && !rows.length) {
|
|
3575
3623
|
return /* @__PURE__ */ jsx15("div", {
|
|
3576
|
-
|
|
3624
|
+
"data-table-slot": "loading",
|
|
3625
|
+
className: cn("rounded-lg border border-dashed p-10 text-center", styles?.feedback?.loading),
|
|
3577
3626
|
children: /* @__PURE__ */ jsx15(Loading, {
|
|
3578
3627
|
label: store.config.labels.loading
|
|
3579
3628
|
})
|
|
@@ -3581,13 +3630,15 @@ var DataTableGallery = ({
|
|
|
3581
3630
|
}
|
|
3582
3631
|
if (!rows.length && !sections.length) {
|
|
3583
3632
|
return /* @__PURE__ */ jsx15("div", {
|
|
3584
|
-
|
|
3633
|
+
"data-table-slot": "empty",
|
|
3634
|
+
className: cn("text-muted-foreground rounded-lg border border-dashed p-10 text-center", styles?.feedback?.empty),
|
|
3585
3635
|
children: store.config.status.empty ?? store.config.labels.empty
|
|
3586
3636
|
});
|
|
3587
3637
|
}
|
|
3588
3638
|
if (!fields.length) {
|
|
3589
3639
|
return /* @__PURE__ */ jsx15("div", {
|
|
3590
|
-
|
|
3640
|
+
"data-table-slot": "gallery",
|
|
3641
|
+
className: cn("grid gap-3 sm:grid-cols-2 xl:grid-cols-3", styles?.gallery),
|
|
3591
3642
|
children: rows.map((row) => /* @__PURE__ */ jsx15(RowIdContext.Provider, {
|
|
3592
3643
|
value: row.id,
|
|
3593
3644
|
children: /* @__PURE__ */ jsx15(GalleryCard, {
|
|
@@ -3642,7 +3693,8 @@ var DataTableGallery = ({
|
|
|
3642
3693
|
]
|
|
3643
3694
|
}),
|
|
3644
3695
|
!collapsed ? section.children.length ? renderSections(section.children) : section.rows.length ? /* @__PURE__ */ jsx15("div", {
|
|
3645
|
-
|
|
3696
|
+
"data-table-slot": "gallery",
|
|
3697
|
+
className: cn("grid gap-3 sm:grid-cols-2 xl:grid-cols-3", styles?.gallery),
|
|
3646
3698
|
children: section.rows.map((row) => /* @__PURE__ */ jsx15(RowIdContext.Provider, {
|
|
3647
3699
|
value: row.id,
|
|
3648
3700
|
children: /* @__PURE__ */ jsx15(GalleryCard, {
|
|
@@ -3664,6 +3716,7 @@ var DataTableGallery = ({
|
|
|
3664
3716
|
var DataTablePagination = ({
|
|
3665
3717
|
tableAtom
|
|
3666
3718
|
}) => {
|
|
3719
|
+
const styles = useContext(DataTableStylesContext);
|
|
3667
3720
|
const [store, setStore] = useTableAtom(tableAtom);
|
|
3668
3721
|
const model = deriveModel(store);
|
|
3669
3722
|
const pagination = store.config.features.pagination ?? { mode: "client" };
|
|
@@ -3684,8 +3737,10 @@ var DataTablePagination = ({
|
|
|
3684
3737
|
const selected = model.rows.filter((row) => store.state.rowSelection[row.id]).length;
|
|
3685
3738
|
const setPagination = (next) => changeState(setStore, (state) => ({ ...state, ...next }));
|
|
3686
3739
|
return /* @__PURE__ */ jsx15("div", {
|
|
3687
|
-
|
|
3740
|
+
"data-table-slot": "pagination",
|
|
3741
|
+
className: cn("pt-4", styles?.pagination),
|
|
3688
3742
|
children: /* @__PURE__ */ jsx15(Pagination, {
|
|
3743
|
+
pageSizeContentClassName: styles?.popup?.select,
|
|
3689
3744
|
locale: store.config.locale,
|
|
3690
3745
|
messages: { [store.config.locale]: store.config.labels },
|
|
3691
3746
|
onPageChange: (page) => setPagination({ page, pageSize: store.state.pageSize }),
|
|
@@ -3780,7 +3835,7 @@ var HydratedDataTable = ({
|
|
|
3780
3835
|
uiState
|
|
3781
3836
|
]);
|
|
3782
3837
|
return /* @__PURE__ */ jsxs9("div", {
|
|
3783
|
-
className: "w-full max-w-full min-w-0 rounded-md",
|
|
3838
|
+
className: cn("w-full max-w-full min-w-0 rounded-md", props.className),
|
|
3784
3839
|
"data-table-root": "",
|
|
3785
3840
|
children: [
|
|
3786
3841
|
/* @__PURE__ */ jsx15(DataTableToolbar, {
|
|
@@ -3824,15 +3879,18 @@ var DataTable = (props) => {
|
|
|
3824
3879
|
if (!persistedUiState || AsyncResult.isWaiting(persistedUiResult)) {
|
|
3825
3880
|
return /* @__PURE__ */ jsx15("div", {
|
|
3826
3881
|
"aria-busy": "true",
|
|
3827
|
-
className: "invisible w-full max-w-full min-w-0 rounded-md",
|
|
3882
|
+
className: cn("invisible w-full max-w-full min-w-0 rounded-md", props.className),
|
|
3828
3883
|
"data-table-root": ""
|
|
3829
3884
|
});
|
|
3830
3885
|
}
|
|
3831
|
-
return /* @__PURE__ */ jsx15(
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3886
|
+
return /* @__PURE__ */ jsx15(DataTableStylesContext.Provider, {
|
|
3887
|
+
value: props.classNames,
|
|
3888
|
+
children: /* @__PURE__ */ jsx15(HydratedDataTable, {
|
|
3889
|
+
...props,
|
|
3890
|
+
locale,
|
|
3891
|
+
persistedUiState,
|
|
3892
|
+
setPersistedUiState
|
|
3893
|
+
})
|
|
3836
3894
|
});
|
|
3837
3895
|
};
|
|
3838
3896
|
var DataTableContent = ({
|
|
@@ -3849,7 +3907,7 @@ var DataTableContent = ({
|
|
|
3849
3907
|
return /* @__PURE__ */ jsxs9(ScrollArea, {
|
|
3850
3908
|
className: "max-w-full min-w-0",
|
|
3851
3909
|
children: [
|
|
3852
|
-
/* @__PURE__ */ jsxs9(
|
|
3910
|
+
/* @__PURE__ */ jsxs9(Table2, {
|
|
3853
3911
|
className: "table-fixed",
|
|
3854
3912
|
style: { width: `max(100%, ${width}px)` },
|
|
3855
3913
|
children: [
|
|
@@ -4028,7 +4086,7 @@ var DataTableListMenu = ({
|
|
|
4028
4086
|
const resolvedLabel = label ?? (hasActions ? labels.actions : labels.listDetails);
|
|
4029
4087
|
return /* @__PURE__ */ jsxs9(DropdownMenu, {
|
|
4030
4088
|
children: [
|
|
4031
|
-
/* @__PURE__ */ jsx15(
|
|
4089
|
+
/* @__PURE__ */ jsx15(DropdownMenuTrigger2, {
|
|
4032
4090
|
onClick: (event) => event.stopPropagation(),
|
|
4033
4091
|
onPointerDown: (event) => event.stopPropagation(),
|
|
4034
4092
|
render: trigger ?? /* @__PURE__ */ jsx15(Button, {
|
|
@@ -4039,28 +4097,28 @@ var DataTableListMenu = ({
|
|
|
4039
4097
|
children: /* @__PURE__ */ jsx15(MoreHorizontal, {})
|
|
4040
4098
|
})
|
|
4041
4099
|
}),
|
|
4042
|
-
/* @__PURE__ */ jsx15(
|
|
4100
|
+
/* @__PURE__ */ jsx15(DropdownMenuContent2, {
|
|
4043
4101
|
align: "end",
|
|
4044
4102
|
className: "max-h-[min(18rem,var(--available-height))] w-72 max-w-[calc(100vw-2rem)]",
|
|
4045
4103
|
onClick: (event) => event.stopPropagation(),
|
|
4046
4104
|
onPointerDown: (event) => event.stopPropagation(),
|
|
4047
4105
|
children: /* @__PURE__ */ jsxs9(DropdownMenuGroup, {
|
|
4048
4106
|
children: [
|
|
4049
|
-
/* @__PURE__ */ jsx15(
|
|
4107
|
+
/* @__PURE__ */ jsx15(DropdownMenuLabel2, {
|
|
4050
4108
|
children: resolvedLabel
|
|
4051
4109
|
}),
|
|
4052
|
-
/* @__PURE__ */ jsx15(
|
|
4110
|
+
/* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}),
|
|
4053
4111
|
entries.map(({ item, visibleActions }, index) => visibleActions.length ? /* @__PURE__ */ jsxs9(DropdownMenuSub, {
|
|
4054
4112
|
children: [
|
|
4055
|
-
/* @__PURE__ */ jsx15(
|
|
4113
|
+
/* @__PURE__ */ jsx15(DropdownMenuSubTrigger2, {
|
|
4056
4114
|
children: /* @__PURE__ */ jsx15(DataTableListEntry, {
|
|
4057
4115
|
item,
|
|
4058
4116
|
appearance: display === "icon" ? "detail" : "list"
|
|
4059
4117
|
})
|
|
4060
4118
|
}),
|
|
4061
|
-
/* @__PURE__ */ jsx15(
|
|
4119
|
+
/* @__PURE__ */ jsx15(DropdownMenuSubContent2, {
|
|
4062
4120
|
className: "w-max",
|
|
4063
|
-
children: visibleActions.map((action) => /* @__PURE__ */ jsxs9(
|
|
4121
|
+
children: visibleActions.map((action) => /* @__PURE__ */ jsxs9(DropdownMenuItem2, {
|
|
4064
4122
|
closeOnClick: action.closeOnClick,
|
|
4065
4123
|
disabled: action.disabled?.(item),
|
|
4066
4124
|
onClick: (event) => {
|
|
@@ -4075,7 +4133,7 @@ var DataTableListMenu = ({
|
|
|
4075
4133
|
}, action.id ?? action.name))
|
|
4076
4134
|
})
|
|
4077
4135
|
]
|
|
4078
|
-
}, item.value ?? `${item.label}-${index}`) : /* @__PURE__ */ jsx15(
|
|
4136
|
+
}, item.value ?? `${item.label}-${index}`) : /* @__PURE__ */ jsx15(DropdownMenuItem2, {
|
|
4079
4137
|
closeOnClick: Boolean(onItemClick),
|
|
4080
4138
|
onClick: (event) => {
|
|
4081
4139
|
event.stopPropagation();
|
|
@@ -4088,7 +4146,7 @@ var DataTableListMenu = ({
|
|
|
4088
4146
|
}, item.value ?? `${item.label}-${index}`)),
|
|
4089
4147
|
onAdd && addOptions?.length ? /* @__PURE__ */ jsxs9(Fragment, {
|
|
4090
4148
|
children: [
|
|
4091
|
-
entries.length ? /* @__PURE__ */ jsx15(
|
|
4149
|
+
entries.length ? /* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}) : null,
|
|
4092
4150
|
/* @__PURE__ */ jsx15(DataTableListAddMenu, {
|
|
4093
4151
|
emptyLabel: addEmptyLabel,
|
|
4094
4152
|
label: addLabel ?? labels.addItem,
|
|
@@ -4130,13 +4188,13 @@ var DataTableListAddMenu = ({
|
|
|
4130
4188
|
setSearch("");
|
|
4131
4189
|
},
|
|
4132
4190
|
children: [
|
|
4133
|
-
/* @__PURE__ */ jsxs9(
|
|
4191
|
+
/* @__PURE__ */ jsxs9(DropdownMenuSubTrigger2, {
|
|
4134
4192
|
children: [
|
|
4135
4193
|
/* @__PURE__ */ jsx15(Plus, {}),
|
|
4136
4194
|
label
|
|
4137
4195
|
]
|
|
4138
4196
|
}),
|
|
4139
|
-
/* @__PURE__ */ jsxs9(
|
|
4197
|
+
/* @__PURE__ */ jsxs9(DropdownMenuSubContent2, {
|
|
4140
4198
|
className: "w-64",
|
|
4141
4199
|
children: [
|
|
4142
4200
|
/* @__PURE__ */ jsxs9("div", {
|
|
@@ -4145,7 +4203,7 @@ var DataTableListAddMenu = ({
|
|
|
4145
4203
|
/* @__PURE__ */ jsx15(Search, {
|
|
4146
4204
|
className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2"
|
|
4147
4205
|
}),
|
|
4148
|
-
/* @__PURE__ */ jsx15(
|
|
4206
|
+
/* @__PURE__ */ jsx15(Input2, {
|
|
4149
4207
|
"aria-label": searchLabel,
|
|
4150
4208
|
className: "h-8 pl-8",
|
|
4151
4209
|
onChange: (event) => setSearch(event.target.value),
|
|
@@ -4159,8 +4217,8 @@ var DataTableListAddMenu = ({
|
|
|
4159
4217
|
})
|
|
4160
4218
|
]
|
|
4161
4219
|
}),
|
|
4162
|
-
/* @__PURE__ */ jsx15(
|
|
4163
|
-
filtered.length ? filtered.map((item) => /* @__PURE__ */ jsx15(
|
|
4220
|
+
/* @__PURE__ */ jsx15(DropdownMenuSeparator2, {}),
|
|
4221
|
+
filtered.length ? filtered.map((item) => /* @__PURE__ */ jsx15(DropdownMenuItem2, {
|
|
4164
4222
|
closeOnClick: false,
|
|
4165
4223
|
onClick: () => onAdd(item),
|
|
4166
4224
|
children: /* @__PURE__ */ jsx15(DataTableListEntry, {
|
|
@@ -4276,7 +4334,7 @@ var DataTableListEntry = ({
|
|
|
4276
4334
|
}),
|
|
4277
4335
|
children: icon
|
|
4278
4336
|
}),
|
|
4279
|
-
/* @__PURE__ */ jsx15(
|
|
4337
|
+
/* @__PURE__ */ jsx15(TooltipContent2, {
|
|
4280
4338
|
children: item.label
|
|
4281
4339
|
})
|
|
4282
4340
|
]
|