synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
80 lines (79 loc) • 2.53 kB
JavaScript
import { useMemo as a } from "react";
import { useTheme as m, useMediaQuery as d } from "@mui/material";
import { NameCell as s } from "../components/EntityNameCell.js";
import { IdCell as t } from "../components/IdCell.js";
import { IdColumnHeader as n } from "../components/IdColumnHeader.js";
import { ModifiedOnCell as f } from "../../EntityFinder/details/view/table/ModifiedOnCell.js";
import { ModifiedByCell as p } from "../../EntityFinder/details/view/table/ModifiedByCell.js";
import { CreatedOnCell as c } from "../../EntityFinder/details/view/table/CreatedOnCell.js";
import { FileEntitySizeCell as u } from "../../EntityFinder/details/view/table/FileEntitySizeCell.js";
import { FileEntityMD5Cell as h } from "../../EntityFinder/details/view/table/FileEntityMD5Cell.js";
import { AddFileToDownloadListCell as C } from "../../EntityFinder/details/view/table/AddToDownloadListCell.js";
import { NameColumnHeader as y, CreatedOnColumnHeader as M, ModifiedOnColumnHeader as b } from "../components/ColumnHeaders.js";
import { EntityBadgeIconsCell as O } from "../components/EntityBadgeIconsCell.js";
const A = (i) => {
const l = m(), o = d(l.breakpoints.up("xl")), r = d(l.breakpoints.up("md"));
return a(() => {
const e = [
{
accessorKey: "entityHeader.name",
id: "name",
header: y,
cell: s,
enableSorting: i,
size: 450
// Default width for Name column
}
];
return r && (e.push({
id: "badges",
header: "",
cell: O,
enableSorting: !1,
size: 120
// Default width for Badges column
}), e.push({
id: "id",
header: n,
cell: t,
enableSorting: !1
})), o && e.push({
accessorKey: "entityHeader.createdOn",
id: "createdOn",
header: M,
cell: c,
enableSorting: i
}), r && e.push({
accessorKey: "entityHeader.modifiedOn",
id: "modifiedOn",
header: b,
cell: f,
enableSorting: i
}), o && e.push({
id: "modifiedBy",
header: "Modified By",
cell: p,
enableSorting: !1
}), r && e.push({
id: "size",
header: "Size",
cell: u,
enableSorting: !1
}), o && e.push({
id: "md5",
header: "MD5",
cell: h,
enableSorting: !1
}), e.push({
id: "download",
header: "Download",
cell: C,
enableSorting: !1,
size: 90
}), e;
}, [i, o, r]);
};
export {
A as useTableColumns
};
//# sourceMappingURL=useTableColumns.js.map