diff --git a/packages/next/src/views/Dashboard/index.tsx b/packages/next/src/views/Dashboard/index.tsx index e026d9a18..b0519126e 100644 --- a/packages/next/src/views/Dashboard/index.tsx +++ b/packages/next/src/views/Dashboard/index.tsx @@ -10,7 +10,7 @@ import { DefaultDashboard } from './Default/index.js' export { generateDashboardMetadata } from './meta.js' -const Link = LinkDefault.default +const Link = LinkDefault export const Dashboard: React.FC = ({ initPageResult, diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json index 04e09bb65..d5d6abee4 100644 --- a/packages/next/tsconfig.json +++ b/packages/next/tsconfig.json @@ -6,7 +6,6 @@ "emitDeclarationOnly": true, "outDir": "./dist" /* Specify an output folder for all emitted files. */, "rootDir": "./src" /* Specify the root folder within your source files. */, - "allowImportingTsExtensions": true, "sourceMap": true, "paths": { "@payloadcms/ui": ["../ui/src/exports/index.ts"], diff --git a/packages/ui/src/elements/NavGroup/index.tsx b/packages/ui/src/elements/NavGroup/index.tsx index 4c4180cb0..6825174c8 100644 --- a/packages/ui/src/elements/NavGroup/index.tsx +++ b/packages/ui/src/elements/NavGroup/index.tsx @@ -7,7 +7,7 @@ import { usePreferences } from '../../providers/Preferences/index.js' import { useNav } from '../Nav/context.js' import './index.scss' -const AnimateHeight = AnimateHeightImport.default +const AnimateHeight = AnimateHeightImport.default || AnimateHeightImport const baseClass = 'nav-group' diff --git a/test/buildConfigWithDefaults.ts b/test/buildConfigWithDefaults.ts index 4804804e9..f30658d7a 100644 --- a/test/buildConfigWithDefaults.ts +++ b/test/buildConfigWithDefaults.ts @@ -1,35 +1,35 @@ import path from 'path' import sharp from 'sharp' -import type { Config, SanitizedConfig } from '../packages/payload/src/config/types' +import type { Config, SanitizedConfig } from '../packages/payload/src/config/types.d.ts' -import { mongooseAdapter } from '../packages/db-mongodb/src' -import { postgresAdapter } from '../packages/db-postgres/src' -import { buildConfig as buildPayloadConfig } from '../packages/payload/src/config/build' -// import { -// AlignFeature, -// BlockQuoteFeature, -// BlocksFeature, -// BoldFeature, -// CheckListFeature, -// HeadingFeature, -// IndentFeature, -// InlineCodeFeature, -// ItalicFeature, -// LinkFeature, -// OrderedListFeature, -// ParagraphFeature, -// RelationshipFeature, -// StrikethroughFeature, -// SubscriptFeature, -// SuperscriptFeature, -// TreeViewFeature, -// UnderlineFeature, -// UnorderedListFeature, -// UploadFeature, -// lexicalEditor, -// } from '../packages/richtext-lexical/src' -import { slateEditor } from '../packages/richtext-slate/src' +import { mongooseAdapter } from '../packages/db-mongodb/src/index.js' +import { postgresAdapter } from '../packages/db-postgres/src/index.js' +import { buildConfig as buildPayloadConfig } from '../packages/payload/src/config/build.js' +import { + AlignFeature, + BlockQuoteFeature, + BlocksFeature, + BoldFeature, + CheckListFeature, + HeadingFeature, + IndentFeature, + InlineCodeFeature, + ItalicFeature, + LinkFeature, + OrderedListFeature, + ParagraphFeature, + RelationshipFeature, + StrikethroughFeature, + SubscriptFeature, + SuperscriptFeature, + TreeViewFeature, + UnderlineFeature, + UnorderedListFeature, + UploadFeature, + lexicalEditor, +} from '../packages/richtext-lexical/src' +// import { slateEditor } from '../packages/richtext-slate/src/index.js' // process.env.PAYLOAD_DATABASE = 'postgres' @@ -66,42 +66,9 @@ export function buildConfigWithDefaults(testConfig?: Partial): Promise): Promise { - // return value !== 'option2' ? true : 'Cannot be option2' - // }, - // }, - // ], - // }, - // ], - // }), - // ], + // }, + // }, // }), + editor: lexicalEditor({ + features: [ + ParagraphFeature(), + RelationshipFeature(), + LinkFeature({ + fields: [ + { + name: 'description', + type: 'text', + }, + ], + }), + CheckListFeature(), + UnorderedListFeature(), + OrderedListFeature(), + AlignFeature(), + BlockQuoteFeature(), + BoldFeature(), + ItalicFeature(), + UploadFeature({ + collections: { + media: { + fields: [ + { + name: 'alt', + type: 'text', + }, + ], + }, + }, + }), + UnderlineFeature(), + StrikethroughFeature(), + SubscriptFeature(), + SuperscriptFeature(), + InlineCodeFeature(), + TreeViewFeature(), + HeadingFeature(), + IndentFeature(), + BlocksFeature({ + blocks: [ + { + slug: 'myBlock', + fields: [ + { + name: 'someText', + type: 'text', + }, + { + name: 'someTextRequired', + type: 'text', + required: true, + }, + { + name: 'radios', + type: 'radio', + options: [ + { + label: 'Option 1', + value: 'option1', + }, + { + label: 'Option 2', + value: 'option2', + }, + { + label: 'Option 3', + value: 'option3', + }, + ], + validate: (value) => { + return value !== 'option2' ? true : 'Cannot be option2' + }, + }, + ], + }, + ], + }), + ], + }), sharp, telemetry: false, ...testConfig, diff --git a/tsconfig.json b/tsconfig.json index 3d881240e..e4f6de40b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "declarationMap": true, "module": "NodeNext", "target": "esnext", - "moduleResolution": "NodeNext", + "moduleResolution": "Node16", "allowJs": true, "checkJs": false, "esModuleInterop": true,