payload

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

Downloads
1.5M
Stars
19.2K
Committers
263

Bot releases are hidden (Show)

payload -

Published by denolfe 5 months ago

2.18.2 (2024-05-17)

Bug Fixes

payload -

Published by denolfe 5 months ago

2.18.1 (2024-05-16)

Bug Fixes

payload -

Published by denolfe 5 months ago

2.18.0 (2024-05-16)

Features

Bug Fixes

  • db-postgres: filter with ID not_in AND queries - postgres (#6358) (cc94078), closes #5151
  • richtext-lexical: upload, relationship and block node insertion fails sometimes (#6390) (48a410e)
payload -

Published by denolfe 5 months ago

2.17.0 (2024-05-15)

Features

  • adds misc translations to API view and react select (#6138) (30e535b)

  • richtext-lexical: remove LexicalBlock, RichTextFieldRequiredEditor and FieldWithRichTextRequiredEditor types (#6279) (9df5ab8)

Bug Fixes

  • appends editDepth value to radio & checkbox IDs when inside drawer (#6181) (69c93d3)
  • collection labels with locales not working when creating new doc (#5995) (51efe4f)
  • safely access cookie header for uploads (#6367) (de92c50)
  • step-nav breadcrumbs ellipsis (#6345) (d02b1fb)

⚠ BREAKING CHANGES

  • richtext-lexical: remove LexicalBlock, RichTextFieldRequiredEditor and FieldWithRichTextRequiredEditor types (#6279)
payload - 3.0.0-beta.32

Published by denolfe 5 months ago

3.0.0-beta.32 (2024-05-14)

Features

  • richtext-lexical: add rootFeatures prop to lexicalEditor (#6360) (c8a1cca)
  • add missing server-only props to custom RSCs, improve req.user type, clean-up ui imports (#6355) (79f4907)
  • consolidates admin.logoutRoute and admin.inactivityRoute into admin.routes (#6354) (6a0fffe)

Bug Fixes

  • graphql: threads through correct draft value for upload relations (#6235) (6e116a7)

BREAKING CHANGES

  • add missing server-only props to custom RSCs, improve req.user type, clean-up ui imports (#6355) (79f4907)

Previously, we were only passing payload to RSCs. Now, we are passing the following props for component rendered outside buildComponentMap:

  • i18n,
  • locale,
  • params,
  • payload,
  • permissions,
  • searchParams,
  • user

And the following props for components rendered within buildComponentMap:

  • i18n,
  • payload,

Breaking:

if you use the following components in your own project, these now require aforementioned additional, server-only props, instead of just the payload prop:

  • Account view
  • Default Dashboard view
  • DefaultTemplate
  • WithServerSideProps
  • RenderCustomComponent (optional)
  • Logo

Additionally, if you were using an HOC as a custom component, and the HOC passed props to the client component, you now have to filter out the additional server-only props we provide. You can use our withMergedProps helper, which filters them automatically, >or mark your HOC with 'use client'.

  • consolidates admin.logoutRoute and admin.inactivityRoute into admin.routes (#6354) (6a0fffe)

The admin.logoutRoute and admin.inactivityRoute properties have been consolidated into a single admin.routes property. To migrate, simply move those two keys as follows:

Old way:

// payload.config.ts
{ 
  // ...
  admin: {
    logoutRoute: '/custom-logout',
    inactivityRoute: '/custom-inactivity'
  }
}

New way:

// payload.config.ts
{
  // ...
  admin: {
    routes: {
      logout: '/custom-logout',
      inactivity: '/custom-inactivity'
    }
  }
}

Contributors

  • Alessio Gravili (@AlessioGr)
  • Jacob Fletcher (@jacobsfletch)
  • Jarrod Flesch (@JarrodMFlesch)
payload - 3.0.0-beta.31

Published by denolfe 5 months ago

3.0.0-beta.31 (2024-05-14)

Features

Bug Fixes

  • ui: step-nav breadcrumbs ellipsis (#6344) (353c2b0)
  • collection labels with multiple locales showing incorrectly (#5998) (58bbbbd)
  • depth field in api view throws error when no value present (#6106) (fcee13b)
  • implements graphql schema generation (#6254) (3abc2e8)
  • next: replaces default svg favicons with png (a48043c)
  • named tab being required in generated types without any required fields (#6324) (aa5ad47)
  • payload: loader alias issues (#6341) (890c21d)
  • ui: properly adds readOnly styles to disabled radio fields (#6240) (c7635b2)
  • db-postgres: too many clients already, cannot read properties 'transaction' of undefined (#6338) (47cd5f4)
  • some custom components were not handled properly if they are RSCs (#6315) (0d98b4b)
  • wrong translation key being used as upload:Sizes instead of upload:sizes (#6323) (2f02b3a)

BREAKING CHANGES

BREAKING: all i18n functions are now strongly typed, which will create errors if you have custom translations. If you do, you will have to pass a generic to i18n containing the types of your custom translations

Example of adding your own translations to the default translations type on the client:

const linkTranslations = {
 en: {
   lexical: {
     link: {
       custom: 'Custom',
       internal: 'Internal',
     },
   },
 },
}

type LinkTranslationKeys = NestedKeysStripped<typeof linkTranslations.en>

type MyI18n = I18nClient<typeof linkTranslations.en, LinkTranslationKeys>

const myI18n: MyI18n

myI18n.t('lexical:link:custom') // custom translations have been ADDED to the default client translations

Example for the useTranslation hook within a component:

const linkTranslations = {
 en: {
   lexical: {
     link: {
       custom: 'Custom',
       internal: 'Internal',
     },
   },
 },
}

type LinkTranslationKeys = NestedKeysStripped<typeof linkTranslations.en>

export const MyComponent: React.FC = () => {
 const { i18n, t } = useTranslation<typeof linkTranslations.en, LinkTranslationKeys>()

 return t('lexical:link:custom')
}

The admin.favicon: string property has been succeeeded by admin.icons: string | Icons | Icon[]. See nextjs.org/docs/app/api-reference/functions/generate-metadata#icons for full details.

  • some custom components were not handled properly if they are RSCs (#6315) (0d98b4b)

Breaking: The following, exported components now need the payload object as a prop rather than the config object:

  • RenderCustomComponent (optional)
  • Logo
  • DefaultTemplate
  • DefaultNav

Contributors

  • Alessio Gravili (@AlessioGr)
  • Patrik (@PatrikKozak)
  • Jessica Chowdhury (@JessChowdhury)
  • Jacob Fletcher (@jacobsfletch)
  • Elliot DeNolf (@denolfe)
  • Jarrod Flesch (@JarrodMFlesch)
  • Paul (@paulpopus)
  • James Mikrut (@jmikrut)
  • Fredrik (@Livog)
payload - 3.0.0-beta.30

Published by denolfe 5 months ago

3.0.0-beta.30 (2024-05-10)

Features

  • storage-uploadthing package (#6316) (ed880d5)
  • payload, ui: adds disableListColumn & disableListFilter to fields admin props (#6238) (ea84e82)

Bug Fixes

  • richtext-slate: list item values returning null (#6291) (4216d69)
  • ui: appends editDepth value to radio & checkbox IDs when inside drawer (#6252) (dcad500)
  • next: respect fallback locale null value (#6207) (e96ff90)

Contributors

  • Elliot DeNolf (@denolfe)
  • Patrik (@PatrikKozak)
  • Paul (@paulpopus)
  • Ritsu (@r1tsuu)
payload - 3.0.0-beta.29

Published by denolfe 5 months ago

3.0.0-beta.29 (2024-05-09)

Features

  • fix non-functional custom RSC component handling, separate label and description props, fix non-functional label function handling (#6264) (cfeac79)

Bug Fixes

  • plugin-form-builder: resolve labelValue from LabelFunction (#5817) (5065322)
  • plugin-form-builder: export types correctly (#6287) (ad4796c)
  • templates: yarn install broken for new template installs (#6283) (3785c79)
  • templates: blank-3.0: pin next version, as it was breaking new installs (#6281) (9364f8d)

BREAKING CHANGES

  • fix non-functional custom RSC component handling, separate label and description props, fix non-functional label function handling (#6264) (cfeac79)

Breaking Changes:

  • Globals config: admin.description no longer accepts a custom component. You will have to move it to admin.components.elements.Description
  • Collections config: admin.description no longer accepts a custom component. You will have to move it to admin.components.edit.Description
  • All Fields: field.admin.description no longer accepts a custom component. You will have to move it to field.admin.components.Description
  • Collapsible Field: field.label no longer accepts a custom component. You will have to move it to field.admin.components.RowLabel
  • Array Field: field.admin.components.RowLabel no longer accepts strings or records
  • If you are using our exported field components in your own app, their labelProps property has been stripped down and no longer contains the label and required prop. Those can now only be configured at the top-level

Contributors

  • Alessio Gravili (@AlessioGr)
  • Elliot DeNolf (@denolfe)
  • Jacob Fletcher (@jacobsfletch)
  • David Velasco (@davelsan)
  • Paul (@paulpopus)
  • Jarrod Flesch (@JarrodMFlesch)
payload - 3.0.0-beta.27

Published by denolfe 6 months ago

3.0.0-beta.27 (2024-05-08)

Features

  • release live-preview and live-preview-react
  • ui: toggle sortable arrays and blocks (#6008) (4c6aaaf)

Contributors

  • Kendell Joseph (@kendelljoseph)
  • Elliot DeNolf (@denolfe)
payload - 3.0.0-beta.26

Published by denolfe 6 months ago

3.0.0-beta.26 (2024-05-08)

Features

  • ssr live preview (#6239) (731f023)
  • improves crop rendering in thumbnail (#6260) (a7ac5ef)
  • richtext-lexical: strongly typed PluginComponent types, remove LexicalBlocks, improve exports, fix e2e (#6255) (8e55a2a)
  • richtext-lexical: improve draggable block indicator style and animations (f5fb095)
  • richtext-lexical: add maxDepth property to various lexical features (#6242) (721919f)

Bug Fixes

  • richtext-lexical: various UX improvements (#6241) (0f306da)
  • richtext-lexical: fixed toolbar actions not ensuring editor focus, various link editor selection issues (ba9ea5c)
  • richtext-lexical: fixed toolbar not wrapping correctly on small screen sizes (53b7d6f)
  • properly extracts fallbackLang (#6237) (ac5d744)
  • richtext-lexical: ensure inline toolbar is positioned between link editor and fixed toolbar (b94a265)
  • richtext-lexical: text within relationship and upload node components was not able to be selected without selection resetting immediately (1ba3a92)
  • richtext-lexical: inline editor is overlapping the clickable link editor for the first line (9814fd7)
  • richtext-lexical: floating link editor did not properly hide if selection is not a range selection (20455f4)

BREAKING CHANGES

  • richtext-lexical: strongly typed PluginComponent types, remove LexicalBlocks, improve exports, fix e2e (#6255) (8e55a2a)

BREAKING:

  • Narrows the type of the plugins prop of lexical features. Client props are now also automatically provided to the plugin components. To migrate, type your plugin as either PluginComponent or PluginComponentWithAnchor.
  • BlockQuoteFeature has been renamed to BlockquoteFeature
  • createClientComponent is now exported only from /components
  • The LexicalBlocks and FieldWithRichTextRequiredEditor types have been removed in favor of just Blocks & Fields, as well as improved validation.
  • plugin-stripe: disables rest proxy by default (#6230) (e1ff92e)

Contributors

  • Jacob Fletcher (@jacobsfletch)
  • Elliot DeNolf (@denolfe)
  • Jarrod Flesch (@JarrodMFlesch)
  • Alessio Gravili (@AlessioGr)
payload -

Published by denolfe 6 months ago

2.16.1 (2024-05-07)

Features

  • richtext-lexical: add maxDepth property to various lexical features (#6250) (857b9a4), closes #6242

Bug Fixes

  • add index to version status field (#6256) (2972af2)
  • richtext-lexical: export missing HorizontalRuleFeature (#6236) (f829b08)
payload - 3.0.0-beta.25

Published by denolfe 6 months ago

3.0.0-beta.25 (2024-05-06)

Features

editor: lexicalEditor({
  features: ({ defaultFeatures }) => [
    ...defaultFeatures,
    FixedToolbarFeature(),
  ],
}),

CleanShot 2024-05-06 at 13 43 04@2x

Bug Fixes

  • threads draft arg through for child resolvers in GraphQL queries (#6196) (51149c7)
  • plugin-form-builder: custom formSubmission hooks overriding core ones (#6204) (8a452c4)

BREAKING CHANGES

  • plugin-stripe: add types exports and rename types to be more consistent with other plugins (#6216) (7f72006)

Some minor type renaming for consistency with other packages.

  • richtext-lexical: add FixedToolbarFeature (#6192) (c462bf2)

BREAKING:

  • The default inline toolbar has now been extracted into an InlineToolbarFeature. While it's part of the defaultFeatures, you might have to add it to your editor features if you are not including the defaultFeatures and still want to keep the inline toolbar (floating toolbar)
  • Some types have been renamed, e.g. InlineToolbarGroup is now ToolbarGroup, and InlineToolbarGroupItem is now ToolbarGroupItem
  • The displayName property of SlashMenuGroup and SlashMenuItem has been renamed to label to match the label prop of the toolbars
  • The inlineToolbarFeatureButtonsGroupWithItem, inlineToolbarFormatGroupWithItems and inlineToolbarTextDropdownGroupWithItems exports have been renamed to toolbarTextDropdownGroupWithItems, toolbarFormatGroupWithItems, toolbarFeatureButtonsGroupWithItems

Contributors

  • Elliot DeNolf (@denolfe)
  • Paul (@paulpopus)
  • Jarrod Flesch (@JarrodMFlesch)
  • Friggo (@MrFriggo)
  • Alessio Gravili (@AlessioGr)
  • Jacob Fletcher (@jacobsfletch)
payload -

Published by denolfe 6 months ago

2.16.0 (2024-05-06)

Features

  • adds disableListColumn, disableListFilter to fields admin props (#6188) (db4aace)

Bug Fixes

  • graphql upload relations returning null (#6233) (cac52da)
  • hide drag handles when admin.isSortable: false (#6225) (622cdb0)
  • plugin-form-builder: hook overrides not working as intended (#6203) (b735d6a)
payload - 3.0.0-beta.24

Published by denolfe 6 months ago

3.0.0-beta.24 (2024-05-03)

Features

  • next: supports custom login redirects in initPage (#6186) (ea917dd)
  • richtext-lexical: finalize ClientFeature interface (#6191) (7ab156e)

Bug Fixes

BREAKING CHANGES

  • update all plugin exports to be named and consistent (#6195) (b642cb2)

All plugins have been updated to use named exports and the names have been updated to be consistent.

Please read the list below and rename your import accordingly

// before
import { cloudStorage } from '@payloadcms/plugin-cloud-storage'
// current
import { cloudStoragePlugin } from '@payloadcms/plugin-cloud-storage'

// before
import { payloadCloud } from '@payloadcms/plugin-cloud'
// current
import { payloadCloudPlugin } from '@payloadcms/plugin-cloud'

// before
import formBuilder from '@payloadcms/plugin-form-builder'
// current
import { formBuilderPlugin } from '@payloadcms/plugin-form-builder'

// before
import { nestedDocs } from '@payloadcms/plugin-nested-docs'
// current
import { nestedDocsPlugin } from '@payloadcms/plugin-nested-docs'

// before
import { redirects } from '@payloadcms/plugin-redirects'
// current
import { redirectsPlugin } from '@payloadcms/plugin-redirects'

// before
import search from '@payloadcms/plugin-search'
// current
import { searchPlugin } from '@payloadcms/plugin-search'

// before
import { sentry } from '@payloadcms/plugin-sentry'
// current
import { sentryPlugin } from '@payloadcms/plugin-sentry'

// before
import { seo } from '@payloadcms/plugin-seo'
// current
import { seoPlugin } from '@payloadcms/plugin-seo'
  • richtext-lexical: finalize ClientFeature interface (#6191) (7ab156e)

If you have own, custom lexical features, there will be a bunch of breaking API changes for you. The saved JSON data is not affected.

  • floatingSelectToolbar has been changed to toolbarInline

  • slashMenu.dynamicOptions and slashMenu.options have been changed to slashMenu.groups and slashMenu.dynamicGroups

  • toolbarFixed.sections is now toolbarFixed.groups

  • Slash menu group options and toolbar group entries have both been renamed to items

  • Toolbar group item onClick has been renamed to onSelect to match slash menu properties

  • slashMenu item onSelect is no longer auto-wrapped inside an editor.update. If you perform editor updates in them, you have to wrap it inside an editor.update callback yourself. Within our own features this extra control has removed a good amount of unnecessary, nested editor.update calls, which is good

  • Slash menu items are no longer initialized using the new keyword, as they are now types and no longer classes. You can convert them to an object and add the key property as an object property instead of an argument to the previous SlashMenuItem constructor

  • CSS classnames for slash menu and toolbars, as well as their items, have changed

  • CheckListFeature is now exported as and has been renamed to ChecklistFeature

For guidance on migration, check out how we migrated our own features in this PR's diff: https://github.com/payloadcms/payload/pull/6191/files

Contributors

  • Elliot DeNolf (@denolfe)
  • Paul (@paulpopus)
  • Jessica Chowdhury (@JessChowdhury)
  • Jacob Fletcher (@jacobsfletch)
  • Jarrod Flesch (@JarrodMFlesch)
  • Alessio Gravili (@AlessioGr)
payload -

Published by denolfe 6 months ago

2.15.0 (2024-05-03)

Features

Bug Fixes

  • bulk publish from collection list (#6063) (84570e6)
  • cascade draft arg in nested GraphQL relationship queries (#6141) (a8ac8b4)
  • GraphQL nested relationships not respecting req locale (#6117) (3fccd34)
  • hide unusable fields from collection filter select (#6135) (2be5ad0)
  • incorrect localesNotSaved translation (#5996) (af67749)
  • plugin-cloud: purge cache for all sizes (#5301) (831f1ff)
  • properly adds readonly styles to disabled radio fields (#6176) (9b7e62d)
  • resets filter state when param state change within route (#6169) (6e38cc2)
  • richtext-lexical: drag and add block handles disappear too quickly for smaller screen sizes. (#6145) (24f6972)
  • richtext-lexical: floating toolbar caret positioned incorrectly for some line heights (#6151) (36b1f5a)
  • sanitizes fields in default edit view for drawer content (#6175) (43dab5c)
  • version restoration (#6039) (91bac9c)
payload - 3.0.0-beta.23

Published by denolfe 6 months ago

3.0.0-beta.23 (2024-05-02)

Features

  • plugin-stripe: update plugin stripe for v3 (#6019) (75a9546)

Bug Fixes

  • reset password validations (#6153) (c0ae287)
  • ui: watch "where" query param inside route and reset WhereBuilder (#6184) (a2b92aa)

Contributors

  • Elliot DeNolf (@denolfe)
  • Paul (@paulpopus)
  • Jarrod Flesch (@JarrodMFlesch)
  • Patrik (@PatrikKozak)
  • Friggo (@MrFriggo)
payload - 3.0.0-beta.22

Published by denolfe 6 months ago

3.0.0-beta.22 (2024-05-02)

Bug Fixes

  • templates: adds back missing CSS import in blank 3.0 template (#6183) (6d642fe)
  • next: ensures admin access only blocks admin routes (3290376)

Contributors

  • Yiannis Demetriades (@ydemetriades)
  • Jacob Fletcher (@jacobsfletch)
  • Alessio Gravili (@AlessioGr)
  • Wilson (@WilsonLe)
  • Tylan Davis (@tylandavis)
  • Paul (@paulpopus)
payload -

Published by denolfe 6 months ago

3.0.0-beta.21 (2024-05-01)

Features

  • richtext-lexical: various validation improvements (#6163) (d8f91cc)
  • richtext-lexical: add validation to link and upload nodes (8829fba)
  • richtext-lexical: link node: disable client-side link validation. This allows overriding validation behavior by providing your own url field to the Link feature. (01f38c4)
  • richtext-lexical: change link fields handling (#6162) (5a82f34)
  • richtext-lexical: initialize lexical during sanitization (#6119) (d9bb51f)
  • richtext-lexical: implement relationship node click and delete/backspace handling (#6147) (181f82f)
  • implement resend rest email adapter (#5916) (3d50caf)

Bug Fixes

  • templates: updates payload app files (#6172) (04f1df8)
  • deps: move file-type to deps (#6171) (1c490ae)
  • various loader issues (#6090) (568b074)
  • add missing error logger to buildFormState error catch (10b99ce)
  • richtext-slate: do not add empty fields group if no custom fields are added (5420d88)
  • richtext-lexical: floating toolbar caret positioned incorrectly for some line heights (#6149) (9a636a3)
  • richtext-lexical: drag and add block handles disappear too quickly for smaller screen sizes. (#6144) (6a9cde2)
  • blocks non-admin users from admin access (#6127) (4d7ef58)
  • importWithoutClientFiles not working due to incorrect import path used (cd5e8d7)
  • loader: typescript module resolver not resolving to source path of symlinked module (fa2083f)

BREAKING CHANGES

  • richtext-lexical: various validation improvement (#6163) (d8f91cc)

This will now display errors if you're previously had invalid link or upload fields data - for example if you have a required field added to an uploads node and did not provide a value to it every time you've added an upload node

  • richtext-lexical: change link fields handling (#6162) (5a82f34)
  • Drawer fields are no longer wrapped in a fields group. This might be breaking if you depend on them being in a field group in any way - potentially if you use custom link fields. This does not change how the data is saved
  • If you pass in an array of custom fields to the link feature, those were previously added to the base fields. Now, they completely replace the base fields for consistency. If you want to ADD fields to the base fields now, you will have to pass in a function and spread defaultFields - similar to how adding your own features to lexical works

Example Migration for ADDING fields to the link base fields:

Previous:

 LinkFeature({
    fields: [
      {
        name: 'rel',
        label: 'Rel Attribute',
        type: 'select',
        hasMany: true,
        options: ['noopener', 'noreferrer', 'nofollow'],
        admin: {
          description:
            'The rel attribute defines the relationship between a linked resource and the current document. This is a custom link field.',
        },
      },
    ],
  }),

Now:

 LinkFeature({
    fields: ({ defaultFields }) => [
      ...defaultFields,
      {
        name: 'rel',
        label: 'Rel Attribute',
        type: 'select',
        hasMany: true,
        options: ['noopener', 'noreferrer', 'nofollow'],
        admin: {
          description:
            'The rel attribute defines the relationship between a linked resource and the current document. This is a custom link field.',
        },
      },
    ],
  }),
"
  • richtext-lexical: initialize lexical during sanitization (#6119) (d9bb51f)
  • sanitizeFields is now an async function
  • the richText adapters now return a function instead of returning the adapter directly"
payload - v3.0.0-beta.20

Published by denolfe 6 months ago

What's Changed

⚠ BREAKING CHANGES:

@payloadcms/richtext-lexical

Upgrade lexical from 0.13.1 to 0.14.5 and backport other changes by @AlessioGr in https://github.com/payloadcms/payload/pull/6095

  • Lexical may introduce breaking changes in their updates. Please consult their changelog. One breaking change I noticed is that the SerializedParagraphNode now has a new, required textFormat property.
  • Now that lexical supports ESM, all CJS-style imports have been changed to ESM-style imports. You may have to do the same in your codebase if you import from lexical core packages

Full Changelog: https://github.com/payloadcms/payload/compare/v3.0.0-beta.18...v3.0.0-beta.20

payload -

Published by denolfe 6 months ago

2.14.2 (2024-04-26)

Bug Fixes