further types
This commit is contained in:
@@ -28,6 +28,8 @@ module.exports = {
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
],
|
||||
rules: {
|
||||
"no-shadow": "off",
|
||||
"@typescript-eslint/no-shadow": ["error"],
|
||||
'import/no-unresolved': [
|
||||
2,
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
import roles from '../access/roles';
|
||||
import checkRole from '../access/checkRole';
|
||||
|
||||
@@ -6,7 +7,7 @@ const access = ({ req: { user } }) => {
|
||||
return result;
|
||||
};
|
||||
|
||||
export default {
|
||||
const Admin: PayloadCollectionConfig = {
|
||||
slug: 'admins',
|
||||
labels: {
|
||||
singular: 'Admin',
|
||||
@@ -68,3 +69,5 @@ export default {
|
||||
useAsTitle: 'email',
|
||||
},
|
||||
};
|
||||
|
||||
export default Admin;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
import checkRole from '../access/checkRole';
|
||||
import Email from '../blocks/Email';
|
||||
import Quote from '../blocks/Quote';
|
||||
import NumberBlock from '../blocks/Number';
|
||||
import CallToAction from '../blocks/CallToAction';
|
||||
|
||||
const AllFields = {
|
||||
const AllFields: PayloadCollectionConfig = {
|
||||
slug: 'all-fields',
|
||||
// labels: {
|
||||
// singular: 'All Fields',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// No labels necessary
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const AutoLabel = {
|
||||
const AutoLabel: PayloadCollectionConfig = {
|
||||
slug: 'auto-label',
|
||||
fields: [{
|
||||
name: 'text',
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
import Email from '../blocks/Email';
|
||||
import Quote from '../blocks/Quote';
|
||||
import NumberBlock from '../blocks/Number';
|
||||
import CallToAction from '../blocks/CallToAction';
|
||||
|
||||
export default {
|
||||
const Blocks: PayloadCollectionConfig = {
|
||||
slug: 'blocks',
|
||||
labels: {
|
||||
singular: 'Blocks',
|
||||
@@ -38,3 +39,5 @@ export default {
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default Blocks;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const Code = {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const Code: PayloadCollectionConfig = {
|
||||
slug: 'code',
|
||||
labels: {
|
||||
singular: 'Code',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const Conditions = {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const Conditions: PayloadCollectionConfig = {
|
||||
slug: 'conditions',
|
||||
labels: {
|
||||
singular: 'Conditions',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
import { PayloadCollectionConfig } from '../../../src/collections/config/types';
|
||||
import DescriptionField from './components/fields/Description/Field';
|
||||
import DescriptionCell from './components/fields/Description/Cell';
|
||||
import DescriptionFilter from './components/fields/Description/Filter';
|
||||
@@ -7,9 +7,8 @@ import GroupField from './components/fields/Group/Field';
|
||||
import NestedGroupField from './components/fields/NestedGroupCustomField/Field';
|
||||
import NestedText1Field from './components/fields/NestedText1/Field';
|
||||
import ListView from './components/views/List';
|
||||
import buildCollection from '../../../src/collections/config/build';
|
||||
|
||||
export default buildCollection({
|
||||
const CustomComponents: PayloadCollectionConfig = {
|
||||
slug: 'custom-components',
|
||||
labels: {
|
||||
singular: 'Custom Component',
|
||||
@@ -105,4 +104,6 @@ export default buildCollection({
|
||||
List: ListView,
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export default CustomComponents;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
import checkRole from '../access/checkRole';
|
||||
import Email from '../blocks/Email';
|
||||
import Quote from '../blocks/Quote';
|
||||
import NumberBlock from '../blocks/Number';
|
||||
import CallToAction from '../blocks/CallToAction';
|
||||
|
||||
const DefaultValues = {
|
||||
const DefaultValues: PayloadCollectionConfig = {
|
||||
slug: 'default-values',
|
||||
labels: {
|
||||
singular: 'Default Value Test',
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
import checkRole from '../access/checkRole';
|
||||
|
||||
const access = ({ req: { user } }) => {
|
||||
@@ -18,7 +19,7 @@ const access = ({ req: { user } }) => {
|
||||
return false;
|
||||
};
|
||||
|
||||
export default {
|
||||
const Files: PayloadCollectionConfig = {
|
||||
slug: 'files',
|
||||
labels: {
|
||||
singular: 'File',
|
||||
@@ -65,3 +66,5 @@ export default {
|
||||
useAsTitle: 'filename',
|
||||
},
|
||||
};
|
||||
|
||||
export default Files;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const HiddenFields = {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const HiddenFields: PayloadCollectionConfig = {
|
||||
slug: 'hidden-fields',
|
||||
labels: {
|
||||
singular: 'Hidden Fields',
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
export default {
|
||||
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const Hooks: PayloadCollectionConfig = {
|
||||
slug: 'hooks',
|
||||
labels: {
|
||||
singular: 'Hook',
|
||||
@@ -88,3 +91,5 @@ export default {
|
||||
],
|
||||
timestamps: true,
|
||||
};
|
||||
|
||||
export default Hooks;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const LocalOperations = {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const LocalOperations: PayloadCollectionConfig = {
|
||||
slug: 'local-operations',
|
||||
labels: {
|
||||
singular: 'Local Operation',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export default {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const LocalizedPosts: PayloadCollectionConfig = {
|
||||
slug: 'localized-posts',
|
||||
labels: {
|
||||
singular: 'Localized Post',
|
||||
@@ -56,3 +58,5 @@ export default {
|
||||
],
|
||||
timestamps: true,
|
||||
};
|
||||
|
||||
export default LocalizedPosts;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const LocalizedArrays = {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const LocalizedArrays: PayloadCollectionConfig = {
|
||||
slug: 'localized-arrays',
|
||||
labels: {
|
||||
singular: 'Localized Array',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import checkRole from '../access/checkRole';
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
export default {
|
||||
const Media: PayloadCollectionConfig = {
|
||||
slug: 'media',
|
||||
labels: {
|
||||
singular: 'Media',
|
||||
@@ -47,3 +47,5 @@ export default {
|
||||
],
|
||||
timestamps: true,
|
||||
};
|
||||
|
||||
export default Media;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const NestedArray = {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const NestedArray: PayloadCollectionConfig = {
|
||||
slug: 'nested-arrays',
|
||||
labels: {
|
||||
singular: 'Nested Array',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export default {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const Preview: PayloadCollectionConfig = {
|
||||
slug: 'previewable-post',
|
||||
labels: {
|
||||
singular: 'Previewable Post',
|
||||
@@ -27,3 +29,5 @@ export default {
|
||||
],
|
||||
timestamps: true,
|
||||
};
|
||||
|
||||
export default Preview;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import checkRole from '../access/checkRole';
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const access = ({ req: { user } }) => checkRole(['admin'], user);
|
||||
|
||||
export default {
|
||||
const PublicUsers: PayloadCollectionConfig = {
|
||||
slug: 'public-users',
|
||||
labels: {
|
||||
singular: 'Public User',
|
||||
@@ -56,3 +57,5 @@ export default {
|
||||
],
|
||||
timestamps: true,
|
||||
};
|
||||
|
||||
export default PublicUsers;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export default {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const RelationshipA: PayloadCollectionConfig = {
|
||||
slug: 'relationship-a',
|
||||
access: {
|
||||
read: () => true,
|
||||
@@ -34,3 +36,5 @@ export default {
|
||||
],
|
||||
timestamps: true,
|
||||
};
|
||||
|
||||
export default RelationshipA;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export default {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const RelationshipB: PayloadCollectionConfig = {
|
||||
slug: 'relationship-b',
|
||||
access: {
|
||||
read: () => true,
|
||||
@@ -19,3 +21,5 @@ export default {
|
||||
],
|
||||
timestamps: true,
|
||||
};
|
||||
|
||||
export default RelationshipB;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import Button from '../client/components/richText/elements/Button';
|
||||
import PurpleBackground from '../client/components/richText/leaves/PurpleBackground';
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const RichText = {
|
||||
const RichText: PayloadCollectionConfig = {
|
||||
slug: 'rich-text',
|
||||
labels: {
|
||||
singular: 'Rich Text',
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
const Select = {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const Select: PayloadCollectionConfig = {
|
||||
slug: 'select',
|
||||
labels: {
|
||||
singular: 'Select',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
import checkRole from '../access/checkRole';
|
||||
|
||||
export default {
|
||||
const StrictAccess: PayloadCollectionConfig = {
|
||||
slug: 'strict-access',
|
||||
labels: {
|
||||
singular: 'Strict Access',
|
||||
@@ -71,3 +72,5 @@ export default {
|
||||
],
|
||||
timestamps: true,
|
||||
};
|
||||
|
||||
export default StrictAccess;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export default {
|
||||
import { PayloadCollectionConfig } from '../../src/collections/config/types';
|
||||
|
||||
const Validations: PayloadCollectionConfig = {
|
||||
slug: 'validations',
|
||||
labels: {
|
||||
singular: 'Validation',
|
||||
@@ -106,5 +108,6 @@ export default {
|
||||
],
|
||||
},
|
||||
],
|
||||
timestamps: true,
|
||||
};
|
||||
|
||||
export default Validations;
|
||||
|
||||
@@ -44,10 +44,12 @@ const buildStateFromSchema = async (fieldSchema: FieldSchema[], fullData: Data =
|
||||
|
||||
if (field.type === 'array' || field.type === 'blocks') {
|
||||
if (Array.isArray(initialData?.[field.name])) {
|
||||
const rows = initialData[field.name] as Data[];
|
||||
|
||||
if (field.type === 'array') {
|
||||
return {
|
||||
...state,
|
||||
...initialData[field.name].reduce((rowState, row, i) => ({
|
||||
...rows.reduce((rowState, row, i) => ({
|
||||
...rowState,
|
||||
...iterateFields(field.fields, row, `${path}${field.name}.${i}.`),
|
||||
}), {}),
|
||||
@@ -57,7 +59,7 @@ const buildStateFromSchema = async (fieldSchema: FieldSchema[], fullData: Data =
|
||||
if (field.type === 'blocks') {
|
||||
return {
|
||||
...state,
|
||||
...initialData[field.name].reduce((rowState, row, i) => {
|
||||
...rows.reduce((rowState, row, i) => {
|
||||
const block = field.blocks.find((blockType) => blockType.slug === row.blockType);
|
||||
const rowPath = `${path}${field.name}.${i}.`;
|
||||
|
||||
@@ -84,7 +86,7 @@ const buildStateFromSchema = async (fieldSchema: FieldSchema[], fullData: Data =
|
||||
}
|
||||
|
||||
// Handle non-array-based nested fields (group, etc)
|
||||
if (field.fields) {
|
||||
if (Array.isArray(field.fields)) {
|
||||
return {
|
||||
...state,
|
||||
...iterateFields(field.fields, initialData?.[field.name], `${path}${field.name}.`),
|
||||
|
||||
@@ -74,6 +74,7 @@ export interface IncomingAuthType {
|
||||
maxLoginAttempts?: number;
|
||||
lockTime?: number;
|
||||
useAPIKey?: boolean;
|
||||
depth?: number
|
||||
cookies?: {
|
||||
secure?: boolean;
|
||||
sameSite?: string;
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { DeepRequired } from 'ts-essentials';
|
||||
import { PaginateModel, Document, PassportLocalModel } from 'mongoose';
|
||||
import { PaginateModel, Document as MongooseDocument, PassportLocalModel } from 'mongoose';
|
||||
import { Access } from '../../config/types';
|
||||
import { Field } from '../../fields/config/types';
|
||||
import { Document } from '../../types';
|
||||
import { PayloadRequest } from '../../express/types/payloadRequest';
|
||||
import { IncomingAuthType, Auth } from '../../auth/types';
|
||||
import { IncomingUploadType, Upload } from '../../uploads/types';
|
||||
|
||||
interface CollectionModel extends PaginateModel<Document>, PassportLocalModel<Document>{}
|
||||
interface CollectionModel extends PaginateModel<MongooseDocument>, PassportLocalModel<MongooseDocument>{}
|
||||
|
||||
export type HookOperationType =
|
||||
| 'create'
|
||||
@@ -91,7 +92,9 @@ export type PayloadCollectionConfig = {
|
||||
useAsTitle?: string;
|
||||
defaultColumns?: string[];
|
||||
components?: any;
|
||||
enableRichTextRelationship?: boolean
|
||||
};
|
||||
preview?: (doc: Document, token: string) => string
|
||||
hooks?: {
|
||||
beforeOperation?: BeforeOperationHook[];
|
||||
beforeValidate?: BeforeValidateHook[];
|
||||
|
||||
@@ -4,7 +4,6 @@ import { PayloadRequest } from '../../express/types/payloadRequest';
|
||||
import { Access } from '../../config/types';
|
||||
import { Document } from '../../types';
|
||||
|
||||
// TODO: add generic type and use mongoose types for originalDoc & data
|
||||
export type FieldHook = (args: {
|
||||
value?: unknown,
|
||||
originalDoc?: Document,
|
||||
@@ -15,7 +14,23 @@ export type FieldHook = (args: {
|
||||
req: PayloadRequest
|
||||
}) => Promise<unknown> | unknown;
|
||||
|
||||
type FieldBase = {
|
||||
type Admin = {
|
||||
position?: string;
|
||||
width?: string;
|
||||
style?: CSSProperties;
|
||||
readOnly?: boolean;
|
||||
disabled?: boolean;
|
||||
condition?: (...args: any[]) => any | void;
|
||||
components?: { [key: string]: React.ComponentType };
|
||||
hidden?: boolean
|
||||
}
|
||||
|
||||
type Labels = {
|
||||
singular: string;
|
||||
plural: string;
|
||||
};
|
||||
|
||||
interface FieldBase {
|
||||
name?: string;
|
||||
label?: string;
|
||||
slug?: string;
|
||||
@@ -24,96 +39,112 @@ type FieldBase = {
|
||||
index?: boolean;
|
||||
defaultValue?: any;
|
||||
hidden?: boolean;
|
||||
saveToJWT?: boolean
|
||||
localized?: boolean;
|
||||
maxLength?: number;
|
||||
validate?: (value: any, field: Field) => any;
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
hooks?: {
|
||||
beforeValidate?: FieldHook[];
|
||||
beforeChange?: FieldHook[];
|
||||
afterChange?: FieldHook[];
|
||||
afterRead?: FieldHook[];
|
||||
}
|
||||
admin?: {
|
||||
position?: string;
|
||||
width?: string;
|
||||
style?: CSSProperties;
|
||||
readOnly?: boolean;
|
||||
disabled?: boolean;
|
||||
condition?: (...args: any[]) => any | void;
|
||||
components?: { [key: string]: React.ComponentType };
|
||||
};
|
||||
admin?: Admin;
|
||||
access?: {
|
||||
create?: Access;
|
||||
read?: Access;
|
||||
update?: Access;
|
||||
delete?: Access;
|
||||
admin?: Access;
|
||||
unlock?: Access;
|
||||
};
|
||||
}
|
||||
|
||||
export type StandardField = FieldBase & {
|
||||
type: string;
|
||||
fields?: Field[];
|
||||
export type NumberField = FieldBase & {
|
||||
type: 'number';
|
||||
min?: number
|
||||
max?: number
|
||||
}
|
||||
|
||||
export type NumberField = StandardField & { type: 'number'; };
|
||||
export type TextField = StandardField & { type: 'text'; };
|
||||
export type EmailField = StandardField & { type: 'email'; };
|
||||
export type TextareaField = StandardField & { type: 'textarea'; };
|
||||
export type CodeField = StandardField & { type: 'code'; };
|
||||
export type CheckboxField = StandardField & { type: 'checkbox'; };
|
||||
export type DateField = StandardField & { type: 'date'; };
|
||||
export type GroupField = StandardField & { type: 'group'; };
|
||||
export type RowField = StandardField & { type: 'row'; };
|
||||
export type TextField = FieldBase & {
|
||||
type: 'text';
|
||||
maxLength?: number
|
||||
minLength?: number
|
||||
}
|
||||
|
||||
export type EmailField = FieldBase & {
|
||||
type: 'email';
|
||||
}
|
||||
|
||||
export type TextareaField = FieldBase & {
|
||||
type: 'textarea';
|
||||
maxLength?: number
|
||||
minLength?: number
|
||||
}
|
||||
|
||||
export type CheckboxField = FieldBase & {
|
||||
type: 'checkbox';
|
||||
}
|
||||
|
||||
export type DateField = FieldBase & {
|
||||
type: 'date';
|
||||
}
|
||||
|
||||
export type GroupField = FieldBase & {
|
||||
type: 'group';
|
||||
fields: Field[];
|
||||
}
|
||||
|
||||
export type RowField = FieldBase & {
|
||||
type: 'row';
|
||||
fields: Field[];
|
||||
}
|
||||
|
||||
export type UploadField = FieldBase & {
|
||||
type: 'upload';
|
||||
relationTo: string;
|
||||
}
|
||||
|
||||
type CodeAdmin = Admin & {
|
||||
language?: string;
|
||||
}
|
||||
|
||||
export type CodeField = Omit<FieldBase, 'admin'> & {
|
||||
admin?: CodeAdmin
|
||||
type: 'code';
|
||||
}
|
||||
|
||||
export type SelectField = FieldBase & {
|
||||
type: 'select';
|
||||
options: {
|
||||
value: string;
|
||||
label: string;
|
||||
}[];
|
||||
}[] | string[];
|
||||
hasMany?: boolean;
|
||||
}
|
||||
|
||||
export type SelectManyField = SelectField & {
|
||||
hasMany: true;
|
||||
}
|
||||
|
||||
export type RelationshipSingleField = FieldBase & {
|
||||
export type RelationshipField = FieldBase & {
|
||||
type: 'relationship';
|
||||
relationTo: string;
|
||||
hasMany?: false;
|
||||
relationTo: string | string[];
|
||||
hasMany?: boolean;
|
||||
}
|
||||
|
||||
export type RelationshipManyField = FieldBase & {
|
||||
type: 'relationship';
|
||||
relationTo: string[];
|
||||
hasMany: true;
|
||||
}
|
||||
|
||||
export type RelationshipField = RelationshipSingleField | RelationshipManyField;
|
||||
|
||||
type RichTextElements = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote' | 'ul' | 'ol' | 'link';
|
||||
type RichTextLeaves = 'bold' | 'italic' | 'underline' | 'strikethrough';
|
||||
export type RichTextField = FieldBase & {
|
||||
|
||||
type RichTextAdmin = Admin & {
|
||||
elements?: RichTextElements[];
|
||||
leaves?: RichTextLeaves[];
|
||||
}
|
||||
|
||||
export type RichTextField = Omit<FieldBase, 'admin'> & {
|
||||
type: 'richText';
|
||||
admin?: {
|
||||
elements?: RichTextElements[];
|
||||
leaves?: RichTextLeaves[];
|
||||
}
|
||||
admin?: RichTextAdmin
|
||||
}
|
||||
|
||||
export type ArrayField = FieldBase & {
|
||||
type: 'array';
|
||||
minRows?: number;
|
||||
maxRows?: number;
|
||||
labels?: Labels;
|
||||
fields?: Field[];
|
||||
}
|
||||
|
||||
@@ -122,16 +153,13 @@ export type RadioField = FieldBase & {
|
||||
options: {
|
||||
value: string;
|
||||
label: string;
|
||||
}[];
|
||||
}[] | string[];
|
||||
hasMany?: boolean;
|
||||
}
|
||||
|
||||
export type Block = {
|
||||
slug: string,
|
||||
labels: {
|
||||
singular: string;
|
||||
plural: string;
|
||||
};
|
||||
labels: Labels
|
||||
fields: Field[],
|
||||
}
|
||||
|
||||
@@ -139,16 +167,25 @@ export type BlockField = FieldBase & {
|
||||
type: 'blocks';
|
||||
minRows?: number;
|
||||
maxRows?: number;
|
||||
blocks?: Field[];
|
||||
};
|
||||
blocks?: Block[];
|
||||
defaultValue?: unknown
|
||||
labels?: Labels
|
||||
}
|
||||
|
||||
export type Field =
|
||||
| StandardField
|
||||
TextField
|
||||
| NumberField
|
||||
| EmailField
|
||||
| TextareaField
|
||||
| CheckboxField
|
||||
| DateField
|
||||
| BlockField
|
||||
| GroupField
|
||||
| RadioField
|
||||
| RelationshipField
|
||||
| ArrayField
|
||||
| RichTextField
|
||||
| SelectField
|
||||
| SelectManyField
|
||||
| UploadField;
|
||||
| UploadField
|
||||
| CodeField
|
||||
| RowField;
|
||||
|
||||
@@ -23,7 +23,7 @@ export type ImageSize = {
|
||||
name: string,
|
||||
width: number,
|
||||
height: number,
|
||||
crop: string, // comes from sharp package
|
||||
crop?: string, // comes from sharp package
|
||||
};
|
||||
|
||||
export type IncomingUploadType = {
|
||||
|
||||
Reference in New Issue
Block a user