feat(cms): add @payloadcms/plugin-form-builder
This commit is contained in:
parent
4bda57b903
commit
7223200d42
3 changed files with 51 additions and 0 deletions
|
|
@ -42,6 +42,7 @@
|
|||
"@payloadcms/email-resend": "^3.84.1",
|
||||
"@payloadcms/live-preview-react": "^3.84.1",
|
||||
"@payloadcms/next": "^3.84.0",
|
||||
"@payloadcms/plugin-form-builder": "^3.84.1",
|
||||
"@payloadcms/plugin-redirects": "^3.84.1",
|
||||
"@payloadcms/plugin-seo": "^3.84.1",
|
||||
"@payloadcms/richtext-lexical": "^3.84.0",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { postgresAdapter } from '@payloadcms/db-postgres'
|
|||
import { lexicalEditor } from '@payloadcms/richtext-lexical'
|
||||
import { seoPlugin } from '@payloadcms/plugin-seo'
|
||||
import { redirectsPlugin } from '@payloadcms/plugin-redirects'
|
||||
import { formBuilderPlugin } from '@payloadcms/plugin-form-builder'
|
||||
import { resendAdapter } from '@payloadcms/email-resend'
|
||||
import sharp from 'sharp'
|
||||
import path from 'path'
|
||||
|
|
@ -141,6 +142,31 @@ export default buildConfig({
|
|||
return d.excerpt ?? d.shortDesc ?? d.heroSubtitle ?? ''
|
||||
},
|
||||
}),
|
||||
formBuilderPlugin({
|
||||
fields: {
|
||||
text: true,
|
||||
textarea: true,
|
||||
select: true,
|
||||
radio: true,
|
||||
email: true,
|
||||
number: true,
|
||||
message: true,
|
||||
date: true,
|
||||
checkbox: true,
|
||||
state: false,
|
||||
country: false,
|
||||
payment: false,
|
||||
},
|
||||
defaultToEmail: process.env['MANAGER_EMAILS']?.split(',')[0] ?? '',
|
||||
redirectRelationships: ['pages'],
|
||||
formOverrides: {
|
||||
admin: { group: 'Форми' },
|
||||
access: { read: () => true },
|
||||
},
|
||||
formSubmissionOverrides: {
|
||||
admin: { group: 'Форми' },
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
admin: {
|
||||
|
|
|
|||
24
pnpm-lock.yaml
generated
24
pnpm-lock.yaml
generated
|
|
@ -20,6 +20,9 @@ importers:
|
|||
'@payloadcms/next':
|
||||
specifier: ^3.84.0
|
||||
version: 3.84.1(@types/react@19.2.14)(graphql@16.14.0)(monaco-editor@0.55.1)(next@16.2.6(@babel/core@7.29.0)(@playwright/test@1.60.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(sass@1.77.4))(payload@3.84.1(graphql@16.14.0)(typescript@6.0.3))(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(typescript@6.0.3)
|
||||
'@payloadcms/plugin-form-builder':
|
||||
specifier: ^3.84.1
|
||||
version: 3.84.1(@types/react@19.2.14)(monaco-editor@0.55.1)(next@16.2.6(@babel/core@7.29.0)(@playwright/test@1.60.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(sass@1.77.4))(payload@3.84.1(graphql@16.14.0)(typescript@6.0.3))(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(typescript@6.0.3)
|
||||
'@payloadcms/plugin-redirects':
|
||||
specifier: ^3.84.1
|
||||
version: 3.84.1(payload@3.84.1(graphql@16.14.0)(typescript@6.0.3))
|
||||
|
|
@ -1551,6 +1554,13 @@ packages:
|
|||
next: '>=15.2.9 <15.3.0 || >=15.3.9 <15.4.0 || >=15.4.11 <15.5.0 || >=16.2.2 <17.0.0'
|
||||
payload: 3.84.1
|
||||
|
||||
'@payloadcms/plugin-form-builder@3.84.1':
|
||||
resolution: {integrity: sha512-pEr4QFceswL+3dpZWtzlLHyED8nxk7iukm/eNUxNn9vaUfb2xcqzQf6xRmoJra9R1yDx6mdC/DU+Whg5Op/yfQ==}
|
||||
peerDependencies:
|
||||
payload: 3.84.1
|
||||
react: ^19.0.1 || ^19.1.2 || ^19.2.1
|
||||
react-dom: ^19.0.1 || ^19.1.2 || ^19.2.1
|
||||
|
||||
'@payloadcms/plugin-redirects@3.84.1':
|
||||
resolution: {integrity: sha512-izKKI5Mm6nosetsAxlqbdOKxraYPlHSGy246D4YbsDemAV4CLOpGcQKTaeTW/JAqYt+RlcvzcWXm0qNMX+2MeQ==}
|
||||
peerDependencies:
|
||||
|
|
@ -6996,6 +7006,20 @@ snapshots:
|
|||
- supports-color
|
||||
- typescript
|
||||
|
||||
'@payloadcms/plugin-form-builder@3.84.1(@types/react@19.2.14)(monaco-editor@0.55.1)(next@16.2.6(@babel/core@7.29.0)(@playwright/test@1.60.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(sass@1.77.4))(payload@3.84.1(graphql@16.14.0)(typescript@6.0.3))(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(typescript@6.0.3)':
|
||||
dependencies:
|
||||
'@payloadcms/ui': 3.84.1(@types/react@19.2.14)(monaco-editor@0.55.1)(next@16.2.6(@babel/core@7.29.0)(@playwright/test@1.60.0)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(sass@1.77.4))(payload@3.84.1(graphql@16.14.0)(typescript@6.0.3))(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(typescript@6.0.3)
|
||||
escape-html: 1.0.3
|
||||
payload: 3.84.1(graphql@16.14.0)(typescript@6.0.3)
|
||||
react: 19.2.6
|
||||
react-dom: 19.2.6(react@19.2.6)
|
||||
transitivePeerDependencies:
|
||||
- '@types/react'
|
||||
- monaco-editor
|
||||
- next
|
||||
- supports-color
|
||||
- typescript
|
||||
|
||||
'@payloadcms/plugin-redirects@3.84.1(payload@3.84.1(graphql@16.14.0)(typescript@6.0.3))':
|
||||
dependencies:
|
||||
'@payloadcms/translations': 3.84.1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue