2022-05-24 16:17:09 +10:00
|
|
|
import { lazy } from "react";
|
|
|
|
|
import { IFieldConfig, FieldType } from "@src/components/fields/types";
|
2022-11-17 18:17:43 +11:00
|
|
|
import withRenderTableCell from "@src/components/Table/TableCell/withRenderTableCell";
|
2022-05-24 16:17:09 +10:00
|
|
|
|
|
|
|
|
import UserIcon from "@mui/icons-material/PersonOutlined";
|
2022-11-10 18:21:32 +11:00
|
|
|
import DisplayCell from "./DisplayCell";
|
2023-01-26 12:56:49 +00:00
|
|
|
import EditorCell from "./EditorCell";
|
2022-05-24 16:17:09 +10:00
|
|
|
|
|
|
|
|
const SideDrawerField = lazy(
|
|
|
|
|
() =>
|
|
|
|
|
import("./SideDrawerField" /* webpackChunkName: "SideDrawerField-User" */)
|
|
|
|
|
);
|
|
|
|
|
const Settings = lazy(
|
2023-01-26 12:56:49 +00:00
|
|
|
() => import("./Settings" /* webpackChunkName: "Settings-User" */)
|
2022-05-24 16:17:09 +10:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
export const config: IFieldConfig = {
|
|
|
|
|
type: FieldType.user,
|
|
|
|
|
name: "User",
|
|
|
|
|
group: "Metadata",
|
|
|
|
|
dataType:
|
|
|
|
|
"{ displayName: string; email: string; emailVerified: boolean; isAnonymous: boolean; photoURL: string; uid: string; timestamp?: firebase.firestore.Timestamp; }",
|
|
|
|
|
initialValue: null,
|
|
|
|
|
icon: <UserIcon />,
|
|
|
|
|
description: "User information and optionally, timestamp. Read-only.",
|
2023-01-26 12:56:49 +00:00
|
|
|
TableCell: withRenderTableCell(DisplayCell, EditorCell, "popover", {
|
|
|
|
|
disablePadding: true,
|
|
|
|
|
transparentPopover: true,
|
|
|
|
|
}),
|
2022-05-24 16:17:09 +10:00
|
|
|
SideDrawerField,
|
|
|
|
|
settings: Settings,
|
2024-02-01 16:45:51 +05:30
|
|
|
keywords: ["entity"]
|
2022-05-24 16:17:09 +10:00
|
|
|
};
|
|
|
|
|
export default config;
|