@premieroctet/next-admin
Version:
Next-Admin provides a customizable and turnkey admin dashboard for applications built with Next.js and powered by the Prisma ORM. It aims to simplify the development process by providing a turnkey admin system that can be easily integrated into your proje
16 lines • 1.23 kB
TypeScript
import React from "react";
import { ListDataItem, ModelName, UploadedFile } from "../types";
export declare const capitalize: <T extends string>(str: T) => Capitalize<T>;
export declare const uncapitalize: <T extends string>(str: T) => Uncapitalize<T>;
export declare const isNativeFunction: (fn: Function) => boolean;
export declare const isScalar: (value: any) => value is string | boolean | number;
export declare const pipe: <T>(...fns: Function[]) => (x: T) => Promise<any>;
export declare const extractSerializable: <T>(obj: T, isAppDir?: boolean) => T;
export declare const slugify: (str: string) => string;
export declare const formatLabel: (label: string) => Capitalize<string>;
export declare const isUploadFile: (obj: any) => obj is UploadedFile;
export declare const getDisplayedValue: (element: React.ReactElement<any> | string) => string;
export declare const getDeletedFilesFieldName: (field: string) => string;
export declare const isFileUploadFormat: (format: string) => format is "data-url" | "file";
export declare const reorderData: <T extends ListDataItem<ModelName>>(data: T[], fromId: number | string, toId: number | string, orderField: string, idField: string) => T[];
//# sourceMappingURL=tools.d.ts.map