Commit Graph

1451 Commits

Author SHA1 Message Date
Alessio Gravili
f7a2cf96b9 chore: properly working generated types within tests (#6288) 2024-05-09 17:12:51 -04:00
Alessio Gravili
cfeac79b99 feat!: fix non-functional custom RSC component handling, separate label and description props, fix non-functional label function handling (#6264)
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
2024-05-09 17:12:01 -04:00
Jacob Fletcher
9e9111666b chore(examples/live-preview): migrates to 3.0 (#6268) 2024-05-09 15:32:46 -04:00
Alessio Gravili
43b7ba82da chore: fix dev:generate-types not working (#6284) 2024-05-09 10:37:11 -04:00
Kendell Joseph
4c6aaafe88 feat(ui): toggle sortable arrays and blocks (#6008) 2024-05-08 13:28:26 -04:00
Jacob Fletcher
731f023c6d feat: ssr live preview (#6239) 2024-05-08 11:08:15 -04:00
Alessio Gravili
8e55a2a866 feat(richtext-lexical)!: strongly typed PluginComponent types, remove LexicalBlocks, improve exports, fix e2e (#6255)
**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.
2024-05-07 16:26:28 -04:00
Jarrod Flesch
51149c75ff fix: threads draft arg through for child resolvers in GraphQL queries (#6196) 2024-05-04 16:43:17 -04:00
Alessio Gravili
c462bf229f feat(richtext-lexical)!: add FixedToolbarFeature (#6192)
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`
2024-05-03 19:55:26 -04:00
Elliot DeNolf
9c13089a2f chore: add dotenv to test dir [skip ci] 2024-05-03 13:42:01 -04:00
Paul
b642cb2d93 chore!: update plugin exports to be named and consistent (#6195)
BREAKING CHANGE: All plugins have been updated to use named exports and the names have been updated to be consistent.

// 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'
2024-05-03 13:36:36 -03:00
Jarrod Flesch
e25814e1ee fix: cascade graphql locales through relationships (#6166) 2024-05-03 08:33:53 -04:00
Jarrod Flesch
27ea117731 fix: only allow save after form is modified (#6189) 2024-05-03 08:28:37 -04:00
Alessio Gravili
7ab156e117 feat(richtext-lexical)!: finalize ClientFeature interface (#6191)
**BREAKING:**
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
2024-05-02 21:38:15 -04:00
Paul
75a95469b2 feat(plugin-stripe): update plugin stripe for v3 (#6019) 2024-05-02 16:19:27 -03:00
Jarrod Flesch
c0ae287d46 fix: reset password validations (#6153)
Co-authored-by: Elliot DeNolf <denolfe@gmail.com>
Co-authored-by: James <james@trbl.design>
Co-authored-by: Alessio Gravili <alessio@gravili.de>
2024-05-02 15:08:47 -04:00
Alessio Gravili
bcb3f08386 chore: hide test flakes, improve playwright CI logs, significantly reduce playwright timeouts, add back test retries, cache playwright browsers in CI, disable CI telemetry, improve test throttle utility (#6155) 2024-05-01 17:35:41 -04:00
Elliot DeNolf
c6132df866 chore: rename resend package (#6168) 2024-05-01 12:02:40 -04:00
Alessio Gravili
d8f91cc94c feat(richtext-lexical)!: various validation improvement (#6163)
BREAKING: 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
2024-05-01 11:33:02 -04:00
Alessio Gravili
568b074809 fix: various loader issues (#6090) 2024-05-01 10:45:28 -04:00
Alessio Gravili
401c16e485 chore: lexical int tests: do not use relationTo to collection with rich text relationships disabled 2024-05-01 00:47:40 -04:00
Alessio Gravili
5a82f34801 feat(richtext-lexical)!: change link fields handling (#6162)
**BREAKING:**
- 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:**
```ts
 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:**
```ts
 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.',
        },
      },
    ],
  }),
2024-04-30 23:01:08 -04:00
Alessio Gravili
d9bb51fdc7 feat(richtext-lexical)!: initialize lexical during sanitization (#6119)
BREAKING:

- sanitizeFields is now an async function
- the richText adapters now return a function instead of returning the adapter directly
2024-04-30 15:09:32 -04:00
Elliot DeNolf
dc31d9c715 test: parse and update tsconfig in before test hook 2024-04-30 00:24:06 -04:00
Elliot DeNolf
45b3f06e1b chore: implement better tsconfig reset mechanism 2024-04-29 23:23:09 -04:00
Elliot DeNolf
3d50caf985 feat: implement resend rest email adapter (#5916) 2024-04-29 22:06:53 -04:00
Jacob Fletcher
4d7ef58e7e fix: blocks non-admin users from admin access (#6127) 2024-04-29 19:53:18 -04:00
James Mikrut
d8c3127b09 fix: local req missing url headers (#6126)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2024-04-29 16:40:59 -04:00
Elliot DeNolf
2e77bdf11e test: add test email adapter, use for all tests by default (#6120) 2024-04-29 14:38:35 -04:00
Jacob Fletcher
fa89057aac fix(next,ui): properly sets document operation for globals (#6116) 2024-04-29 13:58:06 -04:00
Alessio Gravili
943681ae3c chore: upgrade typescript from 5.4.4 to 5.4.5 (#6093) 2024-04-28 17:46:41 -04:00
Alessio Gravili
361d12e97c chore: loader test: use importConfig helper instead of manually registering loader to realistically test what a user would experience 2024-04-28 16:04:11 -04:00
Elliot DeNolf
9c2585ba86 chore(eslint): no-relative-monorepo-imports on package dir, other cleanup 2024-04-28 14:49:48 -04:00
Alessio Gravili
74eb71c304 chore: add failing loader test case 2024-04-27 21:13:38 -04:00
Dan Ribbens
81fb0515fb fix: bulk publish from collection list (#6065) 2024-04-26 15:46:02 -04:00
Jarrod Flesch
20355a4dd4 fix: version restoration (#6040) 2024-04-25 14:15:12 -04:00
Jarrod Flesch
22c53392a3 chore: improves types for payloadRequest (#6012) 2024-04-25 10:23:03 -04:00
Paul
bdaa9e831d chore: add e2e tests for creating first user (#6027) 2024-04-25 10:57:50 -03:00
James Mikrut
036bcd6b8f chore: adds uuid to test (#6030) 2024-04-25 09:51:49 -04:00
Dan Ribbens
4d2bc861cf fix: disable api key beta (#6021) 2024-04-25 09:39:30 -04:00
James Mikrut
629d7c3263 fix(db-postgres): fully functional dbNames (#6023) 2024-04-24 22:42:24 -04:00
James
7d531646fd Merge branch 'fix/create-first-user-pt2' of github.com:payloadcms/payload into fix/create-first-user-pt2 2024-04-24 18:05:02 -04:00
Dan Ribbens
94f1dfef52 fix: bulk publish (#6007) 2024-04-24 15:05:02 -04:00
Elliot DeNolf
0857dbe465 Revert "fix: issues creating the first user (#5986)"
This reverts commit 0ede95f375.
2024-04-24 14:36:08 -04:00
Paul
24b18fb0fd feat!: removed getDataAndFile and getLocales from createPayloadRequest in favour of new utilities addDataAndFileToRequest and addLocalesToRequest (#5999) 2024-04-24 13:31:54 -03:00
Dan Ribbens
47e70abb4e fix: type collection config missing dbName (#5983) 2024-04-24 11:32:59 -04:00
Paul
0ede95f375 fix: issues creating the first user (#5986)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2024-04-24 11:30:52 -04:00
Jarrod Flesch
b723efdd3b chore: fixing flakey tests (#5984) 2024-04-24 00:44:43 -04:00
Alessio Gravili
a1f6bf8a67 fix(richtext-lexical): Heading feature: enabledHeadingSizes not being applied 2024-04-23 20:37:11 -04:00
Alessio Gravili
da5028cdee feat(richtext-lexical): show loading indicator while block nodes are loading 2024-04-23 20:22:18 -04:00