This commit is contained in:
parent
043470fe0c
commit
cb0a2f77a8
11
package.json
11
package.json
@ -22,13 +22,14 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@payloadcms/db-mongodb": "3.0.0-beta.40",
|
"@payloadcms/db-mongodb": "3.0.0-beta.40",
|
||||||
|
"@payloadcms/live-preview": "3.0.0-beta.35",
|
||||||
|
"@payloadcms/live-preview-react": "3.0.0-beta.35",
|
||||||
"@payloadcms/next": "3.0.0-beta.40",
|
"@payloadcms/next": "3.0.0-beta.40",
|
||||||
"@payloadcms/plugin-nested-docs": "3.0.0-beta.35",
|
"@payloadcms/plugin-nested-docs": "3.0.0-beta.35",
|
||||||
"@payloadcms/richtext-lexical": "3.0.0-beta.40",
|
"@payloadcms/richtext-lexical": "3.0.0-beta.40",
|
||||||
"@payloadcms/ui": "3.0.0-beta.40",
|
"@payloadcms/ui": "3.0.0-beta.40",
|
||||||
"@payloadcms/live-preview": "3.0.0-beta.35",
|
|
||||||
"@payloadcms/live-preview-react": "3.0.0-beta.35",
|
|
||||||
"babel-plugin-react-compiler": "^0.0.0-experimental-592953e-20240517",
|
"babel-plugin-react-compiler": "^0.0.0-experimental-592953e-20240517",
|
||||||
|
"clsx": "^2.1.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"deepmerge": "^4.3.1",
|
"deepmerge": "^4.3.1",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
@ -37,7 +38,8 @@
|
|||||||
"react": "19.0.0-rc-f994737d14-20240522",
|
"react": "19.0.0-rc-f994737d14-20240522",
|
||||||
"react-dom": "19.0.0-rc-f994737d14-20240522",
|
"react-dom": "19.0.0-rc-f994737d14-20240522",
|
||||||
"sharp": "0.32.6",
|
"sharp": "0.32.6",
|
||||||
"tailwind-merge": "^2.3.0"
|
"tailwind-merge": "^2.3.0",
|
||||||
|
"lodash": "^4.17.21"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.12.12",
|
"@types/node": "^20.12.12",
|
||||||
@ -48,7 +50,8 @@
|
|||||||
"eslint-config-next": "14.2.3",
|
"eslint-config-next": "14.2.3",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.38",
|
||||||
"tailwindcss": "^3.4.4",
|
"tailwindcss": "^3.4.4",
|
||||||
"typescript": "^5.4.5"
|
"typescript": "^5.4.5",
|
||||||
|
"@types/lodash": "^4.17.4"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
@ -36,6 +36,9 @@ importers:
|
|||||||
babel-plugin-react-compiler:
|
babel-plugin-react-compiler:
|
||||||
specifier: ^0.0.0-experimental-592953e-20240517
|
specifier: ^0.0.0-experimental-592953e-20240517
|
||||||
version: 0.0.0-experimental-938cd9a-20240601
|
version: 0.0.0-experimental-938cd9a-20240601
|
||||||
|
clsx:
|
||||||
|
specifier: ^2.1.1
|
||||||
|
version: 2.1.1
|
||||||
cross-env:
|
cross-env:
|
||||||
specifier: ^7.0.3
|
specifier: ^7.0.3
|
||||||
version: 7.0.3
|
version: 7.0.3
|
||||||
@ -45,6 +48,9 @@ importers:
|
|||||||
graphql:
|
graphql:
|
||||||
specifier: ^16.8.1
|
specifier: ^16.8.1
|
||||||
version: 16.8.1
|
version: 16.8.1
|
||||||
|
lodash:
|
||||||
|
specifier: ^4.17.21
|
||||||
|
version: 4.17.21
|
||||||
next:
|
next:
|
||||||
specifier: 15.0.0-rc.0
|
specifier: 15.0.0-rc.0
|
||||||
version: 15.0.0-rc.0(babel-plugin-react-compiler@0.0.0-experimental-938cd9a-20240601)(react-dom@19.0.0-rc-f994737d14-20240522(react@19.0.0-rc-f994737d14-20240522))(react@19.0.0-rc-f994737d14-20240522)(sass@1.77.4)
|
version: 15.0.0-rc.0(babel-plugin-react-compiler@0.0.0-experimental-938cd9a-20240601)(react-dom@19.0.0-rc-f994737d14-20240522(react@19.0.0-rc-f994737d14-20240522))(react@19.0.0-rc-f994737d14-20240522)(sass@1.77.4)
|
||||||
@ -64,6 +70,9 @@ importers:
|
|||||||
specifier: ^2.3.0
|
specifier: ^2.3.0
|
||||||
version: 2.3.0
|
version: 2.3.0
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
'@types/lodash':
|
||||||
|
specifier: ^4.17.4
|
||||||
|
version: 4.17.4
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^20.12.12
|
specifier: ^20.12.12
|
||||||
version: 20.14.1
|
version: 20.14.1
|
||||||
@ -5767,7 +5776,7 @@ snapshots:
|
|||||||
eslint: 8.57.0
|
eslint: 8.57.0
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0)
|
eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0)
|
||||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
|
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
||||||
eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0)
|
eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0)
|
||||||
eslint-plugin-react: 7.34.2(eslint@8.57.0)
|
eslint-plugin-react: 7.34.2(eslint@8.57.0)
|
||||||
eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0)
|
eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0)
|
||||||
@ -5791,7 +5800,7 @@ snapshots:
|
|||||||
enhanced-resolve: 5.16.1
|
enhanced-resolve: 5.16.1
|
||||||
eslint: 8.57.0
|
eslint: 8.57.0
|
||||||
eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
||||||
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
|
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
|
||||||
fast-glob: 3.3.2
|
fast-glob: 3.3.2
|
||||||
get-tsconfig: 4.7.5
|
get-tsconfig: 4.7.5
|
||||||
is-core-module: 2.13.1
|
is-core-module: 2.13.1
|
||||||
@ -5813,7 +5822,7 @@ snapshots:
|
|||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0):
|
eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0):
|
||||||
dependencies:
|
dependencies:
|
||||||
array-includes: 3.1.8
|
array-includes: 3.1.8
|
||||||
array.prototype.findlastindex: 1.2.5
|
array.prototype.findlastindex: 1.2.5
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
import deepMerge from 'deepmerge'
|
|
||||||
import type { Field } from 'payload/types'
|
|
||||||
import * as HiIcons from 'react-icons/hi2'
|
|
||||||
|
|
||||||
const iconOptions = Object.entries(HiIcons)
|
|
||||||
.filter(([key, value]) => typeof value === 'function')
|
|
||||||
.map(([key]) => ({
|
|
||||||
value: key,
|
|
||||||
label: key.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
||||||
}))
|
|
||||||
|
|
||||||
type IconField = (overrides?: Partial<Field>) => Field
|
|
||||||
|
|
||||||
const iconField: IconField = (overrides = {}) => {
|
|
||||||
return deepMerge<Field, Partial<Field>>(
|
|
||||||
{
|
|
||||||
type: 'select',
|
|
||||||
name: 'icon',
|
|
||||||
label: 'Icon',
|
|
||||||
options: iconOptions
|
|
||||||
},
|
|
||||||
overrides
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default iconField
|
|
@ -74,7 +74,7 @@ const TextComponent: FC<TextComponentProps> = ({ children, format }) => {
|
|||||||
const SerializedLink: React.FC<{
|
const SerializedLink: React.FC<{
|
||||||
node: SerializedLexicalNode
|
node: SerializedLexicalNode
|
||||||
locale: string
|
locale: string
|
||||||
children: JSX.Element | null
|
children: React.JSX.Element | null
|
||||||
}> = ({ node, locale, children }) => {
|
}> = ({ node, locale, children }) => {
|
||||||
const { doc, url, newTab, linkType } = node.fields as any
|
const { doc, url, newTab, linkType } = node.fields as any
|
||||||
const document = doc?.value
|
const document = doc?.value
|
||||||
@ -164,7 +164,7 @@ const LexicalContent: React.FC<{
|
|||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
case 'heading':
|
case 'heading':
|
||||||
const HeadingTag = node.tag as keyof JSX.IntrinsicElements
|
const HeadingTag = node.tag as keyof React.JSX.IntrinsicElements
|
||||||
return (
|
return (
|
||||||
<HeadingTag key={ix} {...attributes}>
|
<HeadingTag key={ix} {...attributes}>
|
||||||
{serializedChildren}
|
{serializedChildren}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
'use server'
|
/* 'use server'
|
||||||
|
|
||||||
import { SESSION_STRATEGY } from '@/lib/auth/config'
|
import { SESSION_STRATEGY } from '@/lib/auth/config'
|
||||||
import { COLLECTION_SLUG_SESSIONS } from '@/payload/collections/config'
|
import { COLLECTION_SLUG_SESSIONS } from '@/payload/collections/config'
|
||||||
@ -16,3 +16,4 @@ export const revalidateUser = async (user: User, payload: Payload) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import configPromise from '@payload-config'
|
import configPromise from '@payload-config'
|
||||||
import { getPayloadHMR as getPayloadInstance } from '@payloadcms/next/utilities'
|
import { getPayloadHMR as getPayloadInstance } from '@payloadcms/next/utilities'
|
||||||
import { headers as getHeaders } from 'next/headers'
|
import { headers as getHeaders } from 'next/headers'
|
||||||
import type { User } from '~/payload-types'
|
import type { User } from 'types/payload-types'
|
||||||
|
|
||||||
export async function getPayload(): ReturnType<typeof getPayloadInstance> {
|
export async function getPayload(): ReturnType<typeof getPayloadInstance> {
|
||||||
return getPayloadInstance({ config: await configPromise })
|
return getPayloadInstance({ config: await configPromise })
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "preserve",
|
"jsx": "react-jsx",
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user