The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS.
MIT License
Bot releases are visible (Hide)
Published by denolfe 2 months ago
Published by denolfe 2 months ago
Published by denolfe 2 months ago
adjusts auth hydration from server (#7545) (e905675)
Fixes https://github.com/payloadcms/payload/issues/6823
Allows the server to initialize the AuthProvider via props. Renames
HydrateClientUser
to HydrateAuthProvider
. It now only hydrates the
permissions as the user can be set from props. Permissions can be
initialized from props, but still need to be hydrated for some pages as
access control can be specific to docs/lists etc.
HydrateClientUser
to HydrateAuthProvider
⚠️ bump next canary to 104 and update withPayload for new config (#7541) (8d1fc6e)
We are now bumping up the Next canary version to 15.0.0-canary.104
and
react
and react-dom
to ^19.0.0-rc-06d0b89e-20240801
.
Your new dependencies should look like this:
"next": "15.0.0-canary.104",
"react": "^19.0.0-rc-06d0b89e-20240801",
"react-dom": "^19.0.0-rc-06d0b89e-20240801",
richtext-lexical: html converters not respecting overrideAccess property when populating values, in local API (c15d679)
Published by denolfe 3 months ago
hasMany
text going outside of input boundaries (#7455) (3f5403a)payload.db.defaultIDType
(#7416) (62666a9)updated admin UI (#7424) (68553ff)
Merriweather
font, you will need to manuallynext/font
in your own project.richtext-lexical: upgrade lexical from 0.16.1 to 0.17.0 (e65b647)
Published by denolfe 3 months ago
Published by denolfe 3 months ago
basePath
into logout component link (#7451) (3d89508)Published by denolfe 3 months ago
abort()
call signal error (#7390) (5655266)ui: passes field props to custom components (#7360) (97837f0)
Currently, there is no way to read field props from within a custom
field component, i.e. admin.components.Description
. For example, if
you set maxLength: 100
on your field, your custom description
component cannot read it from props.maxLength
or any other methods.
Because these components are rendered on the server, there is also no
way of using admin.component.Field
to inject custom props yourself,
either. To support this, we can simply pass the base component props
into these components on the server, as expected. This has also led to
custom field component props becoming more strictly typed within the
config.
This change is considered breaking only because the types have changed.
This only affects you if you were previously importing the following
types into your own custom components. To migrate, simply change the
import paths for that type.
Old:
import type {
ArrayFieldProps,
ReducedBlock,
BlocksFieldProps,
CheckboxFieldProps,
CodeFieldProps,
CollapsibleFieldProps,
DateFieldProps,
EmailFieldProps,
GroupFieldProps,
HiddenFieldProps,
JSONFieldProps,
NumberFieldProps,
PointFieldProps,
RadioFieldProps,
RelationshipFieldProps,
RichTextComponentProps,
RowFieldProps,
SelectFieldProps,
TabsFieldProps,
TextFieldProps,
TextareaFieldProps,
UploadFieldProps,
ErrorProps,
FormFieldBase,
FieldComponentProps,
FieldMap,
MappedField,
MappedTab,
ReducedBlock,
} from '@payloadcms/ui'
New:
import type {
FormFieldBase,
// etc.
} from 'payload'
Custom field components are now much more strongly typed. To make this
happen, an explicit type for every custom component has been generated
for every field type. The convention is to append
DescriptionComponent
, LabelComponent
, and ErrorComponent
onto the
end of the field name, i.e. TextFieldDescriptionComponent
. Here's an
example:
import type { TextFieldDescriptionComponent } from 'payload'
import React from 'react'
export const CustomDescription: TextFieldDescriptionComponent = (props) => {
return (
<div id="custom-field-description">{`The max length of this field is: ${props?.maxLength}`}</div>
)
}
Here's the full list of all new types:
Label Components:
import type {
ArrayFieldLabelComponent,
BlocksFieldLabelComponent,
CheckboxFieldLabelComponent,
CodeFieldLabelComponent,
CollapsibleFieldLabelComponent,
DateFieldLabelComponent,
EmailFieldLabelComponent,
GroupFieldLabelComponent,
HiddenFieldLabelComponent,
JSONFieldLabelComponent,
NumberFieldLabelComponent,
PointFieldLabelComponent,
RadioFieldLabelComponent,
RelationshipFieldLabelComponent,
RichTextFieldLabelComponent,
RowFieldLabelComponent,
SelectFieldLabelComponent,
TabsFieldLabelComponent,
TextFieldLabelComponent,
TextareaFieldLabelComponent,
UploadFieldLabelComponent
} from 'payload'
Error Components:
import type {
ArrayFieldErrorComponent,
BlocksFieldErrorComponent,
CheckboxFieldErrorComponent,
CodeFieldErrorComponent,
CollapsibleFieldErrorComponent,
DateFieldErrorComponent,
EmailFieldErrorComponent,
GroupFieldErrorComponent,
HiddenFieldErrorComponent,
JSONFieldErrorComponent,
NumberFieldErrorComponent,
PointFieldErrorComponent,
RadioFieldErrorComponent,
RelationshipFieldErrorComponent,
RichTextFieldErrorComponent,
RowFieldErrorComponent,
SelectFieldErrorComponent,
TabsFieldErrorComponent,
TextFieldErrorComponent,
TextareaFieldErrorComponent,
UploadFieldErrorComponent
} from 'payload'
Description Components:
import type {
ArrayFieldDescriptionComponent,
BlocksFieldDescriptionComponent,
CheckboxFieldDescriptionComponent,
CodeFieldDescriptionComponent,
CollapsibleFieldDescriptionComponent,
DateFieldDescriptionComponent,
EmailFieldDescriptionComponent,
GroupFieldDescriptionComponent,
HiddenFieldDescriptionComponent,
JSONFieldDescriptionComponent,
NumberFieldDescriptionComponent,
PointFieldDescriptionComponent,
RadioFieldDescriptionComponent,
RelationshipFieldDescriptionComponent,
RichTextFieldDescriptionComponent,
RowFieldDescriptionComponent,
SelectFieldDescriptionComponent,
TabsFieldDescriptionComponent,
TextFieldDescriptionComponent,
TextareaFieldDescriptionComponent,
UploadFieldDescriptionComponent
} from 'payload'
This PR also:
FieldBase['label']
type with a new LabelStatic
<Omit>
, etc.ui: update the names of internal components so that they respect eslint rules (#7362) (e734d51)
So _Upload
becomes UploadComponent
which doesnt break the naming
convention of react components and we no longer export these internal
components
Published by denolfe 3 months ago
Published by denolfe 3 months ago
Published by denolfe 3 months ago
700% faster deepCopyObject, refactor deep merging and deep copying, type improvements (#7272) (c45fbb9)
deepMerge
exported from payload now handles more complex data anddeepMergeSimple
combineMerge
is no longer exported. You can usedeepMergeWithCombinedArrays
insteaddeepCopyObject
and isPlainObject
maynew server-only, faster and immediate autoLogin (#7224) (a7b0f8b)
autoLogin
without prefillOnly
set now also affects graphQL/RestautoLogin
will be returned.Published by denolfe 3 months ago
Published by denolfe 3 months ago
Duplicate of #7146 but for beta. If you were using the AfterMeHook
, AfterLogoutHook
, or AfterRefreshHook
, these types have been renamed and are now prefixed with Collection
to match all other hook naming conventions, just as the documentation already indicates.
Old:
import type { AfterMeHook, AfterLogoutHook, AfterRefreshHook } from 'payload'
New:
import type { CollectionAfterMeHook, CollectionAfterLogoutHook, CollectionAfterRefreshHook } from 'payload'
Published by denolfe 3 months ago
Published by denolfe 3 months ago
Published by denolfe 3 months ago
Fixes publishing issue
Published by denolfe 3 months ago
Published by denolfe 3 months ago
BREAKING:
- Upgrades minimum supported @types/react version from
npm:[email protected] to npm:[email protected]- Upgrades minimum supported @types/react-dom version from
npm:[email protected] to npm:[email protected]- Upgrades minimum supported react and react-dom version from
19.0.0-rc-f994737d14-20240522 to 19.0.0-rc-6230622a1a-20240610