Compare commits

...

2816 Commits

Author SHA1 Message Date
Elliot DeNolf
6ea6172afa chore(release): db-postgres/0.5.2 [skip ci] 2024-02-09 09:06:15 -05:00
Elliot DeNolf
486774796d chore(release): db-mongodb/1.4.1 [skip ci] 2024-02-09 09:06:06 -05:00
Elliot DeNolf
1cd1c38764 chore(release): payload/2.10.1 [skip ci] 2024-02-09 09:04:42 -05:00
Elliot DeNolf
f6d7da7510 fix: clearable cells handle null values (#5038) 2024-02-09 08:59:38 -05:00
Elliot DeNolf
cdc4cb971b fix(db-mongodb): handle null values with exists (#5037) 2024-02-09 08:58:10 -05:00
Elliot DeNolf
e0191b54e1 chore(release): richtext-lexical/0.6.1 [skip ci] 2024-02-08 11:49:02 -05:00
Alessio Gravili
2315781f18 fix(richtext-lexical): make editor reactive to initialValue changes (#5010) 2024-02-08 15:30:21 +01:00
Elliot DeNolf
a0a58e7fd2 fix: query relationships by explicit id field (#5022) 2024-02-07 14:18:13 -05:00
Jessica Chowdhury
e1813fb884 fix: ensures docs with the same id are shown in relationship field select (#4859) 2024-02-07 14:04:03 -05:00
Elliot DeNolf
da184d40ec fix(db-postgres): handle nested docs with drafts (#5012) 2024-02-06 21:27:33 -05:00
Elliot DeNolf
ca8675f89d chore(release): plugin-seo/2.2.1 [skip ci] 2024-02-06 15:41:58 -05:00
Elliot DeNolf
e8c6c9338d chore(release): db-postgres/0.5.1 [skip ci] 2024-02-06 15:41:35 -05:00
Elliot DeNolf
558534aff8 chore(release): richtext-lexical/0.6.0 [skip ci] 2024-02-06 15:41:04 -05:00
Elliot DeNolf
29c901ba9b chore(release): payload/2.10.0 [skip ci] 2024-02-06 15:38:33 -05:00
Elliot DeNolf
f3876c2a39 fix(db-postgres): localized field sort count (#4997)
* fix(db-postgres): localized field sort count

* test: localized sort doc count
2024-02-06 11:44:54 -05:00
Elliot DeNolf
c3a3942969 fix(db-postgres): filtering relationships with drafts enabled (#4998)
* fix(db-postgres): filtering relationships with drafts enabled

* test: draft relationship filtering
2024-02-06 11:16:27 -05:00
Paul
23b135b963 fix(templates): fix conflicting routes with Nextjs (#4725)
* Updated templates and readme to note conflicting routes

* Move information in readmes to blockquotes and move next-api to just next

* Remove unnecessary notes
2024-02-06 10:56:20 -05:00
Daniel Kirchhof
e3c8105cc2 feat: use deletion success message from server if provided (#4966) 2024-02-06 10:17:53 -05:00
Jarrod Flesch
2c71aaef75 chore: standardize req passed through the local API (#4994) 2024-02-05 15:43:59 -05:00
brachypelma
922fb9b7fa docs: added link to JSON field type (#4989) 2024-02-05 13:13:28 -05:00
Elliot DeNolf
0740d5095e fix(migrations): safely create migration file when no name passed (#4995) 2024-02-05 10:43:19 -05:00
Jacob Fletcher
b392d656fe chore(examples/multi-tentant): resets lastLoggedInTenant when none found (#4984) 2024-02-02 15:50:12 -05:00
Elliot DeNolf
c0eef90cdc ci: supabase (#4983)
* ci: supabase

* test: add supabase to adapter record

* test: adjust index tests conditional
2024-02-02 15:26:18 -05:00
Dan Ribbens
db22cbdf21 fix(plugin-seo): tabbedUI with email field causes duplicate field (#4944)
* fix(plugin-seo): tabbedUI with email field causes duplicate field

* chore(plugin-seo): code comment
2024-02-02 14:53:51 -05:00
Dan Ribbens
1e8a6b7899 feat: extend transactions to cover after and beforeOperation hooks (#4960)
* feat: extend transactions to cover after and beforeOperation hooks

* feat: use transactions in refresh operation

* docs: add req to beforeOperation and afterOperation args
2024-02-02 14:53:14 -05:00
Dan Ribbens
5d934ba02d feat: previousValue and previousSiblingDoc args added to beforeChange field hooks (#4958)
* feat: previousValue and previousSiblingDoc args added to beforeChange field hooks

* chore: fieldHook type docs
2024-02-02 13:59:11 -05:00
Elliot DeNolf
f651665f2f chore(deps): add pnpm overrides for common packages (#4980)
* chore(deps): add pnpm overrides for common packages

* chore(deps): bump @swc/core for compat w/ latest typescript
2024-02-02 13:21:57 -05:00
Elliot DeNolf
5d3659d48a fix(db-postgres): handle schema changes with supabase (#4968)
* fix(db-postgres): handle schema changes with supabase

* chore(deps): bump drizzle-orm for test suite
2024-02-02 11:29:32 -05:00
Dan Ribbens
47106d5a1a fix(db-postgres): indexes not creating for relationships, arrays, hasmany and blocks (#4976) 2024-02-02 11:16:21 -05:00
Jarrod Flesch
afa2b942e0 fix: ensures docPermissions fallback to collection permissions on create (#4969) 2024-02-01 16:54:52 -05:00
Dan Ribbens
20ddd0de5b chore: add indexes to preferences for performance (#4965) 2024-02-01 15:31:31 -05:00
Dan Ribbens
64f705c3c9 fix(db-postgres): indexes not created for non unique field names (#4967) 2024-02-01 15:21:15 -05:00
Daniel Shamburger
b30ea8aa6b docs: typo (#4948) 2024-01-31 15:40:55 -05:00
Mark Paolo Libunao
471d2113a7 feat: re-use existing logger instance passed to payload.init (#3124) 2024-01-31 15:40:14 -05:00
Alessio Gravili
8725d41164 feat: add more options to addFieldStatePromise so that it can be used for field flattening (#4799) 2024-01-30 23:02:58 +01:00
Dan Ribbens
0bd81aa25a fix(templates-ecommerce): hook errors for non-string ids (#4946) 2024-01-30 13:28:14 -05:00
Dan Ribbens
8c09ca9be5 examples: fix multi-tenant hooks to use transactions (#4955) 2024-01-30 13:26:13 -05:00
Alessio Gravili
90d7ee3e65 feat(richtext-lexical): Blocks: generate type definitions for blocks fields (#4529) 2024-01-30 16:51:18 +01:00
Kendell Joseph
58bbd8c00f chore(examples/hierarchy): adds hierarchy example (#4923) 2024-01-26 16:17:11 -05:00
Elliot DeNolf
003ad065c3 chore(release): plugin-cloud-storage/1.1.2 [skip ci] 2024-01-26 13:58:13 -05:00
Elliot DeNolf
70715926a8 chore(release): richtext-slate/1.4.0 [skip ci] 2024-01-26 13:57:45 -05:00
Elliot DeNolf
b3a6bfacf2 chore(release): db-postgres/0.5.0 [skip ci] 2024-01-26 13:57:34 -05:00
Elliot DeNolf
e1d9accb27 chore(release): db-mongodb/1.4.0 [skip ci] 2024-01-26 13:57:23 -05:00
Elliot DeNolf
f2f55a84cc chore(release): payload/2.9.0 [skip ci] 2024-01-26 13:55:20 -05:00
Dan Ribbens
eba53ba60a feat: forceAcceptWarning migration arg added to accept prompts (#4874)
* chore: gitignore test migrations

* feat: `forceAcceptWarning` migration args added to accept prompts

* chore: migrationDir env variable fallback

* chore: migrationDir testSuiteDir fallback

* chore: migrationDir testSuiteDir fallback fix

* chore: skip migrate down test
2024-01-26 13:48:53 -05:00
Dan Ribbens
f73d503fec fix(plugin-cloud-storage): slow get file performance large collections (#4927) 2024-01-26 13:43:55 -05:00
Dan Ribbens
6930c4e9f2 fix: upload input drawer does not show draft versions (#4903)
* chore: add field classname to upload field

* fix: upload input drawer does not show draft versions
2024-01-26 13:42:32 -05:00
Dan Ribbens
3eb681e847 fix: afterLogin hook write conflicts (#4904)
* fix: afterLogin hook conflict

* test: afterLogin hook returns for assertion

* chore: commit increment login attempt
2024-01-26 13:39:45 -05:00
Jarrod Flesch
cb4638cfa1 chore: make default views callable (#4928) 2024-01-26 13:38:36 -05:00
Dan Ribbens
b40e9f85a2 chore: use transactions in tests running mongoDB memory server (#4750)
* chore: use transactions in tests running mongoDB memory server

* chore: relationship test async setup changes

* chore: async test fix

* chore: flaky e2e localization test
2024-01-23 19:18:55 -05:00
Dan Ribbens
e5a7907a72 fix: remove No Options dropdown from hasMany fields (#4899) 2024-01-23 10:00:16 -05:00
Jarrod Flesch
3f25d1ca84 chore: re-orders request language detection (#4890) 2024-01-22 11:53:01 -05:00
Timothy Choi
d5720bea7b chore: add fieldIsGroupType type guard helper (#4872) 2024-01-19 14:19:35 -05:00
Jesse Sivonen
8ce15c8b07 fix(db-postgres): query unset relation (#4862) 2024-01-19 13:35:58 -05:00
Timothy Choi
9f5efef78f chore: lint #4766 (#4801)
* fix: import location for config test

* fix: linting fix
2024-01-18 09:25:52 -05:00
Dan Ribbens
dfba5222f3 fix(db-postgres): migrate down error (#4861) 2024-01-17 13:55:57 -05:00
Dan Ribbens
b99d24fcfa fix: migrate down missing filter for latest batch (#4860) 2024-01-17 13:54:30 -05:00
Elliot DeNolf
836ed77568 chore: update changelog [skip ci] 2024-01-16 16:39:42 -05:00
Elliot DeNolf
1c5d5b07c8 chore(release): plugin-seo/2.2.0 [skip ci] 2024-01-16 16:33:53 -05:00
Elliot DeNolf
da5f1f2240 chore(release): plugin-form-builder/1.2.0 [skip ci] 2024-01-16 16:33:44 -05:00
Elliot DeNolf
c84c58c7b4 chore(release): db-postgres/0.4.0 [skip ci] 2024-01-16 16:33:21 -05:00
Elliot DeNolf
1c1b8f3cec chore(release): db-mongodb/1.3.2 [skip ci] 2024-01-16 16:32:52 -05:00
Elliot DeNolf
3f69f83180 chore(release): payload/2.8.2 [skip ci] 2024-01-16 16:31:39 -05:00
beezee
371353f153 feat(db-postgres): support drizzle logging config (#4809) 2024-01-16 15:45:17 -05:00
Dan Ribbens
a92c6334b6 chore(db-postgres): update drizzle-kit to 0.20.5-608ae62 and drizzle-orm to latest (#4772) 2024-01-16 13:35:07 -05:00
Paul
eb9e771a9c fix(db-postgres): Remove duplicate keys from response (#4747)
* Remove duplicate keys from response

* Update to delete duplicates at a higher level and remove '_order' from array rows too
2024-01-16 13:22:08 -05:00
Patrik
ee5390aaca fix: removes max-width from field-types class & correctly sets it on uploads (#4829) 2024-01-16 13:12:58 -05:00
Paul
a861311c5a fix(db-mongodb): mongodb versions creating duplicates (#4825)
* Fixes the issue with mongodb versions

* Update other methods to use options too
2024-01-16 12:20:45 -05:00
James Mikrut
74c3fe1bb2 Merge pull request #4806 from payloadcms/fix/#4775-postgres-block-validation-arrays
fix(db-postgres): validateExistingBlockIsIdentical with arrays
2024-01-15 15:04:47 -05:00
James Mikrut
a2be50279e Merge pull request #4804 from payloadcms/fix/#4802-transaction-options-false
fix(db-mongodb): transactionOptions=false typeErrors
2024-01-15 15:04:01 -05:00
James Mikrut
403eb06acf Merge pull request #4723 from payloadcms/fix/4548-fix-missing-spread
fix(plugin-seo):Fix missing spread operator in URL generator function
2024-01-15 15:02:45 -05:00
James Mikrut
f5c2cd74cc Merge pull request #4695 from payloadcms/feat/4539-seo-plugin-allow-field-and-interface-overrides
feat(plugin-seo): Add support for interfaceName and fieldOverrides
2024-01-15 15:02:14 -05:00
Paul Popus
a6a1963ec6 Merge branch 'main' into feat/4539-seo-plugin-allow-field-and-interface-overrides 2024-01-15 16:29:49 -03:00
Dan Ribbens
0647c870f1 fix(db-postgres): validateExistingBlockIsIdentical with other tables 2024-01-13 22:46:05 -05:00
Dan Ribbens
3b88adc7d0 fix(db-postgres): validateExistingBlockIsIdentical with arrays 2024-01-13 22:40:30 -05:00
Dan Ribbens
82383a5b5f fix(db-mongodb): transactionOptions=false typeErrors 2024-01-13 14:59:16 -05:00
James Mikrut
f9dda628b2 Merge pull request #4730 from payloadcms/feat/4471-add-validation-for-form-submission
feat(plugin-form-builder):Add validation for form ID when creating a form submissions
2024-01-12 15:39:35 -05:00
Elliot DeNolf
93eb0e4a31 chore: update bug report template to renamed possible-bug label 2024-01-12 14:19:43 -05:00
Elliot DeNolf
2e362f44f4 chore(release): payload/2.8.1 [skip ci] 2024-01-12 12:44:15 -05:00
Jarrod Flesch
775502b161 fix: corrects config usage in build bin script (#4796) 2024-01-12 12:40:08 -05:00
Elliot DeNolf
84d75ce6ca chore(release): plugin-form-builder/1.1.2 [skip ci] 2024-01-12 10:47:08 -05:00
Elliot DeNolf
175cf229c0 chore(release): richtext-lexical/0.5.2 [skip ci] 2024-01-12 10:41:55 -05:00
Elliot DeNolf
bb40bd3efb chore(release): db-postgres/0.3.1 [skip ci] 2024-01-12 10:41:46 -05:00
Elliot DeNolf
3d74c133aa chore(release): db-mongodb/1.3.1 [skip ci] 2024-01-12 10:41:37 -05:00
Elliot DeNolf
0f6b6ca970 chore(release): bundler-webpack/1.0.6 [skip ci] 2024-01-12 10:41:29 -05:00
Elliot DeNolf
8e1692ef10 chore(release): bundler-vite/0.1.6 [skip ci] 2024-01-12 10:41:21 -05:00
Elliot DeNolf
1d1ee913fc chore(release): plugin-seo/2.1.0 [skip ci] 2024-01-12 10:40:45 -05:00
Elliot DeNolf
beca43341f chore(release): payload/2.8.0 [skip ci] 2024-01-12 10:39:41 -05:00
Patrik
84818469ea fix(plugin-form-builder): replaces curly brackets with lexical editor (#4753)
* chore: scaffolds fix for replacing curly brackets in email with lexical editor

* fix: submissionData not passed to nested fields

* chore: adds int test for lexical serializer

---------

Co-authored-by: Alessio Gravili <alessio@bonfireleads.com>
2024-01-12 10:37:01 -05:00
Patrik
0a259d27b5 fix: passes draft=true in fetch for relationships (#4784)
* fix: passes draft=true to fetch for relationships

* chore: removes unnecessary delay on field click in e2e test
2024-01-12 10:36:45 -05:00
Nico Bohne
e2e56a4d58 fix: text hasMany validation (#4789) 2024-01-11 23:16:52 -05:00
Patrik
d0f7677d5f fix: prioritizes value key when filtering / querying for relationships (#4727)
* fix: object equality query by prioritizing value key in relationship queries

* chore: adds e2e & int test

* chore: updates test for REST querying on poly relationships
2024-01-11 15:56:07 -05:00
Yuri Koshiishi
35956eb837 chore: use consistent param name in useField's setValue (#4710) 2024-01-11 14:25:48 -05:00
Timothy Choi
d92af295eb feat: allow custom config properties in blocks (#4766) 2024-01-11 13:57:32 -05:00
Marvin
493fde5ccc feat(logger): show local time (#4663) 2024-01-11 11:51:11 -05:00
David Oliver
c6bd20ef33 docs: improve email docs SMTP info (#4698) 2024-01-11 11:45:25 -05:00
Paul
6d5ac1de1e fix: allow a custom ID field to be nested inside unnamed tabs and rows (#4701)
* Adds a check for the first tab and e2e test for custom ID

* Add support for ids in any order inside an unnamed tab

* Update tests for rows

* Minor fixes and remove dead commented code
2024-01-11 10:17:24 -05:00
Dan Ribbens
fa3b3dd62d fix: migration regression (#4777) 2024-01-10 22:40:00 -05:00
Jarrod Flesch
1115387744 fix: build payload without initializing (#4028) 2024-01-10 20:40:46 -05:00
Elliot DeNolf
53e8690feb Merge pull request #4773 from payloadcms/fix/limit-zero
fix: limit=0 returns all docs
2024-01-10 17:00:07 -05:00
Maxime Marty-Dessus
4319fe1c6e feat(plugin-seo): add fr translations (#4774) 2024-01-10 16:48:07 -05:00
Elliot DeNolf
2fee0c0d44 docs: update pagination 2024-01-10 16:45:42 -05:00
Elliot DeNolf
7923edd7bc test: fix limit=0 test 2024-01-10 16:45:34 -05:00
Elliot DeNolf
5702b83e82 fix(db-postgres): totalPages value when limit=0 2024-01-10 16:45:07 -05:00
Elliot DeNolf
63e5c43fe6 fix(db-mongodb): limit=0 returns unpaginated 2024-01-10 16:44:57 -05:00
kiwagu
04f2888135 chore(examples/form-builder): removes legacyBehavior flags from next/link (#4764) 2024-01-10 16:26:50 -05:00
Elliot DeNolf
0f69b9c2f8 chore(templates): remove jackspeak resolutions 2024-01-10 13:06:50 -05:00
Elliot DeNolf
f1bb2f8151 feat(templates): bump plugin-cloud (#4770) 2024-01-10 13:03:50 -05:00
Elliot DeNolf
ea528b8c10 chore(release): eslint-config-payload/1.1.1 [skip ci] 2024-01-10 12:49:11 -05:00
Elliot DeNolf
0053e40404 chore(eslint): object-shorthand warn 2024-01-10 12:45:51 -05:00
Elliot DeNolf
605c0be43c chore(release): plugin-seo/2.0.0 [skip ci] 2024-01-10 12:41:02 -05:00
Elliot DeNolf
3152b4c4c5 chore: revert plugin-seo version bump 2024-01-10 12:40:37 -05:00
Elliot DeNolf
a64b80babc chore(release): plugin-cloud/3.0.0 [skip ci] 2024-01-10 12:34:02 -05:00
Elliot DeNolf
5cfde542b1 feat(plugin-cloud): use resend smtp instead of custom transport (#4746) 2024-01-10 12:22:02 -05:00
Patrik
772020963e fix(examples): bumps next to v13.5.1 (#4763) 2024-01-10 12:17:51 -05:00
Alessio Gravili
5e083689d0 feat(plugin-seo)!: remove support for payload <2.7.0 (#4765) 2024-01-10 17:29:29 +01:00
Taís Massaro
911764a490 chore: export useTheme and add documentation (#4718)
* chore(react-hooks): export useTheme hook

* docs(react-hooks): add useTheme documentation
2024-01-10 10:39:00 -05:00
Alessio Gravili
e3b81d913d chore(plugin-seo): remove test script from package.json (#4762) 2024-01-10 14:38:13 +01:00
Alessio Gravili
41b3b17911 chore(plugin-seo): add to CI, minor package.json improvements (#4761)
* chore: add plugin-seo to CI

* chore(plugin-seo): minor package.json improvements
2024-01-10 14:27:30 +01:00
Yunsup Sim
e9860b36f3 chore(plugin-seo): build command fix (#4756)
* chore(plugin-seo): build command fix

* chore: fix build script

---------

Co-authored-by: Alessio Gravili <alessio@bonfireleads.com>
2024-01-10 14:20:50 +01:00
Alessio Gravili
14b39fbc85 chore: eslint improvements (#4739)
* chore: add @typescript-eslint/prefer-ts-expect-error rule

* chore: fix @typescript-eslint/prefer-ts-expect-error rule

* chore: disable useless class-methods-use-this eslint rule

* chore: only warn for no-unused-vars rule

* remove unused ts-expect-error

* undo admin changes
2024-01-10 11:31:00 +01:00
Elliot DeNolf
d08e85d08c chore(release): plugin-nested-docs/1.0.11 [skip ci] 2024-01-09 16:32:02 -05:00
Elliot DeNolf
abcbf9974d chore(release): plugin-form-builder/1.1.1 [skip ci] 2024-01-09 16:31:52 -05:00
Elliot DeNolf
d01437d212 chore(release): plugin-seo/1.1.0 [skip ci] 2024-01-09 16:31:01 -05:00
Elliot DeNolf
06729a0a73 chore(release): db-postgres/0.3.0 [skip ci] 2024-01-09 16:30:49 -05:00
Elliot DeNolf
2bd7822a16 chore(release): db-mongodb/1.3.0 [skip ci] 2024-01-09 16:30:37 -05:00
Elliot DeNolf
bc7daf6b49 chore(release): payload/2.7.0 [skip ci] 2024-01-09 16:28:34 -05:00
James Mikrut
feab679ef7 Merge pull request #4615 from payloadcms/fix/relationship-field-number-ids-untitled
fix: relations with number based ids (postgres) show untitled ID: x
2024-01-09 15:30:41 -05:00
James Mikrut
be39ed4317 Merge pull request #4633 from payloadcms/fix/#3839-postgres-exist-json
fix(db-postgres): incorrect results querying json field using exists
2024-01-09 15:27:22 -05:00
James Mikrut
570e192eb4 Merge pull request #4741 from payloadcms/fix/#4591-migrate-down-batches
fix(db-postgres): migrate down not limited to latest batch
2024-01-09 13:50:45 -05:00
James Mikrut
22f4967dd4 Merge pull request #4726 from payloadcms/feat/migration-transactions
feat: improve transaction support by passing req to migrations
2024-01-09 13:50:00 -05:00
James Mikrut
4873c36129 Merge pull request #4722 from payloadcms/fix/#4719-migration-transaction-options
fix(db-mongodb): migration errors with transactionOptions false
2024-01-09 13:46:06 -05:00
James Mikrut
f0ec21cdda Merge pull request #4624 from payloadcms/fix/#3692-plugin-nested-docs-overrides
fix(plugin-nested-docs): custom overrides of breadcrumb and parent fields
2024-01-09 13:45:46 -05:00
dependabot[bot]
da737bdf8e chore(deps): bump follow-redirects in /examples/testing (#4735)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 13:18:29 -05:00
dependabot[bot]
40508880c1 chore(deps): bump follow-redirects in /templates/blank (#4736)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 13:18:18 -05:00
dependabot[bot]
8f420d841a chore(deps): bump follow-redirects in /templates/website (#4737)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 13:18:08 -05:00
dependabot[bot]
9022e27308 chore(deps): bump follow-redirects in /templates/ecommerce (#4734)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 13:17:59 -05:00
Patrik
acf2e41312 docs: updates verify to verifyEmail in local api (#4728) 2024-01-09 13:15:31 -05:00
Dan Ribbens
6acfae8ee7 fix(db-postgres): migrate down only runs latest batch size 2024-01-09 10:21:45 -05:00
Alessio Gravili
20bdd91da4 chore: upgrade @types/nodemailer from v6.4.8 to v6.4.14 (#4733) 2024-01-09 14:19:45 +01:00
Alessio Gravili
50502834c9 chore(richtext-lexical): upgrade lexical from v0.12.5 to v0.12.6 (#4732)
* chore(richtext-lexical): upgrade all lexical packages from 0.12.5 to 0.12.6

* fix(richtext-lexical): fix TypeScript errors

* fix indenting
2024-01-09 09:35:18 +01:00
Paul Popus
2b731c1088 feat(plugin-form-builder):Add validation for form ID when creating a submission 2024-01-08 20:35:52 -03:00
Dan Ribbens
983733ad74 merge main 2024-01-08 17:12:02 -05:00
Dan Ribbens
555d02769a feat(db-postgres): improve transaction support by passing req to migrations 2024-01-08 15:50:22 -05:00
Dan Ribbens
682eca2186 feat(db-mongodb): improve transaction support by passing req to migrations 2024-01-08 15:50:09 -05:00
Paul Popus
6affa1c304 Removed fallback for interfaceName 2024-01-08 15:27:17 -03:00
Dan Ribbens
1d14d9f8b8 feat: improve transaction support by passing req to migrations 2024-01-08 12:34:55 -05:00
Dan Ribbens
0abaddc2ef chore: remove payload migration endpoints 2024-01-08 12:24:53 -05:00
Paul Popus
57dc93da5d Fix missing spread operator in generator function 2024-01-08 14:07:35 -03:00
Dan Ribbens
21b9453cf4 fix(db-mongodb): migration error calling beginTransaction with transactionOptions false 2024-01-08 12:03:45 -05:00
Alessio Gravili
136993ec2b chore: undo adding DocumentInfo state to ActionsProvider (#4707) 2024-01-05 22:58:16 +01:00
Dan Ribbens
63bc4cabe1 fix(db-mongodb): querying plan for collections ignoring indexes (#4655)
* fix(db-mongodb): querying plan for collections ignoring indexes

* chore(db-mongodb): improve index hint comment
2024-01-05 16:21:19 -05:00
Alessio Gravili
6a8a6e4ef4 feat: provide document info to ActionsProvider (#4696) 2024-01-05 21:12:21 +01:00
Jessica Chowdhury
9828772890 fix: prevents row overflow (#4704) 2024-01-05 15:04:30 -05:00
Jessica Chowdhury
6116573164 docs: corrects type in useField example (#4705) 2024-01-05 15:03:38 -05:00
Dan Ribbens
cab6babd60 fix(db-postgres): validation prevents group fields in blocks (#4699)
* fix(db-postgres): validation prevents using group fields within blocks

* fix(db-postgres): validation of non-matching blocks in reverse order
2024-01-05 15:03:08 -05:00
Paul
55399424a1 fix(plugin-nested-docs): children wrongly publishing draft data (#4692)
* fix(plugin-nested-docs): handles child parent doc publishing

* Add tests

* Fix error failing on save hook

---------

Co-authored-by: Jessica Chowdhury <jessica@trbl.design>
2024-01-05 15:02:15 -05:00
Paul Popus
28d3f73c2a Fix integration test 2024-01-05 15:23:57 -03:00
Jessica Chowdhury
28a30120dd fix(plugin-form-builder): slate serializer should replace curly braces in links (#4703) 2024-01-05 13:01:03 -05:00
Elliot DeNolf
40a0921597 docs: update 'accessing files outside of payload cloud' 2024-01-05 11:53:51 -05:00
Paul Popus
7eae86bcb3 Add changes from previous branch and update docs 2024-01-05 12:45:03 -03:00
Paul
0b80e4a403 chore: bump the mongodb-memory-server dependency to 9.x (#4693) 2024-01-05 09:35:35 -05:00
Seied Ali Mirkarimi
b378532ddf chore: rtl locale selector and sidebar button (#4684)
* chore: rtl locale popup selector and sidebar button

* chore(plugin-seo): add persian translation
2024-01-04 21:45:39 -05:00
Patrik
d419275fb5 fix: adds objectID validation to isValidID if of type text (#4689)
* fix: adds updated object-id validation to isValidID

* chore: adds check to see if value is of type string or object

* chore: needs to return false if value not of type object or string
2024-01-04 15:08:55 -05:00
Jessica Chowdhury
0fb3a9ca89 fix: allow json field to be saved empty and reflect value changes (#4687)
* fix: allow json field to be saved empty and reflect value changes

* fix: reverts change to json field validation

* chore: wraps more JSON field logic with a try/catch
2024-01-04 14:47:10 -05:00
Gokulsck
f43cf185d4 feat: hasMany property for text fields (#4605)
* fix for supporting hasMany property in text field

* Updated docs

* handle text case types for schema and graphql schema

* fix unit test for required failing

* add unit test for has many text field

* add end to end test for has many on text field creation

* support has many feature for text field on postgres

---------

Co-authored-by: Chris Heinz <chrisi.heinz@web.de>
2024-01-04 14:45:00 -05:00
Dan Ribbens
5d15955f83 fix: custom ids in versions (#4680)
* chore: scaffolds out fix for postgres issues with custom ids in versions

* fix(db-postgres): queryDrafts returns undefined doc.id

* chore(db-postgres): fix build

* fix: removes extra custom id field from  versions buildCollectionFields

* chore: comments test/versions seeding back in

* fix buildCollectionFields version group fields

* fix: id field can be edited after saving a document with custom ids

* chore: updates versions custom ID test

---------

Co-authored-by: PatrikKozak <patrik@payloadcms.com>
2024-01-04 13:05:10 -05:00
Elliot DeNolf
2d35e06667 ci(templates): generate types in ci (#4685) 2024-01-04 10:04:44 -05:00
Elliot DeNolf
d2de6db449 chore(release): eslint-config-payload/1.1.0 2024-01-04 09:56:42 -05:00
Alessio Gravili
a3e78161b5 fix: non-boolean condition result causes infinite looping (#4579) 2024-01-04 09:51:08 -05:00
Hulpoi George-Valentin
d543665995 fix: unlock user condition always passes due to seconds conversion (#4610)
* fix: unlock condition is always true

* test: extra call for locking user, therefor won't be a condition issue
2024-01-04 09:43:10 -05:00
Alessio Gravili
db7dddf1c5 chore: commit intellij run configurations (#4653)
* chore: update .gitignore

* chore: update .gitignore

* chore: commit IntelliJ run configurations
2024-01-04 09:35:01 -05:00
Paul
3027a03ad1 feat(plugin-seo): add i18n (#4665)
* Add i18n to plugin SEO

* Add new translations and e2e tests for the SEO plugin

* Update e2e tests to utilise a shared page ID from a create function
2024-01-04 09:18:09 -05:00
Paul
85e38b7cfd fix: sidebar fields not disabled by access permissions (#4682)
* Pass operation to sidebar fields too

* Add a test for sidebar field update permission
2024-01-03 20:04:40 -05:00
Elliot DeNolf
9090540ece chore(release): richtext-lexical/0.5.1 [skip ci] 2024-01-03 15:58:05 -05:00
Elliot DeNolf
46ef284f6b chore(release): db-postgres/0.2.3 [skip ci] 2024-01-03 15:57:54 -05:00
Elliot DeNolf
0727dcd963 chore(release): db-mongodb/1.2.0 [skip ci] 2024-01-03 15:57:22 -05:00
Elliot DeNolf
52f8d4f9f0 chore(release): payload/2.6.0 [skip ci] 2024-01-03 15:55:34 -05:00
Jessica Chowdhury
f1fa374ed1 fix: tab field error when using the same interface name (#4657)
* fix: tab field error when using the same interface name

* fix: removes unused tab types
2024-01-03 15:50:07 -05:00
Alessio Gravili
6b691eee43 chore(eslint-config-payload): improve perfectionist object sort order (#4678) 2024-01-03 21:45:34 +01:00
Paul
be3beabb9b fix: navigation locks when modal is closed with esc (#4664) 2024-01-03 12:06:09 -05:00
Seied Ali Mirkarimi
1fa00cc25c chore: rtl header locale selector (#4670) 2024-01-03 12:04:39 -05:00
James
f70943524b fix(templates): #4662, templates not building after having types generated 2024-01-02 19:49:09 -05:00
Jessica Chowdhury
a67080a291 Merge pull request #4574 from jschuur/patch-1
fix: adjusts json field joi schema to allow editorOptions
2024-01-02 21:58:34 +00:00
Jarrod Flesch
69a99445c9 fix: detect language from request headers accept-language (#4656) 2024-01-02 15:17:00 -05:00
Alessio Gravili
00d8480062 fix: "The punycode module is deprecated" warning by updating nodemailer 2024-01-02 18:26:52 +01:00
Dan Ribbens
7424ba9090 test: e2e await fix (#4646) 2024-01-01 14:09:48 -05:00
Dan Ribbens
ec4d2f97cb fix(db-postgres): query on json properties 2023-12-29 16:42:32 -05:00
Dan Ribbens
9d9ac0ec28 fix(db-postgres): incorrect results querying json field using exists operator 2023-12-29 11:35:12 -05:00
Dan Ribbens
635e7c26e8 fix(plugin-nested-docs): custom parent field slug 2023-12-28 14:30:36 -05:00
Dan Ribbens
c4a4678afb fix(plugin-nested-docs): parent filterOptions errors when specifying breadcrumbsFieldSlug 2023-12-28 14:01:31 -05:00
Dan Ribbens
a5a91c08a9 fix(plugin-nested-docs): breadcrumbsFieldSlug used in resaveSelfAfterCreate hook 2023-12-28 13:05:53 -05:00
Dan Ribbens
7db58b482b fix: custom overrides of breadcrumb and parent fields 2023-12-28 12:56:30 -05:00
Dan Ribbens
1b914083c8 fix: relations with number based ids (postgres) show untitled ID: x 2023-12-27 15:30:30 -05:00
Anthony Bouch
657d14c07b chore(plugin-search): adjusts code comment when attaching hooks (#4595) 2023-12-23 19:24:33 -05:00
yuc
fbf8ab72a4 docs: fix typo in Select Field example (#4593) 2023-12-23 19:15:44 -05:00
Zakher Masri
997f158149 chore(plugin-stripe): fixes broken link in README (#4602) 2023-12-23 19:08:25 -05:00
James Mikrut
c3be5d1d5e Merge pull request #4560 from payloadcms/fix/#4484-graphql-multiple-locales
fix: graphql cannot query multiple locales
2023-12-21 15:29:14 -05:00
James Mikrut
250bcd8189 Merge pull request #4526 from payloadcms/feat/locale-specific-fallbacks
feat: extend locales to have fallbackLocales
2023-12-21 15:25:55 -05:00
Jesse Sivonen
a71d37b398 fix(db-postgres): Wait for transaction to complete on commit (#4582)
* fix(db-postgres): Wait for transaction to complete on commit
* fix session types
2023-12-21 11:03:27 -05:00
Patrik
5c5523195c fix: resets actions array when navigating out of view with actions (#4585) 2023-12-21 10:48:04 -05:00
Joost Schuur
bff4cf518f fix: adjusts json field joi schema to allow editorOptions
Previous fix was not applied to json fields: https://github.com/payloadcms/payload/pull/2731/files
2023-12-21 00:47:14 +08:00
Alessio Gravili
8015e999cd fix(richtext-lexical): z-index issues (#4570) 2023-12-20 15:10:18 +01:00
Sajarin M
0c905f0da7 docs: typo in transactions page (#4565) 2023-12-20 01:31:50 -05:00
Dan Ribbens
e691a90a4c chore: fix failed test 2023-12-19 15:53:20 -05:00
James Mikrut
0b2da4fba7 Merge pull request #4467 from payloadcms/feat/mongodb-transaction-options
feat(db-mongodb): add transactionOptions
2023-12-19 15:30:23 -05:00
Elliot DeNolf
1c6d6788a3 chore: update changelog [skip ci] 2023-12-19 15:03:44 -05:00
Elliot DeNolf
ecc7978184 chore(release): plugin-nested-docs/1.0.10 [skip ci] 2023-12-19 14:49:38 -05:00
Elliot DeNolf
1b9ee64a67 chore(release): live-preview/0.2.2 [skip ci] 2023-12-19 14:48:20 -05:00
Elliot DeNolf
22b02226c3 chore(release): db-postgres/0.2.2 [skip ci] 2023-12-19 14:48:08 -05:00
Elliot DeNolf
e4102b88d8 chore(release): db-mongodb/1.1.1 [skip ci] 2023-12-19 14:47:41 -05:00
Elliot DeNolf
a099f55a69 chore(release): plugin-form-builder/1.1.0 [skip ci] 2023-12-19 14:46:49 -05:00
Elliot DeNolf
1f1445c798 chore(release): richtext-lexical/0.5.0 [skip ci] 2023-12-19 14:45:27 -05:00
Elliot DeNolf
741a5e3650 chore(release): payload/2.5.0 [skip ci] 2023-12-19 14:41:55 -05:00
Dan Ribbens
365047a3fb Merge branch 'feat/locale-specific-fallbacks' into fix/#4484-graphql-multiple-locales 2023-12-19 14:22:09 -05:00
Dan Ribbens
42c06acd18 docs: transaction options 2023-12-19 14:19:28 -05:00
Dan Ribbens
f2c8ac4a9a feat(db-mongodb): add transactionOptions 2023-12-19 14:19:12 -05:00
Dan Ribbens
05e8914db7 fix(db-mongodb): documentDB unique constraint throws incorrect error (#4513) 2023-12-19 14:14:51 -05:00
Dan Ribbens
35191bdd66 docs: improve docs for locales 2023-12-19 14:11:35 -05:00
Dan Ribbens
98890eee1f fix: graphql multiple locales 2023-12-19 14:00:06 -05:00
Ritsu
ef43629502 fix(db-postgres) incorrect currentTableName in find for blocks (#4524) 2023-12-19 10:30:13 -05:00
Dan Ribbens
c703497924 test: improve e2e locale change selector 2023-12-19 09:57:46 -05:00
Jarrod Flesch
7a4607897d chore: exports the useNav hook (#4557) 2023-12-19 09:44:09 -05:00
Sajarin M
1cad1a6954 docs: fix typo in admin hooks page (#4556) 2023-12-19 09:43:25 -05:00
Dan Ribbens
5caad706bb chore: consistent locale and fallback locale for globals 2023-12-19 09:40:26 -05:00
Patrik
9e8f14a897 feat: adds new actions property to admin customization (#4468) 2023-12-19 09:31:58 -05:00
Patrik
f3748a1534 fix: updates return value of empty arrays in getDataByPath (#4553)
* fix: sets the return value to [] instead of 0 for arrays in getDataByPath

* chore: simplifies empty array check
2023-12-19 09:01:24 -05:00
Dan Ribbens
aa048d5409 fix: req.locale and req.fallbackLocale get reassigned in local operations 2023-12-18 16:50:17 -05:00
Alessio Gravili
fee81bfbc4 fix(templates/ecommerce): updates @payloadcms/plugin-stripe to v0.0.19 (#4554) 2023-12-18 16:28:38 -05:00
Jacob Fletcher
ed7c0e19d2 Merge pull request #3673 from payloadcms/chore/plugin-redirects
chore: imports redirects plugin
2023-12-18 15:55:29 -05:00
Jacob Fletcher
adbd76375f chore(plugin-redirects): scaffolds tests (#4552) 2023-12-18 14:47:11 -05:00
Jacob Fletcher
b1f3582764 chore(plugin-redirects): lints and builds (#4551) 2023-12-18 14:25:32 -05:00
Jarrod Flesch
8bc31cd592 fix(db-postgres): findOne correctly querying with where queries (#4550) 2023-12-18 14:17:58 -05:00
Jacob Fletcher
03688f2348 Merge branch 'main' into chore/plugin-redirects 2023-12-18 12:34:16 -05:00
Jacob Fletcher
ace2e9706b Merge pull request #3676 from payloadcms/chore/plugin-seo
chore: imports seo plugin
2023-12-18 12:29:25 -05:00
Jacob Fletcher
c111fa7531 docs: adds seo plugin docs (#4538) 2023-12-18 12:20:32 -05:00
Jacob Fletcher
a859992709 chore(plugin-seo): lints and builds (#4537) 2023-12-18 11:57:16 -05:00
Jacob Fletcher
f51f8493c9 Merge branch 'main' into chore/plugin-seo 2023-12-18 11:50:10 -05:00
Jacob Fletcher
dd32f5e450 chore(plugin-seo): scaffolds tests (#4531) 2023-12-17 23:49:02 -05:00
Jacob Fletcher
6fdd535f29 chore: adds redirects plugin docs (#4530) 2023-12-17 23:32:05 -05:00
Jacob Fletcher
1c6174ecb5 docs: adds stripe plugin docs (#4528) 2023-12-16 13:40:55 -05:00
Dan Ribbens
aafd538cf8 fix failing e2e test 2023-12-16 00:49:04 -05:00
Dan Ribbens
1b42bd207d fix failing tests 2023-12-16 00:18:59 -05:00
Dan Ribbens
9fac2ef24e feat: extend locales to have fallbackLocales 2023-12-15 23:52:12 -05:00
Jacob Fletcher
7ec6af7296 docs: adds nested docs plugin docs (#4521) 2023-12-15 14:40:00 -05:00
Dan Ribbens
c1bd338d0d feat: prevent querying relationship when filterOptions returns false (#4392)
fix: hidden collections showing in lexical and slate relationships
feat: prevent querying relationship when filterOptions returns false
fix: hidden collections appear in richtext internal link options

Co-authored-by: Alessio Gravili <70709113+AlessioGr@users.noreply.github.com>
2023-12-15 12:43:43 -05:00
Alessio Gravili
c49fd66922 feat(richtext-lexical)!: rename TreeviewFeature into TreeViewFeature (#4520)
Breaking: If you import TreeviewFeature in your project, you have to rename the import to use TreeViewFeature (capitalized "V")
2023-12-15 18:33:16 +01:00
Jarrod Flesch
3e9ef849cd fix: omit field default value if read access returns false (#4518) 2023-12-15 11:22:22 -05:00
Jessica Chowdhury
2650c70960 fix: format fields within tab for list controls (#4516) 2023-12-15 10:51:01 -05:00
Jessica Chowdhury
a3f29fd858 chore: adds translated label to verified field (#4509) 2023-12-15 10:44:09 -05:00
Jessica Chowdhury
8257661c47 fix: formats locales with multiple labels for versions locale selector (#4495) 2023-12-15 10:43:03 -05:00
Jacob Fletcher
d86fe0b46c docs: adds form builder plugin docs (#4512) 2023-12-15 10:17:07 -05:00
Jacob Fletcher
d7d55c2a9c docs: adds search plugin docs (#4514) 2023-12-15 09:10:01 -05:00
Jacob Fletcher
f83d65e0cf docs: fixes mdx syntax error in auth config 2023-12-14 13:33:45 -05:00
Jacob Fletcher
303f0d6227 chore(plugin-search): scaffolds tests (#4511) 2023-12-14 13:06:19 -05:00
Jacob Fletcher
6d9110ec48 chore(plugin-stripe): scaffolds tests (#4510) 2023-12-14 11:56:33 -05:00
Jarrod Flesch
07371b9cad fix: adds bg color for year/month select options in datepicker (#4508) 2023-12-14 09:43:29 -05:00
Jarrod Flesch
228d45cf52 fix: correctly fetches externally stored files when passing uploadEdits (#4505) 2023-12-14 09:09:37 -05:00
Alessio Gravili
cc0ba89518 feat(richtext-lexical)!: link node: change doc data format to be consistent with relationship field (#4504)
BREAKING: An unpopulated, internal link node no longer saves the doc id under fields.doc.value.id. Now, it saves it under fields.doc.value.

Migration inside of payload is automatic. If you are reading from the link node inside of your frontend, though, you will have to adjust it.

The version property of the link and autoLink node has been changed from 1 to 2.
2023-12-13 22:57:08 +01:00
Jacob Fletcher
9e7a8c7206 chore(plugin-form-builder): scaffolds tests (#4500) 2023-12-13 15:13:38 -05:00
Fredrik Nordström
eb6572e9e5 fix: make admin navigation transition smoother (#4217)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-12-13 11:17:41 -05:00
Jessica Chowdhury
45c472d6b3 fix: upload related issues, cropping, fetching local file, external preview image (#4461) 2023-12-13 10:22:25 -05:00
Alessio Gravili
c6c5cabfbb feat(plugin-form-builder): Lexical support (#4487)
* chore(plugin-form-builder): upgrade dependencies

* chore(plugin-form-builder): update demo

* feat(plugin-form-builder): lexical support

* chore(plugin-form-builder): add yarn.lock

* chore(plugin-form-builder): undo changes to demo

* fix(plugin-form-builder): get plugin to build for payload 2.0
2023-12-13 16:14:14 +01:00
Alessio Gravili
dd84cc69c7 chore: export payload/dist inside of monorepo (#4489) 2023-12-13 16:12:31 +01:00
Alessio Gravili
31f8f3cac6 feat(richtext-lexical): Slate to Lexical converter: add blockquote conversion, convert custom link fields (#4486) 2023-12-13 13:16:58 +01:00
Alessio Gravili
f868799404 chore(richtext-lexical): Add e2e test for #4115 (#4483) 2023-12-13 08:36:14 +01:00
Jacob Fletcher
fd1c4b7fc8 fix(templates): pins react-hook-form to v7.45.4 (#4469) 2023-12-12 15:22:23 -05:00
Patrik
46e8c01fbe fix: searching by id sends undefined in where query param (#4464)
fix(db-mongodb): search by id using operator
2023-12-12 14:02:30 -05:00
Jarrod Flesch
13e3e06713 fix: graphql schema generation for fields without queryable subfields (#4463) 2023-12-12 12:40:53 -05:00
Jessica Chowdhury
77ebba3ccd docs: adds api key disclaimer (#4390) 2023-12-12 11:27:12 -05:00
Jacob Fletcher
1cc87bd8ea fix(plugin-nested-docs): properly exports field utilities (#4462) 2023-12-12 10:51:03 -05:00
Patrik
3df52a8856 fix(plugin-form-builder): removes use of slate in rich-text serializer (#4451) 2023-12-12 09:47:38 -05:00
dependabot[bot]
b450aeee85 chore(deps): bump sharp from 0.31.3 to 0.32.6 in /templates/blank (#4173)
Bumps [sharp](https://github.com/lovell/sharp) from 0.31.3 to 0.32.6.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/main/docs/changelog.md)
- [Commits](https://github.com/lovell/sharp/compare/v0.31.3...v0.32.6)

---
updated-dependencies:
- dependency-name: sharp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 09:37:15 -05:00
dependabot[bot]
93f0ebdeae chore(deps): bump terser in /packages/plugin-search/demo (#3886)
Bumps [terser](https://github.com/terser/terser) from 5.12.1 to 5.22.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.12.1...v5.22.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 09:36:43 -05:00
Jarrod Flesch
3a20ddc5f8 fix: ensure ui fields do not make it into gql schemas (#4457) 2023-12-12 08:23:24 -05:00
Jacob Fletcher
dff3f37313 fix(templates): collection archive block (#4426) 2023-12-11 18:28:10 -05:00
Jacob Fletcher
2a65717792 chore(examples): adds nested docs example (#4452) 2023-12-11 17:40:10 -05:00
Jarrod Flesch
63000373e6 fix: cursor jumping around inside json field (#4453) 2023-12-11 16:58:54 -05:00
Patrik
678ba6cdcc docs: adds examples and descriptions to field hook docs (#4448) 2023-12-11 16:53:02 -05:00
Jarrod Flesch
a1d66b83e0 fix: disallow duplicate fieldNames to be used on the same level in the config (#4381) 2023-12-11 16:52:24 -05:00
Alessio Gravili
548e78c598 fix(richtext-lexical): Blocks field: should not prompt for unsaved changes due to value comparison between null and non-existent props (#4450) 2023-12-11 20:42:42 +01:00
Alessio Gravili
168d629697 feat: add context to auth and globals local API (#4449)
* feat: add context to auth and globals local API

* chore: add int test
2023-12-11 20:27:34 +01:00
Alessio Gravili
b9c0248823 fix: pin ts-node versions which are causing swc errors (#4447) 2023-12-11 17:55:36 +01:00
Alessio Gravili
a2dac605e5 Merge pull request #4446 from payloadcms/lexical/commits
fix(richtext-lexical): incorrect URL validation for tel: URLs, unnecessary license headers
2023-12-11 16:38:34 +01:00
Alessio Gravili
9222d6f207 chore(richtext-lexical): remove unnecessary leftover Meta license headers, as they're already included in the LICENSE.md 2023-12-11 16:35:26 +01:00
Alessio Gravili
ac7f9809bc fix(richtext-lexical): not all types of URLs are validated correctly 2023-12-11 16:33:00 +01:00
Jacob Fletcher
076c3258d0 docs: typo in admin components (#4445) 2023-12-11 09:48:27 -05:00
Alessio Gravili
9331204295 feat(richtext-lexical)!: improve floating select menu Dropdown classNames (#4444)
Breaking: Dropdown component has a new mandatory sectionKey prop
2023-12-11 14:34:22 +01:00
Alessio Gravili
9babf6804c feat(richtext-lexical): improve link URL validation (#4442)
* fix(richtext-lexical): Link: allow phone numbers as URLs starting with tel:+

* feat(richtext-lexical): Link Feature: immediately validate URL field in drawer form

* Remove console log
2023-12-11 00:39:32 +01:00
Alessio Gravili
5c2739ebd1 fix(richtext-lexical): do not add unnecessary paragraph before upload, relationship and blocks nodes (#4441) 2023-12-11 00:08:15 +01:00
Alessio Gravili
0421173f9e fix(richtext-lexical): lexicalHTML field now works when used inside of row fields (#4440) 2023-12-10 23:47:32 +01:00
Alessio Gravili
057996766b chore(deps): bump various devDependencies in workspace root (#4433) 2023-12-09 15:35:15 +01:00
Alessio Gravili
b70c8ff6b8 chore(richtext-lexical): Slash Menu: Don't show scroll bar if not needed (#4432) 2023-12-09 15:07:33 +01:00
Jarrod Flesch
8299436554 examples(testing): updates examples/testing to align with Payload 2.x (#4431) 2023-12-08 15:46:14 -05:00
Alessio Gravili
d218f63c6f Merge pull request #4430 from payloadcms/chore/upload-node-html
feat(richtext-lexical): Improve Upload element serialization
2023-12-08 20:12:44 +01:00
Alessio Gravili
e55889480f feat(richtext-lexical): Upload html serializer: Output picture element if the image has multiple sizes, improve absolute URL creation 2023-12-08 20:09:41 +01:00
Elliot DeNolf
37aa99f1dd chore: update changelog [skip ci] 2023-12-07 11:01:52 -05:00
Elliot DeNolf
d3e47b64c1 chore(release): richtext-slate/1.3.1 [skip ci] 2023-12-07 11:00:19 -05:00
Elliot DeNolf
070f4d5bb5 chore(release): richtext-lexical/0.4.1 [skip ci] 2023-12-07 10:58:17 -05:00
Alessio Gravili
48f1299fcb fix(richtext-*): loosen RichTextAdapter types due to re-occuring ts strict mode errors (#4416) 2023-12-07 15:59:59 +01:00
Alessio Gravili
61dca16f91 chore(richtext-lexical): upgrade to lexical 0.12.5 and port over relevant playground changes (#4415) 2023-12-07 15:30:39 +01:00
Dan Ribbens
6e9ae65374 fix(db-postgres): querying nested blocks fields (#4404)
Co-authored-by: Jessica Chowdhury <jessica@trbl.design>
2023-12-07 09:18:48 -05:00
Alessio Gravili
35f54a7be3 Merge pull request #4413 from payloadcms/chore/more-misc-lexical
chore(richtext-lexical): misc fixes and improvements
2023-12-07 14:48:15 +01:00
Alessio Gravili
128f9c4e7e fix(richtext-lexical): lexicalHTML field not working when used inside of Blocks field 2023-12-07 14:30:01 +01:00
Alessio Gravili
1469fc26c7 chore(richtext-lexical): Slash menu items: improve overflow behavior 2023-12-07 14:13:11 +01:00
Elliot DeNolf
e03ff791b6 chore(release): live-preview/0.2.1 [skip ci] 2023-12-06 13:41:32 -05:00
Elliot DeNolf
403c3d3e08 chore(release): db-postgres/0.2.1 [skip ci] 2023-12-06 13:41:32 -05:00
Elliot DeNolf
d7765ef9e1 chore(release): richtext-slate/1.3.0 [skip ci] 2023-12-06 13:41:32 -05:00
Elliot DeNolf
df4f346f2f chore(release): richtext-lexical/0.4.0 [skip ci] 2023-12-06 13:41:32 -05:00
Elliot DeNolf
93fa7b608f chore(richtext-lexical): bump payload peer dep 2023-12-06 13:41:32 -05:00
Elliot DeNolf
989aba665e chore(release): payload/2.4.0 [skip ci] 2023-12-06 13:41:32 -05:00
Alessio Gravili
c582f948c7 docs: update reproduction-guide.md (#4402) 2023-12-06 19:36:00 +01:00
Alessio Gravili
217cc1fc42 docs: update CONTRIBUTING.md (#4401) 2023-12-06 19:15:17 +01:00
Alessio Gravili
7af8f29b4a feat(richtext-lexical): Link & Relationship Feature: field-level configurable allowed relationships (#4182)
* feat(richtext-lexical): ability to configure link feature enabled relations on a field-level

* feat(richtext-lexical): ability to configure Relationship feature enabled relations on a field-level

* chore(richtext-lexical): Improve Link feature props typing

* chore(richtext-lexical): Improve Link and Relationship feature props typing

* fix(richtext-lexical): Link drawer types

* chore: merge conflict resolve

* chore(richtext-lexical): Link Feature: add comments that explain how getBaseFields works
2023-12-06 17:50:50 +01:00
chris
5f2cd1ae77 docs: fix example link (#4394) 2023-12-06 09:35:30 -05:00
Dan Ribbens
dbaecda0e9 fix(db-postgres): sorting on a not-configured field throws error (#4382) 2023-12-06 09:27:43 -05:00
Tylan Davis
cf9a3704df fix: handles null upload field values (#4397) 2023-12-06 09:26:19 -05:00
Patrik
4b5453e8e5 fix: simplifies query validation and fixes nested relationship fields (#4391) 2023-12-06 08:47:34 -05:00
Alessio Gravili
5de347ffff feat(richtext-lexical)!: lazy import React components to prevent client-only code from leaking into the server (#4290)
* chore(richtext-lexical): lazy import all React things

* chore(richtext-lexical): use useMemo for lazy-loaded React Components to prevent lag and flashes when parent component re-renders

* chore: make exportPointerFiles.ts script usable for other packages as well by hoisting it up to the workspace root and making it configurable

* chore(richtext-lexical): make sure no client-side code is imported by default from Features

* chore(richtext-lexical): remove unnecessary scss files

* chore(richtext-lexical): adjust package.json exports

* chore(richtext-*): lazy-import Field & Cell Components, move Client-only exports to /components subpath export

* chore(richtext-lexical): make sure nothing client-side is directly exported from the / subpath export anymore

* add missing imports

* chore: remove breaking changes for Slate

* LazyCellComponent & LazyFieldComponent
2023-12-06 14:20:18 +01:00
Jacob Fletcher
80ef18c149 fix(templates/website): removes unused form builder plugin from deps (#4385) 2023-12-05 11:57:21 -05:00
Christian May
912abe2b64 docs(plugin-nested-docs): clarifies that relationships are intra-collection (#4375) 2023-12-05 00:58:36 -05:00
Jacob Fletcher
4090aebb0e fix(live-preview): populates rte uploads and relationships (#4379) 2023-12-05 00:53:11 -05:00
chris
290e9d8238 docs: fixes typo in migrations (#4374) 2023-12-05 00:24:37 -05:00
Kane Wang
50253f617c feat: add Chinese Traditional translation (#4372) 2023-12-04 15:29:29 -05:00
geisterfurz007
999e05d1b4 docs: fix typo in migrations (#4356) 2023-12-04 15:09:21 -05:00
Dan Ribbens
b6cffcea07 fix: defaultValues computed on new globals (#4380) 2023-12-04 15:05:47 -05:00
Patrik
7b2eb0c175 docs: updates afterInput example (#4378) 2023-12-04 14:35:08 -05:00
Timothy Choi
3b8a27d199 feat: pass path to FieldDescription (#4364)
fix: DescriptionFunction type

Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-12-04 13:59:18 -05:00
Jessica Chowdhury
65adfd21ed fix: uploads files after validation (#4218) 2023-12-04 12:38:23 -05:00
Jacob Fletcher
03a387233d fix(live-preview): sends raw js objects through window.postMessage instead of json (#4354) 2023-12-01 17:50:55 -05:00
Jessica Chowdhury
fcbe5744d9 fix: upload editing error with plugin-cloud (#4170)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-12-01 16:35:12 -05:00
Jessica Chowdhury
06bf6a426e docs: destructures vite bundler import (#4280) 2023-12-01 16:32:10 -05:00
Renat Sagdeev
b634d5e552 docs: fix ul and ol tags mentioned in lexical rte (#4338) 2023-12-01 16:29:43 -05:00
Jacob Fletcher
5f173241df feat: async live preview urls (#4339) 2023-12-01 16:25:39 -05:00
Markus Machatschek
0bd12e01d7 docs: update software requirements to mention pnpm (#4335)
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
2023-12-01 16:25:21 -05:00
Elliot DeNolf
b6f02765eb chore(release): richtext-lexical/0.3.1 [skip ci] 2023-12-01 16:19:58 -05:00
Elliot DeNolf
156ffdd18c chore(release): payload/2.3.1 [skip ci] 2023-12-01 16:18:48 -05:00
Jarrod Flesch
fe888b5f6c fix: query validation on relationship fields (#4353) 2023-12-01 16:03:58 -05:00
Alessio Gravili
bea79feaea fix: ensure doc controls are not hidden behind lexical field (#4345) 2023-12-01 10:23:39 +01:00
Alessio Gravili
293cee6f90 chore(plugin-stripe): rename build script to _build (#4344) 2023-12-01 10:04:37 +01:00
Alessio Gravili
3e745e91da fix(richtext-lexical): blocks content may be hidden behind components outside of the editor (#4325)
* chore(richtext-lexical): add e2e test to reproduce the issue

* fix the issue
2023-12-01 09:46:21 +01:00
Alessio Gravili
4243048fc5 Merge pull request #4342 from payloadcms/fix/lexical-blocks-v1-conversion
fix(richtext-lexical): Blocks node: incorrect conversion from v1 node to v2 node
2023-12-01 09:29:57 +01:00
Alessio Gravili
ef84a2cfff fix(richtext-lexical): Blocks node: incorrect conversion from v1 node to v2 node 2023-12-01 09:28:44 +01:00
James
c00cbaabbc chore: lints 2023-11-30 18:34:38 -05:00
James
02f407e995 chore: lints 2023-11-30 17:12:01 -05:00
Elliot DeNolf
74e8051bb6 chore(templates): GRAPHQL_API_URL to ecommerce template 2023-11-30 17:01:19 -05:00
James
ee670b2b20 chore: introduces graphql_api_url to website template 2023-11-30 16:58:30 -05:00
Elliot DeNolf
2f8bcc977b fix(templates): adjust graphql endpoint 2023-11-30 16:19:46 -05:00
Dan Ribbens
0cc91d7377 docs: update mongoOptions to connectOptions (#4334) 2023-11-30 12:39:32 -05:00
Elliot DeNolf
34e89ff5db chore(release): richtext-slate/1.2.1 [skip ci] 2023-11-30 11:11:28 -05:00
Elliot DeNolf
b39b52dbd3 chore(release): live-preview-react/0.2.0 [skip ci] 2023-11-30 11:11:03 -05:00
Elliot DeNolf
7bfdb2627a chore(release): live-preview/0.2.0 [skip ci] 2023-11-30 11:10:55 -05:00
Elliot DeNolf
8f5867e876 chore(release): db-postgres/0.2.0 [skip ci] 2023-11-30 11:10:44 -05:00
Elliot DeNolf
45a3e31c95 chore(release): db-mongodb/1.1.0 [skip ci] 2023-11-30 11:10:33 -05:00
Elliot DeNolf
176550d26b chore(release): richtext-lexical/0.3.0 [skip ci] 2023-11-30 11:07:44 -05:00
Elliot DeNolf
53958d4662 chore(release): payload/2.3.0 [skip ci] 2023-11-30 11:05:49 -05:00
Elliot DeNolf
a0859114eb chore(richtext-*): bump payload peer dep 2023-11-30 10:59:26 -05:00
Jacob Fletcher
4adc30b034 chore: fixes failing postgres int test for live preview (#4329) 2023-11-30 10:30:09 -05:00
Alessio Gravili
ff61d5a099 chore(richtext-*): roll-back richtext adapter change 2023-11-30 16:25:17 +01:00
Jacob Fletcher
9cc88bb474 fix: properly sets tabs key in fieldSchemaToJSON (#4317) 2023-11-30 09:48:37 -05:00
Jacob Fletcher
57fc211674 fix(live-preview): re-populates externally updated relationships (#4287) 2023-11-30 09:47:56 -05:00
Dan Ribbens
9da9b1fc50 fix: duplicate documents with required localized fields (#4236) 2023-11-30 09:27:24 -05:00
Dan Ribbens
30d050ef86 chore: fix telemetry user id type string (#4321) 2023-11-30 09:26:51 -05:00
Alessio Gravili
9beb9c8627 chore(richtext-lexical): ensure CSS is not accidentally overridden (#4324) 2023-11-30 11:55:02 +01:00
Patrik
224cddd045 feat: relationship sortOptions property (#4301)
* feat: adds sortOptions property to relationship field

* chore: fix lexical int tests

* feat: simplifies logic & updates joi schema definition

* feat: revert to default when searching in relationship select

* fix types and joi schema

* type adjustments

---------

Co-authored-by: Alessio Gravili <alessio@bonfireleads.com>
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-11-29 16:22:47 -05:00
Alessio Gravili
3502ce720b fix: incorrect key property in Tabs field component (#4311)
Fixes #4282
2023-11-29 22:18:40 +01:00
Jacob Fletcher
b8fa61942e chore(examples/custom-server): removes unnused dotenv.js mock file (#4316) 2023-11-29 16:08:16 -05:00
Jacob Fletcher
d49bb4351f feat(live-preview): batches api requests (#4315) 2023-11-29 14:03:05 -05:00
Jacob Fletcher
542096361f fix: properly exports useDocumentsEvents hook (#4314) 2023-11-29 12:26:20 -05:00
Jacob Fletcher
66679fbdd6 fix(live-preview): property resets rte nodes (#4313) 2023-11-29 12:24:51 -05:00
Jarrod Flesch
d4f28b16b4 fix(richtext-slate): add use client to top of tsx files importing from payload core (#4312) 2023-11-29 12:19:54 -05:00
Jarrod Flesch
cd07873fc5 fix(db-postgres): allow for nested block fields to be queried (#4237)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-11-29 11:03:57 -05:00
1nfinite9
6d28fc46bd docs: updates incorrect API for Reset Password (#4270)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-11-29 11:01:44 -05:00
Jacob Fletcher
8e903053e2 Merge pull request #4308 from payloadcms/fix/live-preview-deps
fix(live-preview,live-preview-react): removes payload from peer deps
2023-11-29 11:01:13 -05:00
Jacob Fletcher
7e1052fd98 fix(live-preview-react): removes payload from peer deps 2023-11-29 10:57:44 -05:00
Jacob Fletcher
b4af95f894 fix(live-preview): removes payload from peer deps 2023-11-29 10:57:31 -05:00
Jacob Fletcher
381c158b03 fix(live-preview): compounds merge results (#4306) 2023-11-29 10:54:14 -05:00
Dan Ribbens
3514bfbdae fix(db-postgres): error saving nested arrays with versions (#4302) 2023-11-29 10:10:08 -05:00
James Mikrut
4cfe473627 Merge pull request #4296 from TiKevin83/feature/bearer-jwts
feat: support OAuth 2.0 format Authorization: Bearer tokens in headers
2023-11-28 16:42:13 -05:00
Travis Mcgeehan
c1eb9d1727 feat: support OAuth 2.0 format Authorization: Bearer tokens in headers 2023-11-28 16:23:18 -05:00
Patrik
37b765cce8 fix(plugin-stripe): vite support (#4279)
* chore: updates export of stripe plugin & bumps payload versions

* chore: handles type errors

* chore: adds alias for stripeREST & strepWebhooks

* fixes issues with bundling within demo

* chore: defaults plugin-stripe demo to use vite bundler

* chore: updates pnpm lock file

* chore: removes yarn lock file from plugin-stripe demo

* chore: bumps payload in demo & cleans up demo config

* chore: updates pnpm lock file

---------

Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-11-28 14:12:18 -05:00
Alessio Gravili
5bf64933b4 fix(richtext-lexical): HTML Converter field not working inside of tabs (#4293) 2023-11-28 19:36:23 +01:00
Alessio Gravili
094d02ce1d fix(richtext-lexical): re-use payload population logic to fix population-related issues (#4291)
* chore(richtext-lexical): Add int test which reproduces the issue

* chore: Remove unnecessary await in core afterRead promise

* fix(richtext-lexical): re-use recurseNestedFields from payload instead of using own recurseNestedFields

* chore(richtext-lexical): pass in missing properties which are available in the core afterRead hook

* chore: remove unnecessary block
2023-11-28 19:18:07 +01:00
Elliot DeNolf
1fe4f4c5f4 Merge pull request #4292 from payloadcms/feat/migrate-with-js-files
feat: support migrations with js files
2023-11-28 11:40:36 -05:00
Elliot DeNolf
35ce0ebc83 docs: migrations directory details 2023-11-28 11:18:04 -05:00
Elliot DeNolf
530c825f80 feat(db-mongodb): search for migrations dir intelligently 2023-11-28 11:09:55 -05:00
Elliot DeNolf
308979f31d feat(db-postgres): search for migrations dir intelligently 2023-11-28 11:09:36 -05:00
Elliot DeNolf
2122242192 feat: support migrations with js files 2023-11-28 11:09:25 -05:00
Nikola Spalevic
40c8909ee0 feat: add serbian (latin and cyrillic) translations (#4268) 2023-11-28 09:08:26 -05:00
Dan Ribbens
babe3dba6a chore(db-postgres): add uuid to dependencies (#4286) 2023-11-28 09:08:08 -05:00
Jacob Fletcher
9bb7a88526 feat: useDocumentEvents (#4284) 2023-11-27 16:16:53 -05:00
Elliot DeNolf
098e389147 chore(release): payload/2.2.2 [skip ci] 2023-11-27 16:11:31 -05:00
James Mikrut
b56f1f4f2a Merge pull request #4285 from payloadcms/fix/doc-access-transactions
fix: transactions broken within doc access
2023-11-27 16:07:05 -05:00
James
443847ec71 fix: transactions broken within doc access 2023-11-27 15:56:18 -05:00
Elliot DeNolf
26f6b37a20 chore(release): bundler-vite/0.1.5 [skip ci] 2023-11-27 15:33:43 -05:00
Jessica Chowdhury
1dcd3a2782 fix: prevent json data getting reset when switching tabs (#4123) 2023-11-27 12:23:20 -05:00
Jacob Fletcher
6f59257574 Merge pull request #4250 from payloadcms/fix/live-preview-rels 2023-11-27 11:04:34 -05:00
Jacob Fletcher
65575d3573 Merge branch 'main' into fix/live-preview-rels 2023-11-27 10:54:27 -05:00
Tylan Davis
cbeb0a8bc7 fix(templates): uses context to prevent infinite loop in populateArchiveBlock (#4278) 2023-11-27 10:47:03 -05:00
Jacob Fletcher
ad62db01e7 chore(templates): adds comments to .env.example (#4276) 2023-11-27 10:43:03 -05:00
Kennet Winter
42cba2e3a1 docs: fix broken links to public demo (#4266) 2023-11-27 10:29:05 -05:00
Yunsup Sim
1401718b3b feat(i18n): adds Korean translation (#4258) 2023-11-27 10:26:53 -05:00
Jacob Fletcher
712647d741 docs: adds live preview troubleshooting tips 2023-11-27 08:09:26 -05:00
Alessio Gravili
c8d2b2b60e chore(richtext-lexical): fix failing e2e test due to html class changes (#4265) 2023-11-26 11:39:27 +01:00
Jacob Fletcher
aab2407112 fix(live-preview): clear hasMany relationships 2023-11-24 09:57:41 -05:00
Alessio Gravili
d439bf3011 Merge pull request #4257 from payloadcms/chore/lexical-impr
BREAKING: The last PR is breaking because it changes some properties of the SlashMenu section in the Feature interface
2023-11-24 01:18:55 +01:00
Alessio Gravili
62ca71fbc4 chore(richtext-lexical): breaking: slash menu: simplify, improve CSS class names, change 'title' in interface to key and displayName 2023-11-24 01:16:04 +01:00
Alessio Gravili
e50fa9ca8f feat(richtext-lexical): floating select toolbar: add ability to configure dropdown entry component 2023-11-23 23:52:16 +01:00
Alessio Gravili
ed7aca6525 chore(richtext-lexical): improve CSS class names of floating select toolbar 2023-11-23 23:38:25 +01:00
Zaki Nadhif
98ccd05dd6 chore(richtext-lexical): Add a hint that the slash menu exists to the user (#4206)
* chore(richtext-lexical): Add a hint that the slash menu exists to the user

* Update LexicalEditor.tsx

---------

Co-authored-by: Alessio Gravili <70709113+AlessioGr@users.noreply.github.com>
2023-11-23 22:28:02 +01:00
Alessio Gravili
051bced3b5 Merge pull request #4256 from payloadcms/chore/lexical-small-improvements
BREAKING: The first commit is breaking, as it changes the exported UnoderedListFeature to UnorderedListFeature due to a typo
2023-11-23 22:24:15 +01:00
Alessio Gravili
79f08baf2f chore(richtext-lexical): add lists to floating toolbar 2023-11-23 22:12:10 +01:00
Alessio Gravili
d6b63da617 docs(richtext-lexical): fix incorrect JSDOM import 2023-11-23 22:03:36 +01:00
Alessio Gravili
d512e9382d fix(richtext-lexical): breaking: fix typo: UnoderedListFeature => UnorderedListFeature 2023-11-23 21:39:07 +01:00
Alessio Gravili
b17cafc7be chore(richtext-lexical): add proper typing for node replacements (#4255) 2023-11-23 19:04:34 +01:00
Jacob Fletcher
24dacd6712 fix(live-preview): populates rich text relationships 2023-11-22 17:55:42 -05:00
Dan Ribbens
6ea29094ba fix(db-postgres): incorrect pagination totalDocs (#4248)
Co-authored-by: Alessio Gravili <alessio@bonfireleads.com>
2023-11-22 16:14:14 -05:00
Mark Barton
f27407ce7c chore: correct information from Nested Docs Plugin documentation (#4244) 2023-11-22 12:09:13 -05:00
stoddabr
9ae65fa791 docs: fix create-payload-app example (#4180) 2023-11-21 16:59:06 -05:00
Jessica Chowdhury
3d2b62b210 fix: passes date options to the react-datepicker in filter UI, removes duplicate options from operators select (#4225)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-11-21 16:48:39 -05:00
Jessica Chowdhury
6364afb1dd docs: updates vite alias example and fixes broken link (#4224) 2023-11-21 14:34:18 -05:00
Radosław Kłos
56a4692662 fix: typo in polish translations (#4234) 2023-11-21 13:09:00 -05:00
Dan Ribbens
ef6b8e4235 test: graphql handle deleted relationships (#4229) 2023-11-21 13:07:13 -05:00
Elliot DeNolf
5f5290341a chore(plugin-cloud-storage): adjust prepublishOnly script 2023-11-21 10:28:35 -05:00
Elliot DeNolf
62403584ad chore(scripts): cleanup package details log 2023-11-21 10:28:17 -05:00
Jarrod Flesch
19fcfc27af fix: number field validation (#4233) 2023-11-21 10:12:26 -05:00
Elliot DeNolf
dcf14f5f71 chore(release): payload/2.2.1 [skip ci] 2023-11-21 10:08:07 -05:00
Elliot DeNolf
3a784a06cc fix: make outputSchema optional on richtext config (#4230) 2023-11-21 09:45:57 -05:00
Jessica Chowdhury
6eeae9d53b examples: updates blank template readme (#4216) 2023-11-21 08:40:01 -05:00
Jarrod Flesch
6044f810bd docs: correct PULL_REQUEST_TEMPLATE.md links 2023-11-21 08:37:57 -05:00
Elliot DeNolf
e68ca9363f fix(plugin-cloud-storage): adjust webpack aliasing for pnpm (#4228) 2023-11-20 16:53:30 -05:00
Elliot DeNolf
9963b8d945 chore(release): plugin-nested-docs/1.0.9 [skip ci] 2023-11-20 16:40:46 -05:00
Elliot DeNolf
9afb838182 chore(release): richtext-slate/1.2.0 [skip ci] 2023-11-20 16:39:38 -05:00
Elliot DeNolf
2dad129022 chore(release): richtext-lexical/0.2.0 [skip ci] 2023-11-20 16:39:20 -05:00
Elliot DeNolf
6af1c4d45d chore(release): payload/2.2.0 [skip ci] 2023-11-20 16:36:41 -05:00
Dan Ribbens
4e41dd1bf2 fix(plugin-nested-docs): await populate breadcrumbs on resaveChildren (#4226) 2023-11-20 16:32:02 -05:00
Dan Ribbens
de02490231 feat: hide publish button based on permissions (#4203)
Co-authored-by: James <james@trbl.design>
2023-11-20 16:26:49 -05:00
Jacob Fletcher
8a7b41721a chore: increases live preview testing coverage 2023-11-20 12:58:27 -05:00
Take Weiland
1510baf46e fix: synchronous transaction errors (#4164)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-11-20 12:20:42 -05:00
Jacob Fletcher
0672e864f3 chore: resolves imports and type errors in live preview test app 2023-11-20 11:30:05 -05:00
Alessio Gravili
c10db332cd docs(richtext-lexical): remove unnecessary await from createHeadlessEditor (#4213) 2023-11-19 14:40:09 +01:00
Alessio Gravili
0af9c4d398 fix(richtext-lexical): Blocks: Array row data is not removed (#4209)
* chore(richtext-lexical): Add failing test which reproduces issue

* fix(richtext-lexical): fix the actual issue
2023-11-18 14:01:57 +01:00
Alessio Gravili
fc137c0f53 Merge pull request #4210 from payloadcms/chore/upgrade-lexical
chore(richtext-lexical): Upgrade lexical from 0.12.2 to 0.12.4 and port some playground changes over
2023-11-18 12:59:24 +01:00
Alessio Gravili
a24f2be4a6 chore(richtext-lexical): backport setFloatingElemPositionForLinkEditor type change from playground 2023-11-18 12:54:40 +01:00
Alessio Gravili
57999adfe2 chore(richtext-lexical): backport autolink changes from lexical playground 2023-11-18 12:51:08 +01:00
Alessio Gravili
7857043d03 chore(richtext-lexical): Upgrade lexical packages 2023-11-18 12:37:28 +01:00
Alessio Gravili
3b93af734b Merge pull request #4207 from payloadcms/fix/lexical-validations-
fix(richtext-lexical): Blocks: fields without fulfilled condition are now skipped for validation
2023-11-18 11:55:41 +01:00
Alessio Gravili
50fab902bd fix(richtext-lexical): Blocks: fields without fulfilled condition are now skipped for validation 2023-11-18 11:52:30 +01:00
Alessio Gravili
724d80b7f4 Merge pull request #4196 from payloadcms/docs/lexical-editorconfig
docs(richtext-lexical): various documentation improvements
2023-11-17 18:39:11 +01:00
Alessio Gravili
b406e6afb9 docs(richtext-lexical): various documentation improvements 2023-11-17 18:38:09 +01:00
Alessio Gravili
3f46b21eb2 Merge pull request #4192 from payloadcms/feat/lexical-top
feat(richtext-lexical): Add new position: 'top' property for plugins
2023-11-17 18:20:29 +01:00
Alessio Gravili
eed4f4361c feat(richtext-lexical): Add new position: 'top' property for plugins 2023-11-17 18:18:54 +01:00
Jarrod Flesch
05f3169a75 fix: thread locale through to access routes from admin panel (#4183) 2023-11-17 10:15:12 -05:00
Alessio Gravili
94f1443ce4 Merge pull request #4176 from payloadcms/fix/missing-use-client
fix(richtext-lexical): add missing 'use client' to TestRecorder
2023-11-16 22:38:52 +01:00
Alessio Gravili
fc26275b7a fix(richtext-lexical): add missing 'use client' to TestRecorder feature plugin 2023-11-16 22:37:37 +01:00
Alessio Gravili
e57f5e2aa0 Merge pull request #4175 from payloadcms/fix/lexical-html-globals
fix(richtext-lexical): make lexicalHTML() function work for globals
2023-11-16 22:11:54 +01:00
Alessio Gravili
dbfc83520c fix(richtext-lexical): make lexicalHTML() function work for globals 2023-11-16 22:10:00 +01:00
Alessio Gravili
c068a8784e fix(richtext-lexical): Blocks: make sure fields are wrapped in a uniquely-named group, change block node data format, fix react key error (#3995)
* fix(richtext-lexical): make sure block fields are wrapped in a uniquely-named group

* chore: remove redundant hook

* chore(richtext-lexical): attempt to fix unnecessary unsaved changes warning regression

* cleanup everything

* chore: more cleanup

* debug

* looks like properly cloning the formdata for setting initial state fixes the issue where the old formdata is updated even if node.setFields is not called

* chore: fix e2e tests

* chore: fix e2e tests (a selector has changed)

* chore: fix int tests (due to new blocks data format)

* chore: fix incorrect insert block commands in drawer

* chore: add new e2e test

* chore: fail e2e tests when there are browser console errors

* fix(breaking): beforeInput and afterInput: fix missing key errors, consistent typing and cases in name
2023-11-16 22:01:04 +01:00
Alessio Gravili
989c10e0e0 feat: allow richtext adapters to control type generation, improve generated lexical types (#4036) 2023-11-16 11:36:20 -05:00
Alessio Gravili
3bf2b7a3fe Merge pull request #4171 from zakinadhif/main
fix(richtext-lexical): visual bug after rearranging blocks
2023-11-16 17:23:41 +01:00
Zaki Nadhif
a6b486007d fix(richtext-lexical): visual bug after rearranging blocks 2023-11-16 22:38:34 +07:00
Wilson
4e03ee7079 chore: adds doc blocks for field access properties (#3973) 2023-11-16 09:15:04 -05:00
Quentin Beauperin
b91711a74a fix: improves live preview breakpoints and zoom options in dark mode (#4090) 2023-11-16 09:10:33 -05:00
Jonathan Wu
191c13a409 chore(examples/form-builder): improve form input accessibility (#4166) 2023-11-16 08:02:15 -05:00
Alessio Gravili
b210af4696 fix(richtext-lexical): incorrect caret positioning when selecting second line of multi-line paragraph (#4165) 2023-11-15 22:22:42 +01:00
Taís Massaro
8cebd2ccce docs: correct useTableColumns react import path in example (#4150) 2023-11-15 08:20:42 -05:00
Take Weiland
195a952c43 fix: transactionID isolation for GraphQL (#4095) 2023-11-14 16:07:10 -05:00
Alessio Gravili
4bc5fa7086 chore(richtext-lexical): remove unused defaultValue prop in RichText component (#4146) 2023-11-14 18:31:04 +01:00
Alessio Gravili
2c8d34d2aa fix(richtext-lexical): remove optional chaining after this as transpilers are not handling it well (#4145) 2023-11-14 18:21:51 +01:00
Alessio Gravili
4ec5643dd7 chore: restricts character length in table cells (#4063) 2023-11-14 11:25:24 -05:00
Jessica Chowdhury
45e9a559bb fix: upload fit not accounted for when editing focal point or crop (#4142)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-11-14 11:19:23 -05:00
Jessica Chowdhury
d6233cbf42 templates: update fetch request in populateArchiveBlock hook (#4127) 2023-11-14 11:16:16 -05:00
Jessica Chowdhury
ad3e23b345 chore: updates translation key in dropzone component (#4135) 2023-11-14 11:09:09 -05:00
Radosław Kłos
782e118569 fix(i18n): polish translations (#4134) 2023-11-14 11:06:59 -05:00
Jessica Chowdhury
dbfe4af993 chore: corrects block name overflow in UI (#4138) 2023-11-14 10:56:35 -05:00
Alessio Gravili
859c2f4a6d fix(richtext-lexical): nested editor may lose focus when writing (#4139) 2023-11-14 15:42:30 +01:00
Elliot DeNolf
a34d0f8274 fix(templates): yarn v1 workaround (#4125) 2023-11-13 11:53:57 -05:00
Jessica Chowdhury
967eff1aab fix: rename tab button classname to prevent unintentional styling (#4121) 2023-11-13 08:39:16 -05:00
Alessio Gravili
b7041d6ab1 chore(richtext-lexical): New e2e test: should allow adding new blocks to a sub-blocks field, part of a parent lexical blocks field (#4114) 2023-11-12 23:48:13 +01:00
Alessio Gravili
78b7bd62cd Merge pull request #4113 from payloadcms/fix/4025
fix(richtext-lexical): Blocks: z-index and floating select menu button click issues
2023-11-12 23:17:53 +01:00
Alessio Gravili
7329b1babd chore(richtext-lexical): Remove unnecessary console.log 2023-11-12 23:17:33 +01:00
Alessio Gravili
c87969b7f9 chore(richtext-lexical): Add e2e test: 'ensure slash menu is not hidden behind other blocks' 2023-11-12 23:12:24 +01:00
Alessio Gravili
09f17f4450 fix(richtext-lexical): Blocks: z-index issue, e.g. select field dropdown in blocks hidden behind blocks below, or slash menu inside nested editor hidden behind blocks below 2023-11-12 22:28:05 +01:00
Alessio Gravili
615702b858 fix(richtext-lexical): Floating Select Toolbar: Buttons and Dropdown Buttons not clickable in nested editors
Fixes #4025
2023-11-12 22:09:36 +01:00
Alessio Gravili
f0642ce031 chore(richtext-lexical): add a bunch of e2e tests, including a failing one 2023-11-12 21:44:18 +01:00
Alessio Gravili
56db87d2ec Merge pull request #4104 from payloadcms/chore/console-log-remove
chore: remove unnecessary console.log
2023-11-11 12:58:54 +01:00
Alessio Gravili
45c42724a4 chore: remove unnecessary console.log 2023-11-11 12:57:22 +01:00
Alessio Gravili
a6d5f2e3de fix(richtext-lexical): HTMLConverter: cannot find nested lexical fields (#4103)
Fixes #4034
2023-11-11 12:54:33 +01:00
Elliot Lintz
73b8549ef5 chore: fix readme badge link styles (#4101) 2023-11-10 17:37:50 -05:00
Jarrod Flesch
e22b95bdf3 fix: fully define the define property for esbuild string replacement (#4099) 2023-11-10 13:47:14 -05:00
Jessica Chowdhury
56ddd2c388 chore: update date field schema (#4098) 2023-11-10 12:25:03 -05:00
Jessica Chowdhury
803a37eaa9 fix: simplifies block/array/hasMany-number field validations (#4052)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-11-10 12:06:21 -05:00
Elliot DeNolf
d308bb3421 chore(release): richtext-lexical/0.1.17 [skip ci] 2023-11-10 10:42:33 -05:00
Elliot DeNolf
cbc4752ecb chore(release): plugin-sentry/0.0.6 [skip ci] 2023-11-10 10:42:26 -05:00
Elliot DeNolf
c51f9d01cb chore(release): live-preview-react/0.1.6 [skip ci] 2023-11-10 10:42:18 -05:00
Elliot DeNolf
d19d8fd232 chore(release): live-preview/0.1.6 [skip ci] 2023-11-10 10:42:11 -05:00
Elliot DeNolf
5dbbd8f88b chore(release): db-mongodb/1.0.8 [skip ci] 2023-11-10 10:42:00 -05:00
Elliot DeNolf
47bd3894c4 chore(release): payload/2.1.1 [skip ci] 2023-11-10 10:40:45 -05:00
Elliot DeNolf
a57c68cd04 chore(plugin-sentry): set version to latest instead of beta for release notes 2023-11-10 10:38:12 -05:00
Take Weiland
acad2888cd fix: fixes creation of related documents within a transaction if filterOptions is used (#4087) 2023-11-10 10:37:58 -05:00
Alessio Gravili
db2da71357 Merge pull request #4097 from payloadcms/docs/disableIndexHints
docs: document disableIndexHints property
2023-11-10 16:31:05 +01:00
Alessio Gravili
cbb4ce2f51 docs: document disableIndexHints property 2023-11-10 16:23:21 +01:00
Dan Ribbens
47efd3b92e fix(plugin-nested-docs): sync write transaction errors (#4084) 2023-11-10 10:16:31 -05:00
Dan Ribbens
348a70cc33 fix: possible issue with access control not using req (#4086) 2023-11-10 10:15:07 -05:00
Alessio Gravili
9f873f8630 chore(db-mongodb): add option to disable index hint optimization, which breaks on AWS DocumentDB (#3997)
* chore: add option to disable pagination count index hinting optimization

* chore: rename hintPaginationCountIndex to disablePaginationCountIndexHint

* chore: fix logic

* chore: disablePaginationCountIndexHint => disableIndexHints
2023-11-10 16:08:14 +01:00
Jessica Chowdhury
949e265cd9 fix: disable editing option for svg image types (#4071)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-11-10 00:35:04 -05:00
Jessica Chowdhury
687f4850ac fix: hide empty image sizes from the preview drawer (#3946)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-11-09 22:34:50 -05:00
Jacob Fletcher
1f851f21b1 fix(live-preview): properly handles apiRoute (#4076) 2023-11-09 13:14:41 -05:00
Jarrod Flesch
dbc4ce71e6 chore: fixes test suites that use clearAndSeedEverything (#4080) 2023-11-09 12:30:19 -05:00
Patrik
cef4cbb0ee fix: conditionally hide dot menu in DocumentControls (#4075) 2023-11-09 12:01:58 -05:00
Jacob Fletcher
7059a71243 fix(live-preview): ensures field schema exists before traversing fields (#4074) 2023-11-09 10:08:10 -05:00
Jacob Fletcher
01559ef34b chore: prevents field validation from triggering unnecessary re-renders (#4066) 2023-11-09 09:46:35 -05:00
Jacob Fletcher
8488f7b8db docs: adds apiRoute to useLivePreview args (#4073) 2023-11-09 09:01:04 -05:00
Michał Korczak
a92a160a13 docs: fix link to public demo example config (#4007) 2023-11-09 00:23:58 -05:00
PatrikKozak
77a7c83251 chore: updates default type value for graphql playground type 2023-11-08 18:30:55 -05:00
Jacob Fletcher
2ad7340154 fix(live-preview): field recursion and relationship population (#4045) 2023-11-08 17:28:35 -05:00
Alessio Gravili
c462df38f6 fix(richtext-lexical): floating select toolbar caret not positioned correctly if first line is selected (#4062) 2023-11-08 22:13:38 +01:00
Alessio Gravili
fff377ad22 fix(richtext-lexical): Blocks: unnecessary saving node value when initially opening a document & new lexical tests (#4059)
* chore: new lexical int tests and working test structure

* chore: more int tests, and better lexical collection structure

* fix(richtext-lexical): Blocks: unnecessary saving node value when initially opening a document
2023-11-08 21:32:43 +01:00
Elliot DeNolf
a2cb946155 chore(release): bundler-vite/0.1.4 [skip ci] 2023-11-08 14:54:50 -05:00
Elliot DeNolf
c39472259a chore(release): db-postgres/0.1.13 [skip ci] 2023-11-08 14:53:16 -05:00
Elliot DeNolf
e2d36c3cab chore(release): db-mongodb/1.0.7 [skip ci] 2023-11-08 14:53:05 -05:00
Elliot DeNolf
0e682a32c3 chore(release): payload/2.1.0 [skip ci] 2023-11-08 14:51:29 -05:00
Hulpoi George-Valentin
266c3274d0 feat: Custom Error, Label, and before/after field components (#3747)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-11-08 14:40:31 -05:00
Jarrod Flesch
67b3baaa44 fix: vite not replacing env vars correctly when building 2023-11-08 14:23:58 -05:00
Jarrod Flesch
55659c7c36 chore(docs): imporoves usability of useAuth and exports useTableColumns 2023-11-08 14:23:22 -05:00
Jørgen Kalsnes Hagen
6a0a859563 feat: add internationalization (i18n) to locales (#4005) 2023-11-08 12:56:15 -05:00
Dan Ribbens
57da3c99a7 fix: error on graphql multiple queries (#3985) 2023-11-08 12:38:25 -05:00
Elliot DeNolf
611438177b ci: split e2e tests into 8 parts 2023-11-08 12:35:05 -05:00
Jacob Fletcher
d068ef7e24 fix: injects array and block ids into fieldSchemaToJSON (#4043) 2023-11-08 12:34:51 -05:00
Jacob Fletcher
7a9af4417a fix: polymorphic hasMany relationships missing in postgres admin (#4053) 2023-11-08 12:31:07 -05:00
Patrik
8d14c213c8 fix: resets list filter row when the filter on field is changed (#3956)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-11-08 08:31:01 -05:00
Jarrod Flesch
182c57b191 fix: hasMany number and select fields unable to save within arrays (#4047) 2023-11-07 22:29:41 -05:00
Elliot DeNolf
15459fb8e3 ci: add workflow changes to needs_build filter 2023-11-07 21:11:32 -05:00
Elliot DeNolf
3ca71c4def ci: increase v8 memory allocation 2023-11-07 21:06:18 -05:00
Elliot DeNolf
64136a6b17 test(plugin-sentry): add test components (#4042) 2023-11-07 16:02:24 -05:00
Jarrod Flesch
acba5e482b fix: focal and cropping issues, adds test (#4039) 2023-11-07 15:20:57 -05:00
Elliot DeNolf
571f190f34 chore(plugin-sentry): use proper refs instead of from dist 2023-11-07 15:17:07 -05:00
Take Weiland
131d89c3f5 fix: handle invalid tokens in refresh token operation (#3647)
* fix: handle invalid tokens in refresh token operation

* fix: check for any falsy user values instead of just nullish in token refresh
2023-11-07 14:55:35 -05:00
Elliot DeNolf
55c38a8934 test: plugin-sentry suite (#4040) 2023-11-07 13:51:40 -05:00
Elliot DeNolf
2abb46f4f1 ci: add plugin-sentry build 2023-11-07 12:45:45 -05:00
Elliot DeNolf
f41780ef33 chore: sync pnpm-lock.yaml 2023-11-07 12:45:25 -05:00
Elliot DeNolf
105392cf07 Merge pull request #3671 from payloadcms/chore/plugin-sentry
chore: imports sentry plugin
2023-11-07 12:42:56 -05:00
Elliot DeNolf
fa2e68ad1c chore: force pnpm-lock.yaml 2023-11-07 12:42:28 -05:00
Elliot DeNolf
2053e4eeab chore(plugin-sentry): more cleanup 2023-11-07 12:41:43 -05:00
Elliot DeNolf
432794fa55 chore(plugin-sentry): format 2023-11-07 12:25:47 -05:00
Elliot DeNolf
6787f0dfd9 chore(plugin-sentry): fix eslint errors 2023-11-07 12:25:25 -05:00
Elliot DeNolf
0b0a40c9fb chore(plugin-sentry): cleanup after import 2023-11-07 12:18:14 -05:00
Elliot DeNolf
95c43a2ab4 chore: sync payload package readme 2023-11-07 12:05:51 -05:00
Jarrod Flesch
f4037a6bdc chore: readme boldness 2023-11-07 09:13:35 -05:00
Jacob Fletcher
c4d173ae0f chore: updates CODEOWNERS (#4031) 2023-11-07 09:05:35 -05:00
Patrik
3e5149bc43 Merge pull request #3987 from SimYunSup/fix/#3986
fix: Updates checkbox API views
2023-11-06 15:44:41 -05:00
Alessio Gravili
17f7b94555 chore: improve test suites, upgrade jest and playwright, add debug utilities for lexical (#4011)
* feat(richtext-lexical): 'bottom' position value for plugins

* feat: TestRecorderFeature

* chore: restructuring to seed and clear db before each test

* chore: make sure all tests pass

* chore: make sure indexes are created in seed.ts - this fixes one erroring test

* chore: speed up test runs through db snapshots

* chore: support drizzle when resetting db

* chore: simplify seeding process, by moving boilerplate db reset / snapshot logic into a wrapper function

* chore: add new seeding process to admin test suite

* chore(deps): upgrade jest and playwright

* chore: make sure mongoose-specific tests are not skipped

* chore: fix point test, which was depending on another test (that's bad!)

* chore: fix incorrect import

* chore: remove unnecessary comments

* chore: clearly label lexicalE2E test file as todo

* chore: simplify seed logic

* chore: move versions test suite to new seed system
2023-11-06 16:38:40 +01:00
Elliot DeNolf
04850694c1 chore(deps): bump uuid to 9 (#4014) 2023-11-06 08:58:41 -05:00
Elliot DeNolf
eb42c031ef fix: parse predefined migrations via file arg or name prefix (#4001) 2023-11-03 19:26:25 -04:00
Elliot DeNolf
dc253676e8 docs: add latest tag to all mentions of create-payload-app [no ci] (#3998) 2023-11-03 17:18:03 -04:00
Elliot DeNolf
926372f15a chore: add CODEOWNERS file 2023-11-03 17:05:14 -04:00
Elliot DeNolf
c2f379f139 chore(release): db-postgres/0.1.12 [skip ci] 2023-11-03 16:23:12 -04:00
Elliot DeNolf
1a523eff98 chore(release): db-mongodb/1.0.6 [skip ci] 2023-11-03 16:22:59 -04:00
Elliot DeNolf
f320a87f92 chore(release): payload/2.0.15 [skip ci] 2023-11-03 16:21:13 -04:00
Elliot DeNolf
d1a0822f80 fix: properly load temp files into buffer (#3996) 2023-11-03 16:02:41 -04:00
James Mikrut
da533d6b64 Merge pull request #3981 from payloadcms/fix/autosave
fix: autosave updating data in unrelated docs
2023-11-03 13:59:39 -04:00
Jessica Chowdhury
fb3b95e52d docs: update default autosave interval 2023-11-03 17:08:11 +00:00
Jessica Chowdhury
a9d96b1037 fix: global autosave and relevant e2e test 2023-11-03 16:38:43 +00:00
Jessica Chowdhury
ea7ce6fd97 test: adds autosave test 2023-11-03 15:59:06 +00:00
Jessica Chowdhury
354b73c3aa Merge branch 'main' into fix/autosave 2023-11-03 15:57:23 +00:00
Patrik
96fc3df532 chore: ellipse long error messages, add title attribute (#3812)
Co-authored-by: Jarrod Flesch <30633324+JarrodMFlesch@users.noreply.github.com>
2023-11-03 10:40:58 -04:00
Jarrod Flesch
c7a315a7d1 fix: passes correct data to buildStateFromSchema on account page (#3984)
* chore: fixes e2e tests
2023-11-03 10:30:36 -04:00
Yunsup Sim
b008b6c646 fix: Update API Views 2023-11-03 18:38:06 +09:00
Jessica Chowdhury
b722f202af fix: autosave updating data in unrelated docs 2023-11-02 17:54:25 +00:00
Jessica Chowdhury
720760225f docs: adds section on querying and filtering polymorphic relationship fields (#3976) 2023-11-02 13:27:21 -04:00
Jacob Fletcher
f7d4c04f65 chore: adds e2e tests for nested views (#3962) 2023-11-02 13:13:29 -04:00
Patrik
6b1b4ffd27 fix: better error handling within parseCookies (#3720) 2023-11-02 09:01:01 -04:00
Jessica Chowdhury
6325b334ec chore(docs): adds section on swap space and nextjs incompatibilities with the local api (#3975) 2023-11-02 08:40:24 -04:00
Alessio Gravili
79b1b88a2f chore: Better Lexical documentation, minor improvements to HTML converter feature (#3933)
* docs: add html serialization docs

* chore: add .md to the .editorconfig

* chore: add new consolidateHTMLConverters function

* docs: add more documentation about serializing HTML

* docs: document creation of headless editors, editor => markdown conversion, markdown => editor conversion and editor => lexical conversion

* docs: improve wording

* docs: add missing comma

* docs: add rest of the missing docs

* docs: various improvements
2023-11-02 07:44:18 +01:00
Jacob Fletcher
b2beec302f chore: unable to boot config and endpoints test suites (#3969) 2023-11-01 18:02:25 -04:00
Jacob Fletcher
fbc2064a10 chore: deflakes e2e tests (#3970) 2023-11-01 17:26:07 -04:00
Daniel Kirchhof
900a9eafeb fix: prevent sort from saving a new version in version list view (#3944) 2023-11-01 15:11:10 -04:00
Jacob Fletcher
06cd52b622 fix: sort document tabs by order (#3968) 2023-11-01 14:59:47 -04:00
Jarrod Flesch
c7ec557466 chore(docs): server code aliasing cleanup (#3967) 2023-11-01 13:30:34 -04:00
Jacob Fletcher
4c587acc10 docs: fixes custom component property names (#3966) 2023-11-01 13:20:03 -04:00
Jarrod Flesch
6f39b809b3 chore(docs): vite aliasing and extending (#3965) 2023-11-01 12:57:41 -04:00
Jarrod Flesch
796669279a fix: exclude files from dev bundle if aliased (#3957) 2023-11-01 11:41:35 -04:00
Alessio Gravili
886fca8e37 Merge pull request #3964 from payloadcms/docs/preview-docs-2
docs: add "previewing docs" section to the contributing.md
2023-11-01 16:10:21 +01:00
Alessio Gravili
30db52ac45 docs: add "previewing docs" section to the contributing.md 2023-11-01 16:09:21 +01:00
Jacob Fletcher
f04a18a258 chore: fixes flaky e2e tests (#3961) 2023-11-01 10:22:54 -04:00
Jarrod Flesch
cdc10be1a2 fix: do not display field if read permission is false - admin panel ui (#3949) 2023-11-01 10:21:19 -04:00
Jacob Fletcher
a5b2333140 fix: deeply merges view configs (#3954) 2023-11-01 08:58:42 -04:00
Jessica Chowdhury
afe1834f9a chore: updates hover styles for list control and file detail buttons (#3757) 2023-11-01 08:36:07 -04:00
Jarrod Flesch
3d7a2de00d chore: allow overrides to be passed into ReactDatePicker from DateTimeInput (#3937) 2023-11-01 08:33:26 -04:00
Jarrod Flesch
5ea88bb47d fix: block row removal w/ db-postgres adapter (#3951) 2023-11-01 08:32:02 -04:00
Jarrod Flesch
386fe0741d chore: append globalType inside global version operations (#3903) 2023-10-31 16:43:26 -04:00
Patrik
b6d9a2021f fix: vertical alignment in step nav when using larger logos (#3955) 2023-10-31 15:18:39 -04:00
Jacob Fletcher
1f8f173741 fix: findVersions pagination (#3906) 2023-10-31 09:33:13 -04:00
Jarrod Flesch
36576f152a fix: field paths being mutated if they ended with the req.locale (#3936) 2023-10-31 08:53:00 -04:00
James Mikrut
4ea8ace4c8 Merge pull request #3940 from payloadcms/fix/dataloader-parallel-requests
fix: ensures dataloader does not run requests in parallel
2023-10-30 22:19:00 -04:00
James
3a83f08518 chore: corrects dataloader comment 2023-10-30 17:15:24 -04:00
James
4607dbf976 fix: ensures dataloader does not run requests in parallel 2023-10-30 17:13:40 -04:00
Jessica Chowdhury
94d8d2790b chore: adds missing "menu" translation (#3816) 2023-10-30 16:01:32 -04:00
Mikko Vänskä
e6b9fb4fab docs: adds link to tabs field in fields overview (#3909) 2023-10-30 15:09:26 -04:00
Jacob Fletcher
6918be20ba fix(templates): serializes internal links (#3935) 2023-10-30 15:02:01 -04:00
Piotr Rogowski
e4881bb02f fix(i18n): polish translations (#3934) 2023-10-30 14:59:50 -04:00
Elliot DeNolf
ed748102d6 chore: clean up changelog 2023-10-30 12:40:19 -04:00
Elliot DeNolf
88627f22e5 chore(release): bundler-webpack/1.0.5 [skip ci] 2023-10-30 12:30:29 -04:00
Elliot DeNolf
a2a44a81f2 chore(release): richtext-slate/1.1.0 [skip ci] 2023-10-30 12:29:43 -04:00
Elliot DeNolf
b2b0f10935 chore(release): richtext-lexical/0.1.16 [skip ci] 2023-10-30 12:29:08 -04:00
Elliot DeNolf
2ebb9b8752 chore(release): db-postgres/0.1.11 [skip ci] 2023-10-30 12:28:57 -04:00
Elliot DeNolf
d383a00b65 chore(release): db-mongodb/1.0.5 [skip ci] 2023-10-30 12:28:47 -04:00
Elliot DeNolf
d6ff8e3e69 chore(release): payload/2.0.14 [skip ci] 2023-10-30 12:26:26 -04:00
Jacob Fletcher
20373903fd chore: adds e2e tests for versions tab and route (#3908) 2023-10-30 11:39:24 -04:00
Patrik
6d94e57225 docs: adds Props import to cell-component example (#3931) 2023-10-30 11:17:22 -04:00
Jarrod Flesch
a14b15200a chore: add save prop to docs custom save button example 2023-10-30 08:52:59 -04:00
Nathan Clevenger
0da3b59daf docs: fix broken link to Microsoft's Monaco Docs (#3921) 2023-10-30 01:24:44 +01:00
Jarrod Flesch
46fc41cbd9 fix: incorrect duplication of data in admin ui (#3907) 2023-10-27 22:41:33 -04:00
Patrik
237eebdf87 fix: enables nested AND/OR queries (#3834) 2023-10-27 15:18:25 -04:00
Hristiyan Dodov
422c803da6 fix: disable webpack hot reload on production (#3891) 2023-10-27 15:12:12 -04:00
Jarrod Flesch
7e919aa87c fix: adds null to non-required field unions (#3870) 2023-10-27 15:02:40 -04:00
Jarrod Flesch
d393225289 fix: set date to 12UTC for default, dayOnly and monthOnly fields (#3887) 2023-10-27 14:43:36 -04:00
Jessica Chowdhury
a4f36aa8a0 fix: only apply focal manipulation when necessary (#3902)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-10-27 14:40:26 -04:00
Dan Ribbens
3404bab83f fix: generate new block ids on create (#3871) 2023-10-27 13:32:20 -04:00
Dan Ribbens
89f273bf89 fix: duplicate document copying to incorrect locale (#3874) 2023-10-27 13:31:52 -04:00
Dan Ribbens
4d8d4c214a fix: unique field error handling (#3888) 2023-10-27 13:31:14 -04:00
Dan Ribbens
dc13b101f7 fix(payload): graphql query errors transaction race condition (#3795) 2023-10-27 13:29:51 -04:00
Patrik
42d8d11fd7 fix: ensures compare-version select field cannot be cleared (#3901) 2023-10-27 12:15:36 -04:00
Alessio Gravili
56e58e9ec7 fix(db-mongodb): improve find query performance (#3836)
Fixes #3904

* fix(db-mongodb): improve find query performance

* fix: add optimization to other operations which use pagination: findGlobalVersions, findVersions, queryDrafts

* fix: index createdAt field by default
2023-10-27 17:57:18 +02:00
Jessica Chowdhury
c564a83ab6 fix: ensure serverURL has string value for getBaseUploadFields function (#3900) 2023-10-27 11:42:14 -04:00
Alessio Gravili
a4fa0ef393 chore(richtext-*): bump payload peer dependency versions 2023-10-27 15:56:15 +02:00
Alessio Gravili
dac9514eb0 fix(richtext-*): type issues with typescript strict mode enabled 2023-10-27 15:44:10 +02:00
Alessio Gravili
760565f1e9 fix(richtext-lexical): remove unnecessary dependencies (fixes #3889) 2023-10-27 14:25:31 +02:00
Elliot DeNolf
436825cc0b ci: add plugin-form-builder build 2023-10-26 23:26:10 -04:00
Elliot DeNolf
7256a6b8b9 chore: sync pnpm-lock.yaml 2023-10-26 23:23:52 -04:00
Elliot DeNolf
8066806d13 Merge pull request #3669 from payloadcms/chore/plugin-form-builder
chore: imports form builder plugin
2023-10-26 23:23:26 -04:00
Elliot DeNolf
7a15545773 chore: force pnpm-lock.yaml 2023-10-26 23:22:28 -04:00
Elliot DeNolf
9d4969685f chore(plugin-form-builder): clean up more unneeded files 2023-10-26 23:19:51 -04:00
Elliot DeNolf
3ebcc5120c chore(plugin-form-builder): remove mocks dir from packed 2023-10-26 23:13:52 -04:00
Elliot DeNolf
ed68583392 chore(plugin-form-builder): format 2023-10-26 23:07:33 -04:00
Elliot DeNolf
87c58bc0ba chore(plugin-form-builder): eslint fix 2023-10-26 23:07:08 -04:00
Elliot DeNolf
22bd80b8c2 chore(plugin-form-builder): cleanup after import 2023-10-26 23:05:30 -04:00
dependabot[bot]
09d303c8b3 chore(deps): bump http-cache-semantics in /packages/plugin-search/demo (#3825)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 13:36:12 -04:00
dependabot[bot]
aa22392c4f chore(deps): bump json5 in /packages/plugin-search/demo (#3826)
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 13:35:48 -04:00
dependabot[bot]
da3f99d57f chore(deps): bump loader-utils in /packages/plugin-search/demo (#3827)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 13:35:43 -04:00
dependabot[bot]
24c89e2ad7 chore(deps): bump graphql in /packages/plugin-search/demo (#3828)
Bumps [graphql](https://github.com/graphql/graphql-js) from 16.6.0 to 16.8.1.
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](https://github.com/graphql/graphql-js/compare/v16.6.0...v16.8.1)

---
updated-dependencies:
- dependency-name: graphql
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 13:35:19 -04:00
dependabot[bot]
8e05d8f064 chore(deps): bump postcss in /packages/plugin-search/demo (#3829)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.12 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.12...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 13:35:04 -04:00
dependabot[bot]
9ba7265529 chore(deps): bump semver in /packages/plugin-search/demo (#3830)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 13:34:34 -04:00
Jacob Fletcher
4f2b080d1c fix(db-mongodb): versions pagination (#3875) 2023-10-26 12:18:54 -04:00
Patrik
115e592b54 fix: handles null & undefined relationship field values in versions view (#3609) 2023-10-26 11:59:00 -04:00
Elliot DeNolf
c8fbfc43bd chore(templates): pin next@13.5.2 2023-10-26 09:54:23 -04:00
Elliot DeNolf
6cfa8a373e test: plugin cloud storage suite (#3884)
* chore: proper admin mock for adapters

* test: add plugin-cloud-storage dev
2023-10-26 09:35:49 -04:00
Elliot DeNolf
6c5d525d8e fix: store resized image on req or tempFilePath (#3883) 2023-10-26 09:35:27 -04:00
Elliot DeNolf
f53b713154 fix: resize image if no aspect ratio change (#3859)
* fix: resize image if no aspect ratio change

* test: adjust unawaited assertion
2023-10-26 09:04:13 -04:00
Dan Ribbens
435eb6204e fix: error handling when duplicating documents fails (#3873) 2023-10-25 16:39:11 -04:00
Elliot DeNolf
c4561a4390 chore: proper clean scripts 2023-10-25 15:05:14 -04:00
Elliot DeNolf
8fe712cb66 chore(release): plugin-stripe/0.0.16 [skip ci] 2023-10-25 13:28:10 -04:00
Elliot DeNolf
459a55dfb6 chore(plugin-stripe): use payload 1.x as dev dep 2023-10-25 13:27:30 -04:00
Elliot DeNolf
8de0b89458 chore(release): plugin-cloud/2.2.6 [skip ci] 2023-10-25 13:18:08 -04:00
Elliot DeNolf
718ab6f93b chore(plugin-cloud): rework build 2023-10-25 13:17:01 -04:00
Elliot DeNolf
5bf1cd6d93 Merge pull request #3869 from payloadcms/chore/peer-deps
chore(deps): peer deps in plugin-cloud and plugin-stripe
2023-10-25 12:21:17 -04:00
Elliot DeNolf
556904e75c chore: sync pnpm-lock.yaml 2023-10-25 12:20:37 -04:00
Elliot DeNolf
0851ef41d7 chore(plugin-stripe): update peer deps 2023-10-25 12:19:22 -04:00
Elliot DeNolf
6616942b78 chore(plugin-cloud): move nodemailer to deps 2023-10-25 11:44:24 -04:00
Dan Ribbens
59fabc757d chore(templates): update ecommerce yarn lock (#3867) 2023-10-25 11:19:31 -04:00
Dan Ribbens
650f78a2b9 chore(templates): fix types and seeding errors (#3845) 2023-10-25 09:45:09 -04:00
Hulpoi George-Valentin
d6826f792c docs: wrong import for collections#beforeValidate (#3863) 2023-10-25 11:38:26 +02:00
Jacob Fletcher
3032e0b5a2 fix: global permissions for live preview (#3854) 2023-10-24 23:32:55 -04:00
Elliot DeNolf
c30b59c5fe chore(plugin-cloud-storage): remove all dist references 2023-10-24 17:05:58 -04:00
Elliot DeNolf
3182d422c4 chore: export more upload types 2023-10-24 17:05:26 -04:00
Elliot DeNolf
ce1e7a5d14 ci: add plugin-cloud-storage build 2023-10-24 16:42:13 -04:00
dependabot[bot]
03101f0f54 chore(deps): bump next in /examples/draft-preview/next-app (#3853)
Bumps [next](https://github.com/vercel/next.js) from 13.4.8 to 13.5.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v13.4.8...v13.5.0)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 16:41:50 -04:00
dependabot[bot]
80bf97ebb4 chore(deps): bump next from 13.4.19 to 13.5.0 in /templates/ecommerce (#3851)
Bumps [next](https://github.com/vercel/next.js) from 13.4.19 to 13.5.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v13.4.19...v13.5.0)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 16:41:39 -04:00
dependabot[bot]
ed5da473b5 chore(deps): bump next in /examples/redirects/next-pages (#3850)
Bumps [next](https://github.com/vercel/next.js) from 13.2.1 to 13.5.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v13.2.1...v13.5.0)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 16:41:24 -04:00
dependabot[bot]
01feb6d92d chore(deps): bump next in /examples/draft-preview/next-pages (#3849)
Bumps [next](https://github.com/vercel/next.js) from 13.4.8 to 13.5.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v13.4.8...v13.5.0)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 16:41:18 -04:00
dependabot[bot]
daf1f5fa7d chore(deps): bump next in /examples/form-builder/next-pages (#3848)
Bumps [next](https://github.com/vercel/next.js) from 12.3.1 to 13.5.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v12.3.1...v13.5.0)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 16:41:11 -04:00
Alessio Gravili
35f00fa83d fix(richtext-lexical): Blocks node incorrectly marked as client module 2023-10-24 22:40:05 +02:00
Elliot DeNolf
5fb52f6d17 Merge pull request #3847 from payloadcms/import/plugin-cloud-storage
chore: import plugin-cloud-storage
2023-10-24 16:37:26 -04:00
Elliot DeNolf
41925cef9c chore(plugin-cloud-storage): format 2023-10-24 16:21:12 -04:00
Elliot DeNolf
bff88b3956 chore(plugin-cloud-storage): eslint fix 2023-10-24 16:20:58 -04:00
Elliot DeNolf
11d237ece8 chore(plugin-cloud-storage): cleanup after import 2023-10-24 16:20:01 -04:00
Elliot DeNolf
7f80aa95a4 Merge remote-tracking branch 'plugin-cloud-storage/monorepo-import' into import/plugin-cloud-storage 2023-10-24 16:03:02 -04:00
Elliot DeNolf
fc0c612e47 chore: move all files into packages/plugin-cloud-storage 2023-10-24 15:58:57 -04:00
Jarrod Flesch
24eab3af1d fix: checks for user before accessing properties in preferences update operation(#3844) 2023-10-24 14:46:56 -04:00
Elliot DeNolf
c8f57dd9b9 chore: clean up changelog 2023-10-24 14:21:18 -04:00
Elliot DeNolf
b901401ab3 chore(release): payload/2.0.13 [skip ci] 2023-10-24 14:17:04 -04:00
Elliot DeNolf
00a1ce754a ci: conventional commits changelog (#3843)
* feat(live-preview): another oen

* wip: changelog script

* wippppp

* chore: this worked

* wip: changelog working

* chore(script): working changelog gen

* chore(script): update changelog during release
2023-10-24 14:10:14 -04:00
Dan Ribbens
7eee0ec355 fix: prevent storing duplicate user preferences (#3833)
* fix(payload): prevent storing duplicate user preferences

* test: add int tests for payload-preferences

* chore: add comments and cleanup preferences useEffects
2023-10-24 14:07:43 -04:00
Jacob Fletcher
78312d9d8d fix(templates): gql footer queries 2023-10-24 10:37:29 -04:00
Jacob Fletcher
fa8d591b4b chore: ignores uploads dir in test suite 2023-10-24 09:54:54 -04:00
Paul
a0019d0a78 fix: named tabs not appearing in the gql mutation input type (#3835) 2023-10-24 07:40:51 -04:00
Jarrod Flesch
5a0d0dbc02 fix: reverting localized versions (#3831) 2023-10-23 21:57:24 -04:00
Elliot DeNolf
fa550740eb Merge pull request #3832 from payloadcms/chore/plugin-search
chore: import plugin-search
2023-10-23 17:08:51 -04:00
Elliot DeNolf
e987e2b0ed chore: force pnpm-lock.yaml 2023-10-23 17:08:00 -04:00
Elliot DeNolf
69ca713e45 Revert "chore: imports search plugin (#3675)"
This reverts commit 4f77073e2c.
2023-10-23 17:05:53 -04:00
Jacob Fletcher
71a3e5ba10 fix: prevents document sidebar from collapsing 2023-10-23 17:01:58 -04:00
Elliot DeNolf
9c250d57a4 ci: add plugin-search build 2023-10-23 17:00:17 -04:00
Elliot DeNolf
06b5b3dc6f chore: sync pnpm-lock.yaml 2023-10-23 16:50:48 -04:00
Jacob Fletcher
4f77073e2c chore: imports search plugin (#3675)
* feat: builds plugin

* feat: abstracts syncWithSearch

* feat: attaches payload to beforeSync hook

* feat: enables defaultPriorities

* fix: syncWithSearch args and return type

* 0.0.2

* feat: uses config provider to format linkToDoc

* feat: supports versions api

* 0.0.4

* chore: bumps payload to v0.15.6

* 0.0.5

* chore: updates react peerDep

* 0.0.6

* chore: updates payload and package scope

* 1.0.0

* chore: correct import directive in readme code sample

* chore: exports types (#5)

* chore: eslint and prettier

* chore: migrates demo to payload v1.8.2

* fix: adjusts payload peer dep range (#8)

* 1.0.1

* chore(plugin-search): cleanup after import

* chore(plugin-search): lint

* chore(plugin-search): format

* chore: force pnpm-lock.yaml

---------

Co-authored-by: Colin Ramsay <colinramsay@users.noreply.github.com>
Co-authored-by: Elliot DeNolf <denolfe@gmail.com>
2023-10-23 16:50:09 -04:00
Elliot DeNolf
41e3212949 chore(plugin-search): format 2023-10-23 16:45:45 -04:00
Elliot DeNolf
e9eac9acce chore(plugin-search): lint 2023-10-23 16:45:14 -04:00
Elliot DeNolf
7e20298648 chore(plugin-search): cleanup after import 2023-10-23 16:44:14 -04:00
Daniel Kirchhof
e8f237783b fix: only parses live preview ready message when same origin (#3791) 2023-10-23 15:51:32 -04:00
Elliot DeNolf
d4e6791494 chore: plugin-cloud suite (#3821)
* test: plugin-cloud suite

* chore: clean up dist imports

* chore(plugin-cloud): linting
2023-10-23 14:50:21 -04:00
dependabot[bot]
fa4ceb5322 chore(deps): bump postcss in /packages/plugin-stripe/demo (#3813)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.20 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.20...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 14:31:53 -04:00
dependabot[bot]
9149913319 chore(deps): bump semver in /packages/plugin-stripe/demo (#3814)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 14:31:43 -04:00
dependabot[bot]
284f66e6d8 chore(deps): bump graphql in /packages/plugin-stripe/demo (#3815)
Bumps [graphql](https://github.com/graphql/graphql-js) from 16.6.0 to 16.8.1.
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](https://github.com/graphql/graphql-js/compare/v16.6.0...v16.8.1)

---
updated-dependencies:
- dependency-name: graphql
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 14:31:34 -04:00
Jacob Fletcher
a13ec2ebc4 fix: renders live preview for globals (#3801) 2023-10-23 14:30:51 -04:00
Jacob Fletcher
eaef0e7395 fix: alignment of collapsible within row (#3822) 2023-10-23 14:30:37 -04:00
Elliot DeNolf
4268b7833e chore: export FileData type 2023-10-23 14:02:33 -04:00
Jarrod Flesch
c476d01f4e fix: adjusts props to accept components for before and after fields instead of functions (#3820) 2023-10-23 14:01:51 -04:00
Elliot DeNolf
1a5db608c0 chore: update changelog 2023-10-23 13:34:26 -04:00
Elliot DeNolf
94de5c6c24 chore(release): richtext-slate/1.0.7 [skip ci] 2023-10-23 13:21:00 -04:00
Elliot DeNolf
5d4ef620b1 chore(release): richtext-lexical/0.1.15 [skip ci] 2023-10-23 13:20:48 -04:00
Elliot DeNolf
cac33ac275 chore(release): payload/2.0.12 [skip ci] 2023-10-23 13:18:50 -04:00
Elliot DeNolf
219aa3b2f3 fix: remove duplicate removal of temp upload file (#3818) 2023-10-23 13:01:18 -04:00
Elliot DeNolf
dd0ff50621 chore: sync pnpm-lock.yaml 2023-10-23 00:27:51 -04:00
Elliot DeNolf
591c0a0786 Merge pull request #3677 from payloadcms/chore/plugin-stripe
chore: imports stripe plugin
2023-10-23 00:25:50 -04:00
Elliot DeNolf
a197161390 chore: sync pnpm-lock.yaml 2023-10-23 00:24:15 -04:00
Elliot DeNolf
ae5b397bc8 test(plugin-stripe): stub tests 2023-10-23 00:11:19 -04:00
Elliot DeNolf
e6b2d3d1fc chore(plugin-stripe): format 2023-10-22 17:40:01 -04:00
Elliot DeNolf
6b19525a65 chore(plugin-stripe): eslint fix 2023-10-22 17:39:30 -04:00
Elliot DeNolf
c86ae0a9d2 chore(plugin-stripe): cleanup after import 2023-10-22 17:38:56 -04:00
Alessio Gravili
9277b306de fix(richtext-lexical): infinite re-rendering after draft save (#3709) 2023-10-22 01:41:58 +02:00
Alessio Gravili
156eae2551 fix(richtext-lexical): do not update Block node if form data is the same 2023-10-22 00:21:09 +02:00
Alessio Gravili
e197e0316f fix(richtext-*): hasMany relationships not populated correctly 2023-10-21 23:58:47 +02:00
Alessio Gravili
863b79348b feat(richtext-lexical): linebreak html converter 2023-10-21 23:30:47 +02:00
Alessio Gravili
30ff65d0b4 Merge pull request #3805 from payloadcms/fix/lexical-use-client
fix(richtext-lexical): missing use client markers required for next.js compatibility
2023-10-21 23:25:09 +02:00
Alessio Gravili
3185771551 fix(richtext-lexical): missing use client markers required for next.js compatibility 2023-10-21 23:21:12 +02:00
Jarrod Flesch
ea83c3f3a2 fix: simplify how the search input and query params are connected (#3797) 2023-10-21 10:04:54 -04:00
Alessio Gravili
072f7febd2 chore(richtext-lexical): do not capitalize H2 and H3 headings 2023-10-21 14:56:40 +02:00
Alessio Gravili
b5c7bbed93 fix(richtext-lexical): defaultValue property didn't fit into field schema 2023-10-21 14:52:26 +02:00
Alessio Gravili
931f6ff519 fix(richtext-lexical): Field Description shows up twice (#3793) 2023-10-21 14:51:11 +02:00
Alessio Gravili
0af36af16c feat(richtext-lexical): HTML Serializer (#3685)
* chore(richtext-lexical): add jsdocs for afterReadPromise in GraphQL

* feat(richtext-lexical): HTML Serializer

* chore(richtext-lexical): adjust comment

* chore(richtext-lexical): change the way the html serializer works

* chore: working html converter field, improve various exports

* feat: link and heading html serializers

* fix: populationPromises not being added properly

* feat: allow html serializers to be async

* feat: upload html serializer

* feat: text format => html

* feat: lists => html

* feat: Quote => html

* chore: improve Checklist => html conversion, by passing in the full parent to converters
2023-10-21 14:37:59 +02:00
Alessio Gravili
f6adbae0c7 feat: collection, global and field props for hooks, fix request context initialization, add context to global hooks (#3780)
* feat: pass collection, global and field props to collection, global and field hooks - where applicable

* fix: initial request context not set for all operations

* chore: add tests which check the collection prop for collection hooks

* feat: add context to props of global hooks

* chore: add global tests for global and field props

* chore: int tests: use JSON instead of object hashes
2023-10-21 11:40:57 +02:00
Jacob Fletcher
67d61df563 fix: standardizes layout of document fields (#3798) 2023-10-20 22:22:41 -04:00
Jacob Fletcher
01380bebe5 fix(templates/website): missing env vars (#3799) 2023-10-20 18:09:43 -04:00
Elliot DeNolf
5719b1b39a test: remove declare module from tests 2023-10-20 16:46:14 -04:00
Jarrod Flesch
f259645488 fix: issue where dragging unsortable item would crash the page (#3789) 2023-10-20 16:14:08 -04:00
Elliot DeNolf
eec60d5883 chore: rename .eslintrc.cjs -> .js 2023-10-20 15:50:25 -04:00
Elliot DeNolf
d4548d73d5 ci: checkout code for filters to work with non-PRs 2023-10-20 15:14:20 -04:00
Elliot DeNolf
ccc7c51c90 ci: detect code changes by dir, add builds for templates (#3724)
* ci: add simple website template build

* ci: copy .env.example

* ci: add mongo

* ci: add other templates via matrix

* ci: move templates to separate workflow

* ci: implement paths-filter

* chore: trigger template filter

* chore: refine filters

* chore: adjust needs_build

* chore: undo trigger
2023-10-20 14:57:47 -04:00
Kalon Robson
ec5e35ff71 chore(templates): fix e-commerce template jsx component type error (#3717) 2023-10-20 13:37:21 -04:00
Kalon Robson
55b9bf40df chore(templates): fix website template unused ts-expect-error (#3652) 2023-10-20 13:37:02 -04:00
Elliot DeNolf
5282673746 chore(templates): revert unintentional change 2023-10-20 11:58:35 -04:00
Elliot DeNolf
298ca0b7ae chore(templates): copy yarn.lock in Dockerfile (#3787) 2023-10-20 10:52:00 -04:00
Elliot DeNolf
71407e19e2 chore(deps): bump sharp for CVE-2023-4863 (#3786) 2023-10-20 10:40:59 -04:00
Jarrod Flesch
09078bdb40 fix(examples): ensure next middleware is built, removes unnecessary alias (#3771) 2023-10-20 07:47:07 -04:00
Elliot DeNolf
e84f5ded28 chore: update changelog 2023-10-19 17:34:33 -04:00
Elliot DeNolf
a475b9b28b chore(release): live-preview-react/0.1.5 [skip ci] 2023-10-19 16:42:58 -04:00
Elliot DeNolf
baad7d3360 chore(release): live-preview/0.1.5 [skip ci] 2023-10-19 16:42:33 -04:00
Jacob Fletcher
7fcb972dfa fix(live-preview): blocks field (#3753) 2023-10-19 16:40:16 -04:00
Elliot DeNolf
01245b07f8 chore(release): richtext-lexical/0.1.14 [skip ci] 2023-10-19 16:14:06 -04:00
Elliot DeNolf
d2f45343da chore(release): db-postgres/0.1.10 [skip ci] 2023-10-19 16:13:55 -04:00
Elliot DeNolf
5ba95df674 chore(release): db-mongodb/1.0.4 [skip ci] 2023-10-19 16:13:46 -04:00
Elliot DeNolf
40f98e4a0d chore(release): bundler-webpack/1.0.4 [skip ci] 2023-10-19 16:13:39 -04:00
Elliot DeNolf
584ead9fe2 chore(release): bundler-vite/0.1.3 [skip ci] 2023-10-19 16:13:29 -04:00
Elliot DeNolf
b6bf354f6a chore(release): payload/2.0.11 [skip ci] 2023-10-19 16:10:46 -04:00
Elliot DeNolf
9918c2499a chore(deps): bump sass (#3768)
* chore(deps): bump sass and sass-loader

* chore: handle sass slash div deprecation
2023-10-19 15:52:39 -04:00
Jarrod Flesch
8c48c8beb5 fix(webpack-bundler): corrects payload alias (#3769) 2023-10-19 15:21:39 -04:00
Jacob Fletcher
2697753715 chore(live-preview): significantly improves test coverage (#3763) 2023-10-19 14:56:16 -04:00
Jarrod Flesch
4b13686f61 fix: corrects versions collection casing (#3739) 2023-10-19 13:08:24 -04:00
Jessica Chowdhury
ab7999d3c1 fix: updates req after file resize (#3754) 2023-10-19 12:56:24 -04:00
Jessica Chowdhury
a592188c1d fix: correctly renders focal point when crop is set to false (#3759) 2023-10-19 12:51:13 -04:00
Elliot DeNolf
5ff0846b6c feat: add ability to opt out of type gen declare statement (#3765)
* feat: add ability to opt out of type gen declare statement

* chore: docs wording
2023-10-19 12:44:28 -04:00
xHomu
13cabf129e fix: account for many slug types in generate types (#3698)
* Fix generate:types bug #3697

generateEntityDeclarations function creates mismatched type names. We'll simply use the existing Config type instead.

* code cleanup
2023-10-19 11:36:26 -04:00
Elliot DeNolf
c173e55b89 fix(bundler-webpack): better node_modules resolution (#3744)
* fix(bundler-webpack): better node_modules resolution

* chore: see if retries are affecting new webpack changes

* chore: reinstate retries

This reverts commit 96989295ba.

* chore: default to process.cwd() if cannot find node_modules path
2023-10-19 11:28:31 -04:00
Take Weiland
bcdd2d626f fix: handle graphQL: false on globals when building policy type (#3729) 2023-10-19 09:13:51 -04:00
Elliot DeNolf
67682248c8 chore: more master -> main readme renames 2023-10-19 09:08:40 -04:00
Jacob Fletcher
7c52d6ee28 Merge pull request #3745 from payloadcms/fix/misc-admin
Fix/misc admin
2023-10-19 09:06:20 -04:00
Elliot DeNolf
bc65b53ce5 chore(release): eslint-config-payload/1.0.0 2023-10-18 21:37:35 -04:00
Elliot DeNolf
c8cc6ea1cc chore(script): more prompts during publish 2023-10-18 21:29:26 -04:00
Jacob Fletcher
4e05e6fd85 fix(a11y): tab indices 2023-10-18 17:55:55 -04:00
Jacob Fletcher
6988a68eaf fix: renders id as fallback title in DeleteDocument 2023-10-18 17:55:55 -04:00
Jacob Fletcher
a272692726 chore: refines drawer and blur styles 2023-10-18 17:55:39 -04:00
Dan Ribbens
229e4459cb fix(db-postgres): block and array inserts error (#3714)
Co-authored-by: James <james@trbl.design>
2023-10-18 16:53:26 -04:00
Take Weiland
056585ed31 fix: properly handles hideAPIURL (#3721) 2023-10-18 16:36:57 -04:00
Elliot DeNolf
b545433ee6 chore(templates): add payload helper npm script 2023-10-18 16:11:58 -04:00
Elliot DeNolf
4c938b5f9e chore(plugin-nested-docs): lint fix (#3740) 2023-10-18 14:40:48 -04:00
Elliot DeNolf
f1d8fa9999 chore: add 2.0 announcement banner 2023-10-18 14:38:58 -04:00
Jarrod Flesch
1670a603f6 chore: adjust where sharp types are imported from (#3645) 2023-10-18 11:44:49 -04:00
Elliot DeNolf
22f1fa8fc9 chore: update issue template and repro guide 2023-10-18 11:43:11 -04:00
Jacob Fletcher
370e8d1938 chore: replaces bg blur in document controls (#3736) 2023-10-18 11:40:25 -04:00
Elliot DeNolf
3a3eab761e fix: filesRequiredOnCreate typing, tests, linting (#3737) 2023-10-18 11:27:55 -04:00
Jacob Fletcher
238f7e1b94 chore(examples/live-preview): pins @payloadcms/live-preview-react to latest 2023-10-18 10:18:01 -04:00
Jacob Fletcher
58e2083882 Merge pull request #3719 from payloadcms/fix/live-preview/uploads
Fix/live preview/uploads
2023-10-17 17:05:30 -04:00
Jacob Fletcher
20cde242fb fix(live-preview): properly handles uploads and hasOne monomorphic relationships 2023-10-17 17:00:59 -04:00
Elliot DeNolf
f50a392d59 chore(script): update release script [skip ci] 2023-10-17 17:00:14 -04:00
Elliot DeNolf
fa1740d906 chore: update changelog 2023-10-17 16:51:24 -04:00
Elliot DeNolf
e847061c74 chore(release): payload/2.0.10 [skip ci] 2023-10-17 16:45:10 -04:00
Jacob Fletcher
ebd5e6ae8f chore: types fieldSchemaToJSON 2023-10-17 16:39:36 -04:00
TomDo1234
48de89794b feat: filesRequired is optional for uploads (#3668)
* filesRequired is optional for uploads

* More accurate name

* Updated docs

* ensure that by default you throw on missing file
2023-10-17 15:21:16 -04:00
Elliot DeNolf
ef4b5d8bfd chore: add payload as peer dep to all adapters (#3716) 2023-10-17 15:20:09 -04:00
Elliot DeNolf
5711d42eca chore: update pnpm-lock.yaml 2023-10-17 15:03:58 -04:00
Elliot DeNolf
a446a788a9 chore(release): payload/2.0.9 2023-10-17 15:00:55 -04:00
Elliot DeNolf
df57196d19 chore(live-preview-react): adjust live-preview semver dep 2023-10-17 15:00:55 -04:00
Alessio Gravili
86c563e4e5 Merge remote-tracking branch 'origin/main' 2023-10-17 20:57:17 +02:00
Alessio Gravili
734b8c08ed chore(richtext-lexical): add additional safety checks for incorrect data passed into the editor 2023-10-17 20:56:22 +02:00
geminigeek
68c5a57515 [fix] Register first user verify update missing transaction id / req (#3665)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-10-17 14:50:56 -04:00
Elliot DeNolf
d9f0b7bd30 chore(release): live-preview-react/0.1.4 2023-10-17 13:23:10 -04:00
Elliot DeNolf
5ecfe3da28 chore(release): richtext-lexical/0.1.13 2023-10-17 13:18:30 -04:00
Elliot DeNolf
3e3163e875 chore(release): live-preview/0.1.4 2023-10-17 13:17:33 -04:00
Elliot DeNolf
cfe1698dfd chore: update changelog 2023-10-17 13:15:36 -04:00
Elliot DeNolf
5722634660 chore(release): v2.0.8 2023-10-17 13:06:25 -04:00
Jacob Fletcher
cdbfc9132a chore: optimizes live preview (#3713) 2023-10-17 12:42:31 -04:00
Jacob Fletcher
dd0ac066ce feat(live-preview): caches field schema (#3711) 2023-10-17 12:11:55 -04:00
PatrikKozak
8b8ceabbdd fix(templates): user access control (#3712) 2023-10-17 12:07:37 -04:00
Alessio Gravili
8da18d3496 Merge pull request #3707 from payloadcms/fix/3683
fix(richtext-lexical): Blocks Field: Sub-forms being re-rendered unnecessarily
2023-10-17 17:33:05 +02:00
Elliot DeNolf
6cd4df3dc4 chore(script): properly version and publish non-latest packages 2023-10-17 11:30:09 -04:00
Elliot DeNolf
e74dc8633b ci: add retries to e2e tests (#3708)
* ci: add retries to e2e tests

* ci: add timeout_minutes for retry
2023-10-17 11:26:34 -04:00
Alessio Gravili
2f945919a3 chore: disable props for useIntersect hook 2023-10-17 17:24:50 +02:00
Alessio Gravili
52dc9177d7 chore: enable forceRender for richtext-lexical's Blocks feature form, and all their sub-forms 2023-10-17 16:44:34 +02:00
Alessio Gravili
cec757d098 chore: make sure intersectionObserver does not cause re-renders if forceRender is enabled 2023-10-17 16:34:44 +02:00
Jacob Fletcher
80e57150a0 chore: refines live preview shadow and bg (#3706) 2023-10-17 10:11:21 -04:00
Elliot DeNolf
2969da7402 chore(release): create-payload-app/1.0.0 2023-10-16 23:32:32 -04:00
Elliot DeNolf
35da1db99f chore(create-payload-app): use swc, cleanup scripts 2023-10-16 23:17:45 -04:00
Elliot DeNolf
a578226d34 ci: rework release-it script 2023-10-16 22:47:27 -04:00
James
8c75f32620 chore: website seed script compatibility with postgres + mongo 2023-10-16 18:39:28 -04:00
James
c3ab8b9115 Merge branch 'main' of github.com:payloadcms/payload 2023-10-16 18:34:18 -04:00
James
993568a195 fix: bug with seeding ecommerce 2023-10-16 18:34:10 -04:00
Jacob Fletcher
c3cec64220 chore: refines main nav (#3703) 2023-10-16 17:36:05 -04:00
Elliot DeNolf
084e9f0ff8 chore(release): db-postgres/0.1.9 2023-10-16 16:32:03 -04:00
James Mikrut
9f0ef9b7da chore: template compatibility with postgres (#3701)
* fix: blocks within groups in postgres

* chore: template compatibility
2023-10-16 16:26:21 -04:00
James Mikrut
c384f490c8 Merge pull request #3700 from payloadcms/fix/postgres-blocks-within-groups
fix: blocks within groups in postgres
2023-10-16 16:25:46 -04:00
James
45a62ba949 fix: blocks within groups in postgres 2023-10-16 16:12:21 -04:00
Elliot DeNolf
1eae5f9c99 test(create-payload-app): test create project for all templates 2023-10-16 15:12:59 -04:00
James
dfa861557d chore: website template postgres compatibility 2023-10-16 14:47:18 -04:00
James
228fd58020 chore: ecommerce template postgres compatibility 2023-10-16 14:40:37 -04:00
Take Weiland
150799e10e fix: some local operations missing req.transactionID (#3651)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-10-16 14:17:58 -04:00
Elliot DeNolf
823436a883 chore(release): richtext-slate/1.0.6 2023-10-16 14:16:20 -04:00
Elliot DeNolf
cbb0ba1a2c chore(release): richtext-lexical/0.1.12 2023-10-16 14:15:55 -04:00
Alessio Gravili
cb39354a9d fix(richtext-*): link drawer form receiving incorrect field schema (#3696) 2023-10-16 19:43:23 +02:00
Jacob Fletcher
1625ff244e fix: renders mobile document controls (#3695) 2023-10-16 13:37:40 -04:00
Alessio Gravili
24918fe1d2 fix(richtext-lexical): #3682 isolated editor container causing z-index issues 2023-10-16 18:56:25 +02:00
Alessio Gravili
b8a58666e7 fix(richtext-*): extra fields not being iterated correctly (#3693) 2023-10-16 18:47:52 +02:00
Elliot DeNolf
2e6a2c8355 ci: add plugin-nested-docs build 2023-10-16 12:16:14 -04:00
Elliot DeNolf
1fdff92525 chore(script): use semver to validate and show next version 2023-10-16 12:10:30 -04:00
Elliot DeNolf
7da5f6e92a chore(release): plugin-nested-docs/1.0.8 2023-10-16 12:07:17 -04:00
James Mikrut
67c7572e5f Merge pull request #3689 from payloadcms/chore/nested-docs
Chore/nested docs
2023-10-16 11:44:11 -04:00
craigrdaniels
e311e8fff9 fix: autosave time shown minutes only (#3492) 2023-10-16 11:32:31 -04:00
James
086e50b9b3 chore: renames nested-docs test suite 2023-10-16 11:30:45 -04:00
James
66ab6c587d chore: moves nested docs to monorepo 2023-10-16 11:28:40 -04:00
Elliot DeNolf
786fb926c2 chore: update changelog 2023-10-16 11:16:56 -04:00
James
7d954b11a3 Merge branch 'feat/allow-filteroptions-null' of github.com:payloadcms/payload into chore/nested-docs 2023-10-16 11:09:23 -04:00
Jarrod Flesch
3c5044368d fix: corrects add block index (#3681) 2023-10-16 10:58:54 -04:00
Jacob Fletcher
f129d6c607 Merge pull request #3687 from payloadcms/dependabot/npm_and_yarn/examples/testing/babel/traverse-7.23.2
chore(deps): bump @babel/traverse from 7.22.17 to 7.23.2 in /examples/testing
2023-10-16 10:57:29 -04:00
dependabot[bot]
de2d985405 chore(deps): bump @babel/traverse in /examples/testing
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.17 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-16 14:44:39 +00:00
Jacob Fletcher
060f3c73fa Merge pull request #3674 from payloadcms/chore/plugin-nested-docs
chore: imports nested docs plugin
2023-10-16 10:43:52 -04:00
Jacob Fletcher
62ae7be113 chore(plugin-nested-docs): migrates demo to payload 2.x 2023-10-16 10:40:23 -04:00
Jacob Fletcher
771df061b4 chore(plugin-nested-docs): migrates to monorepo setup 2023-10-16 10:29:04 -04:00
Alessio Gravili
09e64c3be8 chore: _community test: add missing "extends" to tsconfig.json 2023-10-16 16:28:17 +02:00
PatrikKozak
1a006fef19 chore(templates/website): uses correct logo color in dark mode (#3667) 2023-10-16 10:14:09 -04:00
James
c4cac99875 feat: allows filterOptions to return null 2023-10-16 10:01:19 -04:00
Jessica Chowdhury
d616772740 fix: misc upload crop/focal point updates (#3580) 2023-10-16 08:42:35 -04:00
Elliot DeNolf
4b9e87bb4d chore(release): db-postgres/0.1.8 2023-10-15 21:04:46 -04:00
Elliot DeNolf
ff5e174497 chore(script): multiselect publishing prompt 2023-10-15 20:53:16 -04:00
Elliot DeNolf
34017e1758 chore(release): payload/2.0.7 2023-10-15 20:49:18 -04:00
James Mikrut
23d95526ab Merge pull request #3666 from payloadcms/fix/empty-in-array
fix: empty inArray no longer crashes postgres
2023-10-15 18:05:15 -04:00
James
59b87fdb21 chore: typo 2023-10-15 17:55:30 -04:00
James
f2ac1f7d48 chore: merge main 2023-10-15 17:31:24 -04:00
James
8d4f39af5e Merge branch 'main' of github.com:payloadcms/payload into fix/empty-in-array 2023-10-15 17:29:51 -04:00
James
c4ac341d75 fix: empty inArray no longer crashes postgres 2023-10-15 17:28:13 -04:00
Elliot DeNolf
27589482dd chore(release): @payloadcms/db-postgres/0.1.7 2023-10-15 14:12:02 -04:00
James Mikrut
d7ab4b7062 Merge pull request #3642 from payloadcms/fix/#3568-postgres-relationships-in-array
fix(db-postgres): query relationship in array alias
2023-10-15 11:31:57 -04:00
James
2c8fbf1be3 chore: adds specificity to tests 2023-10-15 11:08:16 -04:00
James
eec88f8f1b Merge branch 'fix/#3568-postgres-relationships-in-array' of github.com:payloadcms/payload into fix/#3568-postgres-relationships-in-array 2023-10-15 10:43:32 -04:00
James Mikrut
c9844f2958 Update README.md 2023-10-15 10:01:58 -04:00
James
1481ef97b5 Merge branch 'main' of github.com:payloadcms/payload 2023-10-15 09:44:19 -04:00
James
a89e89fb80 chore: documents pagination: false 2023-10-15 09:44:00 -04:00
Alessio Gravili
7e7eeb059d chore(richtext-lexical): add 'use client' to field and cell 2023-10-15 14:25:36 +02:00
Alessio Gravili
dc2a502dcc perf(richtext-lexical): remove unnecessary prop drilling and load hooks being run for initialState 2023-10-15 14:07:24 +02:00
Jacob Fletcher
a67a9379ce Merge remote-tracking branch 'plugin-sentry/main' into chore/plugin-sentry 2023-10-15 02:49:33 -04:00
Jacob Fletcher
7bbd292efa Merge remote-tracking branch 'plugin-form-builder/main' into chore/plugin-form-builder 2023-10-15 02:31:29 -04:00
Jacob Fletcher
3eefe8cb21 Merge remote-tracking branch 'plugin-nested-docs/main' into chore/plugin-nested-docs 2023-10-15 02:28:29 -04:00
Jacob Fletcher
29ef8e797d Merge remote-tracking branch 'plugin-redirects/main' into chore/plugin-redirects 2023-10-15 01:47:10 -04:00
Jacob Fletcher
b0a62442e5 Merge remote-tracking branch 'plugin-stripe/main' into chore/plugin-stripe 2023-10-15 01:42:42 -04:00
Jacob Fletcher
c6ce6024d2 Merge remote-tracking branch 'plugin-search/main' into chore/plugin-search 2023-10-15 01:30:02 -04:00
Jacob Fletcher
00daf728f4 Merge remote-tracking branch 'plugin-seo/main' into chore/plugin-seo 2023-10-15 00:53:27 -04:00
Elliot DeNolf
a9a5ba82d8 chore: update pnpm-lock.yaml 2023-10-14 21:09:15 -04:00
James
e6e8fae1c5 Merge branch 'main' of github.com:payloadcms/payload 2023-10-14 19:24:50 -04:00
James
a05868a7f3 chore: remove unnecessary peer dep 2023-10-14 19:24:32 -04:00
Elliot DeNolf
f27cd26575 chore(release): richtext-lexical/0.1.11 2023-10-14 17:35:44 -04:00
Elliot DeNolf
db835ea5c8 chore(release): db-postgres/0.1.6 2023-10-14 17:35:26 -04:00
Jacob Fletcher
d8f265fb94 chore(examples): bumps deps to latest (#3655) 2023-10-14 16:49:47 -04:00
Alessio Gravili
d81d4eb075 feat(richtext-lexical): LexicalPluginToLexical migration feature 2023-10-14 22:36:16 +02:00
James
52f89c0136 fix(db-postgres): ensures columns are nullable if within field with condition 2023-10-14 15:34:27 -04:00
Dan Ribbens
b0083b7c07 test: fix missing variable 2023-10-14 15:32:06 -04:00
Dan Ribbens
21649537a6 fix(db-postgres): query relationship path inside arrays 2023-10-14 15:17:42 -04:00
Elliot DeNolf
9be34c9599 chore(release): richtext-lexical/0.1.10 2023-10-14 14:38:58 -04:00
Elliot DeNolf
8ca632e541 chore(release): richtext-slate/1.0.5 2023-10-14 14:38:48 -04:00
Elliot DeNolf
2ef79145a4 chore(release): payload/2.0.6 2023-10-14 14:37:18 -04:00
James
a0641a445d Merge branch 'main' of github.com:payloadcms/payload 2023-10-14 14:34:46 -04:00
James
3a2e78f7f3 chore: add peer deps for richtext packages 2023-10-14 14:34:40 -04:00
James Mikrut
976d69d154 Merge pull request #3657 from payloadcms/chore/export-pattern
chore: properly separates server / client exports
2023-10-14 14:32:11 -04:00
James
66018362fe chore: properly separates server / client exports 2023-10-14 14:08:08 -04:00
Elliot DeNolf
647fe23d1c chore(release): richtext-lexical/0.1.9 2023-10-14 12:26:28 -04:00
Elliot DeNolf
d7c61861f6 chore(release): richtext-slate/1.0.4 2023-10-14 12:26:19 -04:00
Elliot DeNolf
7caa098023 chore(release): db-postgres/0.1.5 2023-10-14 12:25:54 -04:00
James Mikrut
fd54c40400 Merge pull request #3654 from payloadcms/chore/dynamic-drizzle-kit-import
chore: only imports drizzle-kit if it will be used
2023-10-14 12:21:14 -04:00
James
e180131314 chore: only imports drizzle-kit if it will be used 2023-10-14 12:13:13 -04:00
James
5902d4542b Merge branch 'main' of github.com:payloadcms/payload 2023-10-14 11:51:13 -04:00
James
6bc282444e chore: slate compatibility with next-payload 2023-10-14 11:49:38 -04:00
Alessio Gravili
4dc6c09347 feat(richtext-lexical): SlateToLexical migration feature 2023-10-14 13:36:32 +02:00
Elliot DeNolf
03b9ab0054 chore: cleanup scripts 2023-10-13 16:34:37 -04:00
Elliot DeNolf
3c3c93f483 chore(release): richtext-lexical/0.1.8 2023-10-13 16:05:59 -04:00
Alessio Gravili
5dbfb1a335 fix(richtext-lexical): Blocks: working population for crazy amounts of nesting 2023-10-13 21:04:56 +02:00
Alessio Gravili
d411874589 chore(richtext-lexical): Blocks: clean up population 2023-10-13 20:02:18 +02:00
Jacob Fletcher
8358e2f2d2 chore: properly scopes selector in bulk update e2e test (#3640) 2023-10-13 13:51:52 -04:00
Dan Ribbens
2c67eff059 fix(db-postgres): query relationship in array alias 2023-10-13 13:32:44 -04:00
Elliot DeNolf
012b8e6f90 chore: remove pnpm from engines, shows warning when not using pnpm 2023-10-13 13:05:25 -04:00
Jacob Fletcher
fcd4c8d830 fix: document sidebar vertical overflow (#3639) 2023-10-13 13:00:02 -04:00
Elliot DeNolf
81ec435363 chore(release): richtext-lexical/0.1.7 2023-10-13 12:49:08 -04:00
Jacob Fletcher
e116fcfbf5 docs: updates references of master to main 2023-10-13 12:44:45 -04:00
Alessio Gravili
c47632dc1d fix(richtext-lexical): Blocks: Nested Blocks having incorrect initial data (e.g. missing rows property) (#3638)
* fix(richtext-lexical): Blocks: Sub-Blocks having incorrect initial data (e.g. missing rows property)

* chore: remove unnecessary comment
2023-10-13 18:39:34 +02:00
Jacob Fletcher
0dab68b336 chore: prevents group fields from overflowing into the sidebar (#3637) 2023-10-13 12:04:39 -04:00
Jacob Fletcher
483f93bfcf chore: cleans up admin e2e tests (#3636) 2023-10-13 12:04:05 -04:00
Jessica Chowdhury
4bd01df411 fix: login form clearing out and field spacing (#3633) 2023-10-13 11:15:07 -04:00
Elliot DeNolf
927a1ab049 chore(release): plugin-nested-stripe/0.0.15 2023-10-13 10:57:48 -04:00
Elliot DeNolf
f23ae28d45 chore(deps): add payload 2.0 to peer deps 2023-10-13 10:56:46 -04:00
Elliot DeNolf
8938f2b7e9 chore(release): plugin-nested-docs/1.0.7 2023-10-13 10:52:51 -04:00
Elliot DeNolf
ed8a9ffa09 chore(deps): add payload 2.0 to peer deps 2023-10-13 10:51:14 -04:00
Elliot DeNolf
7db69347a1 chore(release): plugin-redirects/1.0.1 2023-10-13 10:44:13 -04:00
Elliot DeNolf
6e22cf291c chore(deps): add payload 2.0 to peer deps 2023-10-13 10:42:08 -04:00
Elliot DeNolf
15cff2b1c5 chore(release): plugin-seo@1.0.15 2023-10-13 10:38:27 -04:00
Elliot DeNolf
864bf2c062 feat: update payload peer dep to 2.0 2023-10-13 10:37:13 -04:00
Jessica Chowdhury
c956a85252 fix: sidebar field permissions (#3629)
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
2023-10-13 10:29:22 -04:00
Elliot DeNolf
6ebc325520 chore(release): plugin-seo@1.0.14 2023-10-13 10:27:13 -04:00
Jacob Fletcher
beed83b231 fix: preview button conditions (#3613) 2023-10-13 10:23:26 -04:00
Elliot DeNolf
9aac5a3384 chore: update scripts 2023-10-13 10:22:07 -04:00
James Mikrut
3b1bdcbe41 chore: de-duplicates array / block data from form state (#3607)
* chore: consolidates array manipulation tests

---------

Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-10-13 09:45:00 -04:00
James Mikrut
d3d0971275 Merge pull request #3630 from payloadcms/fix/duplicating-drafts
fix: allows drafts to be duplicated
2023-10-13 08:50:36 -04:00
Jessica Boezwinkle
1a99d66cd0 fix: allows drafts to be duplicated 2023-10-13 11:59:23 +01:00
Elliot DeNolf
52c4a63bf1 chore(release): richtext-slate/1.0.3 2023-10-12 23:38:38 -04:00
Elliot DeNolf
3446d28602 chore(release): richtext-lexical/0.1.6 2023-10-12 23:38:29 -04:00
Elliot DeNolf
2eb18771a1 chore(release): live-preview-react/0.1.3 2023-10-12 23:38:25 -04:00
Elliot DeNolf
f6fd5d6742 chore(release): live-preview/0.1.3 2023-10-12 23:38:20 -04:00
Elliot DeNolf
76d6c88261 chore(release): db-postgres/0.1.4 2023-10-12 23:38:12 -04:00
Elliot DeNolf
10ebd76fcf chore(release): payload/2.0.5 2023-10-12 23:35:05 -04:00
Elliot DeNolf
36d6eb0a69 Merge pull request #3619 from payloadcms/import/create-payload-app
chore: import create-payload-app
2023-10-12 23:31:44 -04:00
Elliot DeNolf
cd1f8dc332 ci: remove cpa tests, degit doesn't work in actions 2023-10-12 23:20:00 -04:00
Elliot DeNolf
e4275aa228 chore(deps): update pnpm-lock.yaml 2023-10-12 20:37:06 -04:00
Elliot DeNolf
ddfcb2f12e ci: add create-payload-app 2023-10-12 20:29:05 -04:00
Elliot DeNolf
09f33eae2c chore(create-payload-app): remove all yarn refs 2023-10-12 19:09:18 -04:00
Elliot DeNolf
d3b7c9feec chore: ignore lint/format of create-payload-app 2023-10-12 19:06:25 -04:00
Elliot DeNolf
5fd3d43000 chore(create-payload-app): lint and format 2023-10-12 19:04:28 -04:00
Elliot DeNolf
7767679caa chore(create-payload-app): cleanup after import 2023-10-12 18:37:31 -04:00
Elliot DeNolf
fdf2e32005 chore: import create-payload-app 2023-10-12 18:22:27 -04:00
Elliot DeNolf
773be8744d chore: move all files into packages/create-payload-app 2023-10-12 18:20:19 -04:00
Alessio Gravili
40d5bc0c4a Merge pull request #3617 from payloadcms/fix/will-change 2023-10-13 00:05:24 +02:00
Alessio Gravili
fd33c790f2 chore(richtext-lexical): Improve animations of draggable block indicator 2023-10-13 00:03:51 +02:00
Alessio Gravili
ae7aac7639 fix(richtext-lexical): will-change css rule applied to all top-level nodes causing various issues 2023-10-12 23:50:31 +02:00
Jacob Fletcher
05cc2873b4 fix: properly renders custom buttons for globals (#3616) 2023-10-12 17:47:55 -04:00
Elliot DeNolf
171ee121e9 chore: remove workspace file 2023-10-12 17:18:12 -04:00
Elliot DeNolf
4af1d7d812 chore(deps): update dev deps 2023-10-12 17:15:47 -04:00
Dan Ribbens
d229fc391a fix(db-postgres): sorting on versions (#3611)
* fix(db-postgres): WIP sorting on versions

* fix: sorting collections with drafts

* chore: getQueryDraftsSort readability
2023-10-12 17:11:25 -04:00
Dan Ribbens
46a24a9822 fix(db-postgres): in and not_in query operator (#3608) 2023-10-12 17:11:12 -04:00
Alessio Gravili
06a51b3c9b fix: minor type issue in richText validate function 2023-10-12 22:59:03 +02:00
Alessio Gravili
1d4142ccc0 Merge pull request #3615 from payloadcms/chore/lexical-improvements 2023-10-12 22:53:34 +02:00
Alessio Gravili
f1741beba2 fix(richtext-lexical): dropdown menu closing too early on firefox 2023-10-12 22:52:41 +02:00
Alessio Gravili
9103277a10 chore(richtext-lexical): throw error if you try to use Slate or payload-plugin-lexical data inside of richtext-lexical 2023-10-12 22:07:20 +02:00
Elliot DeNolf
2a549438e0 chore(release): plugin-cloud-storage/1.1.1 2023-10-12 15:54:45 -04:00
Alessio Gravili
d84673f400 chore(richtext-lexical): improve slash menu positioning when it goes off the screen 2023-10-12 21:53:47 +02:00
Elliot DeNolf
46121b5891 chore(release): plugin-cloud-storage/1.1.0 2023-10-12 15:48:49 -04:00
Elliot DeNolf
f3b6e49781 chore: update peer deps 2023-10-12 15:45:12 -04:00
Alessio Gravili
15e23a3adc chore(richtext-lexical): improve anchor handling for slash menu and floating select menu 2023-10-12 21:01:47 +02:00
Elliot DeNolf
565929adcf chore(templates): better versioning in blank 2023-10-12 14:23:10 -04:00
Jacob Fletcher
8bbac60e60 fix: live preview device size (#3606) 2023-10-12 14:20:55 -04:00
Jacob Fletcher
15c7f0dbf3 docs: updates building your own live preview hook (#3604) 2023-10-12 14:20:02 -04:00
Nikola Ganchev
05eba56d7d Fix Bulgarian translation (#3582) 2023-10-12 14:18:28 -04:00
Elliot DeNolf
ab984b3ea9 fix(templates): peer dependencies for pnpm (#3603)
* fix(templates): peer dependencies for pnpm

* chore: more concise dep versions
2023-10-12 14:16:55 -04:00
Elliot DeNolf
a54638eb47 fix(templates): bump plugin-cloud version for blank 2023-10-12 14:15:51 -04:00
Alessio Gravili
69af8d9c83 chore: remove duplicate z-index property 2023-10-12 19:43:46 +02:00
Jacob Fletcher
64864686c4 fix: properly handles nested routes for live preview (#3586) 2023-10-12 12:45:39 -04:00
Jessica Chowdhury
32c0bef05e fix: updates admin e2e test for stepnav change (#3602) 2023-10-12 12:40:35 -04:00
Jacob Fletcher
a77513e94f fix(live-preview-react): prevents duplicative ready message in strict mode (#3601) 2023-10-12 12:17:59 -04:00
Jessica Chowdhury
aaf883909c fix: various stepnav related issues (#3599) 2023-10-12 12:01:16 -04:00
Alessio Gravili
cc56da11d6 fix: database adapter types 2023-10-12 17:53:35 +02:00
Jacob Fletcher
41d9c28073 feat(live-preview): exports ready function for reuse (#3600) 2023-10-12 11:42:21 -04:00
Jacob Fletcher
a071b97607 fix(live-preview): posts message to proper window (#3585) 2023-10-12 11:06:32 -04:00
Elliot DeNolf
cfd9231403 docs: update config overview 2023-10-12 10:28:04 -04:00
Elliot DeNolf
71dce62646 chore(script): list packages (#3590)
* chore(script): list-packages script

* chore(script): show commits since last tag
2023-10-12 09:40:57 -04:00
Elliot DeNolf
db376f24ba ci: add plugins build/test job 2023-10-11 22:20:17 -04:00
Elliot DeNolf
2752483ac7 Merge pull request #3588 from payloadcms/import/plugin-cloud
chore: import plugin-cloud
2023-10-11 22:13:22 -04:00
Elliot DeNolf
860f867c62 chore(plugin-cloud): use proper tsconfig.json 2023-10-11 22:04:12 -04:00
Elliot DeNolf
5b0adbe9c3 chore: git ignore lint/format of plugin-cloud 2023-10-11 21:59:31 -04:00
Elliot DeNolf
fb7d1be2f3 chore(plugin-cloud): lint and format 2023-10-11 21:57:47 -04:00
Elliot DeNolf
687a2e85d0 chore(plugin-cloud): cleanup after import 2023-10-11 21:50:22 -04:00
Elliot DeNolf
df80483afe chore: import plugin-cloud 2023-10-11 21:27:18 -04:00
Elliot DeNolf
8781770d83 chore: move all files into packages/plugin-cloud 2023-10-11 20:58:24 -04:00
Alessio Gravili
ed1d5a60f7 chore(richtext-lexical): link drawer: skip unnecessary reduceFieldsToValues call 2023-10-12 00:54:19 +02:00
Elliot DeNolf
50a0965561 0.5.2 2023-10-11 18:32:02 -04:00
Elliot DeNolf
c31fa5dd83 fix(create-payload-app): ensure only one db adapter 2023-10-11 18:31:43 -04:00
Elliot DeNolf
440eb8d9c6 2.2.5 2023-10-11 17:02:10 -04:00
Elliot DeNolf
1523b2be41 feat: add payload 2.0 to peer deps 2023-10-11 17:00:57 -04:00
Jarrod Flesch
68f55c4064 chore: temp readme updates 2023-10-11 15:53:28 -04:00
Jarrod Flesch
0d3544ea04 Merge branch 'main' of https://github.com/payloadcms/payload 2023-10-11 15:39:53 -04:00
Jarrod Flesch
f152f451dc chore: fix readme 2023-10-11 15:39:47 -04:00
Elliot DeNolf
5d92436e39 chore: sync pnpm-lock.yaml 2023-10-11 15:23:01 -04:00
Elliot DeNolf
63edecddd8 chore(release): bundler-webpack/1.0.3 2023-10-11 14:41:17 -04:00
Elliot DeNolf
65cdf6bfd0 fix(bundler-webpack): pnpm webpack aliases 2023-10-11 14:39:44 -04:00
Elliot DeNolf
9e831a6a00 chore(deps): revert drizzle-kit bump 2023-10-11 11:53:27 -04:00
Elliot DeNolf
0b64c5fb66 chore(deps): bump graphql, graphql-request, mongoose, drizzle-kit 2023-10-11 11:20:58 -04:00
James Mikrut
40426a25df Update CHANGELOG.md 2023-10-11 11:07:16 -04:00
James Mikrut
c91b1e8310 Merge pull request #3578 from payloadcms/fix/#3570
fix: postgres select fields within groups (#3570)
2023-10-11 11:00:49 -04:00
James
06e2fa9d11 fix: postgres select fields within groups (#3570) 2023-10-11 10:47:10 -04:00
Elliot DeNolf
72249d1ecd test(create-payload-app): stub out template verification 2023-10-11 10:31:59 -04:00
Elliot DeNolf
dc22496103 0.5.1 2023-10-11 10:27:49 -04:00
Nathan Clevenger
c6925ec29f Fix typo on graphql-schema.mdx (#3548) 2023-10-11 10:25:20 -04:00
Leonard Struck
8f46b31249 fix "crop" translation de (#3567) 2023-10-11 10:24:43 -04:00
Elliot DeNolf
af1c2e924e chore: rename create-project test suite 2023-10-11 10:24:27 -04:00
Elliot DeNolf
1487250752 feat(create-payload-app): more explicit versioning of deps 2023-10-11 10:23:23 -04:00
James Mikrut
e3c776523a fix: #3511, documents don't delete their versions (#3520)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-10-11 10:20:57 -04:00
Dan Ribbens
c09e9d96cf fix(db-postgres): update password error (#3575) 2023-10-11 10:19:00 -04:00
Dan Ribbens
aabc0650f8 fix(db-postgres): drafts cannot be saved because not null constraint (#3547) 2023-10-11 10:18:44 -04:00
Elliot DeNolf
4dd4e9aaae chore(deps): script deps 2023-10-11 10:16:06 -04:00
Elliot DeNolf
3b63b7fc3c chore: update contributing.md links 2023-10-10 22:31:25 -04:00
Alexander
f0e2e78b82 fix(i18n): "crop" translation for ru and ua (#3566) 2023-10-10 19:31:36 -04:00
Elliot DeNolf
a154adf066 chore(examples): update nodemon to respond to prompts 2023-10-10 18:37:33 -04:00
Elliot DeNolf
d86bcc1495 chore: update publish script 2023-10-10 17:48:42 -04:00
Elliot DeNolf
2b7043c6e6 chore(release): payload/2.0.4 2023-10-10 17:45:36 -04:00
Jarrod Flesch
e0afeeca97 fix: API tab breadcrumbs and results indentation (#3564) 2023-10-10 17:33:15 -04:00
Jacob Fletcher
76e306ddd8 fix: sticky sidebar (#3563) 2023-10-10 17:20:11 -04:00
Jacob Fletcher
cfc78ed4f5 fix: sidebar width when fields have long descriptions (#3562) 2023-10-10 17:04:54 -04:00
Elliot DeNolf
64b0db5a7a chore(readme): announcement link adjustment 2023-10-10 16:14:40 -04:00
Elliot DeNolf
48600f0c66 chore(release): db-mongodb/1.0.3 2023-10-10 16:09:53 -04:00
Elliot DeNolf
6d2dd5849d chore(release): db-postgres/0.1.3 2023-10-10 16:09:24 -04:00
Jacob Fletcher
6d9353b53f fix: row field margins (#3558) 2023-10-10 16:00:41 -04:00
James Mikrut
1914be75aa Merge pull request #3555 from payloadcms/fix/#3521
fix: #3521
2023-10-10 15:59:52 -04:00
Elliot DeNolf
b17f627e02 chore(release): richtext-slate/1.0.2 2023-10-10 15:59:33 -04:00
Elliot DeNolf
bef79621ee chore(release): db-postgres/0.1.2 2023-10-10 15:59:33 -04:00
Jarrod Flesch
af892ecb0e fix: removes nested array field configs from array value (#3549)
* fix: array controls 'addBelow' was adding above
2023-10-10 15:55:00 -04:00
Elliot DeNolf
a42e84bbb2 chore(eslint): prepare config for publishing 2023-10-10 15:10:22 -04:00
James Mikrut
470bdb72ff Merge pull request #3553 from payloadcms/fix/#3541
fix: #3541
2023-10-10 14:49:11 -04:00
James Mikrut
5c36be949c Merge pull request #3554 from payloadcms/fix/#3540
fix: #3540
2023-10-10 14:49:01 -04:00
James
eb97acd408 fix: #3521 2023-10-10 14:46:52 -04:00
James
2567ac58ba fix: #3540 2023-10-10 14:21:12 -04:00
Jacob Fletcher
9ff014bbfe fix: row field width (#3550) 2023-10-10 14:09:47 -04:00
James
e6f0d35985 fix: #3541 2023-10-10 14:07:26 -04:00
Alessio Gravili
b1e449e005 Merge pull request #3551 from payloadcms/fix/slate-toolbar
fix: Slate toolbar rendered even if it has no elements and leaves
2023-10-10 19:36:29 +02:00
Alessio Gravili
9ae585d23c fix: Slate toolbar rendered even if it has no elements and leaves 2023-10-10 19:22:08 +02:00
Elliot DeNolf
9de3320933 chore(release): richtext-lexical/0.1.5 2023-10-10 12:08:13 -04:00
Elliot DeNolf
5d429fa7ae chore(release): live-preview-react/0.1.2 2023-10-10 12:08:08 -04:00
Elliot DeNolf
dc8f1925f0 chore(release): live-preview/0.1.2 2023-10-10 12:07:40 -04:00
Jessica Chowdhury
15f650afde docs: adds build your own plugin page (#3184)
* docs: adds build your own plugin page

* chore(docs): adds npx command to plugin template doc

* docs: update plugin doc order values

* docs: update plugin admin compatibility to coming soon

---------

Co-authored-by: Elliot DeNolf <denolfe@gmail.com>
2023-10-10 11:37:53 -04:00
Jacob Fletcher
c945384d63 fix(live-preview-react): moves react to peer dependencies (#3545) 2023-10-10 11:36:44 -04:00
Jacob Fletcher
dfada1b238 chore(live-preview): removes react dependencies (#3544) 2023-10-10 11:07:18 -04:00
Elliot DeNolf
229bdda2c1 chore: rename publish script 2023-10-10 10:48:51 -04:00
Alessio Gravili
a1d51fb410 Merge pull request #3543 from payloadcms/fix/lexical-blocks-validation
fix(richtext-lexical): blocks: missing properties passed into validation calls
2023-10-10 16:41:39 +02:00
Alessio Gravili
46430f5598 chore: prefer config.collections over payload.collections for validations 2023-10-10 16:20:11 +02:00
Alessio Gravili
e41899cd27 fix(richtext-lexical): missing properties passed into validation functions 2023-10-10 16:06:39 +02:00
Elliot DeNolf
890af8be05 ci: optimize e2e and refactor workflow (#3530)
* ci: split e2e

* chore: 3 parts

* chore: use matrix

* chore: use playwright container, bump playwright

* chore: remove playwright container

* ci: move all packages into matrix

* ci: reusable action to restore build cache

* chore: revert custom action

* chore: cleanup logs
2023-10-09 23:43:34 -04:00
Tylan Davis
8bfae6b932 docs: removes MONGODB_URI (#3482) 2023-10-09 18:07:09 -04:00
Jacob Fletcher
ace3e577f6 fix: renders global label as page title (#3532) 2023-10-09 17:58:21 -04:00
Marcus R
9198245ad9 docs(configuration/collections): moves pagination options to admin config (#3533) 2023-10-09 17:55:34 -04:00
Jarrod Flesch
f0095937ba fix: increases document controls popup list button hitbox (#3529) 2023-10-09 16:44:57 -04:00
Jarrod Flesch
0bbd7137cd chore: properly clear cart with correct data shape (#3500) 2023-10-09 16:29:15 -04:00
Thomas Dudziak
ffed34cf27 chore(docs): corrects bundler package import paths (#3523) 2023-10-09 16:03:16 -04:00
Elliot DeNolf
040f3a34d1 chore(release): payload@2.0.3 2023-10-09 15:27:26 -04:00
Elliot DeNolf
0985825b08 fix(templates/website): account view query 2023-10-09 15:25:56 -04:00
Alessio Gravili
c18d3b5f0e Merge pull request #3522 from payloadcms/chore/lexical-heading-node-improvements
fix(richtext-lexical): respect enabledHeadingSizes for markdown transformers
2023-10-09 21:22:52 +02:00
Alessio Gravili
e9e25ceac9 fix(richtext-lexical): respect enabledHeadingSizes for markdown transformers 2023-10-09 21:21:37 +02:00
James
35aed59a1a Merge branch 'main' of github.com:payloadcms/payload 2023-10-09 14:44:27 -04:00
James
26002173b1 chore: streamlines args necessary for entityToJSONSchema 2023-10-09 14:42:29 -04:00
Elliot DeNolf
41d968771e chore(release): bundler-webpack@1.0.2 2023-10-09 14:36:39 -04:00
James
26c34541d2 chore: merge 2023-10-09 14:31:31 -04:00
James
263d40d169 chore: adds safety to type generation 2023-10-09 14:31:02 -04:00
James Mikrut
6ced11d44d Merge pull request #3519 from payloadcms/fix/#3494
fix: #3494
2023-10-09 14:25:10 -04:00
James
be049cea00 fix: #3494 2023-10-09 14:24:20 -04:00
Jacob Fletcher
491e50c236 docs(admin/components): removes duplicative link 2023-10-09 14:15:59 -04:00
Jacob Fletcher
ad253db691 chore(examples/redirect): removes build files 2023-10-09 14:13:16 -04:00
Elliot DeNolf
aff5fdff8a chore(release): richtext-lexical@0.1.4 2023-10-09 14:09:17 -04:00
Alessio Gravili
aa97bebbd4 Merge pull request #3518 from payloadcms/chore/export-more-richtext-lexical
chore(richtext-lexical): export utils
2023-10-09 20:07:42 +02:00
Alessio Gravili
a2410ea9fc chore(richtext-lexical): export utils 2023-10-09 20:07:07 +02:00
Jacob Fletcher
de20ef1e8d chore(examples/form-builder): migrates to 2.0 (#3516) 2023-10-09 14:03:39 -04:00
Jacob Fletcher
08f7497040 chore(examples/redirects): migrates to 2.0 (#3514) 2023-10-09 14:03:18 -04:00
James Mikrut
74e99ce251 Merge pull request #3517 from payloadcms/fix/#3504
fix: #3504
2023-10-09 14:03:02 -04:00
Jacob Fletcher
b5c56efb4b chore(examples/multi-tenant): migrates to 2.0 (#3512) 2023-10-09 14:02:44 -04:00
Jacob Fletcher
4ff6d63c94 chore(examples/custom-server): migrates to 2.0 (#3509) 2023-10-09 14:01:51 -04:00
James
c90d1faa7f fix: #3504 2023-10-09 14:01:12 -04:00
Jacob Fletcher
1848b120ce chore(examples/live-preview): pins payload to latest and regenerates types (#3507) 2023-10-09 14:01:08 -04:00
Jacob Fletcher
62679baa91 chore(examples/auth): migrates to 2.0 (#3506) 2023-10-09 14:00:38 -04:00
Jacob Fletcher
2de36550ae chore(examples/draft-preview): migrates to 2.0 (#3505) 2023-10-09 14:00:23 -04:00
James Mikrut
61ea5becbb Merge pull request #3515 from payloadcms/fix/#3513
fix: #3513, hasMany relationships unable to be cleared
2023-10-09 13:47:34 -04:00
James
5d9384f530 fix: #3513, hasMany relationships unable to be cleared 2023-10-09 13:46:41 -04:00
Elliot DeNolf
d75ffa0ea7 chore(release): richtext-lexical@0.1.3 2023-10-09 13:31:39 -04:00
Elliot DeNolf
26967fb924 docs: move payload script mention to top of migrations 2023-10-09 13:30:06 -04:00
Alessio Gravili
830d9867b6 chore(richtext-lexical): add build:clean script to package.json 2023-10-09 19:27:01 +02:00
Elliot DeNolf
2f86c196e1 docs: payload script in package.json 2023-10-09 13:18:01 -04:00
Alessio Gravili
86a35ed441 chore(richtext-lexical): improve handling of read-only lexical editors (#3510) 2023-10-09 18:47:09 +02:00
Jessica Boezwinkle
70e068b182 docs: updates required node version 2023-10-09 16:01:49 +01:00
Elliot DeNolf
4ac01a7fa3 chore(readme): add 2.0 announcement 2023-10-09 10:05:37 -04:00
Elliot DeNolf
8058a6d800 chore(readme): add migrating link 2023-10-09 09:26:57 -04:00
Elliot DeNolf
252b04097f chore(release): richtext-slate@1.0.1 2023-10-09 09:21:49 -04:00
Elliot DeNolf
23066aec71 chore(release): richtext-lexical@0.1.2 2023-10-09 09:21:37 -04:00
Elliot DeNolf
b9a595b00c chore(release): live-preview-react@0.1.1 2023-10-09 09:21:33 -04:00
Elliot DeNolf
ea49d74941 chore(release): live-preview@0.1.1 2023-10-09 09:21:27 -04:00
Elliot DeNolf
f5f41f929e chore(release): db-postgres@0.1.1 2023-10-09 09:21:17 -04:00
Elliot DeNolf
61151c9c5d chore(release): db-mongodb@1.0.2 2023-10-09 09:21:10 -04:00
Elliot DeNolf
c12c1a7472 chore(release): bundler-webpack@1.0.1 2023-10-09 09:21:04 -04:00
Elliot DeNolf
7afa1e999d chore(release): bundler-vite@0.1.2 2023-10-09 09:20:36 -04:00
Elliot DeNolf
71c41dbe03 chore: update main and types to dist 2023-10-09 09:16:46 -04:00
dependabot[bot]
a161dc7bb6 chore(deps): bump semver in /examples/live-preview/next-app (#3490)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 09:14:34 -04:00
Jacob Fletcher
6c17222a6a docs: improves custom views (#3499) 2023-10-09 09:14:09 -04:00
Elliot DeNolf
63bf7d9303 chore(release): payload@2.0.2 2023-10-09 09:04:44 -04:00
James Mikrut
f878135e8b Update CHANGELOG.md 2023-10-09 09:03:49 -04:00
James
11a77ae489 Merge branch 'main' of github.com:payloadcms/payload 2023-10-09 09:02:11 -04:00
James
e5d6a75449 fix: beforeOperation hooks now correctly only run once 2023-10-09 09:02:04 -04:00
Jessica Boezwinkle
3cb0d9c2ca docs: misc cleanup 2023-10-09 14:00:11 +01:00
Jacob Fletcher
229149a5a6 chore: removes console log 2023-10-09 08:56:08 -04:00
Elliot DeNolf
9006643102 chore(templates): fix website template error 2023-10-09 08:56:08 -04:00
Jacob Fletcher
25ae4a24f2 chore: consolidates admin view types 2023-10-09 08:56:08 -04:00
Alessio Gravili
501ec4464f chore(richtext-slate): export ElementButton, LeafButton and toggleElement 2023-10-09 14:50:19 +02:00
Elliot DeNolf
961505366a chore(release): payload@2.0.1 2023-10-09 08:20:21 -04:00
Elliot DeNolf
c54fb304e7 chore(release): richtext-lexical@0.1.1 2023-10-09 08:18:28 -04:00
Alessio Gravili
7679e3f0aa fix: richtext adapter types (#3497)
* fix: richtext adapter assignment types breaks in strict mode

* fix: generic type
2023-10-09 14:07:32 +02:00
Alessio Gravili
f7c35df6de docs(richtext): remove --save flag for install command 2023-10-09 14:06:11 +02:00
Jacob Fletcher
ca97f692c3 docs: updates live preview docs 2023-10-09 00:53:42 -04:00
James Mikrut
9244a2d25d Update CHANGELOG.md 2023-10-09 00:36:38 -04:00
Dan Ribbens
24f1965f69 Merge branch 'main' of github.com:payloadcms/payload 2023-10-09 00:33:47 -04:00
Dan Ribbens
d0c352cc62 chore: remove transaction logger warnings 2023-10-09 00:33:19 -04:00
Elliot DeNolf
c56e61023d chore: update changelog 2023-10-09 00:28:15 -04:00
James
ae03501753 Merge branch 'main' of github.com:payloadcms/payload 2023-10-09 00:23:06 -04:00
James
7b94fb75bb chore: shortens collection names in relationship test suite 2023-10-09 00:22:59 -04:00
Elliot DeNolf
e842c6624a chore(templates): use payload latest 2023-10-09 00:18:40 -04:00
Jacob Fletcher
2ddf15ce9a chore(examples/live-preview): adds live preview example (#3489) 2023-10-09 00:18:31 -04:00
James
7df1256bf6 docs: fixes label for rich text overview 2023-10-09 00:16:26 -04:00
Elliot DeNolf
1ebb9f3915 0.5.0 2023-10-09 00:01:27 -04:00
Elliot DeNolf
eab04d9b4d chore: point payload at latest 2023-10-09 00:01:01 -04:00
Elliot DeNolf
c6e6f99868 chore(release): payload@2.0.0 2023-10-08 23:58:58 -04:00
Elliot DeNolf
fbbc0a3c67 chore(release): all remaining packages 2023-10-08 23:57:11 -04:00
Elliot DeNolf
ef24f430a2 chore(release): richtext-lexical@0.1.0 2023-10-08 23:57:11 -04:00
Elliot DeNolf
617ab76a22 chore(release): live-preview-react@0.1.0 2023-10-08 23:57:11 -04:00
Elliot DeNolf
9d9918e0fd chore(release): live-preview@0.1.0 2023-10-08 23:57:11 -04:00
Elliot DeNolf
e515712fcd chore(release): db-postgres@0.1.0 2023-10-08 23:57:11 -04:00
Elliot DeNolf
0ce08aab99 chore(release): bundler-vite@0.1.0 2023-10-08 23:57:11 -04:00
James
e398044442 docs: merge conflict 2023-10-08 23:56:50 -04:00
Dan Ribbens
7e5d322d6b chore(template): remove comments 2023-10-08 23:46:29 -04:00
Dan Ribbens
b04f6b2b5b Merge branch 'main' of github.com:payloadcms/payload 2023-10-08 23:45:25 -04:00
Dan Ribbens
36225d1455 chore(template): fix lint error in webpage template 2023-10-08 23:45:13 -04:00
Elliot DeNolf
c9fdcebb9e chore(templates): fix website template error 2023-10-08 23:38:20 -04:00
Elliot DeNolf
1758b6c449 chore: indentation 2023-10-08 23:37:03 -04:00
Dan Ribbens
5e6bec773f Merge branch 'main' of github.com:payloadcms/payload 2023-10-08 23:28:43 -04:00
Dan Ribbens
5ebe375743 chore (template): website template type error 2023-10-08 23:28:28 -04:00
Elliot DeNolf
bca1be8cb6 0.5.0-beta.10 2023-10-08 23:26:58 -04:00
Elliot DeNolf
1e197933dd feat: pull templates from main 2023-10-08 23:26:54 -04:00
Elliot DeNolf
25d20cf87b feat: 2.0 template updates (#3488)
* feat: update templates to 2.0 and support create-payload-app

* chore: rich text updates

* chore(templates): remove mongoURL

* chore: migrates rich text fields in website

* chore: manually aliases dotenv in templates

* chore: installs new beta in website template

* chore: type issues

* chore (template): add alias for fs to website template

* chore: more template updates

---------

Co-authored-by: James <james@trbl.design>
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-10-08 23:23:51 -04:00
Elliot DeNolf
b32b156f9f chore: update README paths 2023-10-08 23:19:59 -04:00
Elliot DeNolf
fd38fa8209 chore: duplicate README to package dir 2023-10-08 23:15:27 -04:00
Elliot DeNolf
33bf4491a9 chore: update README 2023-10-08 23:11:43 -04:00
Elliot DeNolf
7ad9d777a2 chore(release): payload@2.0.0-beta.31 2023-10-08 22:45:11 -04:00
Alessio Gravili
92fdfbe333 chore(richtext-slate): export types 2023-10-09 04:38:14 +02:00
Alessio Gravili
27ba1fc79e docs(richtext): fix typos and other issues 2023-10-09 04:34:50 +02:00
Elliot DeNolf
bdbfc8c9af docs: remove mongoURL mentions 2023-10-08 22:26:40 -04:00
Elliot DeNolf
8c097ccaa7 chore(release): richtext-lexical@0.1.0-beta.7 2023-10-08 21:29:36 -04:00
Elliot DeNolf
4eb929d57c 0.5.0-beta.9 2023-10-08 21:20:16 -04:00
Elliot DeNolf
198209c2a4 feat: default to slate, not lexical 2023-10-08 21:20:07 -04:00
Elliot DeNolf
54f19ce1e3 0.5.0-beta.8 2023-10-08 21:08:04 -04:00
Elliot DeNolf
d32f3ade1b chore: point to branch for testing 2023-10-08 21:07:56 -04:00
Alessio Gravili
87d66dceb1 Merge pull request #3487 from payloadcms/chore/export-even-more-stuff
chore(richtext-lexical): export slash menu and floating toolbar-related stuff
2023-10-09 03:07:36 +02:00
Alessio Gravili
256fc6d178 chore(richtext-lexical): export slash menu and floating toolbar-related stuff 2023-10-09 03:06:50 +02:00
Dan Ribbens
74f8923922 fix: default rateLimit window changed from 1.5 to 15 minutes (#3486) 2023-10-08 20:37:32 -04:00
Elliot DeNolf
d9d4df22e5 chore(release): live-preview-react@1.0.0-beta.3 2023-10-08 20:13:06 -04:00
Elliot DeNolf
3161d3e552 chore(release): live-preview@1.0.0-beta.3 2023-10-08 20:13:06 -04:00
Elliot DeNolf
0acffa38eb chore(release): bundler-vite@0.1.0-beta.11 2023-10-08 20:13:05 -04:00
Elliot DeNolf
4503ce39fa chore(release): bundler-webpack@1.0.0-beta.6 2023-10-08 20:13:05 -04:00
Elliot DeNolf
0e407e05d7 chore(release): db-postgres@0.1.0-beta.20 2023-10-08 20:13:05 -04:00
Elliot DeNolf
d50049878d chore(release): db-mongodb@1.0.0-beta.9 2023-10-08 20:13:05 -04:00
Elliot DeNolf
26d56de572 chore(release): richtext-slate@1.0.0-beta.5 2023-10-08 20:13:05 -04:00
Elliot DeNolf
73f434e394 chore(release): richtext-lexical@0.1.0-beta.6 2023-10-08 20:13:05 -04:00
Elliot DeNolf
bf189abc91 0.5.0-beta.7 2023-10-08 19:55:09 -04:00
dependabot[bot]
13bc3e3681 chore(deps): bump postcss from 8.4.27 to 8.4.31 (#3484)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-08 19:48:40 -04:00
Elliot DeNolf
b398c44bfe chore: update all references to main in docs, examples, and templates 2023-10-08 19:45:54 -04:00
Elliot DeNolf
aa443d9050 ci: update ci to main 2023-10-08 19:44:59 -04:00
Jacob Fletcher
f39ba60b08 docs: live preview config path 2023-10-08 19:39:50 -04:00
James
791f2051f3 Merge branch 'main' of github.com:payloadcms/payload 2023-10-08 19:38:34 -04:00
James
a37798b80d Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-08 19:37:47 -04:00
James
077bd7fad3 chore: rich text docs 2023-10-08 19:37:41 -04:00
Jacob Fletcher
8255088f39 docs: custom views (#3483) 2023-10-08 19:34:23 -04:00
Dan Ribbens
5a969a2c4d chore: removes unused transaction utility function 2023-10-08 19:19:38 -04:00
Dan Ribbens
7c7e841af7 chore: fix delete user preferences 2023-10-08 19:19:03 -04:00
Alessio Gravili
13332f04ab Merge pull request #3481 from payloadcms/chore/export-more-stuff
chore(richtext-lexical): export nodes
2023-10-09 01:07:59 +02:00
Alessio Gravili
c1d28a7a07 chore(richtext-lexical): export nodes 2023-10-09 01:07:16 +02:00
Elliot DeNolf
69a379e49f chore: point all adapters at latest 2023-10-08 18:39:10 -04:00
Elliot DeNolf
493fc3ed68 chore: switch from 2.0 to default branch for templates 2023-10-08 18:32:20 -04:00
Elliot DeNolf
138e495e1a feat: default to slate, not lexical 2023-10-08 18:31:04 -04:00
dependabot[bot]
4eaa76a314 chore(deps): bump postcss in /packages/bundler-webpack (#3478)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-08 18:13:51 -04:00
dependabot[bot]
8f98eff0d7 chore(deps): bump graphql from 16.8.0 to 16.8.1 in /examples/testing (#3479)
Bumps [graphql](https://github.com/graphql/graphql-js) from 16.8.0 to 16.8.1.
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](https://github.com/graphql/graphql-js/compare/v16.8.0...v16.8.1)

---
updated-dependencies:
- dependency-name: graphql
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-08 18:13:29 -04:00
dependabot[bot]
f8dce28904 chore(deps): bump postcss from 8.4.29 to 8.4.31 in /examples/testing (#3480)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.29 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.29...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-08 18:13:17 -04:00
Elliot DeNolf
09ee95087b chore(release): richtext-slate@1.0.0-beta.4 2023-10-08 17:42:17 -04:00
Elliot DeNolf
190a1ab5a0 chore(release): richtext-lexical@0.1.0-beta.5 2023-10-08 17:39:41 -04:00
Dan Ribbens
5e8b11b5d3 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-08 17:37:12 -04:00
Dan Ribbens
436250d594 Revert "chore: delete req.transactionID when committing payload operations"
This reverts commit 8e4cede62c.
2023-10-08 17:35:59 -04:00
James
09c94609b4 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-08 17:23:28 -04:00
James
6d012bff68 chore: properly runs duplication of locales one after another 2023-10-08 17:23:18 -04:00
Jacob Fletcher
f0af24d066 chore: merges README 2023-10-08 16:57:52 -04:00
Jacob Fletcher
360291c407 chore: merges examples 2023-10-08 16:57:52 -04:00
Jacob Fletcher
d8f6f86228 chore: merges templates 2023-10-08 16:57:52 -04:00
James
a0645bbae5 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-08 16:47:47 -04:00
James
999f2fba04 chore: live preview tests pass 2023-10-08 16:47:42 -04:00
Tylan Davis
6009b18f75 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-08 16:11:33 -04:00
Tylan Davis
f968b92968 fix: removes quotes in keywords 2023-10-08 16:10:35 -04:00
Tylan Davis
b51987d4ac chore: adds point field database disclaimer 2023-10-08 16:10:10 -04:00
Tylan Davis
2639d29b91 fix: removes unused page 2023-10-08 16:09:30 -04:00
Jacob Fletcher
3668f053b3 chore!: consolidates admin routes and views configs (#3458)
BREAKING CHANGE: If your config has a `admin.components.routes` array, you will need to key them into the `admin.components.views` object. The configuration options should remain unchanged.
2023-10-08 16:08:13 -04:00
Dan Ribbens
18da607f5b Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-08 15:31:43 -04:00
Dan Ribbens
8e4cede62c chore: delete req.transactionID when committing payload operations 2023-10-08 15:30:33 -04:00
James
e0af6fea99 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-08 14:57:14 -04:00
James
27f861d725 chore: updates bundler docs 2023-10-08 14:57:05 -04:00
Dan Ribbens
bb0c997a87 chore: cleanup database adapter interface 2023-10-08 14:55:07 -04:00
Dan Ribbens
eb58d9e877 chore: removes indexes from collection config (#3476) 2023-10-08 14:48:14 -04:00
James
c9387eba27 Merge branch '2_0/docs/bundlers' of github.com:payloadcms/payload into 2.0 2023-10-08 14:37:14 -04:00
Jarrod Flesch
1c577d1d0c chore: removes placeholder vite
link
2023-10-08 14:33:44 -04:00
Jarrod Flesch
86802dd531 chore: add bundle doc page, update env and vite 2023-10-08 14:31:40 -04:00
James
1c3d969ef1 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-08 14:23:32 -04:00
James
b9aa4d96a3 chore: db docs 2023-10-08 14:23:18 -04:00
Jacob Fletcher
6c866773b2 chore: statically renders live preview toolbar (#3475) 2023-10-08 14:23:01 -04:00
Elliot DeNolf
1020b08fd1 chore: port publish script to ts 2023-10-08 13:20:43 -04:00
Elliot DeNolf
b5b451464c chore(release): db-mongodb@1.0.0-beta.8 2023-10-08 12:29:10 -04:00
Elliot DeNolf
b90796f48a chore(db-mongodb): drafts v1-v2 versions?.drafts 2023-10-08 12:28:58 -04:00
Elliot DeNolf
0e67ac9b6b chore(release): db-mongodb@1.0.0-beta.7 2023-10-08 12:12:06 -04:00
Elliot DeNolf
de79dca08f chore(release): payload@2.0.0-beta.30 2023-10-08 12:11:12 -04:00
Elliot DeNolf
74972cf4c9 chore: add predefined migration for version-v1-v2 2023-10-08 12:10:03 -04:00
Jarrod Flesch
595ba1b241 chore: simplifies webpack/server-code docs 2023-10-08 11:03:25 -04:00
PatrikKozak
022ef85d8c docs: removes generated type aliasing
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
2023-10-08 10:13:03 -04:00
Elliot DeNolf
8e0c3602f9 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-08 10:00:30 -04:00
Jacob Fletcher
70d41407a8 docs: live preview (#3474) 2023-10-08 09:55:06 -04:00
James
be618ba79e chore: addtl protection against invalid ids 2023-10-08 09:34:11 -04:00
Elliot DeNolf
8f2cec2535 chore(release): richtext-lexical@0.1.0-beta.4 2023-10-08 07:42:43 -04:00
Elliot DeNolf
ad896e377b chore(release): payload@2.0.0-beta.29 2023-10-07 19:22:33 -04:00
Elliot DeNolf
9574444b57 chore: better handle retrieving migrations 2023-10-07 19:22:01 -04:00
Elliot DeNolf
450a648e7e chore(release): db-postgres@0.1.0-beta.19 2023-10-07 19:17:08 -04:00
Elliot DeNolf
940174f446 chore(db-postgres): improve error parsing 2023-10-07 19:16:36 -04:00
James
3600dbb3ab Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-07 17:58:51 -04:00
James
a41a3c5ee7 chore: allows updateOne with where clause in postgres 2023-10-07 17:58:38 -04:00
James
6c0eef3ec2 chore: allows disabling of push 2023-10-07 17:58:17 -04:00
Elliot DeNolf
3a16eb90b6 chore(release): db-postgres@0.1.0-beta.18 2023-10-07 16:55:13 -04:00
James
2f8d5dc628 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-07 16:54:19 -04:00
James
e1f092410e chore: removes unique compound indexes 2023-10-07 16:54:00 -04:00
Elliot DeNolf
654561cf30 chore: reinstall script 2023-10-07 16:46:00 -04:00
Elliot DeNolf
77bb42d672 chore(release): db-postgres@0.1.0-beta.17 2023-10-07 16:33:21 -04:00
Elliot DeNolf
cdbe61875e chore(release): payload@2.0.0-beta.28 2023-10-07 16:32:17 -04:00
James
e5d3821a9e chore(release): db-postgres@0.1.0-beta.17 2023-10-07 15:54:30 -04:00
James
f70837ab11 chore: shortens relationships table name to rels 2023-10-07 15:53:56 -04:00
James
0dbcc2725e chore: login redirection 2023-10-07 14:55:06 -04:00
Jarrod Flesch
6efedc174a chore: updates admin/webpack, admin/overview. Adds admin/server-only. 2023-10-07 14:51:26 -04:00
Jacob Fletcher
c4f2a65e49 chore: cleans up custom collection and global view routing (#3459) 2023-10-07 13:31:41 -04:00
Alessio Gravili
5d1444e1bd fix(richtext-lexical): incorrect stacking of block's fields 2023-10-07 18:35:59 +02:00
Elliot DeNolf
8fe619a221 0.5.0-beta.6 2023-10-07 12:17:44 -04:00
Elliot DeNolf
5195a80dba chore: format db choice title on connection string prompt 2023-10-07 12:17:27 -04:00
Elliot DeNolf
909cf90fa2 chore: add -d shorthand for --db 2023-10-07 12:16:56 -04:00
Alessio Gravili
03c9a91ea9 chore(richtext-lexical): CSS rule to fix focus outline issue when using vite bundler 2023-10-07 18:11:43 +02:00
Alessio Gravili
f3d2060d8d fix: minor CSS margin issue for upload field buttons 2023-10-07 18:08:24 +02:00
Elliot DeNolf
c1d1a00d4a 0.5.0-beta.5 2023-10-07 11:54:30 -04:00
Elliot DeNolf
ae68093f35 chore: update postgres replacement 2023-10-07 11:53:52 -04:00
Elliot DeNolf
0f2f355a01 chore: add beta tag to postgres selection 2023-10-07 11:49:43 -04:00
Elliot DeNolf
0101aa60d9 chore: update yarn.lock 2023-10-07 11:49:30 -04:00
Elliot DeNolf
eb069e4253 chore(release): payload@2.0.0-beta.27 2023-10-07 11:34:33 -04:00
Elliot DeNolf
27deeccd50 chore: move react-image-crop to proper package.json 2023-10-07 11:34:06 -04:00
Elliot DeNolf
59bd6abfc3 chore: stub out basic READMEs for all packages 2023-10-07 11:24:33 -04:00
Alessio Gravili
ad7c25685e chore(richtext-lexical): adjust node data formats, adjust population behavior, fix some validation issues 2023-10-07 15:52:12 +02:00
Alessio Gravili
7e9c7707ba chore: improve ID field validation, fixing 2.0 int tests (#3457)
* chore: WIP id type validation for richtext upload

* chore: fix richtext fields test ID placeholder replacements

* chore: use getIDType in relationship validation for consistency

* chore: make getIDType safer in case payload.db.defaultIDType is null

---------

Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-10-07 00:49:24 +02:00
Alessio Gravili
acfda5d8d4 chore(richtext-lexical): updated lexical incoming config API 2023-10-07 00:22:13 +02:00
Jacob Fletcher
b6de427f04 feat: supports live preview config inheritance (#3456) 2023-10-06 18:20:13 -04:00
Elliot DeNolf
88c84ad8d6 chore: move test deps to root package.json 2023-10-06 17:38:33 -04:00
Elliot DeNolf
00543f5e25 chore(release): db-postgres@0.1.0-beta.16 2023-10-06 17:18:12 -04:00
Elliot DeNolf
d2415a5af4 chore(release): db-mongodb@1.0.0-beta.6 2023-10-06 17:18:06 -04:00
Elliot DeNolf
75ae2456a8 chore(release): payload@2.0.0-beta.26 2023-10-06 17:17:07 -04:00
Elliot DeNolf
ace393ca46 chore(release): payload@2.0.0-beta.25 2023-10-06 17:16:44 -04:00
Elliot DeNolf
3fce97a6d2 chore: misc eslint 2023-10-06 17:16:13 -04:00
Elliot DeNolf
e55ec6329c chore: fix up fresh, refresh, and reset migration operations 2023-10-06 17:15:43 -04:00
Jarrod Flesch
fb07308dca feat: 2.0 upload enhancements (#3433) 2023-10-06 17:02:42 -04:00
Jacob Fletcher
5bc81031d1 chore: supports live preview url as function (#3455) 2023-10-06 16:52:47 -04:00
PatrikKozak
03538c0901 chore: renders id column as code cell (#3435)
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
2023-10-06 15:58:02 -04:00
Jacob Fletcher
960fe42b93 chore: resolves ts errors in views (#3453) 2023-10-06 14:58:51 -04:00
Jacob Fletcher
64c405d0fc chore: hides dot nav when creating new 2023-10-06 14:07:51 -04:00
Jacob Fletcher
75ec46ad63 chore: adds title attribute to nav icon 2023-10-06 14:07:51 -04:00
Elliot DeNolf
345c606895 chore(release): payload@2.0.0-beta.24 2023-10-06 14:01:47 -04:00
Elliot DeNolf
06fe3f4ac8 chore(templates): move bundler under admin 2023-10-06 14:01:19 -04:00
James
6afdaefdcd chore(release): payload@2.0.0-beta.23 2023-10-06 13:35:12 -04:00
James
4d4db8065e Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-06 13:34:54 -04:00
Jacob Fletcher
1ce9b28dce chore: passing live preview int tests 2023-10-06 13:34:45 -04:00
Jarrod Flesch
6a74173789 chore: merges existing docs with 2.0 docs (#3450) 2023-10-06 13:33:24 -04:00
James
877576119a chore(release): payload@2.0.0-beta.22 2023-10-06 13:29:38 -04:00
James Mikrut
50dd03853a Merge pull request #3452 from payloadcms/2_0/chore/nav-icon
chore: replaces current collapse icon
2023-10-06 13:27:46 -04:00
Elliot DeNolf
163cf631e8 chore(release): bundler-vite@0.1.0-beta.10 2023-10-06 13:25:22 -04:00
Elliot DeNolf
7690fa1b55 chore(release): payload@2.0.0-beta.21 2023-10-06 13:24:25 -04:00
James
11b51bca75 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-06 13:23:15 -04:00
James
85e64c9209 chore: passes payload config so it is picked up by vite hmr 2023-10-06 13:23:05 -04:00
James
4ad8a9f5bb chore: allows config to be passed to root 2023-10-06 13:19:12 -04:00
Jarrod Flesch
ba4656b966 Merge branch '2.0' into 2_0/chore/nav-icon 2023-10-06 13:17:57 -04:00
Jarrod Flesch
8df9d57a69 Merge branch '2.0' of https://github.com/payloadcms/payload into 2.0 2023-10-06 13:17:32 -04:00
Jarrod Flesch
ae436673cb chore: corrects merge data import path 2023-10-06 13:17:27 -04:00
Jacob Fletcher
7c1b3b9de3 chore: uses proper depth 2023-10-06 13:16:56 -04:00
Jarrod Flesch
83d6b3f652 chore: css tweaks 2023-10-06 13:04:35 -04:00
Elliot DeNolf
ae49403c45 chore(release): payload@2.0.0-beta.20 2023-10-06 12:43:01 -04:00
Elliot DeNolf
c8b843c819 chore: fix migrate args 2023-10-06 12:42:50 -04:00
Jarrod Flesch
48db3027c9 chore: x icon on mobile 2023-10-06 12:33:34 -04:00
Jacob Fletcher
5f4c38ce21 chore: builds live preview app (#3451) 2023-10-06 12:32:13 -04:00
Jarrod Flesch
4a91be1d62 chore: adjusts mobile line styles 2023-10-06 12:23:52 -04:00
Jarrod Flesch
ca5dbb5cd4 chore: adjusts collapse icon for collection navigation 2023-10-06 12:21:10 -04:00
Jessica Boezwinkle
a8ff06a134 docs: updates onInit options 2023-10-06 17:16:38 +01:00
Jessica Boezwinkle
01891bb8bc docs: updates config examples, oninit props, mongoDB references and adds warning to point field 2023-10-06 17:16:38 +01:00
Elliot DeNolf
0d2fe860e5 chore(release): db-postgres@0.1.0-beta.15 2023-10-06 11:58:58 -04:00
Elliot DeNolf
542dcb3226 chore(release): payload@2.0.0-beta.19 2023-10-06 11:58:26 -04:00
Elliot DeNolf
4e973c9389 chore: adjust logging on start and in connect warning prompts 2023-10-06 11:57:00 -04:00
Dan Ribbens
2b831a67b4 chore: changes postgres interface client arg to pool and adds poolOptions 2023-10-06 11:56:23 -04:00
Elliot DeNolf
36740b70d4 0.0.15-beta.0 2023-10-06 11:49:53 -04:00
Elliot DeNolf
a423c7fd60 chore(release): richtext-lexical@0.1.0-beta.3 2023-10-06 11:01:03 -04:00
Elliot DeNolf
c3b2b19dbe chore(release): payload@2.0.0-beta.17 2023-10-06 10:59:45 -04:00
Alessio Gravili
272f62f032 Merge pull request #3449 from payloadcms/feat/2.0-lexical-block-validations
BREAKING: config (SanitizedConfig) is now a new, mandatory property to be passed into .validate(, options) functions. In order to accommodate that, other functions which may call validate now also have a new, mandatory config property. These are:
* buildStateFromSchema
* addFieldStatePromise


feat: breaking: richtext-lexical: block node validations
2023-10-06 16:56:59 +02:00
PatrikKozak
5d1677a84e Merge pull request #29 from payloadcms/chore/alias-pattern
chore: improves alias pattern
2023-10-06 10:55:29 -04:00
Jarrod Flesch
d063c93394 chore: style adjustments for api tab (#3447) 2023-10-06 10:39:15 -04:00
James
d73596a670 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-06 10:20:51 -04:00
James
78d6643950 chore: docs stubbing 2023-10-06 10:20:44 -04:00
Elliot DeNolf
c823ee07cd 0.5.0-beta.4 2023-10-06 10:02:04 -04:00
Elliot DeNolf
1f12f9b480 chore: force beta packages for now 2023-10-06 10:02:04 -04:00
Elliot DeNolf
ec31ab3a2c 0.5.0-beta.3 2023-10-06 10:02:04 -04:00
Elliot DeNolf
a7bea35d69 chore: rename editors 2023-10-06 10:02:04 -04:00
Elliot DeNolf
64a4f19539 0.5.0-beta.2 2023-10-06 10:02:04 -04:00
Elliot DeNolf
c35661e16e feat: add editor import and replacement 2023-10-06 10:02:04 -04:00
Elliot DeNolf
69b6179521 0.5.0-beta.1 2023-10-06 10:02:04 -04:00
Elliot DeNolf
3d2e167e78 chore: proper postgres adapter import replacement 2023-10-06 10:02:04 -04:00
Elliot DeNolf
aa1955221c 0.5.0-beta.0 2023-10-06 10:02:04 -04:00
Elliot DeNolf
7a9b11e2c4 feat: bump template branch to 2.0 2023-10-06 10:02:04 -04:00
Elliot DeNolf
a82c0d0e50 chore: check DATABASE_URI key 2023-10-06 10:02:04 -04:00
Elliot DeNolf
35a6daa10d test: reorganize tests 2023-10-06 10:02:04 -04:00
Elliot DeNolf
bf5db4e44a chore(templates): update branch on starter urls temporarily 2023-10-06 10:02:04 -04:00
Elliot DeNolf
a87e8aa82b chore: replace DATABASE_URI env value 2023-10-06 10:02:04 -04:00
Elliot DeNolf
e00d87a791 test: add debug for cli 2023-10-06 10:02:04 -04:00
Elliot DeNolf
b61babca73 test: dependency and config replacement tests 2023-10-06 10:02:04 -04:00
Elliot DeNolf
e403a0492e feat: update templates with bundler and db adapter 2023-10-06 10:02:04 -04:00
Elliot DeNolf
54a76e1401 feat: implement db selection 2023-10-06 10:02:04 -04:00
Alessio Gravili
cffb5663aa fix: custom fields of Upload and Link features not being sanitized (both Slate and Lexical) 2023-10-06 15:47:31 +02:00
Elliot DeNolf
91f6e36420 2.2.2 2023-10-06 09:44:48 -04:00
Elliot DeNolf
c73113565a 1.1.0-beta.1 2023-10-06 09:41:41 -04:00
Elliot DeNolf
02c165b71f chore(release): payload@2.0.0-beta.16 2023-10-06 09:28:52 -04:00
Elliot DeNolf
783072ef7c chore(release): live-preview-react@1.0.0-beta.2 2023-10-06 09:28:39 -04:00
Elliot DeNolf
72fe24b69e chore(release): live-preview@1.0.0-beta.2 2023-10-06 09:28:31 -04:00
Elliot DeNolf
81ed355bbc chore(release): richtext-slate@1.0.0-beta.3 2023-10-06 09:28:08 -04:00
Elliot DeNolf
08a114e0e0 chore(release): richtext-lexical@0.1.0-beta.2 2023-10-06 09:27:57 -04:00
Elliot DeNolf
c49bb14414 chore(release): db-mongodb@1.0.0-beta.5 2023-10-06 09:27:42 -04:00
Elliot DeNolf
2411cfbe13 chore(release): db-postgres@0.1.0-beta.14 2023-10-06 09:27:32 -04:00
Elliot DeNolf
c1439ae7da chore(release): bundler-webpack@1.0.0-beta.5 2023-10-06 09:27:20 -04:00
Elliot DeNolf
36e7e1d946 chore(release): bundler-vite@0.1.0-beta.9 2023-10-06 09:26:45 -04:00
James
ad924c8d7b Merge branch 'master' of github.com:payloadcms/plugin-cloud-storage 2023-10-06 09:02:15 -04:00
James
bb6956cd32 chore: plugin alias specificity 2023-10-06 09:02:08 -04:00
Alessio Gravili
63bae989bb chore: upgrade turborepo 2023-10-06 14:39:09 +02:00
Alessio Gravili
528150c3f7 Merge remote-tracking branch 'origin/2.0' into feat/2.0-lexical-block-validations 2023-10-06 14:31:52 +02:00
Alessio Gravili
fa91d45ae6 chore: richtext-lexical: save block node's collapsed state in preferences instead of node data 2023-10-06 14:30:40 +02:00
Alessio Gravili
b545f62574 chore: richtext-lexical: various styling and validation improvements 2023-10-06 12:39:22 +02:00
Alessio Gravili
b6a778196d feat: richtext-lexical: blocks: nicely show errors in Block component 2023-10-06 12:10:20 +02:00
Alessio Gravili
9acc1e4c99 feat: block node validations 2023-10-06 11:30:18 +02:00
Dan Ribbens
dfd5151c4f chore: fix testSuiteDir arg 2023-10-06 03:38:39 -04:00
Dan Ribbens
605ba73c30 chore: fix build in bin migrate ts error 2023-10-06 03:33:34 -04:00
Patrik Kozak
4fab26db9d chore: updates local dev aliases 2023-10-05 22:29:51 -04:00
Elliot DeNolf
c4e4a5a3f7 ci: add live-preview-react build 2023-10-05 17:30:50 -04:00
Elliot DeNolf
82d9dd8a28 chore(release): live-preview-react@1.0.0-beta.1 2023-10-05 17:28:06 -04:00
Elliot DeNolf
8a2045e3e4 chore(db-postgres): remove schema col from migration table creation 2023-10-05 16:54:56 -04:00
Elliot DeNolf
cddde3e488 chore: migrate help flag 2023-10-05 16:50:53 -04:00
Elliot DeNolf
986ceea246 chore: nodemon stdin:false, -I flag 2023-10-05 16:49:58 -04:00
Elliot DeNolf
d638408399 chore(release): db-postgres@0.1.0-beta.13 2023-10-05 16:00:59 -04:00
Elliot DeNolf
a46a80bd52 chore(db-postgres): create migration prompts when no schema changes detected 2023-10-05 16:00:59 -04:00
James
c2a99c8edc Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-05 16:00:21 -04:00
James
2fe7818f29 chore: semantics 2023-10-05 16:00:12 -04:00
James
0bb11ecf8b chore: ensures live preview hook always returns data 2023-10-05 15:57:26 -04:00
Elliot DeNolf
eafeea4dd8 chore(db-postgres): return early on migrate if no migration files 2023-10-05 15:45:28 -04:00
Patrik Kozak
56cf767e18 chore: improves alias pattern 2023-10-05 15:37:01 -04:00
Elliot DeNolf
bbd410bcbe chore(release): live-preview@1.0.0-beta.1 2023-10-05 15:21:43 -04:00
Elliot DeNolf
d2fa65cb4f ci: add live-preview build 2023-10-05 15:21:15 -04:00
Jacob Fletcher
18472d0178 chore: properly sizes tab field when sidebar exists 2023-10-05 15:15:02 -04:00
Jarrod Flesch
7ee41b6a65 chore: default menu to open if pref not set (#3445) 2023-10-05 15:00:27 -04:00
Elliot DeNolf
0a895eee80 chore(release): db-postgres@0.1.0-beta.12 2023-10-05 14:51:18 -04:00
Elliot DeNolf
74d6ef0c31 chore(db-postgres): set updated_at on dev push migration 2023-10-05 14:50:57 -04:00
Jacob Fletcher
f77c41978b chore: resolves path to live preview module 2023-10-05 14:33:02 -04:00
Elliot DeNolf
9e74fe558f 2.2.2-beta.0 2023-10-05 14:23:22 -04:00
James
ac8bcfac23 chore: proper dev webpack config 2023-10-05 14:17:57 -04:00
Elliot DeNolf
5c97d05acf 1.1.0-beta.0 2023-10-05 14:15:02 -04:00
Jarrod Flesch
3538c2132d fix: doc title not rendering in breadcrumbs (#3444) 2023-10-05 14:12:48 -04:00
Jacob Fletcher
fd9d98da9f chore: removes empty space in header left by non-localized configs 2023-10-05 14:09:31 -04:00
Dan Ribbens
1c22459107 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-05 14:08:35 -04:00
Dan Ribbens
2d084e19d3 chore: windows safe pattern match for swc ignore 2023-10-05 14:06:59 -04:00
Elliot DeNolf
80f2d417f2 chore: delete dev pushes from migrations on migrate:reset 2023-10-05 14:02:31 -04:00
Elliot DeNolf
cfb77e2f27 chore(db-postgres): show warning if dev pushes exist on migrate 2023-10-05 14:02:10 -04:00
Jarrod Flesch
deb5be5a9b chore(examples/testing): builds testing example (#3443) 2023-10-05 13:55:36 -04:00
James
6bad383a95 chore: working local dev aliases 2023-10-05 13:28:22 -04:00
Jarrod Flesch
9880880384 feat!: store array values as actual array value (#3442) 2023-10-05 13:16:30 -04:00
Jarrod Flesch
618ee991dc fix: secures the user response from the me auth route (#3424) 2023-10-05 12:54:53 -04:00
James
4b726eb139 chore: improves alias pattern 2023-10-05 12:35:14 -04:00
Jessica Chowdhury
374fb99571 fix: corrects greater than or equal filter key (#3307) 2023-10-05 12:32:13 -04:00
Jarrod Flesch
183414e6e8 feat: adds API for view on collection and globals (#3432) 2023-10-05 12:30:30 -04:00
James
91b0a691ed chore: moves admin plugin into src 2023-10-05 12:19:09 -04:00
James
3ced6ec2a0 chore: merge 2023-10-05 12:17:23 -04:00
James
650fe159ee chore: renames mock to admin.js 2023-10-05 12:16:54 -04:00
Jacob Fletcher
b7d983f30a feat: builds live preview sdk (#3441) 2023-10-05 12:13:19 -04:00
James
b92657fb39 chore: simplifies alias 2023-10-05 12:12:31 -04:00
Elliot DeNolf
617ca9f85f chore(release): db-postgres@0.1.0-beta.11 2023-10-05 12:03:55 -04:00
Elliot DeNolf
47206f9e6a chore(db-postgres): safely get migration snapshots 2023-10-05 12:03:32 -04:00
Elliot DeNolf
131157ba29 chore(db-postgres): write json snapshot to migrations dir 2023-10-05 11:38:26 -04:00
Elliot DeNolf
db28547a51 chore(db-postgres): push to migrations table on connect for dev 2023-10-05 11:37:25 -04:00
James
f0689d403d Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-05 11:00:10 -04:00
James
c46ffbd7ae chore: corrects config reference from bin / build 2023-10-05 10:59:58 -04:00
Dan Ribbens
f935a54107 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-05 10:58:51 -04:00
Dan Ribbens
bfa16e418f chore: write migration schema json 2023-10-05 10:53:07 -04:00
Elliot DeNolf
6dbe80be2e chore(release): payload@2.0.0-beta.13 2023-10-05 10:46:44 -04:00
Elliot DeNolf
302185e473 chore(release): bundler-vite@0.1.0-beta.8 2023-10-05 10:46:12 -04:00
PatrikKozak
7d8ac3e6f2 Merge branch '2.0' of https://github.com/payloadcms/payload into 2.0 2023-10-05 10:37:14 -04:00
PatrikKozak
001b87a8c6 chore: adds emptyOutDir option to build in vite config 2023-10-05 10:37:06 -04:00
James
cd49a7a940 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-05 10:35:09 -04:00
James
9da6506622 chore: initializes payload before build 2023-10-05 10:34:56 -04:00
Jacob Fletcher
0ac36069bd chore: handles live preview data (#3440) 2023-10-05 10:14:57 -04:00
Jacob Fletcher
f989e02a85 chore: builds fieldSchemaToJSON utility 2023-10-05 10:02:43 -04:00
Alessio Gravili
15e6401d4e chore: gitignore pointer files 2023-10-05 15:43:58 +02:00
Alessio Gravili
3d61445cd0 chore: delete pointerfiles 2023-10-05 15:43:42 +02:00
Alessio Gravili
20a99ff2c7 chore(richtext-lexical): slash menu x Blocks feature improvements 2023-10-05 15:37:22 +02:00
Alessio Gravili
27ef3a01f8 feat(richtext-lexical): list all blocks in Slash menu 2023-10-05 14:31:40 +02:00
Alessio Gravili
0bc4276d87 Merge pull request #3439 from payloadcms/feat/2.0-lexical-improvements-2
feat: lexical improvements
2023-10-05 11:00:30 +02:00
Alessio Gravili
ab34f08169 feat(richtext-lexical): populate fields in blocks field 2023-10-05 10:59:38 +02:00
Alessio Gravili
0c57c89d83 chore(richtext-lexical): improve internal link label 2023-10-04 22:55:25 +02:00
Elliot DeNolf
12bf78f41b chore(script): pack_to_dest script 2023-10-04 16:48:18 -04:00
Jacob Fletcher
10bd20904a chore: removes pseudo element from mobile doc tabs 2023-10-04 16:47:36 -04:00
Alessio Gravili
c3abaf5f1d feat(richtext-lexical): remove button for block 2023-10-04 22:44:00 +02:00
Elliot DeNolf
9ecef40ee7 chore(release): bundler-vite@0.1.0-beta.7 2023-10-04 16:32:14 -04:00
Alessio Gravili
76c2fad94f chore(richtext-lexical): fields test default value 2023-10-04 22:31:23 +02:00
PatrikKozak
aff983f5a2 Merge branch '2.0' of https://github.com/payloadcms/payload into 2.0 2023-10-04 16:28:37 -04:00
PatrikKozak
bf2cd5aac4 chore: sets process.env to empty object in vite bundler config 2023-10-04 16:28:22 -04:00
Elliot DeNolf
9baf7e9a70 chore(release): payload@2.0.0-beta.12 2023-10-04 16:10:56 -04:00
PatrikKozak
e64928f03a chore: vite progress 2023-10-04 15:46:58 -04:00
Dan Ribbens
33c3a7a50a Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-04 15:38:40 -04:00
Dan Ribbens
1cce3ebce9 chore: fix mongodb transactions 2023-10-04 15:37:53 -04:00
Alessio Gravili
1e71776f22 Merge pull request #3436 from payloadcms/feat/2.0-lexical-improvements
feat: various lexical improvements
2023-10-04 21:32:52 +02:00
Alessio Gravili
6a5ddd32ab chore(richtext-lexical): various style improvements 2023-10-04 21:28:41 +02:00
Alessio Gravili
4e8d4797e1 chore(richtext-lexical): improve slash menu positioning and styling 2023-10-04 21:01:59 +02:00
Elliot DeNolf
3ce9c9ef03 ci: create beta release script 2023-10-04 14:49:57 -04:00
Elliot DeNolf
d1cbe4aa4e chore(release): payload@2.0.0-beta.11 2023-10-04 14:48:22 -04:00
Elliot DeNolf
84702d8e31 chore(release): bundler-vite@0.1.0-beta.6 2023-10-04 14:48:04 -04:00
Elliot DeNolf
9d1bda070f chore(release): db-mongodb@1.0.0-beta.4 2023-10-04 14:46:20 -04:00
Elliot DeNolf
b6b1a8e65d chore(release): db-postgres@0.1.0-beta.10 2023-10-04 14:44:16 -04:00
Elliot DeNolf
ffc16f08b9 chore: update pointer files 2023-10-04 14:43:04 -04:00
Elliot DeNolf
4e97621619 chore: proper declare module for drizzle 2023-10-04 14:24:12 -04:00
James
3d0b125e0a chore: type fixes 2023-10-04 14:23:57 -04:00
James
029d031974 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-04 14:21:59 -04:00
James
812d1806f5 chore: revisions to local dev suite 2023-10-04 14:21:51 -04:00
Jacob Fletcher
fc364b2d02 chore: redirects after create first user 2023-10-04 14:20:08 -04:00
Dan Ribbens
a6880207cd chore(db-postgres): schema building implements collection indexes (#3429) 2023-10-04 14:14:47 -04:00
James
98b6108eab chore: better alias pattern for db adapters 2023-10-04 14:13:40 -04:00
Elliot DeNolf
aa3a997d4d chore(release): payload v2.0.0-beta.8 2023-10-04 13:38:26 -04:00
Dan Ribbens
5c5b661412 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-04 13:33:54 -04:00
Dan Ribbens
823681cc42 chore: remove replicaset warning for mongodb transactions 2023-10-04 13:33:18 -04:00
Elliot DeNolf
6226368841 chore: adjust eslint npm script 2023-10-04 13:28:09 -04:00
Elliot DeNolf
1107a1d7d1 chore: rename editors 2023-10-04 13:27:19 -04:00
Dan Ribbens
394c2bc23a chore(db-postgres): add name to all unique constraints 2023-10-04 11:48:45 -04:00
Dan Ribbens
825f9521bb chore: fix relationship preferences unique constraint prompt on pushSchema 2023-10-04 11:36:44 -04:00
Elliot DeNolf
c161f019af chore: disable prettier on json for now 2023-10-04 11:27:42 -04:00
Elliot DeNolf
f80dc6a668 chore(release): payload v2.0.0-beta.7 2023-10-04 11:11:46 -04:00
Elliot DeNolf
df69441a6a chore: update pnpm-lock.yaml 2023-10-04 11:09:50 -04:00
Elliot DeNolf
25672f5975 chore: find and load .env file in bin script 2023-10-04 11:09:41 -04:00
Alessio Gravili
99a5e78a66 chore(richtext-lexical): sanitize block fields 2023-10-04 17:02:45 +02:00
Elliot DeNolf
d48f0c1567 chore(release): bundler-vite 0.1.0-beta.4 2023-10-04 10:11:05 -04:00
Elliot DeNolf
bb385280cc chore(bundler-vite): copy entry.tsx, files key in package.json 2023-10-04 10:10:54 -04:00
Elliot DeNolf
cb3029583c chore(release): payload v2.0.0-beta.6 2023-10-04 10:10:17 -04:00
PatrikKozak
d5ab5e2afe chore: updates define in vite bundler config 2023-10-04 09:52:40 -04:00
PatrikKozak
46774b80f0 Merge branch '2.0' of https://github.com/payloadcms/payload into 2.0 2023-10-04 09:45:57 -04:00
PatrikKozak
299c29019f chore: adds disableDBConnect option to on init 2023-10-04 09:45:17 -04:00
Alessio Gravili
3092fd0843 chore: export sanitizeFields 2023-10-04 15:31:13 +02:00
Alessio Gravili
715ae79727 chore(richtext-lexical): Blocks feature improvements 2023-10-04 14:18:55 +02:00
Jacob Fletcher
2e0c0d0224 chore: renders LeaveWithoutSaving as modal (#3428) 2023-10-03 17:04:24 -04:00
Elliot DeNolf
5f28bcc25a chore(release): bundler-vite 0.1.0-beta.2 2023-10-03 16:55:23 -04:00
Elliot DeNolf
81a1ad288d chore(bundler-vite): add copyfiles, adjust joi validation 2023-10-03 16:37:58 -04:00
Jacob Fletcher
cbc1f3b3f1 chore: improves edit view types (#3427) 2023-10-03 15:41:15 -04:00
Jacob Fletcher
fdbb61fc43 chore: dynamic device sizing (#3426) 2023-10-03 13:47:41 -04:00
Elliot DeNolf
f5d7ff2eee chore(release): bundler-vite 0.1.0-beta.1 2023-10-03 13:02:37 -04:00
PatrikKozak
3c63f5148b feat: adds vite property to payload admin config options (#3425) 2023-10-03 12:56:58 -04:00
Elliot DeNolf
2ad94e48f7 chore: add stdin: true to all nodemon.json files 2023-10-03 12:42:22 -04:00
Elliot DeNolf
cf26155995 chore: sync logger for prompts, adjust nodemon 2023-10-03 12:34:48 -04:00
Elliot DeNolf
7349c82e28 chore: add json files to lint-staged 2023-10-02 22:16:57 -04:00
Elliot DeNolf
f94e20942b ci: add clean pipeline to turbo 2023-10-02 22:16:32 -04:00
Elliot DeNolf
fdcdabd3ed chore(release): all beta packages 2023-10-02 21:47:32 -04:00
Elliot DeNolf
8ba1274e2f chore: update clean script for all packages 2023-10-02 21:03:41 -04:00
Jacob Fletcher
baf2b6de30 chore: passing admin e2e tests 2023-10-02 17:57:10 -04:00
Alessio Gravili
426efcaa08 chore: unbreak vscode config launch command 2023-10-02 23:32:15 +02:00
Elliot DeNolf
4f405bbee6 chore: remove console.log 2023-10-02 17:19:53 -04:00
Elliot DeNolf
0c977511f6 chore(script): list latest package versions from registry 2023-10-02 17:19:40 -04:00
Elliot DeNolf
7abb2450ef chore: better typing 2023-10-02 17:05:26 -04:00
Elliot DeNolf
85bcf150a7 chore: more drizzle renames 2023-10-02 16:28:24 -04:00
Elliot DeNolf
05116dd667 chore: rename db.db to db.drizzle 2023-10-02 16:22:57 -04:00
James
8e0b57ea59 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-02 16:19:29 -04:00
James
1286ed4706 chore: types mongodb adapter 2023-10-02 16:19:18 -04:00
Jacob Fletcher
51b2ce9fe9 chore: lints live preview 2023-10-02 15:21:50 -04:00
Jacob Fletcher
0c6bea7388 chore: nests doc tab li in tab conditions 2023-10-02 15:15:43 -04:00
Jacob Fletcher
29aa6e1449 chore: renders collapse label in sidebar 2023-10-02 15:15:43 -04:00
Jacob Fletcher
2938ce0d09 chore: renders icon graphic in step nav 2023-10-02 15:15:43 -04:00
Elliot DeNolf
a52ebf5596 chore: add commit to .git-blame-ignore-revs 2023-10-02 15:04:21 -04:00
Elliot DeNolf
dfac7395fe chore: prettier fix 2023-10-02 15:03:09 -04:00
Elliot DeNolf
5b3fd4f6ab ci: add husky and lint-staged 2023-10-02 14:36:23 -04:00
Jacob Fletcher
5ea06c9ad0 chore: removes json-formatter-js dependency 2023-10-02 13:29:58 -04:00
Jacob Fletcher
e7aac41672 chore: fixes EditViewProps type 2023-10-02 13:29:28 -04:00
James
c1861eecc8 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-02 12:19:31 -04:00
James
63177b5d55 chore: comments out js thign 2023-10-02 12:00:41 -04:00
Elliot DeNolf
5464966d1a chore: migration dir to src, use process.cwd() 2023-10-02 11:59:01 -04:00
Jacob Fletcher
a53cbd146f feat: live preview (#3382) 2023-10-02 11:40:08 -04:00
Jacob Fletcher
ec0f5a77b7 feat: api view (#3420)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-10-02 11:38:14 -04:00
Elliot DeNolf
316702c253 chore: fix migrateDown args 2023-10-02 11:16:56 -04:00
Elliot DeNolf
029da71a83 chore: remove payload starting log 2023-10-02 11:09:40 -04:00
James
e5a95755da chore: returns generic to BasePayload to fix typing 2023-10-02 11:07:01 -04:00
James
eb988f1f19 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-02 10:46:37 -04:00
Alessio Gravili
45f23367c8 fix: 2.0 hotkey's pressed keys are not unset when window is not focused (#3401)
* fix: hotkey's pressed keys are not unset when window is not focused

* chore: re-order string list

* chore: add back removed comment
2023-10-02 16:46:12 +02:00
James
30e9ba67ed Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-02 10:46:02 -04:00
Dan Ribbens
6d014cf748 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-02 10:45:36 -04:00
James
2e480d4c99 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-02 10:45:28 -04:00
Dan Ribbens
42ceafb942 chore: update all payload generated types imports to use payload redeclared types 2023-10-02 10:45:21 -04:00
James
fa4821adef chore: add declare pattern to generated types 2023-10-02 10:45:19 -04:00
Elliot DeNolf
5d6b82a2b4 chore: use console.log in connect until we can adjust our logger 2023-10-02 10:32:30 -04:00
James
e913d5c400 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-02 10:23:05 -04:00
James
9a6d650a13 chore: progress to type overrides 2023-10-02 10:22:59 -04:00
Elliot DeNolf
6aaa22b2b4 chore: fix outdated lockfile 2023-10-02 09:09:23 -04:00
Alessio Gravili
0de816591b chore(richtext-lexical): add additional exports 2023-10-02 12:42:36 +02:00
Alessio Gravili
fd9ca519d7 chore(richtext-lexical): export more functions 2023-10-02 11:26:29 +02:00
Elliot DeNolf
dbdd317af7 chore: add clean and prepublishOnly scripts to all packages 2023-10-01 22:14:39 -04:00
Elliot DeNolf
71b372211f chore: export migration args from top-level adapter export 2023-10-01 22:07:53 -04:00
James
ddc6cb927b chore: exports database adapter from base payload 2023-10-01 21:49:30 -04:00
Elliot DeNolf
85c81c3efe chore: adjust DatabaseAdapter export/import for declare module 2023-10-01 21:43:12 -04:00
James
bb9b4c9fa0 chore: misc fixes 2023-10-01 20:40:30 -04:00
James
237fa50255 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-01 18:55:12 -04:00
James
556620a94e chore: enables bundle analyzer in webpack 2023-10-01 18:55:01 -04:00
James
8f837f99ae chore: vite in production 2023-10-01 18:42:47 -04:00
Elliot DeNolf
32e30ca678 feat(bundler-webpack): adjust aliasing 2023-10-01 17:10:52 -04:00
Elliot DeNolf
6e07aee59a feat(richtext-slate): add copyfiles command 2023-10-01 16:23:27 -04:00
James
44b10cc9b4 chore: webpack published package bugs 2023-10-01 16:20:18 -04:00
James
2649ceaac6 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-01 15:47:20 -04:00
James
ee22a488c0 chore: able to select bundler in dev 2023-10-01 15:47:16 -04:00
Elliot DeNolf
40f4014920 feat(templates): add editor import and config lines 2023-10-01 15:40:59 -04:00
Elliot DeNolf
317104bb9f ci: add richtext-lexical build job 2023-10-01 15:19:34 -04:00
Alessio Gravili
eed2b699c8 chore: fix lexical package not building 2023-10-01 21:19:22 +02:00
Alessio Gravili
48591aa24c fix: error when trying to access id property in null value 2023-10-01 21:14:11 +02:00
James
f8d456d762 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-01 15:07:31 -04:00
James
e6a0ed5e1c chore: vite dev script 2023-10-01 15:07:21 -04:00
Alessio Gravili
9308c792e1 feat: Lexical richtext editor (#3359)
* chore: move slate stuff into packages/richtext-slate

* chore: fieldTypes stuff

* chore: fix richtext-slate tsconfig

* chore: add clean:unix command

* chore: fix up things

* chore: undo subpath imports being hoisted up

* chore: fix incorrect imports

* chore: improve AdapterArguments type

* chore: remove unused richTextToHTML and stringifyRichText files

* fix: core-dev scss imports

* chore: fix publishConfig exports for richtext-slate

* chore: adjust joi schema for richtext field

* chore: various fixes

* chore: handle afterRead population in richText adapter

* chore: handle more after-read promise stuff

* chore: fix joi validation

* chore: add richtext adapter to tests

* chore: merge adapter props with field props

* chore: index.tsx => index.ts

* chore: rename `adapter` to `editor`

* chore: fix e2e tests not running due to importing a constant from a file (`Tabs`) which imports createSlate.

This fails because createSlate imports React components.

* chore: remove unnecessary import

* chore: improve various typings

* chore: improve typings for List view Cell components

* feat: richText adapter cell component

* chore: add missing types packages for packages/richtext-slate

* chore: add new adapter interface properties to joi schema

* chore: withMergedProps utility which replaces getSlateCellComponent and getSlateFieldComponent

* feat: added config.defaultEditor property which is now required. field.editor is no longer required and overrides config.defaultEditor

* docs: mention editor and defaultEditor property in the docs

* chore: fix incorrectly formatted JSX in docs files breaking mdx parser

* feat: create base structure for lexical adapter

* chore: upgrade dependencies

* chore: improve package.json property order

* chore: undo unnecessary changes in core

* chore: initial, working lexical editor

* chore: utils

* chore: add license.md

* chore: work on Floating toolbar

* chore: floatingSelectToolbar extensibility

* chore: FloatingSelectToolbar format buttons

* chore: add functionality to format buttons

* chore: caret handling improvements

* chore: keep toolbar hidden during mousedown

* chore: keep carat centered unless at edge of container

* chore: placeholder, style improvements

* chore: DraggableBlock Handle

* chore: limit cell preview length

* chore: fix drag handle styling in light mode

* chore: remove unnecessary listener

* feat: add block handle

* chore: handle removal of handles properly

* chore: add HistoryPlugin

* chore: improve naming of format button properties

* chore: fix incorrect position of HistoryPlugin

* chore: serif font

* chore: improve opacity handling of FloatingSelectToolbar

* feat: slash menu

* feat: slash menu interface

* chore: fix mixed-up icon

* chore: add missing editorConfig?.feature dependency

* feat: sanitizedEditorConfig, slash menu grouping

* feat: interface for nodes

* feat: Plugin interface

* feat: working AddBlockHandlePlugin

* feat: headings

* chore: improve editor focus handling for add block handle's slash menu

* chore: improve handling of slash menu filtering

* fix: cloneDeep function not handling all data types well

* feat: markdown transformers for headings

* feat: proper dependency system

* feat: add remaining markdown transformers

* feat: order system for floating toolbar format buttons

* chore: customizable floating select toolbar sections system

* feat: WIP floatingSelectToolbar dropdown sections

* feat: working dropdown & misc improvements

* chore: fix dropdown top positioning after scrolling down

* chore: downgrade @types/react

* feat: treeview debug feature, & misc improvements

* feat: add TabIndentationPlugin by default

* fix: wrong key for treeviewfeature

* chore: handle plugin keys

* chore: simplify Heading Feature

* feat: Text Align

* feat: Indent

* chore: floating text toolbar section dividers

* feat: isEnabled for floating select toolbar, and isEnabled handling for decreaseIndent

* chore: add all missing icons

* feat: checklist, orderedlist, unorderedlist

* chore: improve lists by using lexical/react's ListPlugin

* chore: lists markdown transformers

* chore: improve key generation for plugins

* fix: add missing payload scss import

* fix: make default editorConfig null instead of defaultSanitizedEditorConfig for EditorConfigProvider. This fixes a bug where the editor would crash if some feature was using this EditorConfigProvider, as EditorConfigProvider needs the feature (due to the serialization process) and the Feature needing EditorConfigProvider (circular dependency)

* chore: allow positioning plugins under floatingAnchorElem

* feat: WIP: Link Feature

* chore: add box shadow to slash menu in light mode

* chore: CheckList => Check List

* chore: respect admin.readOnly setting

* chore: Simplify Link Feature

* chore: restructuring

* chore: prettier

* chore: scss-ify

* feat: wip: nicer draggable blocks

* chore: lots of block drag improvements

* helllll yea

* chore: just pure niceness

* fix: drag handle not working when scrolling down

* fix: "add" drag handle not working when scrolling down

* chore: remove unnecessary console log

* chore: fix slash menu positioning if there is not enough space below

* chore: increase animation speed of floating select toolbar

* chore: expect transforms for top-level editor nodes

* chore: move css rule to correct position

* chore: slightly animate target drag line

* chore: do not indicate drag-ability in un-dragable positions

* chore: explanatory comment

* chore: link editor styling

* chore: lots of link-related improvements

* chore: a lot of floating toolbar improvements

* chore: adjust link colors to be the same as in the website

* chore: prep work link extensibility

* chore: work on link plugin

* feat: fully-working link feature 🎉

* chore: add upload icon

* chore: merge in useful changes from playground & misc stuff

* feat: WIP relationship feature

* feat: Relationship Feature

* feat: BlockQuote Feature

* chore: base structure for Upload feature

* chore: fix types

* chore: WIP work on population and upload nodes

* chore: stuff

* fix: ensure uuid is only generated once

* chore: remove console.log's

* feat: link and relationship population

* fix: populate relationships at correct position

* chore: bunch of progress on upload node

* chore: working upload node!

* chore: various upload feature improvements

* chore: misc

* feat: working upload feature fields customization

* feat: WIP Blocks feature

* chore: fix incorrectly registered editor commands

* chore: get Block fields to render

* feat: functional blocks feature

* chore: improve functionality of blocks feature component (styling, collapsing)

* chore: disable console logs
2023-10-01 21:03:44 +02:00
Elliot DeNolf
8f14cd2c59 chore(release): db-mongodb 1.0.0-beta.0 2023-10-01 14:15:06 -04:00
Elliot DeNolf
4ac9f339e6 chore(db-mongodb): add files key to package.json 2023-10-01 14:13:31 -04:00
Elliot DeNolf
fd146fb9ac chore(release): bundler-webpack 1.0.0-beta.0 2023-10-01 14:08:07 -04:00
Elliot DeNolf
4debc50c36 chore(bunder-webpack): add files key to package.json 2023-10-01 14:06:20 -04:00
James
a73246f85b Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-10-01 13:50:38 -04:00
James
7bccd40a95 chore: building packages 2023-10-01 13:50:28 -04:00
Elliot DeNolf
b990e98b89 chore: add missing type dep 2023-10-01 13:38:53 -04:00
Alessio Gravili
5767e5d61c chore: fix build errors 2023-09-29 23:31:30 +02:00
Jacob Fletcher
34e2dc8a79 chore: overflows step nav (#3415) 2023-09-29 17:11:27 -04:00
Jacob Fletcher
244db8d621 chore: refines doc controls (#3411) 2023-09-29 14:14:48 -04:00
Jacob Fletcher
9d9d20efd9 chore: overhauls main nav (#3410) 2023-09-29 13:10:37 -04:00
Elliot DeNolf
96844a5185 ci: add builds for bundlers and plugins 2023-09-29 12:26:50 -04:00
Elliot DeNolf
973b4edba9 chore(release): core 2.0.0-beta.0 2023-09-29 11:55:38 -04:00
Elliot DeNolf
4ae40f4a12 chore(release): db-postgres 0.1.0-beta 2023-09-29 11:49:44 -04:00
Elliot DeNolf
07f713f8e9 chore: update latest components output 2023-09-29 10:51:03 -04:00
Elliot DeNolf
1ca5c70ed6 chore: better migration failure message 2023-09-29 10:44:38 -04:00
Jarrod Flesch
6fa5866f99 feat: 2.0 popover style updates (#3404) 2023-09-29 09:05:02 -04:00
Elliot DeNolf
f723b0e0e9 docs: add disableOnInit 2023-09-28 16:03:40 -04:00
Elliot DeNolf
33aac93c6e chore: use copy of options for modification 2023-09-28 15:23:50 -04:00
Elliot DeNolf
719dd1f2ba chore: adjust when to run init, and use proper payload param in dev script 2023-09-28 15:02:59 -04:00
Elliot DeNolf
b8c36ea8c5 chore: reorder migrate status table columns 2023-09-28 13:45:17 -04:00
Elliot DeNolf
706f2b469f feat: add disableOnInit option 2023-09-28 13:44:50 -04:00
Dan Ribbens
806dc9c098 chore: postgres cleanup 2023-09-28 13:18:24 -04:00
Dan Ribbens
be09b9bbe6 chore: querying with not_equals works with nulls every test past! 2023-09-28 11:52:52 -04:00
Dan Ribbens
0c943be3be chore: optional chain req.transactionID 2023-09-28 11:46:00 -04:00
James
796469f7cc chore: defaultValues within group 2023-09-28 10:47:54 -04:00
James
8ea63421f0 chore: locale=all relationships 2023-09-28 09:41:00 -04:00
James
5d0bd25267 chore: streamlined fallback locale in local operations 2023-09-28 09:15:43 -04:00
James
5be49e1484 chore: threads through req so transactions are able to function accordingly 2023-09-27 16:52:20 -04:00
James
a73625edb9 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-27 16:32:20 -04:00
James
20da1c4a13 chore: bug with reading globals 2023-09-27 16:32:03 -04:00
Elliot DeNolf
506f82127b chore: add dotenv to root package.json 2023-09-27 16:29:40 -04:00
Elliot DeNolf
6ed6c5b5b0 chore: allow dev override to PAYLOAD_DROP_DATABASE 2023-09-27 16:29:40 -04:00
Elliot DeNolf
43daa8640a chore: handle unnamed migrations 2023-09-27 16:29:40 -04:00
Elliot DeNolf
97352f7ceb chore: adjust migration file naming 2023-09-27 16:29:40 -04:00
James
09883ee78c chore: passing field tests 2023-09-27 16:25:23 -04:00
Jacob Fletcher
aa94c00bc6 chore: misc css (#3391) 2023-09-27 13:18:29 -04:00
Jacob Fletcher
d61eef23d1 chore: fixes admin view types (#3398) 2023-09-27 10:56:15 -04:00
James
6e81fa68e8 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-26 17:11:59 -04:00
James
8e8ba82c6d chore: revises a few tests 2023-09-26 17:11:46 -04:00
Elliot DeNolf
74605e471d chore: add migrate down to template 2023-09-26 16:52:16 -04:00
James
4593d37815 chore: merge 2023-09-26 16:19:42 -04:00
James
6f5561e14f chore: builds postgres json querying 2023-09-26 16:17:13 -04:00
Dan Ribbens
db38499d41 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-26 15:44:22 -04:00
Dan Ribbens
a5f162e883 chore: fix verifyEmail missing update properties 2023-09-26 15:44:04 -04:00
Elliot DeNolf
65e080671d chore: use utilities dir 2023-09-26 15:33:24 -04:00
Elliot DeNolf
c5c15c4463 chore: reorg postgres adapter props 2023-09-26 15:33:23 -04:00
Elliot DeNolf
5572c69741 chore: migration table existence handling 2023-09-26 15:32:21 -04:00
Jacob Fletcher
eac4605c99 chore: wraps global view with edit depth provider 2023-09-26 13:00:52 -04:00
Dan Ribbens
a48d000b54 chore: sanitize dates queries postgres 2023-09-26 12:14:57 -04:00
Dan Ribbens
88030616d7 chore: fixes forgotPassword resetPassword for postgres 2023-09-26 12:14:39 -04:00
Dan Ribbens
826c8671c6 chore: windows exportPointerFiles fix 2023-09-26 12:07:09 -04:00
Dan Ribbens
81d294b065 chore: add missing transaction support to auth operations 2023-09-26 10:02:40 -04:00
Dan Ribbens
b214d7b7d3 chore: merges 2023-09-26 09:34:11 -04:00
Elliot DeNolf
9c0aadd046 chore: migration dir and migration template updates 2023-09-25 23:27:58 -04:00
Elliot DeNolf
a9f1dc02ca chore: rework pg migration creation 2023-09-25 23:27:58 -04:00
Elliot DeNolf
07dd353432 chore: postgres builds without jsonquery 2023-09-25 23:27:58 -04:00
Dan Ribbens
6a6094c1a7 chore: adds postgres destroy 2023-09-25 11:40:30 -04:00
Dan Ribbens
beb7647bc7 chore: mongodb destroy connections outside of tests 2023-09-25 11:39:22 -04:00
Jacob Fletcher
af3baee927 chore: adds creatingNewLabel translation 2023-09-25 10:54:37 -04:00
Jacob Fletcher
7f7d914b4e chore: conditionally renders global sidebar fields 2023-09-25 10:54:07 -04:00
Jacob Fletcher
43064f4900 chore: renders autosave and status 2023-09-25 00:39:02 -04:00
James
6fd3a896a1 chore: fixes syntax error 2023-09-24 18:02:07 -07:00
James
8e6e576cd0 chore: refactors transactions 2023-09-24 18:01:01 -07:00
Elliot DeNolf
ba4cd2b599 chore: await db calls, disable no-floating-promises as necessary 2023-09-24 16:44:31 -07:00
James
ad24a17bd5 chore: merge 2023-09-24 16:31:58 -07:00
James
4df19cbdf6 chore: converts anything that awaits many promises to sequential execution 2023-09-24 16:31:23 -07:00
Elliot DeNolf
67103a7059 chore: fix postgres adapter types 2023-09-24 15:52:46 -07:00
Dan Ribbens
4ba5d723f5 chore: fix call to db query 2023-09-24 18:02:30 -04:00
James
8155902476 chore: poc for how to type db adapters 2023-09-24 14:22:06 -07:00
Dan Ribbens
bf745d19ed Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-24 15:53:22 -04:00
Dan Ribbens
ef51e0855f chore: wip transactions re-enabled 2023-09-24 15:53:02 -04:00
James
e437b41950 chore: misc bugs, types pattern 2023-09-24 10:51:21 -07:00
James
220e7a590d chore: bugs with hasMany select localized 2023-09-23 12:29:40 -07:00
James
bb7feddbff chore: improves semantics of transform write 2023-09-23 12:18:04 -07:00
James
74fcf2fc1f chore: bugs with array 2023-09-23 10:59:34 -07:00
James
a458375934 chore: passing versions tests 2023-09-23 10:07:29 -07:00
Dan Ribbens
e5ef842839 chore: split out updateVersion function 2023-09-23 12:22:23 -04:00
Dan Ribbens
0fbb8d1a32 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-23 12:18:23 -04:00
Dan Ribbens
1c2e74f0c9 chore: split out updateVersion function 2023-09-23 12:18:10 -04:00
James
e6e8ab6630 chore: adds updateGlobalVersion to mongo adapter 2023-09-23 09:02:59 -07:00
Dan Ribbens
d3bfb76783 merges 2023-09-23 11:38:39 -04:00
James
64e7c395ce chore: ensures globals can be found and updated 2023-09-23 08:35:23 -07:00
James
d886af32d9 chore: allows querying on relationTo 2023-09-23 08:26:40 -07:00
James
ee0bddf85b chore: progress to versions 2023-09-23 07:50:28 -07:00
Jacob Fletcher
7ea4fcde2c feat: custom document tabs (#3387) 2023-09-22 17:42:23 -04:00
James
0f6f26e4d1 chore: updates old versions when new is created 2023-09-22 17:41:26 -04:00
James
82d2d2350f chore: uploads test suite passes 2023-09-22 16:51:29 -04:00
Elliot DeNolf
1377f56f26 chore: handle nulls vs undefined 2023-09-22 16:44:51 -04:00
Elliot DeNolf
a112b98597 chore: handle querying for existing upload 2023-09-22 16:42:53 -04:00
James
95e428223f Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-22 16:34:53 -04:00
James
5abd9e3372 chore: self joins are now aliased correctly in relationship queries 2023-09-22 16:34:25 -04:00
Dan Ribbens
0c0a11debb chore: postgres versions update to latest false 2023-09-22 15:43:35 -04:00
Elliot DeNolf
528fb47b0b chore: fix dev:generate-types 2023-09-22 15:13:57 -04:00
Elliot DeNolf
0d68216c4b chore: fix hooks test, array inside group 2023-09-22 14:54:02 -04:00
Dan Ribbens
6ee15c3571 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-22 14:51:12 -04:00
Dan Ribbens
575bd9436a chore: build query fixes 2023-09-22 14:31:23 -04:00
James
f3415bb13e chore: ensures relationships can be cleared 2023-09-22 14:11:18 -04:00
Alessio Gravili
8b715a8127 chore: revert setting default db to postgres 2023-09-22 02:05:57 +02:00
Dan Ribbens
ad82b99dc6 chore: save updatedAt with new values 2023-09-21 16:51:40 -04:00
Dan Ribbens
6aaaeaff98 chore: add postgres updateVersion 2023-09-21 16:07:40 -04:00
James
edf9dd7983 chore: misc cleanup 2023-09-21 13:52:01 -04:00
Dan Ribbens
9eca30f281 chore: add postgres findglobalversions 2023-09-21 12:57:04 -04:00
Dan Ribbens
67b347aaa3 chore: postgres disable unique constraints for version tables 2023-09-21 12:19:19 -04:00
Dan Ribbens
c02dc385cb chore: use db transactions in upsertRows 2023-09-21 12:18:10 -04:00
Dan Ribbens
44a2b1a98f Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-21 11:29:18 -04:00
Dan Ribbens
c0dfeb4918 chore: postgres operations use db from session for transactions 2023-09-21 11:29:09 -04:00
Elliot DeNolf
17132b72ad ci: configure int tests with postgres (#3364)
* chore: configure postgres

* chore: adjust action and connection

* chore: export postgres url as env
2023-09-21 09:34:43 -04:00
James
1191a2851c chore: wires up a few versions methods 2023-09-20 14:37:14 -04:00
Dan Ribbens
caa56e6ef6 chore: postgres abstract find 2023-09-20 13:25:04 -04:00
Dan Ribbens
62421da6ad chore: fix missing transaction id bug 2023-09-20 06:58:40 -04:00
Dan Ribbens
cec16abea0 chore: postgres enforce notNullable on required fields 2023-09-20 06:57:15 -04:00
Elliot DeNolf
25be3a3c6f ci: cache build and run tests per db adapter (#3362)
* ci: cache entire build to share with future jobs

* chore: pnpm setup for tests job

* chore: use build cache in db adapter builds

* chore: troubleshoot db builds

* chore: add back db-mongodb

* chore: add back db-postgres, cleanup

* chore: separate type gen into separate job

* chore: run tests separately for each db adapter

* chore: use matrix for tests w/ db

* chore: explicit ip and port for postgres
2023-09-19 22:31:33 -04:00
James
4dd98396a7 chore: adds date field 2023-09-19 19:23:17 -04:00
James
0c101cd713 chore: revises field names being lost while creating indexes 2023-09-19 19:00:35 -04:00
James
2a282c7257 chore: builds select field 2023-09-19 17:39:35 -04:00
James
bbcdf32a90 chore: builds hasMany selects 2023-09-19 17:15:10 -04:00
Elliot DeNolf
db4aa1e8b6 ci: move int tests before e2e 2023-09-19 17:04:31 -04:00
Elliot DeNolf
7159bf2ff3 test: remove unused test/postgres dir 2023-09-19 17:04:31 -04:00
Dan Ribbens
07aaacaa55 chore: postgres radio field type 2023-09-19 17:01:07 -04:00
Dan Ribbens
274d062d6d Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-19 16:37:53 -04:00
Dan Ribbens
53572bf933 chore: postgres checkbox type 2023-09-19 16:29:21 -04:00
Elliot DeNolf
7b6fd62895 feat(templates): update templates for 2.0 (#3358)
* chore: add reinstall script

* feat(templates): update blank template

* chore(templates): update website and ecommerce
2023-09-19 16:17:37 -04:00
James
32fb5e66f8 chore: builds select enum pattern 2023-09-19 15:52:40 -04:00
James
92275f909f chore: restores community test suite 2023-09-19 15:27:04 -04:00
James
3cfc51ecf4 chore: hasMany numbers 2023-09-19 15:26:08 -04:00
James
1ed8dad92d chore: test resolution 2023-09-19 14:13:33 -04:00
James
81df72b5c2 chore: merge 2023-09-19 13:27:24 -04:00
James
7b38bd1e52 chore: nested unnamed fields, like query constraint 2023-09-19 13:27:05 -04:00
Alessio Gravili
b1ec1f5f3f chore: undo setting e2e tests to postgres by default 2023-09-19 17:38:04 +02:00
Jarrod Flesch
1b3419cd12 chore: resolved console errors from checkbox inputs (#3356) 2023-09-19 11:16:53 -04:00
James
c3a357f893 chore: merge 2023-09-19 11:04:58 -04:00
Jacob Fletcher
5f0207d617 chore: comments out live preview tab 2023-09-19 11:01:47 -04:00
James
5bc8b29e79 chore: merge 2023-09-19 10:53:44 -04:00
James
7fdf77cf3e chore: bugs with sort, graphql tests with postgres 2023-09-19 10:50:04 -04:00
Jacob Fletcher
463a39e822 chore: improves document tab logic 2023-09-19 10:13:42 -04:00
Alessio Gravili
6338471287 chore: sort package.json keys of richtext-slate package 2023-09-19 12:02:42 +02:00
Alessio Gravili
c356b96913 chore: package.json improvements: order, duplicate scripts and packages 2023-09-19 11:51:56 +02:00
Alessio Gravili
fbe5f36b29 chore: add commit to .git-blame-ignore-revs 2023-09-19 11:43:25 +02:00
Alessio Gravili
cdaa0acd61 chore: run eslint & prettier, adjust perfectionist sorting for package.json and tsconfig.json in eslint configs 2023-09-19 11:41:56 +02:00
Alessio Gravili
4f68b722dc chore: fix imports in db-postgres adapter 2023-09-19 11:15:47 +02:00
Alessio Gravili
a81401cf77 feat: breaking: richtext adapter (#3311)
BREAKING: requires user to install @payloacms-richtext-slate and specify a `config.editor` property

* chore: move slate stuff into packages/richtext-slate

* chore: fieldTypes stuff

* chore: fix richtext-slate tsconfig

* chore: add clean:unix command

* chore: fix up things

* chore: undo subpath imports being hoisted up

* chore: fix incorrect imports

* chore: improve AdapterArguments type

* chore: remove unused richTextToHTML and stringifyRichText files

* fix: core-dev scss imports

* chore: fix publishConfig exports for richtext-slate

* chore: adjust joi schema for richtext field

* chore: various fixes

* chore: handle afterRead population in richText adapter

* chore: handle more after-read promise stuff

* chore: fix joi validation

* chore: add richtext adapter to tests

* chore: merge adapter props with field props

* chore: index.tsx => index.ts

* chore: rename `adapter` to `editor`

* chore: fix e2e tests not running due to importing a constant from a file (`Tabs`) which imports createSlate.

This fails because createSlate imports React components.

* chore: remove unnecessary import

* chore: improve various typings

* chore: improve typings for List view Cell components

* feat: richText adapter cell component

* chore: add missing types packages for packages/richtext-slate

* chore: add new adapter interface properties to joi schema

* chore: withMergedProps utility which replaces getSlateCellComponent and getSlateFieldComponent

* feat: added config.defaultEditor property which is now required. field.editor is no longer required and overrides config.defaultEditor

* docs: mention editor and defaultEditor property in the docs

* chore: fix incorrectly formatted JSX in docs files breaking mdx parser

* chore: fix various errors

* chore: auto-generated pointer files
2023-09-19 11:03:31 +02:00
Alessio Gravili
835efdf400 chore: fix issues with tests 2023-09-19 10:46:32 +02:00
Elliot DeNolf
7725c1fdc9 chore: webpack bundler aliasing 2023-09-18 17:17:37 -04:00
Elliot DeNolf
1efab0b6a3 chore: make bundlers use named exports (#3352) 2023-09-18 15:38:05 -04:00
Elliot DeNolf
53a80be6a0 Merge pull request #3351 from payloadcms/chore/2.0-prettier-templates
chore: prettier templates
2023-09-18 14:51:52 -04:00
Elliot DeNolf
05eabc7a9d chore: add template prettier commit to .git-blame-ignore-revs 2023-09-18 14:47:07 -04:00
Dan Ribbens
43451a629a Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-18 14:45:08 -04:00
Dan Ribbens
8ab24a4513 chore: postgres chain selectCount query methods 2023-09-18 14:44:35 -04:00
Elliot DeNolf
75a428ddc4 chore: prettier on all templates 2023-09-18 14:43:51 -04:00
Dan Ribbens
b271936b64 chore: fix postgres updateOne 2023-09-18 14:38:59 -04:00
Dan Ribbens
c7744c5bf0 test: conditional geojson 2023-09-18 14:37:51 -04:00
Jacob Fletcher
320e4a47cd chore: responsifies document header 2023-09-18 14:25:28 -04:00
Jacob Fletcher
66859f4073 chore: responsifies document controls 2023-09-18 14:25:28 -04:00
Dan Ribbens
321e59705d chore: split paths for graphql 2023-09-18 13:53:07 -04:00
James
029e319c7b chore: wires up contains in pg, skips point tests 2023-09-18 13:00:00 -04:00
James
2442144c98 chore: fixes id types for graphql in database adapters 2023-09-18 11:42:59 -04:00
Dan Ribbens
a8418bffa2 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-18 11:11:57 -04:00
Dan Ribbens
025d647bf7 chore: wip postgres collections-graphql 2023-09-18 11:10:32 -04:00
Jacob Fletcher
718f51d8d8 chore: fixes hmr 2023-09-18 11:10:12 -04:00
James
3c92c55ca9 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-18 10:42:36 -04:00
James
128fe0119e chore: fixes e2e tests 2023-09-18 10:42:30 -04:00
Jacob Fletcher
9bd8f14ba8 chore: refines gutter and spacing 2023-09-18 10:22:25 -04:00
Dan Ribbens
998eb99003 chore: postgres query block fields (#3347) 2023-09-17 23:19:19 -04:00
James
6abe7f2569 chore: vite builds 2023-09-16 11:24:14 -04:00
James
9efd7c9ed2 chore: few fixes in build 2023-09-16 11:13:42 -04:00
James
d46e1837a1 Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-16 11:02:48 -04:00
James
16a4de2df7 chore: merge bundlers 2023-09-16 11:02:42 -04:00
James
649cf57ea8 chore: reverts test suite back to webpack for now 2023-09-16 11:01:29 -04:00
James
5aa67cf98d chore: functioning vite 2023-09-16 10:59:58 -04:00
Jacob Fletcher
4df942529a chore: improves collection and global view routing (#3341) 2023-09-16 01:46:56 -04:00
Jacob Fletcher
dbaa1f7319 chore: abstracts filterFields from RenderFields (#3340) 2023-09-15 17:39:00 -04:00
Jacob Fletcher
85c8e4dc65 chore: overhauls admin navigation (#3339) 2023-09-15 17:33:28 -04:00
James
055c65f229 chore: passing mongodb tests 2023-09-15 17:26:50 -04:00
James
270ee3687b chore: merge 2023-09-15 17:12:32 -04:00
James
5292f41a3b chore: rectifies test issues 2023-09-15 17:12:13 -04:00
Dan Ribbens
5a56e18e7d Merge branch '2.0' of github.com:payloadcms/payload into 2.0 2023-09-15 17:11:22 -04:00
Elliot DeNolf
26955bb331 chore: fix up tests for globals, hooks, localization 2023-09-15 17:08:15 -04:00
Dan Ribbens
b8f831fd05 test: fix imports 2023-09-15 17:01:43 -04:00
Jacob Fletcher
81010311f9 chore: builds main menu modal (#3313) 2023-09-15 16:40:08 -04:00
Jacob Fletcher
4b514d4c94 chore: establishes pattern for custom collection and global views (#3312) 2023-09-15 16:38:23 -04:00
James
92b4490257 chore: merge 2023-09-15 16:32:40 -04:00
James
2a9946f788 chore: resolves some of the testing suite issues 2023-09-15 16:29:16 -04:00
Elliot DeNolf
dd0514bd2c ci: multiple jobs (#3337)
* ci: move playwright install to test:e2e script

* test: adjust test db names to avoid conflicts

* ci: clean up core job

* ci: add db-mongodb build job

* chore: add jest setup db adapter logging

* chore: install on mongodb job

* chore: adjust root deps

* chore: use turbo for db-mongodb to ensure build order

* chore: use turbo from .bin

* chore: add build script for db-postgres

* ci: add db-postgres build job

* chore: upgrade actions/checkout and actions/setup-node

* chore: rename github workflow file to main
2023-09-15 16:17:41 -04:00
James
a28b266716 chore: removes unused files 2023-09-15 14:00:00 -04:00
Dan Ribbens
09a455bb7b chore: remove temp test env var 2023-09-15 13:52:19 -04:00
Dan Ribbens
2c61ae8452 chore: merge db-adapters 2023-09-15 13:03:13 -04:00
James
0347d6a211 chore: successfully builds webpack bundler 2023-09-15 12:38:02 -04:00
James
b21b4719fc chore: ports webpack bundler over to monorepo package 2023-09-15 12:26:29 -04:00
Alessio Gravili
1fa636417f chore: disable prettier for docs, as prettier is not compatible with mdx version 2. See https://github.com/prettier/prettier/issues/12209 2023-09-15 14:42:50 +02:00
Elliot DeNolf
577f54fcf3 chore: adjust object sorting groups 2023-09-14 16:33:13 -04:00
Elliot DeNolf
abab0abca8 chore: sort all package.json files in a sane way 2023-09-14 16:32:37 -04:00
Dan Ribbens
8df2c888fe feat: postgres transactions 2023-09-14 15:39:58 -04:00
Dan Ribbens
a838274ae7 chore: merge 2023-09-14 14:52:16 -04:00
Dan Ribbens
16d314ff49 chore: fix imports postgres 2023-09-14 14:46:27 -04:00
Elliot DeNolf
79f9ef2481 chore: migration improvements (#3335)
* chore: better migrationDir handling

* chore: add .migrations to gitignore

* chore: migration cli debugging

* docs: stub out each migration command
2023-09-14 14:23:17 -04:00
Dan Ribbens
9575ec5319 merges postgres transactions 2023-09-14 13:13:59 -04:00
Elliot DeNolf
11c8804886 chore: add build script back to db-postgres/package.json 2023-09-14 12:27:38 -04:00
Elliot DeNolf
488c6651d9 chore: restore db-postgres from feat/db-adapters 2023-09-14 12:24:30 -04:00
Elliot DeNolf
744de9c706 chore: merge from 2.0 2023-09-14 12:10:36 -04:00
Dan Ribbens
1f1082c068 query exists false 2023-09-13 14:43:01 -04:00
Dan Ribbens
33e50f7d6b test: improve expects 2023-09-13 13:04:06 -04:00
Dan Ribbens
bb16ce965c query relationship by id 2023-09-13 13:02:22 -04:00
Dan Ribbens
8d98dea1b8 querying localized fields with all 2023-09-13 10:23:18 -04:00
Dan Ribbens
7cdda26e5d querying on poly relationTo ids 2023-09-12 16:26:06 -04:00
Dan Ribbens
cc1966020a querying localized has many relationship field 2023-09-12 13:43:31 -04:00
Jarrod Flesch
48398db28c chore: removes hmr prod plugin (#3320) 2023-09-12 13:12:50 -04:00
Dan Ribbens
33c15afa79 querying localized relationship field 2023-09-12 12:29:00 -04:00
Jarrod Flesch
2b7d776b26 fix(2.0): ensures relationTo as array fields load returned data from form correctly (#3318) 2023-09-12 11:53:21 -04:00
James
61098f96a8 chore: builds pattern to return constraints array 2023-09-12 10:14:09 -04:00
Dan Ribbens
8e16d825ff wip refactor joins for relationships 2023-09-12 09:54:53 -04:00
Elliot DeNolf
9f4fdc5bc4 chore: missing jest config 2023-09-12 08:20:18 -04:00
Elliot DeNolf
2ff41f7a50 chore: more tests commands to top level 2023-09-11 17:22:08 -04:00
Alessio Gravili
aad2389a20 chore: add back missing 'utf-8' flag for exportPointerFiles script 2023-09-11 23:18:49 +02:00
Alessio Gravili
58589021cc chore: add support for .scss pointer files 2023-09-11 23:17:26 +02:00
Elliot DeNolf
56a02975d1 chore: fix dev type gen 2023-09-11 16:57:33 -04:00
Elliot DeNolf
41347bef5f chore: fix components tests 2023-09-11 16:49:35 -04:00
Alessio Gravili
73fe11baf3 chore: improve handling of subpath exports for published package (#3310)
* chore: exportPointerFiles script

* chore: handle creation of subfolders which may not exist

* chore: add json to copyfiles

* chore: do not use exports property for publishConfig

* chore: add clean:unix command

* chore: modify clean:unix command to also delete any tsconfig.tsbuildinfo files

* chore: remove exports properties from db adapter packages
2023-09-11 22:20:12 +02:00
Dan Ribbens
af6b7592a1 postgres short circuit empty find results 2023-09-09 17:26:38 -04:00
Jarrod Flesch
1fc9ca1709 chore: corrects hasMany relationships within addFieldStatePromise (#3301) 2023-09-09 00:31:52 -04:00
Dan Ribbens
754efe00f6 optimize find to query docs and count concurrently, normalize pagination args 2023-09-08 11:21:22 -04:00
Alessio Gravili
df33323bc8 chore: add missing root packages for test suite to work 2023-09-07 23:06:04 +02:00
Alessio Gravili
e2df74bbff chore: fix e2e tests by not importing from ./config 2023-09-07 22:53:28 +02:00
Alessio Gravili
4aad563f58 chore: cleanup 2.0 tsconfigs, fix building types for db adapters (#3293)
* chore: cleanup tsconfigs and fix db-mongodb builds

* chore: make the db adapters depend on payload

* chore: fix tsconfig for test directory

* chore: fix packages/db-mongodb not building
2023-09-07 22:36:17 +02:00
Dan Ribbens
1f7b52497c postgres sanitize query value 2023-09-07 14:45:07 -04:00
Dan Ribbens
595173327e postgres operations buildQuery updates 2023-09-07 11:49:21 -04:00
Jarrod Flesch
abd983f421 chore: mirror changes from PR #3276 (#3284) 2023-09-07 11:06:57 -04:00
Jarrod Flesch
1092ae6f98 chore: mirror changes from PR #3279 (#3285) 2023-09-07 11:06:35 -04:00
Alessio Gravili
d52e265117 chore: add last lint & format commit to .git-blame-ignore-revs 2023-09-07 15:54:48 +02:00
Alessio Gravili
1fbda85cd0 chore: lint and format everything again 2023-09-07 15:53:48 +02:00
Alessio Gravili
9e4474be60 chore: fix eslint and prettier configs for test directory 2023-09-07 15:48:48 +02:00
Alessio Gravili
a51b5970dc chore: re-run prettier 2023-09-07 15:45:48 +02:00
Alessio Gravili
fd2290d6f7 chore: update lint-specific packages 2023-09-07 15:36:02 +02:00
Alessio Gravili
4e9b2b4b5e chore: add .git-blame-ignore-revs file 2023-09-07 15:26:34 +02:00
Alessio Gravili
bf673096e3 chore: add .vscode/settings.json 2023-09-07 15:23:16 +02:00
Dan Ribbens
2e086d95d9 chore: working simple where 2023-09-06 16:25:52 -04:00
Dan Ribbens
d07394d197 sorting on group nested field 2023-09-06 15:05:04 -04:00
Elliot DeNolf
17dbe066c1 0.4.2 2023-09-06 12:54:59 -04:00
Elliot DeNolf
5acc88ee9a fix: disregard yarn.lock file when using templates 2023-09-06 12:53:35 -04:00
Elliot DeNolf
8093eb46b3 chore: remove db-mongodb/tsconfig.tsbuildinfo 2023-09-06 11:30:22 -04:00
Elliot DeNolf
dbfcaded16 chore: update gitignore, ignore tsbuildinfo 2023-09-06 10:37:39 -04:00
Alessio Gravili
4c5673be23 chore: improve package.json script commands 2023-09-06 01:01:57 +02:00
Dan Ribbens
d33cff94e0 getTableColumnFromPath tabs 2023-09-05 17:27:43 -04:00
Dan Ribbens
5b620e77f4 wip getTableColumnFromPath 2023-09-05 16:36:32 -04:00
James
59fe015239 chore: chops up buildQuery 2023-09-05 13:57:08 -04:00
Dan Ribbens
73e2a03b6d wip changes to build query 2023-09-05 12:30:06 -04:00
Alessio Gravili
eea371b336 chore: hoist up testing-related packages 2023-09-01 21:57:59 +02:00
Alessio Gravili
bd7bd8faec chore: fix MongooseAdapter import 2023-09-01 21:52:40 +02:00
Alessio Gravili
16c1ac8d9a Merge pull request #3264 from payloadcms/fix/2.0-tests
chore: fix 2.0 tests and use swc for building
2023-09-01 21:44:53 +02:00
Alessio Gravili
f97da2a9b4 chore: fix scss import 2023-09-01 21:43:45 +02:00
Alessio Gravili
b93d2d89c7 chore: use swc instead of tsc to build 2023-09-01 21:41:12 +02:00
James
0f3b364e46 chore: hoists tests out of payload package 2023-09-01 14:45:41 -04:00
Alessio Gravili
893ca87225 fix: database alias 2023-09-01 18:31:55 +02:00
Alessio Gravili
934bae2d24 chore: dirty TypeScript bandaid fixes 2023-09-01 18:29:36 +02:00
Alessio Gravili
63d18beb10 chore: fix flaky tests due to missing or incorrect awaits 2023-09-01 17:51:02 +02:00
Alessio Gravili
c48f6a298c chore: upgrade jest and jest-environment-jsdom 2023-09-01 17:48:04 +02:00
Alessio Gravili
cacae16678 fix: deleting preferences 2023-09-01 17:47:02 +02:00
Alessio Gravili
3444525428 chore: dirty fix for circular dependency 2023-09-01 17:46:32 +02:00
Alessio Gravili
ae7d6f97d2 chore: formatting and linting (#3261)
* chore: lint packages/payload

* chore: lint packages/db-postgres

* chore: lint packages/db-mongodb

* chore: update eslintrc exclusion rules

* chore: update eslintrc exclusion rules

* chore: lint misc files

* chore: run prettier through packages

* chore: run eslint on payload again

* chore: prettier misc files

* chore: prettier docs
2023-09-01 17:39:44 +02:00
Dan Ribbens
5d7aa0d009 chore: wip traversePaths of sort and buildSearchParams 2023-09-01 11:26:36 -04:00
Alessio Gravili
5f7673d735 chore: update configuration files 2023-09-01 17:13:12 +02:00
Alessio Gravili
c3c13627f1 chore: update pnpm-lock.yaml 2023-09-01 17:00:28 +02:00
Alessio Gravili
373e89a6ba chore: eslint, turbo and various configs 2023-09-01 16:59:45 +02:00
James
6ba79de560 chore: merge 2023-08-30 12:55:45 -04:00
James
ba2f6ed9c3 chore: writes all locales 2023-08-30 12:55:07 -04:00
Dan Ribbens
f0ce57169d chore: begin using sort arg 2023-08-28 17:02:49 -04:00
Daniel Kirchhof
e13d8da7c2 fix: skip following code if form.emails list is empty (#54) 2023-08-28 19:15:09 +02:00
Elliot DeNolf
d4983af3fc 0.4.1 2023-08-28 11:19:47 -04:00
Elliot DeNolf
6f2dcfd44e fix: all env vars copied from .env.example for starters 2023-08-28 11:18:52 -04:00
James
ee89693691 chore: adds delete, queryDrafts, find operations 2023-08-27 17:50:05 -04:00
James
e9b6db6559 chore: removes unused dependency 2023-08-27 17:49:42 -04:00
James
a19ccbb359 feat: optimizes querying drafts 2023-08-27 17:21:02 -04:00
James
09260df134 chore: temporarily comments out versions until methods are stubbed out 2023-08-27 12:03:53 -04:00
James
00874a4406 chore: builds version tables 2023-08-27 11:53:01 -04:00
James
2a99e6b72a chore: adds global methods 2023-08-27 11:02:38 -04:00
James
126f7f1a5a chore: adds relationship tests 2023-08-26 23:48:58 -04:00
James
55a996af19 chore: localized groups 2023-08-26 23:34:04 -04:00
James
bf79211163 chore: localized arrays now save correctly 2023-08-26 22:56:32 -04:00
James
fe0487b336 chore: passing postgres tests 2023-08-26 22:42:29 -04:00
James
62e37802ca chore: progress to retaining array rows 2023-08-26 20:50:56 -04:00
James
4dd29bf4e8 chore: ensures blocks can be updated while saving additional locales 2023-08-26 16:24:35 -04:00
James
1ca81ac726 chore: working localized relationships 2023-08-26 11:59:33 -04:00
Alessio Gravili
7b72f887d1 chore: enable esModuleInterop 2023-08-26 00:30:14 +02:00
Alessio Gravili
53526490f8 chore: fix top-level package.json commands 2023-08-25 22:13:02 +00:00
Alessio Gravili
28eaafd9c7 chore: omg it finally works omgggg 2023-08-25 22:08:20 +00:00
Alessio Gravili
27c02abacd chore: upgrade typescript and @types/node 2023-08-25 21:42:17 +00:00
James
e350c72342 Merge branch 'feat/db-adapters' of github.com:payloadcms/payload into feat/db-adapters 2023-08-25 15:59:30 -04:00
James
f631e5bef3 chore: ensures transform read preserves all locales 2023-08-25 15:59:19 -04:00
Alessio Gravili
6f22b662ec fix: make it work 2023-08-25 19:17:37 +00:00
Dan Ribbens
61e675dd7b working config after master changes 2023-08-25 15:07:03 -04:00
Dan Ribbens
4c345d18ff remove unused imports 2023-08-25 14:06:27 -04:00
Elliot DeNolf
1a8ab3b7cd chore: fix types in db-postgres 2023-08-25 11:58:21 -04:00
Alessio Gravili
7a90a440a9 fix: package.json 2023-08-25 15:47:46 +00:00
Alessio Gravili
2fdbf1d212 chore: more work on imports and exports 2023-08-25 15:44:31 +00:00
Alessio Gravili
7a72e99896 chore: import and export more stuff 2023-08-25 15:34:41 +00:00
Alessio Gravili
1acc6f2adc chore: exports/versions.ts 2023-08-25 15:20:51 +00:00
Alessio Gravili
36f0f63d3e chore: export/utilities.ts 2023-08-25 15:17:58 +00:00
Alessio Gravili
759d36049d chore: more work on exports 2023-08-25 15:04:05 +00:00
Alessio Gravili
97fac77fa3 chore: export more stuff from databases 2023-08-25 14:58:55 +00:00
Alessio Gravili
d7a89d4098 chore: add .devcontainer to .gitignore 2023-08-25 14:57:04 +00:00
Alessio Gravili
370e38ae30 chore: work on imports 2023-08-25 14:56:42 +00:00
Alessio Gravili
2d2d9fa673 chore: npm publishConfig exports 2023-08-25 14:55:20 +00:00
Alessio Gravili
4ee83881cc chore: export stuff 2023-08-25 15:19:18 +02:00
Alessio Gravili
57e8c0756e fix: db-mongodb package tsconfig.json 2023-08-25 12:26:36 +00:00
Alessio Gravili
2d97d3bcb1 chore: move exports to exports folder 2023-08-25 12:16:46 +00:00
Alessio Gravili
65a22082d6 chore: initial tsconfig.json and package.json setup 2023-08-25 12:02:20 +00:00
Dan Ribbens
004f2ed045 fixes type error in db-mongodb 2023-08-23 21:18:15 -04:00
Dan Ribbens
b8b9d7b7a1 fixes operator validation regression 2023-08-23 20:33:29 -04:00
Alessio Gravili
52820d0111 chore: upgrade playwright and jest 2023-08-23 12:41:06 +02:00
Alessio Gravili
6fdd854cab chore: install packages via workspaces 2023-08-23 12:38:48 +02:00
Alessio Gravili
b5bca5412a chore: upgrade typescript 2023-08-23 12:38:09 +02:00
Alessio Gravili
a67278b29f chore: move to monorepo structure 2023-08-23 12:20:30 +02:00
Alessio Gravili
e24ad67168 chore: migrate to pnpm 2023-08-23 00:21:11 +02:00
Alessio Gravili
25a182f407 Merge branch 'feat/db-adapters' into 2.0 2023-08-22 23:47:26 +02:00
Alessio Gravili
b4578c10a4 feat: security improvements and features (#3214)
BREAKING CHANGE:
- Unhandled Errors are now omitted by default. This can be breaking if people depend on those error messages. Now, it will just say "Something went wrong.".

* chore: slightly improved testing of registration via graphql

Signed-off-by: Vsevolod Volkov <st.lyn4@gmail.com>

* chore: hiding details of internal errors from responses

Signed-off-by: Vsevolod Volkov <st.lyn4@gmail.com>

* feat: ability to remove authorization tokens from response bodies

Signed-off-by: Vsevolod Volkov <st.lyn4@gmail.com>

* chore: add section for design contributions in contributing.md

* feat: add afterOperation hook (#2697)

* feat: add afterOperation hook for Find operation

* docs: change #afterOperation to #afteroperation

* chore: extract afterOperation in function

* chore: implement afterChange in operations

* docs: use proper CollectionAfterOperationHook

* chore: remove outdated info

* chore: types afterOperation hook

* chore: improves afterOperation tests

* docs: updates description of afterOperation hook

* chore: improve typings

* chore: improve types

* chore: rename index.tsx => index.ts

---------

Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
Co-authored-by: Alessio Gravili <alessio@gravili.de>

* chore: remove swc version pin (#3179)

* fix: WhereBuilder component does not accept all valid Where queries (#3087)

* chore: add jsDocs for ListControls

* chore: add jsDocs for ListView

* chore: add jsDocs for WhereBuilder

* chore: add comment

* chore: remove unnecessary console log

* chore: improve operator type

* fix: transform where queries which aren't necessarily incorrect, and improve their validation

* chore: add type to import

* fix: do not merge existing old query params with new ones if the existing old ones got transformed and are not valid, as that would cause duplicates

* chore: sort imports and remove extra validation

* fix: transformWhereQuery logic

* chore: add back extra validation

* chore: add e2e tests

* chore(test): adds test to ensure relationship returns over 10 docs (#3181)

* chore(test): adds test to ensure relationship returns over 10 docs

* chore: remove unnecessary movieDocs variable

* fix: passes in height to resizeOptions upload option to allow height resize (#3171)

* docs: fixes syntax error in rich-text.mdx that was breaking build

* docs: removes auto-formatting from rich-text.mdx (#3188)

* feat: Improve admin dashboard accessibility (#3053)

Co-authored-by: Alessio Gravili <alessio@gravili.de>

* feat: improve field ops (#3172)

Co-authored-by: PatrikKozak <patrik@trbl.design>

* chore: file cleanup (#3190)

* chore(release): v1.14.0

* chore: improve ts typing in sanitization functions (#3194)

* chore(templates): default port on website

* chore(templates): safely handles bad network requests

* chore(templates): implements draft preview and on-demand revalidation

* chore(templates): renders static cart page fallback

* chore(examples): updates draft-preview next-app example to use revalidateTag (#3199)

* feat: query support for geo within and intersects + dynamic GraphQL operator types (#3183)

Co-authored-by: Lucas Blancas <lablancas@gmail.com>

* chore: improve checkboxes (#3191)

* chore: improve filtering for hasMany number field (#3193)

* chore: improve fiiltering for hasMany number field

* chore: add translation for 'items' and replace rows with items

* chore: new exceededLimit key

* Revert "chore: add translation for 'items' and replace rows with items"

This reverts commit 3a91dabdfd.

* chore: undo adding items key in translation schema

* chore: new limitReached key

* chore: remove unnecessary exceededLimit key

* chore: spelling improvements

* chore: update test build config import

---------

Signed-off-by: Vsevolod Volkov <st.lyn4@gmail.com>
Co-authored-by: Vsevolod Volkov <st.lyn4@gmail.com>
Co-authored-by: Jarrod Flesch <30633324+JarrodMFlesch@users.noreply.github.com>
2023-08-22 23:30:22 +02:00
Dan Ribbens
bb3dd62b4e fixes relationship validation for custom id text types 2023-08-22 16:27:12 -04:00
Dan Ribbens
48d51fbf08 Merge remote-tracking branch 'origin/2.0' into feat/db-adapters 2023-08-22 16:06:02 -04:00
Alessio Gravili
9467074fb9 chore: update 2.0 branch from master (#3207)
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
Co-authored-by: Alessio Gravili <alessio@gravili.de>
Co-authored-by: PatrikKozak <patrik@trbl.design>
Co-authored-by: Lucas Blancas <lablancas@gmail.com>
Co-authored-by: Stef Gootzen <37367280+stefgootzen@users.noreply.github.com>
Co-authored-by: Jarrod Flesch <30633324+JarrodMFlesch@users.noreply.github.com>
Co-authored-by: Jessica Chowdhury <67977755+JessChowdhury@users.noreply.github.com>
Co-authored-by: PatrikKozak <35232443+PatrikKozak@users.noreply.github.com>
Co-authored-by: Greg Willard <Wickett06@gmail.com>
Co-authored-by: James Mikrut <james@payloadcms.com>
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
Co-authored-by: Elliot DeNolf <denolfe@gmail.com>
fix: WhereBuilder component does not accept all valid Where queries (#3087)
fix: passes in height to resizeOptions upload option to allow height resize (#3171)
2023-08-22 16:04:50 -04:00
Dan Ribbens
659d4e77b9 fixes updateOne ignoring id arg 2023-08-22 15:56:41 -04:00
Alessio Gravili
f911257cd9 feat: RTL Support (#3003)
Co-authored-by: Alessio Gravili <alessio@gravili.de>
Co-authored-by: ibr-hin95 <ibr.hin95@gmail.com>
Co-authored-by: Seied Ali Mirkarimi <dasmergo@gmail.com>
Co-authored-by: muathkhatib <mkhatib.dev@gmail.com>
Co-authored-by: ibr-hin95 <40246707+ibr-hin95@users.noreply.github.com>
fix: recursiveNestedPaths not merging existing fields when hoisting row/collapsible fields (#2769)
fix: exclude monaco code editor from ltr due to microsoft/monaco-editor#2371

BREAKING CHANGE:
- The admin hook for `useLocale` now returns a Locale object of the currently active locale. Previously this would only return the code as a string. Any custom components built which had `locale = useLocale()` should be replaced with `{ code: locale } = useLocale()` to maintain the same functionality.
- The property `localization.locales` of `SanitizedConfig` type has changed. This was an array of strings and is now an array of Locale objects having: `label: string`, `code: string` and `rtl: boolean`. If you are using localization.locales from the config you will need to adjust your project or plugin accordingly.
2023-08-22 12:18:15 -04:00
Dan Ribbens
0296c51324 testing rollback 2023-08-22 11:07:52 -04:00
Alessio Gravili
b29b83315d Merge branch 'feat/db-adapters' into 2.0 2023-08-22 14:06:02 +02:00
James
0732f00490 chore: flattens insert and upsert 2023-08-21 17:51:00 -04:00
James
e22ca1beff chore: working update for relationships, locales, base row 2023-08-21 17:37:28 -04:00
Alessio Gravili
635b2e9963 chore: upgrade pino (v6 => v8) and pino-pretty (v9 => v10) (#2698)
* feat: upgrade pino from v6 to v8

* chore: update pino and pino-pretty
2023-08-21 22:22:24 +02:00
Dan Ribbens
ddc692a966 wip: postgres transactions 2023-08-21 16:04:37 -04:00
James
640fd2843f Merge branch 'feat/db-adapters' of github.com:payloadcms/payload into feat/db-adapters 2023-08-21 15:44:59 -04:00
James
af13924d3f chore: handles date in upsertRow 2023-08-21 15:44:46 -04:00
Alessio Gravili
7c4dd5ec5e feat: option to disable auto pluralization for the mongoose adapter (#3153)
* chore: disable slug pluralization for versions model

* chore: disable slug pluralizations for globals version model

* chore: disable auto slug pluralization for globals collection

* feat: autoPluralization option for mongoose adapter
2023-08-21 18:05:39 +02:00
Elliot DeNolf
3df6435353 0.4.0 2023-08-17 16:04:52 -04:00
Elliot DeNolf
3ef03364be feat: remove static templates 2023-08-17 16:03:26 -04:00
Elliot DeNolf
5396af9bfc feat: use templates from payload/payloadcms/templates 2023-08-17 15:19:42 -04:00
Elliot DeNolf
56eddf3a93 0.3.34 2023-08-16 09:49:56 -04:00
Elliot DeNolf
6dd900e6b9 feat: add plugin template 2023-08-16 09:23:21 -04:00
Dan Ribbens
e73cd26f10 merge master 2023-08-14 15:54:04 -04:00
Chingiz Mammadov
63e3063b9e feat: Added Azerbaijani language file (#3164)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-08-14 15:40:53 -04:00
rpfaeffle
942cfec286 feat: add support for hotkeys (#1821)
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
Co-authored-by: Alessio Gravili <70709113+AlessioGr@users.noreply.github.com>
Co-authored-by: Alessio Gravili <alessio@gravili.de>
Co-authored-by: Jessica Boezwinkle <jessica@trbl.design>
2023-08-14 15:36:49 -04:00
Jarrod Flesch
35dfaab7c2 chore: works around changes in @swc/core 1.3.76 (#3170) 2023-08-14 14:32:42 -04:00
Elliot DeNolf
24aa1f27c1 feat: handle postgres numeric field for batch number comparison 2023-08-14 14:02:56 -04:00
Jordy Alcides
bad363882c feat: allow async relationship filter options (#2951)
* chore: improving relationship filter options;

Updating prop filterOptions from field type "relationship" to allow async functions;

* chore: add failing test case

* fix: translation followingFieldsInvalid_many not getting triggered

* docs: improve documentation

---------

Co-authored-by: Alessio Gravili <alessio@gravili.de>
2023-08-14 17:29:29 +02:00
Alessio Gravili
20a6ce8823 Merge pull request #3166 from payloadcms/fix/external-website-redirects
fix: do not allow redirects to external sites
2023-08-14 17:20:07 +02:00
Alessio Gravili
6797222733 chore: remove duplicate code 2023-08-14 17:19:19 +02:00
Jarrod Flesch
edcb3933cf fix: DatePicker showing only selected day by default (#3169) 2023-08-14 11:18:13 -04:00
Mark Barton
a0b13a5b01 feat: text alignment for richtext editor (#2803)
* Update isActive.tsx

This change allows us to define toggling of custom types in Slate. Specifically, this fixes the ability to toggle Alignment on nodes that use other active elements.

isElementActive(editor, format, TEXT_ALIGN_TYPES.includes(format) ? 'align' : 'type');

Type is the default for elements, allowing us to use a custom field lets us greater extend the functionality of Slate in Payload without causing any breaking changes

* Update toggle.tsx

Added to toggleElement public function

* Update isActive.tsx

* Update toggle.tsx

Added Rich Text Alignment, updated toggle function, added tests and doc updates

* added margin to void elements

* fix: list alignment

* removed textAlign from elements and added docs

* chore: fix typo

---------

Co-authored-by: Alessio Gravili <alessio@gravili.de>
2023-08-14 17:08:50 +02:00
Alessio Gravili
5744de7ec6 feat: make PAYLOAD_CONFIG_PATH optional (#2839)
* feat: make PAYLOAD_CONFIG_PATH optional

* hardcode common search paths

* docs: update docs regarding PAYLOAD_CONFIG_PATH

* make the tsConfig parser less prone to errors
2023-08-14 16:46:10 +02:00
Alessio Gravili
8a6cbf8a4d Merge pull request #2500 from Elliot67/feat/file-caching 2023-08-14 16:37:00 +02:00
Alessio Gravili
0a4730188b chore: update from master 2023-08-14 15:23:28 +02:00
Alessio Gravili
ea46fadc26 Merge remote-tracking branch 'origin/master' into pr/2500 2023-08-14 15:23:19 +02:00
Alessio Gravili
40db0d0462 chore: improve regex 2023-08-14 15:14:54 +02:00
Alessio Gravili
c0f05a1c38 fix: only allow redirects to /admin sub-routes 2023-08-13 16:25:14 +02:00
Elliot DeNolf
52de1f6ab0 chore(release): v1.13.4 2023-08-11 16:58:06 -04:00
Jarrod Flesch
479293fe6f chore: removes duplicative code for getting parent path (#3163) 2023-08-11 13:04:43 -04:00
Jarrod Flesch
3c60abd61a fix: correctly passes block path inside buildFieldSchemaMap (#3162) 2023-08-11 10:49:52 -04:00
Elliot DeNolf
f9807b5bd5 chore(release): v1.13.3 2023-08-11 09:27:27 -04:00
Jarrod Flesch
cb04d4a82a fix: unable to add arrays inside secondary named tabs (#3158) 2023-08-11 09:02:29 -04:00
James
5f7ea17717 chore(release): v1.13.2 2023-08-10 17:43:46 -04:00
Jarrod Flesch
608ae42eff chore: pins @swc/core to 1.3.75 2023-08-10 16:23:43 -04:00
Elliot DeNolf
791ed3be50 feat: conditionally use transactions 2023-08-10 13:54:04 -04:00
James
7345fa8fcd chore: cleanup 2023-08-09 19:33:07 -04:00
James
589fbba5aa chore: merge 2023-08-09 19:23:23 -04:00
James
237a91f0cc chore: ensures block and array locale relations are built properly 2023-08-09 19:22:19 -04:00
Elliot DeNolf
f8e6914f44 feat: proper type for createMigration func 2023-08-09 17:10:00 -04:00
Elliot DeNolf
cd447f1a9d feat: drizzle json generation 2023-08-09 17:07:51 -04:00
James
2f8549f331 chore: ports over find utilities 2023-08-09 16:41:21 -04:00
Jacob Fletcher
1da412a9bf chore(templates): fixes orders access control in ecommerce template (#3150) 2023-08-09 12:27:11 -04:00
Dan Ribbens
4f7d7a4d1b adds postgres findOne 2023-08-09 11:55:14 -04:00
Dan Ribbens
a7ad9903d7 Merge branch 'feat/db-adapters' of github.com:payloadcms/payload into feat/db-adapters 2023-08-09 07:15:46 -04:00
Dan Ribbens
9d7f88c8f7 adds pagination to find 2023-08-09 07:15:26 -04:00
Elliot DeNolf
0447dd3a33 chore: formatting 2023-08-08 16:36:55 -04:00
Elliot DeNolf
5bac50bca9 chore: apply schema changes before inserting into migrations table 2023-08-08 16:35:39 -04:00
James
353e851b29 chore: renames insertRow to upsertRow 2023-08-08 16:02:42 -04:00
Dan Ribbens
324b51e778 chore(release): v1.13.1 2023-08-08 16:00:52 -04:00
Jarrod Flesch
f5cf546e19 fix: updates addFieldRow and replaceFieldRow rowIndex insertion (#3145) 2023-08-08 15:35:59 -04:00
James
e25b77b411 chore: adds todo for update 2023-08-08 15:35:35 -04:00
James
84207d1e3b chore: cleanup 2023-08-08 15:06:56 -04:00
James
7e5f091e3a chore: inserts arrays within blocks 2023-08-08 14:38:48 -04:00
James
2f3f830de0 chore: merge 2023-08-08 14:27:43 -04:00
James
9500d94add chore: functional create 2023-08-08 14:25:28 -04:00
James
eea3cca28b chore: WIP - nested array insertion 2023-08-08 13:30:08 -04:00
Dan Ribbens
f6379e2117 Merge branch 'master' into feat/db-adapters 2023-08-08 12:58:43 -04:00
Dan Ribbens
510510cc66 chore: update changelog 2023-08-08 12:54:47 -04:00
Dan Ribbens
69cb015e0b chore(release): v1.13.0 2023-08-08 12:54:14 -04:00
Dan Ribbens
c6e0908076 feat: recursive saveToJWT field support (#3130) 2023-08-08 12:38:44 -04:00
Jarrod Flesch
8e188cfe61 fix: adding and replacing similarly shaped block configs (#3140) 2023-08-08 12:38:14 -04:00
Jessica Chowdhury
8ae98503f5 docs: adds images to each field page (#3137) 2023-08-08 10:00:21 -04:00
Jessica Chowdhury
1039f39c09 fix: absolute staticURL admin thumbnails (#3135) 2023-08-08 09:49:03 -04:00
Hristiyan Dodov
463d6bbec6 fix: setPreference() return type (#3125) 2023-08-08 09:17:17 -04:00
Dan Ribbens
57e25689a7 merge 2023-08-07 17:02:52 -04:00
Dan Ribbens
8ec4a70aa8 wip: build query 2023-08-07 17:00:46 -04:00
Jarrod Flesch
b117e73464 feat: radio and select fields are filterable by options (#3136) 2023-08-07 16:58:42 -04:00
Elliot DeNolf
8685ca6e94 feat: dev push migrations handling and prompt 2023-08-07 16:23:02 -04:00
James
72efd56302 chore: WIP create 2023-08-07 14:40:00 -04:00
PatrikKozak
fd0f078586 Merge pull request #3134 from leikoilja/fix-form-builder-example
fix: form-builder buildInitialFormState example
2023-08-07 11:14:20 -04:00
Dan Ribbens
89f759fa84 merge master 2023-08-07 09:22:19 -04:00
Ilja Leiko
0aa494b339 fix: fix form-builder buildInitialFormState example 2023-08-07 12:36:07 +02:00
Dan Ribbens
e8f05165eb feat: default tab labels from name (#3129) 2023-08-05 13:48:56 -04:00
Dan Ribbens
a776e06111 chore(release): v1.12.0 2023-08-04 14:06:10 -04:00
Dan Ribbens
02fc36e988 chore: update devDependencies for supply chain vulnerabilities (#3127) 2023-08-04 13:53:57 -04:00
Alessio Gravili
c5756ed4a1 feat: option to pre-fill login credentials automatically (#3021)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-08-04 13:41:08 -04:00
Jacob Fletcher
0a45389a25 0.0.14 2023-08-04 13:28:23 -04:00
Jacob Fletcher
2abdce31f8 feat: allows turning off rest proxy (#22) 2023-08-04 13:27:48 -04:00
Dan Ribbens
356f174b9f feat: set JWT token field name with saveToJWT (#3126) 2023-08-04 13:22:05 -04:00
Jarrod Flesch
1c15868b50 chore(translations): removes extra keys from required 2023-08-04 12:59:12 -04:00
Jarrod Flesch
1180c795a3 chore: adds missing translations 2023-08-04 12:52:58 -04:00
Dan Ribbens
da27a8aadb fix: relationship field filter long titles (#3113) 2023-08-04 11:40:47 -04:00
Alessio Gravili
6a189c6548 fix: wrong links in verification and forgot password emails if serverURL not set (#3010) 2023-08-04 11:30:09 -04:00
Jessica Chowdhury
8c4d2514b0 fix: excludes useAsTitle field from searchableFields in collection view (#3105) 2023-08-04 11:27:52 -04:00
Alessio Gravili
a09c4ddc3b chore: improve flaky admin test suite (#3085) 2023-08-04 11:23:17 -04:00
James
6192c8623f chore: resolves conflict in relationship validation 2023-08-03 22:49:17 -04:00
James
cd322beba1 chore: progress to insert 2023-08-03 16:28:50 -04:00
James
e120d08282 chore: begins insert 2023-08-03 16:01:57 -04:00
Jarrod Flesch
5ca45987c4 chore: adds error and errors translations (#3121) 2023-08-03 15:14:34 -04:00
James
a9c4263646 chore: stubs out remaining field types 2023-08-03 14:21:40 -04:00
James
fd51903f02 chore: ensures parentID column type is set accordingly 2023-08-03 14:17:11 -04:00
James
221636027c chore: conflict 2023-08-03 13:30:28 -04:00
James
672e7e6ff3 chore: writes out todo migration plans 2023-08-03 13:29:57 -04:00
Jarrod Flesch
5b07e18ff5 chore: adds missing japanese translations (#3119) 2023-08-03 12:39:10 -04:00
Jessica Chowdhury
ea73e689ac feat: allows for upload relationship drawer to be opened (#3108) 2023-08-03 12:03:27 -04:00
Jacob Fletcher
456f29d689 chore: updates CONTRIBUTING.md (#3073) 2023-08-03 11:57:00 -04:00
Jacob Fletcher
50360b8769 chore: updates PULL_REQUEST_TEMPLATE.md (#3088) 2023-08-03 11:56:38 -04:00
Alessio Gravili
541e41293d chore: add RichTextAdapter interface type (#3117) 2023-08-03 11:31:21 -04:00
Elliot DeNolf
9022c8e22e feat: implement dropping of tables for postgres 2023-08-03 11:20:56 -04:00
Jarrod Flesch
a78c4631b4 feat: programmatic control over array and block rows inside the form (#3110) 2023-08-03 09:39:50 -04:00
Jarrod Flesch
da8ff20616 chore: prevent enter keypress from saving document (#3115) 2023-08-03 08:51:30 -04:00
Jessica Boezwinkle
3e9826d7ae chore: updates readme 2023-08-03 11:42:26 +01:00
Jessica Boezwinkle
f8a095e7f4 chore: updates readme 2023-08-03 11:41:00 +01:00
James
bd464990ea chore: handles blocks 2023-08-02 21:37:06 -04:00
James
3ccdcc5c29 chore: builds enum pattern 2023-08-02 20:52:14 -04:00
James
dffb88e947 chore: working dynamic schema 2023-08-02 20:18:24 -04:00
James
a1388630d0 chore: adds postgres test suite 2023-08-02 19:57:22 -04:00
James
93352dd35e chore: merge 2023-08-02 17:21:58 -04:00
James
ee8f691073 chore: progress to init 2023-08-02 17:17:52 -04:00
Jacob Fletcher
037ccdd96e chore(examples): updates preview example (#3099) 2023-08-01 16:53:45 -04:00
Jacob Fletcher
b84496e5da chore(examples): updates auth example (#3100) 2023-08-01 16:53:31 -04:00
dependabot[bot]
62ecf54f85 chore(deps): bump semver in /examples/form-builder/nextjs (#3075)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 15:24:25 -04:00
Elliot DeNolf
6355d732be chore: drop pg database when PAYLOAD_DROP_DATABASE 2023-08-01 11:30:23 -04:00
James
71758b68f7 chore: renames postgres connection to db 2023-08-01 10:56:35 -04:00
James
b3b1146fe1 chore: local postgres db for testing 2023-08-01 10:50:59 -04:00
James
55ae20654c chore: pg connection 2023-08-01 10:48:34 -04:00
Sean Zubrickas
3fdaeb875e removes yarn lock from virtual fields example because of merge conflict 2023-08-01 09:26:47 -04:00
Sean Zubrickas
992be4af44 updates top banner copy 2023-08-01 09:25:17 -04:00
Josef Bredreck
144bb81721 feat: add support for sharp resize options (#2844)
* feat(ImageResize): add support for resize options

* fix(ImageUpload): reuse name for accidental duplicate

* fix(ImageResize): e2e tests for added media size

* chore: simplify fileExists method

* fix: typo

* feat(ImageResize): update name to be more transparent

* fix: use fileExists in file removal

* improve names, comments and clarity of needsResize function

* fix: jsDoc params

* fix: incorrect needsResize condition and add failing test case

* chore: improve comment

* fix: merge conflict error

---------

Co-authored-by: Alessio Gravili <70709113+AlessioGr@users.noreply.github.com>
2023-08-01 09:20:50 -04:00
Dan Ribbens
5ef20e3440 docs: mention virtual fields cannot be sorted (#3107) 2023-08-01 05:10:02 -04:00
James Mikrut
88b56d04f5 Update README.md 2023-07-31 18:31:33 -04:00
James
3a5851d28a chore: passing tests 2023-07-31 18:12:09 -04:00
James
af302e19ee chore: ensures passwords never make it to db 2023-07-31 17:04:53 -04:00
James
8d265ee368 chore: maintains internal sanitize fields for mongodb 2023-07-31 16:52:56 -04:00
James
872b38d378 chore: corrects remaining mongodb adapter paths 2023-07-31 15:57:59 -04:00
James
affd55f84e chore: merge 2023-07-31 15:28:44 -04:00
James
561f29454b chore: conflict 2023-07-31 15:28:15 -04:00
Elliot DeNolf
5763870938 feat: more import paths 2023-07-31 15:28:11 -04:00
James
f057e25ec7 chore: more path corrections 2023-07-31 15:27:55 -04:00
Dan Ribbens
aa7bad41e4 chore: import path cleanup continued 2023-07-31 15:27:37 -04:00
Dan Ribbens
e70754f417 chore: import path cleanup 2023-07-31 15:26:08 -04:00
James
be61f8ab96 chore: revises paths 2023-07-31 15:20:34 -04:00
James
948dae5b63 chore: path cleanup 2023-07-31 15:16:20 -04:00
James
a2e635d75c chore: path cleanup 2023-07-31 15:10:07 -04:00
James
1c2a5bc342 chore: merge conflicts 2023-07-31 15:01:59 -04:00
James
4b00850e41 chore(release): v1.11.8 2023-07-31 15:00:28 -04:00
James
badf2336ee chore: resolves type conflicts introduced with database folder 2023-07-31 14:55:23 -04:00
James
6220c3d6d9 chore: includes database files for adapter build 2023-07-31 14:46:28 -04:00
James
028872261b chore: path cleanup 2023-07-31 14:41:52 -04:00
Dan Ribbens
487eb00402 chore: move getLocalizedPaths to core 2023-07-31 14:32:50 -04:00
James
832c1069f1 chore: moves db adapters to top-level packages 2023-07-31 14:26:14 -04:00
James
f69e5949e1 chore: abstracts adapters to be their own package 2023-07-31 12:42:21 -04:00
Elliot DeNolf
441a26b79c 2.2.1 2023-07-31 10:59:44 -04:00
Elliot DeNolf
471d5ca17f 2.2.1-beta.0 2023-07-31 10:42:13 -04:00
Elliot DeNolf
536f995ab4 feat: bump resend 2023-07-31 10:41:50 -04:00
James
f7ff894df4 chore: alternative typing for withBaseDatabaseAdapter 2023-07-31 10:21:15 -04:00
James
9050493c61 chore: abstracts dev / test suites to accept incoming database specification 2023-07-30 12:27:15 -04:00
James
06b1fe88ca chore: moves mongoose adapter 2023-07-29 11:24:35 -04:00
James
20179ba77b chore: merge master 2023-07-29 11:18:39 -04:00
Dan Ribbens
455b35dc1b chore: remove console log array field 2023-07-28 07:27:14 -04:00
Sean Zubrickas
b7299ab601 increases font size on top banner 2023-07-27 17:27:22 -04:00
Sean Zubrickas
174f83faf7 adds alternate github banner, removes cloud cta 2023-07-27 17:24:45 -04:00
Sean Zubrickas
5e41e0fb9e removes benefits banner & reverts to unordered list 2023-07-27 16:54:55 -04:00
Elliot DeNolf
bb3c97828e 2.2.0 2023-07-27 11:07:32 -04:00
James
129a9e7675 chore(release): v1.11.7 2023-07-26 21:24:27 -04:00
Elliot DeNolf
c4d32d5418 feat: adjust multipart upload settings for memory optimization (#7) 2023-07-26 20:43:21 -04:00
Sean Zubrickas
eb57c2280e removes benefits h3 in favor of benefits image, reorders helpful links 2023-07-26 18:48:58 -04:00
Sean Zubrickas
e2ad0baaaf refactors benefits list into h3 2023-07-26 17:41:56 -04:00
Jarrod Flesch
7542a92104 chore(tests): adds array row manipulation tests (#3086) 2023-07-26 16:34:13 -04:00
Elliot DeNolf
8522fd9f27 feat: cloudflare upload caching (#6)
* feat: implement caching hooks

* 2.1.2-canary.0

* feat: allow caching configuration per collection

* 2.1.2-canary.1

* feat: implement purge call to cloud-cms

* 2.1.2-canary.2

* chore: adjust purge logging

* 2.1.2-canary.3

* chore: req.body nesting

* 2.1.2-canary.4

* feat: handle /purge-cache response properly

* feat: clean up caching call logic

* 2.1.2-canary.5

* chore: handle enabled: false for caching collection

* 2.1.2-canary.6

* chore: tweaks

* 2.1.2-canary.7

* chore: remove immutable

* chore: update README

* 2.1.2-canary.8

* feat: rework caching config type, do not await purge call

* 2.1.2-canary.9

* chore: cleanup logging

* chore: bump payload

* chore: update README
2023-07-26 15:01:43 -04:00
Corfitz
0a91950f05 fix: incorrect image rotation after being processed by sharp (#3081)
* Applying rotation fix for sharp image resizing

* fix: make sure original image is rotated correctly

* chore: explain why rotate() is needed in comments

---------

Co-authored-by: Alessio Gravili <alessio@gravili.de>
2023-07-26 20:57:36 +02:00
James
02809532b4 fix: #3062 2023-07-26 11:34:22 -04:00
Alessio Gravili
67ba131cc6 feat: ability to add context to payload's request object (#2796)
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-07-26 09:07:49 -04:00
Jarrod Flesch
cf9795b8d8 fix: array row deletion (#3062) 2023-07-26 09:01:25 -04:00
James
a5f42e6a08 chore(release): v1.11.6 2023-07-25 17:14:59 -04:00
James Mikrut
23e718d4d1 Merge pull request #3068 from sannajammeh/master
fix(admin:upload): Enable adminThumbnail fn execution on all mime types
2023-07-25 17:01:50 -04:00
Sean Zubrickas
e8d9cab046 updates payload logos, updates top banner + cloud banner, adds line to benefits 2023-07-25 16:14:43 -04:00
Tylan Davis
d43c83dad1 fix: threads hasMaxRows into ArrayAction components within blocks and arrays (#3066) 2023-07-25 15:43:20 -04:00
Jarrod Flesch
916f04cba0 chore: better parity for initing admin routes between dev and build (#3074) 2023-07-25 14:27:01 -04:00
Jarrod Flesch
156c3eeb08 chore: adds updated yarn lock files for examples and templates folders 2023-07-25 14:22:53 -04:00
Jarrod Flesch
9755a55672 chore: sets payload to latest within templates and examples 2023-07-25 14:11:33 -04:00
Jacob Fletcher
774ffa14d3 chore: updates e-commerce template (#3072) 2023-07-25 12:47:08 -04:00
James
e30db30b07 chore(release): v1.11.5 2023-07-25 10:27:03 -04:00
Jarrod Flesch
e71866856f fix: admin route not mounting on production serve (#3071) 2023-07-25 10:16:55 -04:00
Elliot DeNolf
242dac5b8e chore(release): v1.11.4 2023-07-25 08:48:16 -04:00
Sanna Jammeh
dda9ff01ca docs(upload): Modify the note under adminThumbnail to reflect changes 2023-07-25 00:35:19 +00:00
Sanna Jammeh
5b7aac08f5 test(uploads): Add test case for adminThumbnail 2023-07-25 00:29:54 +00:00
Sanna Jammeh
2c74e9396a fix(collections:admin): Enable adminThumbnail fn execution on all types 2023-07-24 22:42:41 +00:00
Sean Zubrickas
62b73250b4 changes e-commerce and saas links to h3s, adds icons to each heading 2023-07-24 14:47:20 -04:00
Sean Zubrickas
9953e36f6b updates cloud cta, updates examples & tempaltes block, adds one-click tempaltes block 2023-07-24 14:17:19 -04:00
Sean Zubrickas
532f08c5b8 updates readme with new images, copy and layout 2023-07-24 13:29:04 -04:00
Jessica Boezwinkle
136298ac86 docs: fix useAuth code snippet on admin/react-hooks 2023-07-24 16:53:56 +01:00
Greg Willard
080e6195ef feat: improve keyboard focus styles (#3011)
* feat: Card: add keyboard focus outline

* feat: Button: add keyboard focus styles

* feat: links: add keyboard focus styles

* feat: CopyToClipboard: fix textarea tabbing issue, add keyboard focus style

* chore: fix text getting darker on keyboard focus

* feat: Pill: add keyboard focus styles

* feat: Paginator: fix disabled state, add keyboard focus styles

* feat: Nav: add keyboard focus styles

* feat: Table: add keyboard focus styles

* chore: add jsDocs to (s)css loaders

* fix: update dependency which fixes css bug

* chore: remove unnecessary Card style

* fix: use Button instead of button for DeleteDocument

* chore: override browser default outline

* chore: remove unnecessary outline rule

* fix: list drawer outline

---------

Co-authored-by: Alessio Gravili <alessio@gravili.de>
2023-07-24 17:04:12 +02:00
Jacob Fletcher
074abf4b7d chore: migrates ecommerce template to next.js app router (#2991) 2023-07-24 08:23:51 -04:00
Jarrod Flesch
08377cc5a7 fix: if arrayFieldType rows are undefined, page would crash (#3049) 2023-07-21 17:24:44 -04:00
Jarrod Flesch
641c765fb9 feat: solidifies bundler adapter pattern (#3044) 2023-07-21 17:20:51 -04:00
Dan Ribbens
f11ae6a162 wip: database docs 2023-07-21 16:16:39 -04:00
Dan Ribbens
8cfc2141cc export baseDatabaseAdapter for use in adapters 2023-07-21 15:44:50 -04:00
Dan Ribbens
cf83237a51 merge master 2023-07-21 14:19:59 -04:00
Dan Ribbens
8a681450d1 feat: add database transaction support(#2983) 2023-07-21 14:13:18 -04:00
Jessica Chowdhury
9c046d049a Removes WIP disclaimer from README 2023-07-21 15:22:30 +01:00
Jacob Fletcher
9f06253321 chore: fixes ecommerce template .env.example (#3041) 2023-07-20 17:45:55 -04:00
Elliot DeNolf
5476cdfee2 chore: only needed dependabot security alerts enabled, not all deps 2023-07-20 17:44:03 -04:00
Elliot DeNolf
ee93118688 0.3.33 2023-07-20 17:34:04 -04:00
Elliot DeNolf
47f9b89175 fix: help message rendering 2023-07-20 17:33:54 -04:00
Elliot DeNolf
f232434b9a chore: add dependabot (#3027) 2023-07-20 17:12:05 -04:00
Jacob Fletcher
2a932ea28e chore: updates auth example (#3026) 2023-07-20 14:06:26 -04:00
Elliot DeNolf
41d3eee35f feat: bump mongoose and mongoose-paginate versions (#3025) 2023-07-20 12:51:30 -04:00
Jessica Boezwinkle
0871f299ef chore: update test suite 2023-07-20 14:47:03 +01:00
Jessica Chowdhury
a074a5b376 Minor README.md tweak 2023-07-18 13:41:25 +01:00
Jessica Chowdhury
abf3378441 Update README.md to emphasize that it is WIP 2023-07-18 13:38:20 +01:00
Elliot DeNolf
891fc55e25 2.1.1 2023-07-17 20:53:17 -04:00
Elliot DeNolf
988755f202 fix: fallback domain email format 2023-07-17 20:52:45 -04:00
Alessio Gravili
c8c22dad06 feat: work on database adapter (#3000) 2023-07-17 13:22:51 -04:00
Jessica Chowdhury
c1b41b75c4 Merge pull request #2 from payloadcms/chore/update-types
chore: updates types and readme
2023-07-17 16:05:36 +01:00
Elliot DeNolf
b5483a46f6 chore: add accessing file storage section to README 2023-07-15 08:23:01 -04:00
Elliot DeNolf
f1e23b1cd0 chore: migration error handling 2023-07-11 14:30:24 -04:00
Jacob Fletcher
b5b487ab90 1.0.6 2023-07-10 16:49:14 -04:00
Jacob Fletcher
940bfe4f18 fix: threads locale through resaveChildren (#24) 2023-07-10 16:45:21 -04:00
Jacob Fletcher
41dcdd4e01 chore: adds localization section to docs (#25) 2023-07-10 16:43:28 -04:00
Elliot DeNolf
bac63f5204 fix: graphql and endpoint type issues 2023-07-07 11:37:56 -04:00
Dan Ribbens
fc1f4c494f chore: cherry pick missing from migrations 2023-07-07 11:31:36 -04:00
Elliot DeNolf
2198445df9 Feat/migrations cli (#2940)
* feat: migrate cli call db adapter

* feat: mongoose adapter migrate:create

* feat: implement migrate command

* feat: use mongooseAdapter in test config

* feat: use filename as migration name

* feat: intelligently execute migrations, status table

* feat: implement migrate:down

* feat: implement migrate:reset

* feat: implement migrate:refresh

* feat: move common adapter operations to database/migrations dir

* feat: delete migrations instead of storing ran property

* feat: createMigration cleanup

* feat: clean up logging and add duration to output

* chore: export type, handle graphQL false

* chore: simplify getting latest batch number

* chore: remove existing migration logging noise

* feat: remove adapter export from top level

* chore: fix some db types
2023-07-07 11:02:56 -04:00
Elliot DeNolf
04fd2d6e82 0.3.32 2023-07-06 10:40:28 -04:00
Elliot DeNolf
4cdc7cf3c4 revert: use standalone template repos until frontend handling done 2023-07-06 10:40:23 -04:00
Elliot DeNolf
fbaa1028e6 0.3.31 2023-07-06 10:31:04 -04:00
Elliot DeNolf
df26e19c16 feat: use templates inside payload repo instead of standalone repos 2023-07-06 10:30:58 -04:00
Dan Ribbens
756fe197c2 Merge branch 'master' into feat/mongoose-adapter-merge 2023-07-05 16:30:19 -04:00
Dan Ribbens
23ea91ebe1 use db adapter in preferences 2023-07-05 14:19:12 -04:00
Dan Ribbens
ed82135d0d fix find version globals 2023-07-05 13:51:50 -04:00
Dan Ribbens
190cf2ddc9 remove unused file 2023-07-05 13:34:12 -04:00
Dan Ribbens
2c43db9461 correct sort used in findVersions 2023-07-05 13:33:17 -04:00
Dan Ribbens
f85ba4a4a7 merges master 10.1.5 2023-07-05 11:50:17 -04:00
Elliot DeNolf
98501cf4c0 0.3.30 2023-07-05 11:25:00 -04:00
Elliot DeNolf
d0ac142871 fix: move cross-env from dev dep to dep 2023-07-05 11:23:38 -04:00
Elliot DeNolf
d60c66ebd6 feat: change user collection access to default on all templates 2023-07-05 11:23:22 -04:00
Alessio Gravili
b9417a7e19 fix: limit 0 not working always, + typing 2023-06-29 19:48:22 +02:00
Dan Ribbens
682f8ecae4 wip merge master 2023-06-29 13:27:33 -04:00
Alessio Gravili
b4c049c745 feat: mongoose-adapter: findOne, sort direction, id => where and cleanup (#2918)
* chore: add jsDocs for buildQuery

* feat: where instead of id for updateOne and deleteOne

* feat: find => findOne

* sort order => sort direction

* fix: typing of Global buildQuery

* cleanup

* fix: init payload's i18n for error message

* fix: incorrect use of FindArgs in findByID

* move deleteOne call to adapter

* re-order

* deleteVersions

* versions stuff

* more version stuff

* moar version stuff

* global stuff

* global stuff

* move combineQueries inside the findGlobal

* global stuff

* fix type

* more global stuff

* move docWithFilenameExists to adapter pattern

* chore: remove unnecessary comments

* perf: make everything lean, disable virtuals, ++performance

* chore: remove unnecessary Model
2023-06-28 16:19:43 +02:00
Jessica Boezwinkle
19706617e5 chore: uses existing express app 2023-06-28 12:02:41 +01:00
Jacob Fletcher
ced5ad8b76 1.0.1 2023-06-27 14:30:02 -04:00
Jacob Fletcher
11429135ee fix: adjusts payload peer dep range (#8) 2023-06-27 14:29:15 -04:00
Alessio Gravili
bc5aeb7840 feat: new sort for mongoose adapter (#2912)
* feat: new sort

* fix: undefined sort handling
2023-06-27 00:00:41 +02:00
Elliot DeNolf
3d5858ca6d 1.0.19 2023-06-26 14:23:23 -04:00
James Mikrut
5456695728 Merge pull request #62 from lucyawrey/individual-prefixes
Add support for 'prefix' field on individual uploads, takes priority over global prefix field
2023-06-26 14:22:04 -04:00
Lucy Awrey
b79da5920a Add support for 'prefix' field on individual uploads, takes priority over global prefix field
squashed a few commits testing different approaches to this
2023-06-26 13:18:36 -04:00
Alessio Gravili
696a215dd0 feat: move some stuff over to the new adapter pattern (#2880)
* chore: add jsdocs for limit

* moar jsdocs

* Replace find in deleteByID

* (check this:) add missing locale

* move findByID

* Make findByID return only one document

* _id => id

* _id => id

* Improve version types

* Improve sortOrder types

* move version stuff over

* version stuff

* fix: sort types

* fix params

* fix: findVersionByID generic

* fix: type error for versions

* remove unused value

* fix: Document import

* add todo

* feat: updateOne to mongoose

* remove unnecessary Model

* more update stuff

* remove unnecessary imports

* remove unnecessary function arguments

* fix: auth db update calls

* fix: bad updateByID which made tests fail

* fix: update returned docs to fix tests

* fix: update from version using mongoose directly even though the Model does not exist

* feat: implement deleteOne

* fix: assign verificationToken only when it exists - fixes test

* migrate saveVersion partly

* feat: make dev:generate-graphql-schema work even without specifying extra argument

* fix: this.db can be null

* chore: use destructured locale where possible

* chore: improve variable name

* fix: SanitizedConfig type

* feat: findGlobal database adapter

* fix: flaky e2e test

* chore: improve incorrect comment

* chore: undo diffs

* fix: id types

* fix: id typing
2023-06-26 17:45:52 +02:00
Elliot DeNolf
a0a92952eb 1.0.18 2023-06-23 17:13:57 -04:00
Elliot DeNolf
a687dfdb16 docs: arg comments and dev readme formatting 2023-06-23 17:13:10 -04:00
Elliot DeNolf
b9d7e82052 chore: add region aws adapter example in readme 2023-06-23 14:42:15 -04:00
Jessica Boezwinkle
cc28df1324 chore: adds test 2023-06-23 17:00:37 +01:00
Jessica Boezwinkle
607d345eb2 chore: misc update 2023-06-23 16:49:40 +01:00
TomDo1234
fb10af8365 docs: mention usage with AWS EC2 IAM Role (#30)
Specified that you don't need to provide any credentials when using a correct IAM Role. IAM Roles are recommended by AWS over direct credentials due to superior security.
2023-06-23 11:40:08 -04:00
Seth Syberg
53427443a7 fix: allow empty config on s3 adapter (#60) 2023-06-23 11:39:04 -04:00
vvvctr
62fae5520d chore: fix email link (#44)
Fix mail link in readme.
2023-06-23 11:33:23 -04:00
DireWolf707
8b186dbf83 docs: add default value for GCS_CREDENTIALS (#48)
without default value, it gives error in payload admin page (in console of browser)

caught SyntaxError: "undefined" is not valid JSON
    at JSON.parse (<anonymous>)
    at ./src/payload.config.ts 

as envs are not availabe in payload admin GCS_CREDENTIALS gives undefined
resulting JSON.parse(undefined) raises this error
2023-06-23 11:32:02 -04:00
Jessica Boezwinkle
e41515564b chore: actually commits jsdoc additions 2023-06-23 16:05:01 +01:00
Jessica Boezwinkle
f615b8cdf2 chore: updates types and readme 2023-06-23 16:02:01 +01:00
Elliot DeNolf
9182e79c2d Merge pull request #1 from payloadcms/feedback
feat: improvements
2023-06-23 10:36:14 -04:00
Elliot DeNolf
ed95722a50 test: add test suite, run in workflow and prepublishOnly 2023-06-23 10:32:44 -04:00
Jessica Boezwinkle
d7adb094a5 chore: updates index.ts and Payload version 2023-06-23 12:22:30 +01:00
Jessica Boezwinkle
717e01bbbf chore: removes yarn test 2023-06-22 11:43:45 +01:00
Jessica Boezwinkle
3987953947 chore: adds enable option and misc feedback changes 2023-06-22 11:28:48 +01:00
Dan Ribbens
b0b30f5aef mongoose adapter create operation (#2882) 2023-06-21 16:13:05 -04:00
Elliot DeNolf
a515bdae56 2.1.0 2023-06-21 12:29:02 -04:00
Elliot DeNolf
cc40853903 feat: support sending from custom email domains (#3)
* feat: support sending from custom email domains

* feat: proper callback for nodemailer transport

* 2.1.0-beta.0
2023-06-21 12:28:19 -04:00
Elliot DeNolf
b7c750220e chore: general feedback 2023-06-21 12:00:10 -04:00
James
7a0e085a1f chore: add todo for findGlobal 2023-06-21 11:36:32 -04:00
Jessica Boezwinkle
33f9357e58 demo: updates depenedencies 2023-06-21 12:13:51 +01:00
Jessica Boezwinkle
9109f7094b chore: adds requestHandler and error options, adds test errors to demo 2023-06-21 12:10:21 +01:00
Jessica Chowdhury
92bd914966 Update README.md 2023-06-21 12:03:09 +01:00
Jessica Chowdhury
b210551e96 Update README.md 2023-06-21 12:01:07 +01:00
Elliot DeNolf
121d69faf9 0.3.29 2023-06-20 23:07:53 -04:00
Elliot DeNolf
0a2d7c858a chore: fix static dirs 2023-06-20 23:06:50 -04:00
Elliot DeNolf
0962e1e563 feat: support for git templates (#8)
* feat: add payload demo as template

* feat: rework templates, add descriptions, better help message

* wip: parse .env

* chore: remove js templates

* feat: populate mongo and secret from .env.example

* feat: add cloud templates

* test: fix test suite template dir
2023-06-20 22:47:04 -04:00
Jacob Fletcher
3dbb70a9e6 1.0.5 2023-06-19 17:02:48 -04:00
Jacob Fletcher
adef360275 Merge pull request #21 from payloadcms/fix/parent-types
fix: createParentField types
2023-06-19 17:01:02 -04:00
Jacob Fletcher
abebd7f440 Merge pull request #11 from payloadcms/chore/export-fields
chore: exports fields top-level
2023-06-19 16:56:50 -04:00
Jacob Fletcher
e9ed969ad9 fix: createParentField types 2023-06-19 16:56:34 -04:00
Dan Ribbens
3863959c53 chore: change db adapter args 2023-06-19 16:46:17 -04:00
Dan Ribbens
c60886fe3e docs: preferences graphql 2023-06-18 22:56:30 -04:00
Dan Ribbens
c7f40dd860 chore: remove mongoose models from auth 2023-06-18 08:38:40 -04:00
Dan Ribbens
832c19c1f7 chore: lint fix 2023-06-18 07:42:13 -04:00
Dan Ribbens
25151ee191 chore: collection based preferences (#2820)
**BREAKING CHANGES**

Preferences have been overhauled to be abstracted as a Payload collection and no longer explicitly defined by Payload. They previously used the slug `_preferences` as a collection name and url route and are now

If any of the following are true you will need to take action:
- You have existing preferences you wish to keep for your admin users you must migrate data in the _preferences collection to the new shape. To migrate the preferences in the database you must update the shape of each _preferences document from:
```js
{
  user: ObjectId("abc"),
  userCollection: "users",
  /** other fields remain the same **/
}
```
to:
```js
{
  user: {
    value: 'abc',
    relationTo: 'users",
  }
  /** other fields remain the same **/
}
```
- You have code external of Payload or custom code within Payload using the API endpoint `api/_preferences`, you should update any applications to use `api/payload-preferences` instead.
- You were using the preferences GraphQL implementation. This was removed and is instead provided the same way as Payload handles any other. In this way the queries, mutation and schemas have changed. These are now generated as any other collection within your payload project.
- You were using the Payload's exported Preference type for your typescript code. Now you can instead import the generated type from your project.
2023-06-16 16:58:36 -04:00
Jessica Chowdhury
5e64e52dab chore: Updates README 2023-06-16 12:13:32 +01:00
Jessica Boezwinkle
90e9dd7f47 setup: builds plugin and demo 2023-06-16 11:58:47 +01:00
Jessica Boezwinkle
f867d7a615 setup: initial commit 2023-06-16 11:55:13 +01:00
Dan Ribbens
504f5190d5 chore: normalize payload collections and globals outside db adapter 2023-06-15 16:50:11 -04:00
James
6aabdd05be chore: adds mongoose mock 2023-06-14 17:41:49 -04:00
James
87ba8b1f58 chore: removes some findOnes 2023-06-12 22:07:24 -04:00
James
5433560f8d chore: bulk update 2023-06-12 21:44:01 -04:00
James
05ed6d9721 chore: stubs out global versions queries 2023-06-12 21:38:10 -04:00
James
f74ff8f6bf chore: stubs out find adapter method 2023-06-12 20:18:09 -04:00
James
41acf71013 chore: passing tests 2023-06-12 19:41:08 -04:00
James
03c004f3d8 chore: progress to simplifying buildQuery logic 2023-06-12 17:59:05 -04:00
James
2be33a0fca chore: improves types for mongoose adapter model handling 2023-06-12 17:39:26 -04:00
James
5762d80945 Merge branch 'feat/mongoose-adapter' of github.com:payloadcms/payload into feat/mongoose-adapter 2023-06-12 16:50:11 -04:00
James Mikrut
a72d6fcb13 Merge pull request #2789 from payloadcms/chore/abstract-query-validation-complete
chore: refactor query validation outside of mongoose
2023-06-12 16:49:56 -04:00
James
4073c63cec chore: stubs out query drafts 2023-06-12 16:49:10 -04:00
James
2737fd400f chore: begins adapter 2023-06-12 16:36:13 -04:00
Elliot DeNolf
4ede3384f0 1.0.17 2023-06-12 10:54:34 -04:00
Elliot DeNolf
008eb640f0 1.0.17-beta.1 2023-06-12 10:51:57 -04:00
Elliot DeNolf
019ef358a5 chore: proper fsMock location 2023-06-11 19:37:39 -04:00
Elliot DeNolf
72950b2b82 1.0.17-beta.0 2023-06-11 19:06:41 -04:00
Elliot DeNolf
5b2ea583d2 chore: version sync 2023-06-11 19:06:35 -04:00
Elliot DeNolf
6fb0289e71 chore: add enabled to plugin options section in readme 2023-06-11 18:49:25 -04:00
Elliot DeNolf
f2bbe662f2 feat: add enabled property to conditionally enable/disable (#57) 2023-06-11 18:39:58 -04:00
Dan Ribbens
e020e7598a cleanup imports 2023-06-07 16:47:30 -04:00
Dan Ribbens
cecea07b4d validate query handle nested version paths 2023-06-07 16:26:29 -04:00
Dan Ribbens
8ca3f3c53c allow hidden fields to query with overrideAccess 2023-06-07 15:10:45 -04:00
Dan Ribbens
4e617abf08 validate query sanitize _id 2023-06-07 14:50:32 -04:00
Dan Ribbens
e2cba16698 validate query use versionFields in query drafts 2023-06-07 14:40:49 -04:00
Dan Ribbens
49eac7368e validate query for poly relationships 2023-06-07 14:40:23 -04:00
Dan Ribbens
8908ac4646 validate nested paths 2023-06-07 07:09:07 -04:00
Dan Ribbens
47fd704630 execute access before validate query 2023-06-07 00:35:08 -04:00
Dan Ribbens
38d1a98193 prevent reassigning global version fields 2023-06-06 23:31:17 -04:00
Dan Ribbens
aa848eef90 chore: separate query validation from build query 2023-06-06 16:35:34 -04:00
Dan Ribbens
12e9cd5db1 chore: refactor getLocalizedPaths 2023-06-06 15:39:56 -04:00
Dan Ribbens
23dddc2e04 chore: refactor buildQuery to remove paramParser class 2023-06-06 15:36:43 -04:00
Dan Ribbens
1ea83f6349 chore: refactor parsePathOrRelation 2023-06-06 15:36:43 -04:00
Dan Ribbens
07a5801798 chore: separate parsePathOrRelation and buildAndOrConditions from buildQuery 2023-06-06 15:36:43 -04:00
Dan Ribbens
db71774fc2 chore: separate buildSearchParams from buildQuery 2023-06-06 15:36:43 -04:00
Dan Ribbens
2b80ad2bb4 chore: refactor getLocalizedPaths 2023-06-06 15:36:41 -04:00
Jacob Fletcher
19f3cef799 1.0.14-canary.0 2023-06-02 10:07:59 -04:00
Jacob Fletcher
9cd7315222 feat: threads doc info through generation functions #53 (#54) 2023-06-02 10:07:24 -04:00
Elliot DeNolf
a324768b3f 2.0.0 2023-05-24 09:53:33 -04:00
Elliot DeNolf
0973ee512e 2.0.0-0 2023-05-23 16:29:57 -04:00
Elliot DeNolf
f74e492448 feat: email (#1)
* chore: bump payload

* test: add jest

* chore: update eslint rules

* feat: add email transport to plugin

* ci: actions build and test

* chore: bump typescript

* chore: adjust top-level plugin options

* test: clean up

* feat: better env var handling, assertions

* chore: update README

* 1.1.0-beta.0

* chore: update package.json files

* 1.1.0-beta.1

* chore: fix webpack recursion

* 1.1.0-beta.2

* chore: bump payload

* chore: email logging on success on error

* 1.1.0-beta.3

* chore: use proper env var for default domain

* 1.1.0-beta.4

* chore: log sendEmail error with better message

* 1.1.0-beta.5

* chore: add comments to plugin options properties

* 1.1.0-beta.6

* chore: bump payload peer dep

* 1.1.0-beta.7

* chore: update README

* chore: bump payload in dev dir

* chore: package.json license

* test: move test
2023-05-23 15:52:00 -04:00
Jacob Fletcher
6b1a7f0843 Merge pull request #16 from payloadcms/chore/eslint
chore: eslint and prettier
2023-05-18 14:43:26 -04:00
Jacob Fletcher
7a9b5133a7 Merge pull request #1 from payloadcms/chore/eslint
chore: eslint and prettier
2023-05-18 14:37:55 -04:00
Jacob Fletcher
7633922ec1 Merge pull request #7 from payloadcms/chore/eslint
chore: eslint and prettier
2023-05-18 14:34:32 -04:00
Jacob Fletcher
c4c7c20c8c chore: migrates demo to payload v1.8.2 2023-05-18 14:33:17 -04:00
Jacob Fletcher
ee403b79f4 chore: eslint and prettier 2023-05-18 14:33:13 -04:00
Jacob Fletcher
0221394c06 Merge pull request #19 from payloadcms/chore/eslint
chore: eslint and prettier
2023-05-18 14:29:18 -04:00
Jacob Fletcher
741ab0487d bumps demo to payload v1.8.2 2023-05-18 14:28:46 -04:00
Jacob Fletcher
8a513ba7af chore: eslint and prettier 2023-05-18 14:28:41 -04:00
Jacob Fletcher
d968349772 chore: bumps demo to payload v1.8.2 2023-05-18 14:03:19 -04:00
Jacob Fletcher
fc8eb07a35 chore: eslint and prettier 2023-05-18 14:02:21 -04:00
Jacob Fletcher
e76cd58425 chore: bumps demo to payload v1.8.2 2023-05-18 13:57:32 -04:00
Jacob Fletcher
888f937e3c chore: eslint and prettier 2023-05-18 13:57:32 -04:00
Jacob Fletcher
3de43379e7 1.0.15 2023-05-16 09:00:51 -04:00
Jacob Fletcher
f564ab6783 1.0.13 2023-05-16 08:38:05 -04:00
Jacob Fletcher
7e88159e99 fix: properly spreads collection fields into non-tabbed configs #50 (#51) 2023-05-16 08:37:29 -04:00
Jacob Fletcher
6c3a5d9c85 1.0.14 2023-05-16 00:03:38 -04:00
Jacob Fletcher
fcca4a46f9 chore: lints DynamicPriceSelector 2023-05-16 00:03:33 -04:00
Jacob Fletcher
c4f8052280 1.0.12 2023-05-15 23:48:01 -04:00
Jacob Fletcher
052c282d75 chore: updates README 2023-05-15 23:45:38 -04:00
Jacob Fletcher
8d1251f0d6 chore: removes unused eslint comments and updates demo yarn.lock 2023-05-15 23:29:06 -04:00
Jacob Fletcher
b9bcbbea02 fix: implements 7501d0a for globals 2023-05-15 23:18:11 -04:00
Jacob Fletcher
8271c206b7 fix: supports custom fields #41 (#48) 2023-05-15 23:09:43 -04:00
Jacob Fletcher
7501d0ad96 fix: supports top-level and sidebar fields with tabbedUI #35 (#47) 2023-05-15 22:45:15 -04:00
Jacob Fletcher
b4259fa625 chore: eslint and prettier (#46) 2023-05-15 17:57:42 -04:00
Jacob Fletcher
5e09f50055 1.0.11 2023-05-15 17:38:55 -04:00
Jacob Fletcher
32dc030e17 1.0.14-canary.0 2023-05-15 17:26:11 -04:00
Jarrod Flesch
64a443f968 chore: adds use client directive atop custom react components (#45) 2023-05-15 13:30:02 -04:00
Jarrod Flesch
8769d042f9 chore: adds use client directive atop custom react components (#42) 2023-05-15 13:29:06 -04:00
Jacob Fletcher
76c9704850 fix: correctly types width fields #37 (#41) 2023-05-15 12:27:34 -04:00
Jacob Fletcher
f8da32a9bd feat: explicitly exports fields for reuse #35 (#39) 2023-05-15 11:56:34 -04:00
Jacob Fletcher
a89df757bf chore: eslint and prettier (#40) 2023-05-15 11:23:29 -04:00
Alberto Maghini
a12240b71e fix: threads locale through findByID (#31) 2023-05-15 17:14:07 +02:00
Elliot DeNolf
e567627809 1.0.1 2023-05-11 22:55:53 -04:00
Elliot DeNolf
56965bc0ed feat: export some utils (#2) 2023-05-11 22:55:13 -04:00
Elliot DeNolf
e43d6520c5 0.3.28 2023-05-09 13:39:19 -04:00
Elliot DeNolf
1123909960 fix: revert template serverURL back to localhost 2023-05-09 13:39:12 -04:00
Elliot DeNolf
bc1853c2e7 0.3.27 2023-05-09 10:59:13 -04:00
Elliot DeNolf
318b734f96 feat: use 127.0.0.1 for node compatibility 2023-05-09 10:58:20 -04:00
Jacob Fletcher
dfb9a93547 0.0.13 2023-05-01 17:40:57 -04:00
Jacob Fletcher
a2e336470a Merge pull request #18 from payloadcms/fix/deletion-hook
fix: safely retrieves stripe resource before deletion #17
2023-05-01 17:40:20 -04:00
Jacob Fletcher
f6994e57dd fix: safely retrieves stripe resource before deletion #17 2023-05-01 17:36:40 -04:00
James
297e7f8c1d 1.0.16 2023-04-27 16:38:21 -04:00
James
5c9a01aa1c 1.0.15 2023-04-27 16:37:34 -04:00
James
df7499483a chore: merge conflicts 2023-04-27 16:35:08 -04:00
James
131333fc3a fix: #34, only deletes files with valid filename 2023-04-27 16:30:44 -04:00
James
60cf803e8d fix: #43, not deleting old files 2023-04-27 16:28:16 -04:00
James
7eb8d8bed1 fix: uses fallback for stream to prevent webpack error 2023-04-27 13:00:02 -04:00
Elliot DeNolf
2734b1d54a 0.3.26 2023-04-19 09:48:09 -04:00
Elliot DeNolf
82510c1574 feat: remove .npmrc from templates 2023-04-19 09:48:04 -04:00
Elliot67
56d48885e1 :feat: Improve admin panel file's caching 2023-04-16 00:55:27 +02:00
Dan Ribbens
2f799a9420 feat: azure upload file stream (#46) 2023-04-10 17:04:28 -04:00
Ssor Onid
09584940d1 chore: Update README.md (#24) 2023-04-10 09:15:42 -04:00
Dan Ribbens
87063a03c4 chore: show MIT license in package.json 2023-04-07 17:07:50 -04:00
Dan Ribbens
b7e2f2a57b Merge pull request #45 from alamit/feat/azure-partial-content 2023-04-07 15:39:44 -04:00
alamit
25c4d858e9 Update staticHandler.ts 2023-04-07 04:36:18 +02:00
alamit
02c83b65ef feat(azure): Add support for partial content requests 2023-04-07 03:06:46 +02:00
Elliot DeNolf
0a2b02f206 1.0.0 2023-04-02 23:17:54 -04:00
Elliot DeNolf
41ee127de8 chore: update readme 2023-04-02 23:17:43 -04:00
James
9ddec59ddd 0.0.10 2023-04-02 18:12:24 -04:00
James
b72b22c628 fix: specifies region 2023-04-02 18:12:17 -04:00
Elliot DeNolf
a685f30245 0.0.6 2023-04-02 13:26:19 -04:00
Elliot DeNolf
173ec6f0f8 feat: set bucket region in s3 storage client 2023-04-02 13:26:05 -04:00
James
349ab5343e chore: update readme 2023-04-02 13:25:52 -04:00
Jacob Fletcher
bfe8de3fd6 0.0.12 2023-03-29 13:27:09 -04:00
Jacob Fletcher
bd16e9fb53 chore: conditionally logs webhook events #15 (#16) 2023-03-29 13:25:27 -04:00
James
cf97adab7c 0.0.5 2023-03-29 12:07:16 -04:00
James
b6fc940f18 chore: mocks email provider 2023-03-29 12:07:06 -04:00
James
2fb685c0fe 0.0.4 2023-03-28 13:58:15 -04:00
James
54be5847f7 chore: only initializes email transport if running within payload cloud 2023-03-28 13:58:03 -04:00
James
bf4f37b514 0.0.3 2023-03-28 13:55:05 -04:00
James
9e577e7214 chore: refactors email transport 2023-03-28 13:54:57 -04:00
James
69185c06c2 0.0.2 2023-03-28 13:49:47 -04:00
James
e561016d07 Merge branch 'main' of github.com:payloadcms/plugin-cloud 2023-03-28 13:49:25 -04:00
James
9db4dadce3 feat: builds email transport w/ resend 2023-03-28 13:49:08 -04:00
Elliot DeNolf
fa40d511c2 chore: .env.example update, dev debugger 2023-03-23 11:53:23 -04:00
James
ebfb86866f chore: bumps payload 2023-03-20 13:32:06 -04:00
James
be853a0657 chore: little cleanup 2023-03-11 00:01:59 -08:00
James
c880342099 chore: streamlines env var naming 2023-03-10 23:39:04 -08:00
James
d09bbd2171 chore: initial build 2023-03-10 23:30:00 -08:00
James
c1823f719a chore: init 2023-03-10 22:20:27 -08:00
Dragos Nedelcu
9968d0aaff chore: conditionally renders meta generation buttons 2023-02-27 11:58:57 -05:00
Ellie
9fe4c4aabc fix: passes locale through generateURL 2023-02-27 10:16:07 -05:00
Elliot DeNolf
39686e3f05 0.3.25 2023-02-09 14:55:40 -05:00
Elliot DeNolf
482973559d feat: add media collection to blog template 2023-02-09 14:55:16 -05:00
Elliot DeNolf
6cb8794c5a 1.0.14 2023-02-09 14:01:57 -05:00
Elliot DeNolf
e56518e702 fix: properly alias fs at the package level, not dev 2023-02-09 14:01:09 -05:00
Elliot DeNolf
20cfd61dbf 1.0.13 2023-02-09 13:13:20 -05:00
Elliot DeNolf
65899766d6 feat: add proper prepublishOnly script
chore: remove dev/yarn.lock during clean, prevents publish

chore: make dev package.json private

chore: adjust payload peer dep version
2023-02-09 13:06:00 -05:00
Elliot DeNolf
17dbc1e484 chore: add lib-storage to dev deps, needed for dev and build 2023-02-09 12:13:13 -05:00
Elliot DeNolf
ee62c2a722 chore: additional webpack mock for dev 2023-02-09 12:12:12 -05:00
Elliot DeNolf
1f7f5e5cdb feat(s3): implement multipart upload 2023-02-09 11:56:53 -05:00
Elliot DeNolf
7ab9c386ca fix: change upload fields from disabled to hidden 2023-02-08 13:31:30 -05:00
Elliot DeNolf
b4b66e2f16 chore: explicit type for S3 storage client 2023-02-07 14:37:51 -05:00
Elliot DeNolf
bd64ec3c49 chore: add some eslint ignores for dev dir 2023-02-07 14:27:04 -05:00
Elliot DeNolf
600dbd72f4 0.3.24 2023-02-03 14:47:58 -05:00
Elliot DeNolf
785337dc5d chore: add rimraf to prepublish 2023-02-03 14:47:17 -05:00
Jacob Fletcher
8ddbb67f07 0.0.11 2023-02-02 14:28:23 -05:00
Jacob Fletcher
d61ced9cbd chore: exports fields top-level 2023-02-01 17:57:16 -05:00
Jacob Fletcher
ada165a21e Merge pull request #10 from payloadcms/chore/export-types
chore: exports types
2023-02-01 17:42:12 -05:00
Jacob Fletcher
715e154817 chore: exports types (#5) 2023-02-01 17:41:28 -05:00
Jacob Fletcher
8d4fd14ff2 chore: exports types 2023-02-01 17:36:31 -05:00
Elliot DeNolf
4c8f33e098 feat(s3): support large uploads (#37)
* feat(s3): implement multipart upload

* feat(s3): support tempFilePath and using read stream for uploads
2023-02-01 16:31:07 -05:00
Elliot DeNolf
14a35f35c3 0.3.23 2023-02-01 15:53:54 -05:00
Elliot DeNolf
ed2e176285 feat: add cross-env to graphql schema gen command 2023-02-01 14:51:11 -05:00
Jacob Fletcher
0eac5ffe64 1.0.0 2023-02-01 14:19:29 -05:00
Jacob Fletcher
41961ad51d chore: bumps demo to payload v1.6.2 2023-02-01 14:18:54 -05:00
Jacob Fletcher
a2aa475ece initial working draft 2023-02-01 13:34:23 -05:00
Elliot DeNolf
2d79280999 0.3.22 2023-01-31 13:15:13 -05:00
Elliot DeNolf
8b5084ab43 0.3.21 2023-01-31 13:14:45 -05:00
Elliot DeNolf
b19356597b chore: revert onInit passing payload
Signed-off-by: Elliot DeNolf <denolfe@gmail.com>
2023-01-31 13:14:09 -05:00
Jacob Fletcher
42f1a23b7f 1.0.13 2023-01-23 09:36:09 -05:00
Jacob Fletcher
da4d9018c1 feat: spreads overrides into configs #25 (#29) 2023-01-23 09:34:31 -05:00
Jacob Fletcher
e8458f84bc fix: removes conditional return of formattedEmails in sendEmail hook #26 (#28) 2023-01-23 09:00:26 -05:00
Jacob Fletcher
5b6705b4f6 fix: properly overrides form submission relationTo #19 (#27) 2023-01-23 08:59:52 -05:00
bencun
b4d1eaf1fb feat: field localization
* Localize field labels and values.

* More localization.
2023-01-23 14:59:15 +01:00
Elliot DeNolf
0bd412edbd feat: server init async and onInit use scoped payload 2023-01-19 15:23:19 -05:00
Elliot DeNolf
1a6ba25e5d 0.3.21-beta.0 2023-01-18 16:01:41 -05:00
Elliot DeNolf
26d0cd18a1 feat: add generate-types path and ts-node swc to tsconfig 2023-01-18 15:58:41 -05:00
Jacob Fletcher
93b049288b 1.0.12 2023-01-18 08:07:06 -05:00
Jacob Fletcher
35e14cf044 fix: uses form slug from config in form relationship field #19 (#23) 2023-01-18 08:04:11 -05:00
Jacob Fletcher
76e715aa6d chore: reverts cb0197e 2023-01-18 08:00:09 -05:00
Elliot DeNolf
31653fe76e 0.3.21 2023-01-16 11:34:53 -05:00
Elliot DeNolf
a6d52223d5 chore: update readme with template names 2023-01-16 11:23:33 -05:00
Elliot DeNolf
1bf7c4084c feat: remove javascript templates 2023-01-16 11:21:51 -05:00
Jessica Chowdhury
2c8ea533af feat: adds cc field to email 2023-01-13 18:00:03 +00:00
Jacob Fletcher
60c14557ff Merge pull request #14 from payloadcms/chore/13
chore: handles stripe test keys
2023-01-04 16:53:56 -05:00
Jacob Fletcher
a38b43dc4f chore: handles stripe test keys 2023-01-04 16:53:18 -05:00
Jacob Fletcher
12e85f654e Merge pull request #12 from payloadcms/fix/7
fix: auto-generates password for webhook-created users
2023-01-04 10:18:26 -05:00
Jacob Fletcher
c02463be69 fix: auto-generates password for webhook-created users 2023-01-04 10:16:41 -05:00
Jacob Fletcher
1b6d0cf4da Merge pull request #11 from payloadcms/feat/type-exports
fix: properly exports types
2023-01-04 09:58:03 -05:00
Jacob Fletcher
e59e6ed65e fix: properly exports types 2023-01-04 09:44:15 -05:00
Jacob Fletcher
d6a11921e0 Merge pull request #10 from Velua/patch-2
feat: accepts generic in StripeWebhookHandler
2023-01-04 08:57:25 -05:00
Jacob Fletcher
ab4df553f0 1.0.10 2023-01-04 01:19:08 -05:00
Jacob Fletcher
e1e91e7e99 Merge pull request #26 from payloadcms/feat/export-types
feat: properly export types
2023-01-04 01:13:37 -05:00
Jacob Fletcher
a7f1aff2c4 chore: explicitly includes types in files array 2023-01-04 01:11:33 -05:00
Jacob Fletcher
a8b366992a 1.0.11 2023-01-04 00:48:54 -05:00
Jacob Fletcher
4841dbf7ab Merge pull request #17 from payloadcms/fix/15
fix: custom form fields
2023-01-04 00:46:10 -05:00
Jacob Fletcher
9ee7041f9f Merge pull request #18 from payloadcms/fix/type-exports
fix: properly exports types
2023-01-04 00:45:37 -05:00
Jacob Fletcher
856962c6c6 fix: properly exports types 2023-01-04 00:39:10 -05:00
Jacob Fletcher
ba0651cecf fix: custom form fields 2023-01-03 23:26:13 -05:00
Elliot DeNolf
419a3eef53 0.3.20 2023-01-02 15:50:08 -05:00
Elliot DeNolf
f62531bafd feat: pass through npm run command to package.json template 2023-01-02 15:50:02 -05:00
John Williamson
573c8de380 accept generic 2022-12-29 17:11:33 +10:00
Elliot DeNolf
dc815dad14 0.3.19 2022-12-26 21:08:06 -05:00
Elliot DeNolf
bde2ce9b53 chore: stricter typing on prompts validation 2022-12-26 21:07:25 -05:00
Elliot DeNolf
041af0100c feat: use project name as package.json name 2022-12-26 21:00:05 -05:00
Jacob Fletcher
a64297b376 1.0.10 2022-12-23 17:24:55 -05:00
Jacob Fletcher
9f5ec1784c fix: build errors 2022-12-23 17:24:46 -05:00
Jacob Fletcher
caf9e5699e Merge pull request #13 from andr-ec/latestPayload
Updated to payload 1.3.0
2022-12-23 17:01:54 -05:00
Elliot DeNolf
2e18c5b8cf feat: add Dockerfile 2022-12-21 00:41:22 -05:00
Andre Carrera
505d58f7b6 updated to payload 1.3.0 2022-12-14 21:43:19 -07:00
Elliot DeNolf
3e5da25a24 feat: properly export types 2022-11-26 08:07:08 -05:00
Elliot DeNolf
e11a0fb285 docs: add more detail on S3 configuration 2022-11-21 10:01:16 -05:00
Elliot DeNolf
53f0c526f7 0.3.18 2022-11-20 12:38:48 -05:00
Elliot DeNolf
dc5c4eced0 0.3.18-beta.1 2022-11-18 15:45:59 -05:00
Elliot DeNolf
0d8b6d03ed feat: add fallback for terminal link for unsupported terminals 2022-11-18 15:44:26 -05:00
Jacob Fletcher
0363c85dbd chore: renames Options to PluginConfig 2022-11-17 17:13:27 -05:00
Jacob Fletcher
9d43805242 1.0.9 2022-11-17 17:05:28 -05:00
Jacob Fletcher
0dd39bcad2 chore: types 2022-11-17 17:04:47 -05:00
Jacob Fletcher
a0d479ead8 1.0.9 2022-11-17 16:59:25 -05:00
Jacob Fletcher
ef7ba946c4 chore: seeds meta image 2022-11-17 16:48:02 -05:00
Jacob Fletcher
bb915448e1 Merge pull request #25 from payloadcms/fix/tabs
fix: improves tab handling
2022-11-16 17:54:31 -05:00
Jacob Fletcher
b1c07ef748 fix: improves tab handling 2022-11-16 17:37:17 -05:00
Jacob Fletcher
a7d5a0fa81 chore: renames SEOConfig to PluginConfig 2022-11-16 16:04:25 -05:00
Jacob Fletcher
e0f6f36787 docs: adds development documentation 2022-11-16 15:08:12 -05:00
Jacob Fletcher
ca684a33d1 chore: migrates from useWatchForm to useAllFormFields 2022-11-16 15:04:09 -05:00
Jacob Fletcher
59a31543c8 chore: seeds demo 2022-11-16 14:59:29 -05:00
Jacob Fletcher
fa660cd4ef chore: ignores package-lock 2022-11-16 14:06:03 -05:00
Jacob Fletcher
fd9cbd2cdb chore: ignores package-lock 2022-11-16 14:05:19 -05:00
Jacob Fletcher
4f6eb1e307 chore: adds .env.example to demo 2022-11-16 12:50:53 -05:00
Jacob Fletcher
e3278bf981 chore: adds .env.example to demo 2022-11-16 12:47:33 -05:00
Jacob Fletcher
50860bc8c1 1.0.4 2022-11-16 12:27:39 -05:00
Jacob Fletcher
71057aa5ef docs: adds development documentation 2022-11-16 12:25:45 -05:00
Jacob Fletcher
52f7890989 docs: adds development documentation 2022-11-16 12:22:57 -05:00
Jacob Fletcher
6200a119f9 fix: prevents child-parents 2022-11-16 11:31:15 -05:00
Jacob Fletcher
46eb61d18a chore: payload peerDep 2022-11-16 10:45:14 -05:00
Jacob Fletcher
246c78c6c7 chore: bumps payload deps 2022-11-16 10:39:42 -05:00
Jacob Fletcher
37efc13c1e chore: seeds demo 2022-11-15 18:01:26 -05:00
Jacob Fletcher
2766489476 chore: bumps payload deps 2022-11-15 17:44:59 -05:00
Jacob Fletcher
0c1102a138 chore: seeds grandchild page 2022-11-15 17:10:53 -05:00
Jacob Fletcher
e765b96a4e Merge pull request #8 from payloadcms/fix/localization
fix: conditionally localizes breadcrumbs
2022-11-15 16:33:39 -05:00
Jacob Fletcher
01c42d9630 fix: conditionally localizes breadcrumbs 2022-11-15 16:19:18 -05:00
Jacob Fletcher
f421a2715d chore: seeds demo 2022-11-15 16:01:27 -05:00
Jacob Fletcher
edd7a8086c Merge pull request #7 from bencun/feat/disable-self-as-parent
Disable referencing self as a parent by default to prevent crashes
2022-11-15 13:24:09 -05:00
Jacob Fletcher
010db46e08 docs: updates README 2022-11-15 13:18:11 -05:00
Jacob Fletcher
fc8a6e107e chore: ignores .DS_Store 2022-11-15 12:58:09 -05:00
Jacob Fletcher
2a85bb9fa9 chore: ignores .DS_Store 2022-11-15 12:55:36 -05:00
Jacob Fletcher
c069f46f4c docs: adds troubleshooting section 2022-11-15 12:07:42 -05:00
Elliot DeNolf
eb65340923 chore: add installation section to readme 2022-11-14 12:47:22 -05:00
Jacob Fletcher
64bb16a6ff Merge pull request #6 from yagee/main
Update README and little fix to email template
2022-11-10 07:01:20 -08:00
Elliot DeNolf
cfa364280f v0.3.18-beta.0 2022-11-08 11:17:27 -08:00
Elliot DeNolf
7a293563fb feat: implement using current directory 2022-11-08 11:16:02 -08:00
Roman Ryzhikov
6f6e3cabe7 close <div> tag in html email template 2022-11-07 15:56:27 +02:00
Roman Ryzhikov
e9b5309a39 update method miss-spelling 2022-11-07 15:54:58 +02:00
Aleksandar Bencun
2cb79f1752 Improved the docs a bit. 2022-10-26 23:22:53 +02:00
Aleksandar Bencun
5f740a60cc Prevent selecting self as a parent unless this behavior is overridden explicitly. 2022-10-26 23:15:04 +02:00
Elliot DeNolf
9359954233 0.3.17 2022-10-25 13:26:46 -04:00
Elliot DeNolf
9fcc05676e 0.3.16
0.3.16
2022-10-25 13:20:24 -04:00
Elliot DeNolf
1e95f5de49 chore: update scripts 2022-10-25 13:17:44 -04:00
Elliot DeNolf
f8983e9e5c refactor: rework templating 2022-10-25 12:54:39 -04:00
Elliot DeNolf
aab71f03b3 chore: linting, update deps 2022-10-24 23:25:04 -04:00
Elliot DeNolf
447d88bf82 test: update createProject test 2022-10-24 23:06:45 -04:00
Elliot DeNolf
897e94f2f4 feat: basic readme template 2022-10-24 22:58:55 -04:00
Elliot DeNolf
87936e5b52 refactor: linting and file naming 2022-10-24 22:57:09 -04:00
Jarrod Flesch
175d44b0ae fix: thread through collection admin config properties - #5 2022-10-20 09:59:25 -04:00
Jacob Fletcher
e7ac1819ce 0.0.10 2022-10-19 14:51:29 -04:00
Jacob Fletcher
288ff2b094 feat: inforces stripeArgs array 2022-10-19 14:51:11 -04:00
Jacob Fletcher
aca534ec59 0.0.9 2022-10-19 14:27:39 -04:00
Jacob Fletcher
a8951cb741 fix: safely passes args through stripe proxy method handler 2022-10-19 14:26:39 -04:00
Jarrod Flesch
7f9dd2b4e1 fix: readme example ContentType to Content-Type 2022-10-18 17:02:26 -04:00
Alex Pagnotta
8a9f8408cf feat: ensure "accept-ranges" header is passed-trough on static files for S3 and Azure adapters 2022-10-17 18:21:23 +02:00
James Mikrut
f333ff1c5b Merge pull request #20 from linde12/master
Lazily initialize storage clients
2022-10-14 11:52:06 -04:00
olinde
d9dd7ca2c9 fix: await incoming configs onInit
The incoming configs onInit functions may be async, so we should await them.
2022-10-14 17:40:39 +02:00
olinde
2790bab479 feat: make s3 adapter initialize lazily 2022-10-14 15:29:28 +02:00
olinde
29b4bcd1b0 feat: make gcs adapter initialize lazily 2022-10-14 15:29:28 +02:00
olinde
d9dd60ff70 feat: make azure adapter initialize lazyily 2022-10-14 15:29:28 +02:00
Jacob Fletcher
07b970027d fix: demo subscription sync 2022-10-12 16:14:41 -04:00
Elliot DeNolf
e7f5c2e767 1.0.12 2022-10-11 12:53:45 -04:00
alamit
4889fe29f5 fix: content length header (#16) 2022-10-11 12:44:51 -04:00
Jacob Fletcher
71f6542341 chore: adds ui link to demo subscriptions 2022-10-11 11:13:46 -04:00
Jacob Fletcher
c90830f961 chore: syncs subscription status 2022-10-11 11:10:34 -04:00
Jacob Fletcher
d46d2c0595 0.0.8 2022-10-11 09:58:12 -04:00
Jacob Fletcher
16d6c26387 feat: adds priceJSON sync to demo 2022-10-11 09:55:15 -04:00
Jacob Fletcher
32df3067e1 fix: migrates from afterChange to beforeChange hook 2022-10-10 17:27:49 -04:00
Jacob Fletcher
3a7440dcb9 fix: uses proper key-value pairs in to-stripe hooks and renames fieldName to fieldPath 2022-10-10 17:11:10 -04:00
Jacob Fletcher
417f4b7aa9 fix: allows dot notation in sync config 2022-10-10 16:24:36 -04:00
Jacob Fletcher
822aec0a5c chore: renames fieldName and stripeProperty 2022-10-10 15:24:05 -04:00
Jacob Fletcher
455622fa57 0.0.7 2022-10-07 14:20:00 -04:00
Jacob Fletcher
f93316e588 chore: renames resource to stripeResourceType 2022-10-07 14:05:29 -04:00
Jacob Fletcher
b7e65d1024 feat: adds direct link to stripe resources #4 2022-10-07 13:38:40 -04:00
Jacob Fletcher
b5728104dd 0.0.6 2022-09-30 13:09:52 -04:00
Jacob Fletcher
604197bb98 chore: mocks server modules in demo 2022-09-30 13:05:43 -04:00
Jacob Fletcher
6b30a9702b 0.0.5 2022-09-30 11:21:54 -04:00
Jacob Fletcher
ab974ee587 fix: build errors 2022-09-30 11:20:47 -04:00
Jacob Fletcher
3a9efb21e0 chore: custom webhooks 2022-09-30 11:12:45 -04:00
Jacob Fletcher
2dd395f718 chore: improves logs 2022-09-29 15:27:03 -04:00
Jacob Fletcher
2df28355cf chore: syncs demo products 2022-09-29 12:33:24 -04:00
Jacob Fletcher
7607c17041 chore: custom subscriptionCreatedOrUpdated webhook 2022-09-29 12:33:07 -04:00
Jacob Fletcher
64560dd36b Merge pull request #1 from colinramsay/patch-1
chore: correct import directive in readme code sample
2022-09-29 08:58:35 -04:00
Colin Ramsay
e72fff6768 chore: correct import directive in readme code sample 2022-09-29 13:54:00 +01:00
Jacob Fletcher
f81b4d3a1b feat: detects nested webhooks events 2022-09-28 12:24:53 -04:00
Jacob Fletcher
8305b65b98 chore: renames object to resource 2022-09-27 17:00:47 -04:00
Jacob Fletcher
275d15cfdc chore: renames isSyncedToStripe to skipSync 2022-09-27 16:28:26 -04:00
Jacob Fletcher
c09667edfc chore: general housekeeping 2022-09-27 16:26:49 -04:00
Jacob Fletcher
2cbb14f8dd feat: abstracts webhooks 2022-09-27 14:43:21 -04:00
Jacob Fletcher
936c125a42 fix: auto-sync hooks 2022-09-27 10:55:30 -04:00
Jacob Fletcher
5a8cdef103 wip: auto-sync 2022-09-26 18:18:58 -04:00
Jacob Fletcher
26bc1b46c1 chore: bumps to payload v1.1.4 2022-09-26 10:32:45 -04:00
Jacob Fletcher
639a832600 feat: supports collection config 2022-09-23 16:22:07 -04:00
Jacob Fletcher
ba4d751831 feat: configures working sync 2022-09-23 14:49:48 -04:00
James
c2c60851b0 1.0.11 2022-09-23 09:27:36 -07:00
James
84cd214a89 fix: only uses adapter to generate file urls if filename exists 2022-09-23 09:27:16 -07:00
James
6023191201 1.0.10 2022-09-21 09:45:26 -07:00
James
a7ccfaeb6f feat: adds generateFileURL to override file urls 2022-09-21 09:45:02 -07:00
Jacob Fletcher
32a0972855 feat: webhooks catch-all 2022-09-21 11:09:05 -04:00
Jacob Fletcher
d354610978 0.0.4 2022-09-20 13:20:04 -04:00
Jacob Fletcher
97bd414d3d chore: updates README.md 2022-09-20 13:19:16 -04:00
Jacob Fletcher
9f396598a0 chore: pluralizes stripeWebhooksEndpointSecret 2022-09-20 13:06:54 -04:00
Jacob Fletcher
c2e20277ec chore: aliases server modules 2022-09-20 13:04:09 -04:00
Jacob Fletcher
7e6f35f380 chore: removes proxy from demo hooks 2022-09-19 17:28:51 -04:00
Jacob Fletcher
750646b3b8 chore: updates README 2022-09-19 12:40:40 -04:00
James
e93599234d 1.0.9 2022-09-14 16:37:44 -07:00
James
c1cf66dc53 fix: sets proper headers for gcs 2022-09-14 16:36:15 -07:00
James
2cd83f2aa6 merge 2022-09-14 15:56:50 -07:00
James
0685717794 fix: ensures that proper Content-Type headers are set on pass-through static files 2022-09-14 15:53:14 -07:00
Elliot DeNolf
5e02762715 0.3.14 2022-09-13 19:14:19 -07:00
Elliot DeNolf
0785820539 feat: automatically generate secret 2022-09-13 19:14:04 -07:00
Dan Ribbens
d318e2276c 1.0.8 2022-08-25 11:58:23 -04:00
Dan Ribbens
8d3974776c chore: add prepublish build to package.json 2022-08-25 11:58:02 -04:00
Dan Ribbens
8f8b824432 Merge pull request #5 from afzaalahmad/feature/prefix-option
feat: add prefix option
2022-08-25 11:48:09 -04:00
Dan Ribbens
7d60a22ccf fix: typescript error 2022-08-25 11:39:34 -04:00
afzaalahmad
2075c0e817 fix: existing prefix field scenario 2022-08-25 02:53:46 +05:00
afzaalahmad
ad68a58859 fix: remove unnecessary param from deleteHandler 2022-08-25 02:53:46 +05:00
afzaalahmad
31622dd448 update: README.md 2022-08-25 02:53:42 +05:00
afzaalahmad
2b51699ec3 feat: add prefix option 2022-08-25 02:53:16 +05:00
Jacob Fletcher
eef80a8239 0.0.3 2022-08-24 16:24:38 -04:00
Jacob Fletcher
339fb96b7d fix: type error in demo 2022-08-24 16:24:04 -04:00
Jacob Fletcher
fe8254c73d fix: exports stripeProxy 2022-08-24 16:23:47 -04:00
Jacob Fletcher
aef868f471 0.0.2 2022-08-24 15:44:40 -04:00
Jacob Fletcher
8e02db10ae chore: updates README.md 2022-08-24 15:44:24 -04:00
Jacob Fletcher
44dd66cb72 feat: builds customers sync demo 2022-08-24 15:44:13 -04:00
Jacob Fletcher
713c6738aa feat: abstracts stripe proxy from route 2022-08-24 15:43:26 -04:00
James
5d18d2793a chore: readme 2022-08-24 11:46:40 -07:00
James
fe002cf9b2 1.0.7 2022-08-24 11:45:11 -07:00
James
434bdb72ab Merge branch 'master' of github.com:payloadcms/plugin-cloud-storage 2022-08-24 11:42:06 -07:00
James
5a802d0d94 feat: allows adapter to be set to null, which will fall back to local storage 2022-08-24 11:41:49 -07:00
Jacob Fletcher
f70a7b80fc chore: stripe rest api error handling 2022-08-24 11:34:22 -04:00
Jacob Fletcher
32665d11c5 0.0.1 2022-08-24 08:18:52 -04:00
Jacob Fletcher
1ed4c096a3 fix: type errors 2022-08-24 08:18:43 -04:00
James Mikrut
c4a492a62a Merge pull request #4 from echocrow/master
Fix Google Cloud Storage install instruction
2022-08-23 12:57:38 -07:00
Crow
e01473ec0c Fix Google Cloud Storage install instruction 2022-08-23 16:05:25 +02:00
Elliot DeNolf
bb6d545aae 0.3.13 2022-08-22 10:15:08 -04:00
Elliot DeNolf
4cdc94d92f feat: always write .npmrc 2022-08-22 10:14:22 -04:00
James
97a3be87f3 1.0.6 2022-08-21 15:41:34 -07:00
James
aa2c48cb71 chore: yarn 2022-08-21 15:41:29 -07:00
James
ef31984e24 1.0.5 2022-08-21 15:39:05 -07:00
James
de37218c6b chore: updates gitignore 2022-08-21 15:38:45 -07:00
James
9d875332b0 Merge branch 'master' of github.com:payloadcms/plugin-cloud-storage 2022-08-21 15:37:36 -07:00
James Mikrut
c8d8f1fd73 Merge pull request #2 from afzaalahmad/feature/add-google-cloud-storage-adapter
feat: add google cloud storage adapter
2022-08-21 15:37:08 -07:00
afzaalahmad
ba29a5dd7a fix: dev build command 2022-08-20 13:35:27 +05:00
afzaalahmad
0c3b69795b update: README.md 2022-08-20 13:17:41 +05:00
afzaalahmad
3465f7c60d feat: add google cloud storage adapter 2022-08-20 13:10:29 +05:00
Jacob Fletcher
fe62871c75 1.0.8 2022-08-19 10:35:09 -04:00
Jacob Fletcher
741ba30513 chore: updates README 2022-08-19 10:34:44 -04:00
Jacob Fletcher
159d61e172 Merge pull request #9 from rsisson/main
feat: useTabbedUI
2022-08-19 10:20:40 -04:00
Riley
63240ca9ab change tabbedUi to tabbedUI 2022-08-19 09:19:02 -05:00
Jacob Fletcher
339ab3a838 fix: express type errors 2022-08-18 15:36:23 -04:00
Jacob Fletcher
cc9f9dd704 feat: opens stripe rest 2022-08-18 14:17:31 -04:00
Riley
6e85a1263d add new config param to readme, fix readme indentation 2022-08-17 18:40:57 -05:00
Riley
eec5fdcccf make tabbed interface opt-in via config 2022-08-17 18:35:41 -05:00
Jacob Fletcher
c13acfe47a feat: initial working draft 2022-08-17 18:11:59 -04:00
Jacob Fletcher
715e13b78e chore: scaffolds plugin 2022-08-17 13:58:41 -04:00
Riley
6d6fd11b04 use tabbed interface for better ux 2022-08-15 09:48:30 -05:00
Jacob Fletcher
27313995cc Merge pull request #5 from mikemoooo/patch-1
feat: localized breadcrumbs
2022-08-15 10:03:02 -04:00
Mike
93afe1d000 Support localised breadcrumbs 2022-08-15 15:51:28 +02:00
Jacob Fletcher
5979f72962 docs: adds globals config to README #7 2022-08-14 10:04:51 -04:00
Jacob Fletcher
7e93ab95d9 1.0.7 2022-08-14 09:54:09 -04:00
Jacob Fletcher
ae156a6679 feat: supports globals #7 2022-08-14 09:53:56 -04:00
Jacob Fletcher
cc9c012e3a docs: adds generateImage to readme #8 2022-08-14 09:45:24 -04:00
Jacob Fletcher
4bac60b959 Merge pull request #6 from kalon-robson/main
chore: bump payload to v1
2022-08-14 09:41:27 -04:00
Jacob Fletcher
790e401837 Merge pull request #3 from Kalmarv/patch-1
docs: readme syntax highlighting
2022-08-14 09:36:23 -04:00
Elliot DeNolf
d7b16dd88f feat: require latest payload as peer dep 2022-08-08 09:32:18 -04:00
Elliot DeNolf
6962fabb4e chore: update .gitignore, remove ignored 2022-08-08 09:28:10 -04:00
James
9705e351b3 chore: improves comments 2022-08-07 20:05:28 -04:00
James
45744b0eed 1.0.4 2022-08-07 19:47:05 -04:00
James
7c8f2b1855 chore: fixes adapter exports 2022-08-07 19:46:59 -04:00
James
a7c5d6476c 1.0.3 2022-08-07 19:36:54 -04:00
James
932fefcb7d chore: simplifies usage pattern for plugin 2022-08-07 19:36:48 -04:00
James
ae8342c3ed 1.0.2 2022-08-07 19:27:14 -04:00
James
ec24bb9e2a Merge branch 'master' of github.com:payloadcms/plugin-cloud-storage 2022-08-07 19:27:04 -04:00
James
e1a903d03e chore: fixes payload dependency requirement 2022-08-07 19:26:59 -04:00
James
2f822d517d feat: builds pattern to preserve payload access control 2022-08-07 19:26:30 -04:00
James Mikrut
02a5648ff9 Update README.md 2022-08-07 10:47:21 -04:00
James Mikrut
2ba244cb01 Update README.md 2022-08-07 10:46:59 -04:00
James Mikrut
fab1ea5338 Update README.md 2022-08-07 10:43:25 -04:00
James
ac9c6c5c6d 1.0.1 2022-08-07 10:39:47 -04:00
James
0a4745b869 feat: builds s3 adapter 2022-08-07 10:37:51 -04:00
James
bc0bb6c1b4 chore: credit 2022-08-06 16:15:42 -04:00
James
3aa0d3f3ee chore: simplifies the work an adapter has to do to delete files 2022-08-06 16:09:31 -04:00
James
1f570f97a4 chore: adds optional chaining in handleDelete 2022-08-06 16:02:19 -04:00
James
76067b4e50 chore: bumps payload 2022-08-06 15:51:51 -04:00
James
82293292a1 chore: ignores azure emulator mounted volume 2022-08-06 15:42:26 -04:00
James
ad9ccfd338 fix: ensures azure server-only dependencies are aliased 2022-08-06 15:36:29 -04:00
James
2b7547fbae feat: builds plugin with azure adapter 2022-08-06 14:49:46 -04:00
James
4e1da749c9 chore: init 2022-08-05 15:00:12 -04:00
Elliot DeNolf
c28dca6fc0 0.3.12 2022-07-28 00:59:46 -04:00
Elliot DeNolf
95e630201a feat: include .gitignore 2022-07-28 00:59:35 -04:00
Kalon Robson
8b8fccca04 chore: bump payload to v1 2022-07-25 19:52:10 +01:00
Elliot DeNolf
84100be7eb 0.3.11 2022-07-23 18:23:23 -07:00
Elliot DeNolf
0c7007ae9a feat: legacy-peer-deps=true template 2022-07-23 18:23:04 -07:00
Elliot DeNolf
3e7e3669fe 0.3.10 2022-07-23 17:56:38 -07:00
Elliot DeNolf
1d3bb9c287 feat: add .npmrc with legacy-peer-deps=true 2022-07-23 17:54:15 -07:00
Elliot DeNolf
cacc624f5a 0.3.9 2022-07-21 13:51:01 -07:00
Elliot DeNolf
04dd824f0a feat: add graphql schema gen script 2022-07-21 13:43:01 -07:00
Elliot DeNolf
dc929732b1 feat: copyfiles script, allowJs, bump payload 2022-07-21 13:13:48 -07:00
Caleb
fa119550ae Add syntax highlighting to readme 2022-07-19 14:19:03 -06:00
James
629e9d3faa 1.0.6 2022-07-16 14:32:54 -07:00
James
de0913d958 1.0.5 2022-07-16 14:32:36 -07:00
James
8e9577b8e7 feat: dark-mode friendly colors 2022-07-16 14:30:43 -07:00
James
e7ffa2638a 1.0.3 2022-07-11 15:19:02 -07:00
James
666765f3fb fix: further ensures resaving children works with drafts 2022-07-11 15:18:52 -07:00
James
fc14622555 1.0.2 2022-07-11 15:14:14 -07:00
James
0d83d83d3c feat: ensures drafts work 2022-07-11 15:14:09 -07:00
Jacob Fletcher
aab2f5f7d2 chore: updates README 2022-07-05 15:11:25 -04:00
Jacob Fletcher
2d5cd84314 chore: updates README 2022-07-05 15:10:54 -04:00
Jacob Fletcher
80b0d79342 1.0.0 2022-07-05 15:10:07 -04:00
Jacob Fletcher
3fc4bc43ac chore: updates payload and package scope 2022-07-05 15:09:50 -04:00
Jacob Fletcher
fbdc74ea71 chore: adds homepage and repository to package.json 2022-07-05 14:54:39 -04:00
Jacob Fletcher
c06c80e416 chore: adds homepage and repository to package.json 2022-07-05 14:54:25 -04:00
Jacob Fletcher
a0116685bd chore: adds homepage and repository to package.json 2022-07-05 14:54:16 -04:00
Jacob Fletcher
141e40ffb9 Merge branch 'main' of github.com:payloadcms/payload-plugin-nested-pages 2022-07-05 14:46:41 -04:00
Jacob Fletcher
bd2c1c6bf2 1.0.1 2022-07-05 14:46:27 -04:00
Jacob Fletcher
ba90fdbdfd feat: updates payload 2022-07-05 14:45:48 -04:00
Jacob Fletcher
22a0486f1c 1.0.4 2022-07-05 14:31:49 -04:00
Jacob Fletcher
3b03abdd78 1.0.3 2022-07-05 14:31:44 -04:00
Jacob Fletcher
b7c3899e38 Merge pull request #2 from payloadcms/feat/textarea-field
feat: adds textarea field
2022-07-05 14:15:27 -04:00
Jacob Fletcher
af4a41e219 1.0.7 2022-07-05 14:13:14 -04:00
Jacob Fletcher
5e59b5666c 1.0.6 2022-07-05 14:12:19 -04:00
Jacob Fletcher
a3105d3897 chore: updates payload 2022-07-05 14:11:32 -04:00
Jacob Fletcher
7a32f39c2c chore: updates payload peerDep 2022-07-05 13:54:26 -04:00
Jacob Fletcher
c4a09967f3 chore: adds build to .gitignore 2022-07-05 13:38:35 -04:00
Jacob Fletcher
dd8c7906da chore: renames textArea to textarea 2022-07-05 13:36:46 -04:00
Jacob Fletcher
c7bdf5eb43 chore: adds textarea documentation 2022-07-05 13:35:04 -04:00
Jacob Fletcher
3e0ba91c5b chore: removes required label from fields 2022-07-05 13:33:10 -04:00
Jessica Boezwinkle
6940f2c0b7 fix: updates payload 2022-07-05 18:24:11 +01:00
Jessica Boezwinkle
474436e9ab feat: add textarea field 2022-07-05 15:48:49 +01:00
James Mikrut
9991fdb8c8 Update README.md 2022-06-13 09:15:14 -04:00
Jacob Fletcher
15c9ce56c2 chore: updates package name 2022-05-27 10:25:15 -04:00
Jacob Fletcher
0306d01af9 1.0.2 2022-05-27 09:35:58 -04:00
Jacob Fletcher
02676bb421 feat: bumps payload to v0.17.2 2022-05-27 09:34:47 -04:00
Jacob Fletcher
911285db27 wip: migrates to payload v0.17.0 2022-05-17 09:06:13 -04:00
Elliot DeNolf
a47fd23199 0.3.8 2022-05-16 18:45:11 -04:00
Elliot DeNolf
d205da0aa4 feat: remove licensing env var comments 2022-05-16 18:43:13 -04:00
Patrik Kozak
3816431893 feat: adds email-from-name & reply-to-name fields to Emails 2022-05-13 12:49:41 -04:00
James
b8f62f6d52 1.0.5 2022-05-09 17:54:15 -04:00
James
3ca632bcbd fix: overwrites incoming config arrays within field overrides 2022-05-09 17:54:09 -04:00
James
a4032c49e9 1.0.4 2022-05-09 17:48:01 -04:00
James
7f89d404f8 1.0.3 2022-05-09 17:37:35 -04:00
James
c880a61f13 fix: allows form fields to be properly overridden 2022-05-09 17:37:21 -04:00
James
c3401be7c4 1.0.2 2022-05-04 11:39:24 -04:00
James
af8e283203 1.0.1 2022-05-04 11:38:26 -04:00
James
65d72b01f0 Merge branch 'main' of github.com:payloadcms/payload-plugin-form-builder 2022-05-04 11:38:15 -04:00
James
2bbe4286f6 fix: only populates redirect references if passed via config 2022-05-04 11:38:07 -04:00
James
d41dd8cc4a chore: merge 2022-05-04 11:28:24 -04:00
James
de9f9c16b2 chore: bumps version 2022-05-04 11:27:51 -04:00
James
e2cc1dcf17 chore: migrates to @payloadcms scope 2022-05-04 11:27:22 -04:00
Jacob Fletcher
b8eeea9ea1 chore: updates react peerDep 2022-05-04 11:17:45 -04:00
Jacob Fletcher
eecdd0e118 Merge branch 'main' of github.com:payloadcms/payload-plugin-nested-pages 2022-05-04 11:13:21 -04:00
Jacob Fletcher
f749732a0a 0.0.3 2022-05-04 11:13:07 -04:00
Jacob Fletcher
78e2b518cf chore: updates react peerDep 2022-05-04 11:12:09 -04:00
Jacob Fletcher
66fa70e275 0.0.6 2022-05-04 11:09:46 -04:00
Jacob Fletcher
6b31173ed0 chore: updates react peerDep 2022-05-04 11:09:29 -04:00
Jacob Fletcher
196a4574cb 0.0.5 2022-05-04 11:08:48 -04:00
Jacob Fletcher
313f42ef55 chore: updates react peerDep 2022-05-04 11:08:18 -04:00
James
91362587f0 chore: renames plugin 2022-05-04 10:48:36 -04:00
James
e1485b3600 chore: updates readme 2022-05-04 10:34:41 -04:00
James
9119087f71 chore: updates README 2022-05-04 10:28:04 -04:00
James
321c666dba chore: moves plugin to @payloadcms npm scope 2022-05-04 10:27:17 -04:00
Jacob Fletcher
f0e9b75a73 Merge pull request #3 from AlessioGr/patch-2
chore: fixes generateTitle example in README and adds screenshot
2022-04-30 15:28:02 -04:00
James
1ce678505b 1.0.7 2022-04-27 17:10:49 -04:00
James
4938602ee0 feat: utilizes unused replyTo 2022-04-27 17:10:38 -04:00
Jacob Fletcher
4dd3f131b0 1.0.6 2022-04-26 10:17:40 -04:00
Alessio Gravili
20e385b358 Add image 2022-04-18 19:49:18 +02:00
Alessio Gravili
3d3f5e3302 Fix incorrect generateTitle title value in README 2022-04-18 19:44:57 +02:00
Jacob Fletcher
a4c4fc7060 Merge pull request #1 from payloadcms/fix/disable-errors-breadcrumbs
fix: disables errors while populating breadcrumbs
2022-04-18 08:43:31 -04:00
Jacob Fletcher
268c66b907 Merge pull request #2 from AlessioGr/patch-1
fix: import path in README.md
2022-04-18 08:13:56 -04:00
Alessio Gravili
af23614ad6 Fix incorrect import in the README.md 2022-04-17 21:31:56 +02:00
James
db09f4839f fix: disables errors while populating breadcrumbs 2022-04-15 15:28:18 -04:00
Jacob Fletcher
e2b9e227a0 0.0.2 2022-04-10 12:52:01 -04:00
Jacob Fletcher
4f0bc2306f chore: logs mock email credentials and adds field placeholders 2022-04-10 12:51:46 -04:00
Jacob Fletcher
7ad4c26829 chore: bumps payload to v0.15.6 2022-04-10 12:28:35 -04:00
Jacob Fletcher
c71e079fae 0.0.2 2022-04-10 12:23:09 -04:00
Jacob Fletcher
b90785fa8c chore: bumps payload to v0.15.6 2022-04-10 12:22:54 -04:00
Jacob Fletcher
472bf4401e 0.0.5 2022-04-10 12:17:12 -04:00
Jacob Fletcher
77f7054832 chore: bumps payload to v0.15.6 2022-04-10 12:17:01 -04:00
Jacob Fletcher
4567e6fb0b 0.0.4 2022-04-10 12:10:23 -04:00
Jacob Fletcher
3a0658f0dd chore: bumps payload to v0.15.6 2022-04-10 12:09:09 -04:00
Elliot DeNolf
c414f12527 feat: use prepublishOnly instead of prepublish 2022-03-23 00:48:31 -04:00
Elliot DeNolf
d9418c9fe3 0.3.7 2022-03-18 10:30:36 -04:00
Elliot DeNolf
65e2ba9bd0 feat: update sentry and error handling 2022-03-18 10:04:46 -04:00
Jacob Fletcher
6e340f008f feat: initial working draft 2022-03-07 16:19:40 -05:00
Jacob Fletcher
1d3a9aee28 0.0.4 2022-03-07 12:40:38 -05:00
Jacob Fletcher
875d8dc27b feat: supports versions api 2022-03-07 12:40:12 -05:00
Elliot DeNolf
b3f808644f chore: add comment about populating license key 2022-03-04 16:23:29 -05:00
Jacob Fletcher
01d092b219 0.0.1 2022-03-04 15:26:25 -05:00
Jacob Fletcher
a8d432f7b3 fix: dynamic price selector 2022-03-04 15:26:20 -05:00
Jacob Fletcher
36a8dc49b3 fix: payment form submissions 2022-03-04 15:01:02 -05:00
Elliot DeNolf
1e30435525 test: fix tests 2022-03-02 10:16:58 -05:00
Elliot DeNolf
156d25741b 0.3.6 2022-03-02 09:35:09 -05:00
Elliot DeNolf
de3ee812cd fix: available templates in help message 2022-03-02 09:23:27 -05:00
Jacob Fletcher
e08e681eda chore: initializes standalone repository 2022-02-22 15:22:13 -05:00
Jacob Fletcher
0d26923d30 0.0.3 2022-02-22 14:58:57 -05:00
Jacob Fletcher
869215e65b feat: supports generateURL 2022-02-22 14:48:41 -05:00
Jacob Fletcher
064c141be1 fix: passes plugin config to custom components 2022-02-22 13:28:38 -05:00
Jacob Fletcher
1fe7ea936c 0.0.2 2022-02-21 15:14:46 -05:00
Jacob Fletcher
52d24d96db fix: image field and type errors 2022-02-21 15:05:38 -05:00
Jacob Fletcher
1a2a576aa8 feat: uses config provider to format linkToDoc 2022-02-21 08:31:49 -05:00
Jacob Fletcher
d1a04965f3 fix: payload config provider 2022-02-20 13:00:44 -05:00
Jacob Fletcher
2ba6bf69c1 chore: initializes standalone repository 2022-02-20 12:39:58 -05:00
Jacob Fletcher
274f19c269 0.0.2 2022-02-20 02:08:59 -05:00
Jacob Fletcher
41d80a959c fix: syncWithSearch args and return type 2022-02-20 02:08:41 -05:00
Jacob Fletcher
80da94c3e0 feat: enables defaultPriorities 2022-02-20 01:08:15 -05:00
Jacob Fletcher
27a3b8ca6d feat: attaches payload to beforeSync hook 2022-02-20 00:38:23 -05:00
Jacob Fletcher
7e44fa1010 feat: abstracts syncWithSearch 2022-02-19 23:44:02 -05:00
Jacob Fletcher
1b10111ba9 feat: builds plugin 2022-02-19 11:02:55 -05:00
Jacob Fletcher
2b01b9b41f 1.0.5 2022-02-18 18:18:11 -05:00
Jacob Fletcher
422b63a9f6 1.0.4 2022-02-18 18:17:42 -05:00
Jacob Fletcher
fbc216e667 chore: adds README 2022-02-18 18:17:37 -05:00
Jacob Fletcher
f0cc05ab91 fix: dynamic field selector option values 2022-02-18 13:22:12 -05:00
Jacob Fletcher
65a53c7d76 feat: builds getPaymentTotal utility 2022-02-18 13:21:41 -05:00
Jacob Fletcher
12c85d7707 feat: adds basePrice to payment field 2022-02-18 11:08:24 -05:00
Jacob Fletcher
4a31090388 feat: types payment field 2022-02-18 11:07:15 -05:00
Jacob Fletcher
6d76091fa1 chore: initializes standalone repository 2022-02-17 23:02:42 -05:00
Jacob Fletcher
3d8d043ab1 1.0.3 2022-02-17 21:09:05 -05:00
Jacob Fletcher
a7780b10d9 fix: fieldToUse options 2022-02-17 21:07:53 -05:00
Jacob Fletcher
b931072eed chore: bumps payload to v0.14.24-beta.0 2022-02-17 21:03:06 -05:00
Jacob Fletcher
dfabfc5227 1.0.2 2022-02-17 16:41:40 -05:00
Jacob Fletcher
8b69625b57 feat: configures tsc and fixes types 2022-02-17 16:41:31 -05:00
Jacob Fletcher
d4d05ae3f3 1.0.1 2022-02-17 15:30:18 -05:00
Jacob Fletcher
e15e00b5f1 fix: declares payload as a peer dependency 2022-02-17 15:30:06 -05:00
Jacob Fletcher
31efa57975 chore: ignores demo env 2022-02-17 13:58:05 -05:00
Jacob Fletcher
f05462efd3 feat: builds demo 2022-02-17 13:57:13 -05:00
Jacob Fletcher
92fa206fa4 chore: initializes standalone repository 2022-02-17 11:42:38 -05:00
Jacob Fletcher
b749f89c30 feat: dynamic pricing and payment handling #43 2022-02-17 11:09:26 -05:00
Elliot DeNolf
234fb33864 0.3.5 2022-02-13 08:59:52 -05:00
Elliot DeNolf
c168bb5201 fix: removing onlyNameIfPublic hook, causes confusion in other hooks 2022-02-13 08:57:31 -05:00
Elliot DeNolf
0ce5d774cb fix: use proper type for collection hook 2022-02-12 09:18:05 -05:00
Jacob Fletcher
3b1b8ddc30 feat: restructures form builder #43 2022-02-09 18:05:00 -05:00
Jacob Fletcher
ec60147aff feat: integrates stripe api into form builder #43 2022-02-09 13:32:10 -05:00
Jacob Fletcher
2f00aef66c feat: adds payment fields to form builder #43 2022-02-09 12:09:40 -05:00
Elliot DeNolf
d2c2bbd711 0.3.4 2022-02-05 14:21:18 -05:00
Elliot DeNolf
88193adebb feat: add beta flag to use payload@beta 2022-02-05 14:21:03 -05:00
Elliot DeNolf
eac44f9496 0.3.3 2022-02-03 11:01:30 -05:00
Elliot DeNolf
6400095f1f feat: redirect root to admin panel 2022-02-03 11:00:22 -05:00
James
238db1750c fix: potential bug in breadcrumbs plugin 2022-01-31 16:18:46 -05:00
Jacob Fletcher
3db98e14dd feat: removes pipe from meta title #33 2022-01-21 12:31:21 -05:00
Jessica Boezwinkle
b4610a3fae fix: reduces richtext indent padding 2022-01-12 16:02:04 -05:00
Jessica Boezwinkle
ea22da4fc7 fix: updates richtext indentation within formbuilder 2022-01-12 16:00:31 -05:00
Jessica Boezwinkle
67df834f31 feat: adds indentation option to richText 2022-01-12 15:48:30 -05:00
Jessica Boezwinkle
3e4271474a merge conflicts 2022-01-10 14:41:53 -05:00
Jessica Boezwinkle
0152c91869 feat: adds max file size label to media fields 2022-01-10 14:40:10 -05:00
James
0962cd6fcb fix: allows breadcrumbs to populate without being passed full copy of page data 2022-01-07 18:34:40 -05:00
James
5b3d0fc0fe fix: unnecessary dependencies 2022-01-07 10:54:53 -05:00
James
f478fee9ea chore: bumps payload 2021-12-29 15:14:44 -05:00
Jacob Fletcher
2ccaa823e4 feat: omits irrelevant collections from rich text relationships 2021-12-16 14:04:18 -05:00
Jacob Fletcher
c2c2bb7f2d feat: adds image and video elements to sticky list and content grid rich text 2021-12-16 10:51:31 -05:00
Jacob Fletcher
8f0d85fe13 fix: form builder rich text serialization 2021-12-15 16:03:29 -05:00
Jacob Fletcher
7ce4f546a3 feat: form submission emails 2021-12-14 18:07:46 -05:00
Jacob Fletcher
db29b07b82 feat: form submission emails 2021-12-14 18:07:30 -05:00
Jacob Fletcher
3207202808 feat: supports form email variables and prepares for send 2021-12-14 13:21:07 -05:00
Elliot DeNolf
b57267e60a feat: add prepublish script, upgrade jest 2021-12-13 21:43:21 -05:00
Elliot DeNolf
79541b6ba7 0.3.2 2021-12-13 21:33:29 -05:00
Elliot DeNolf
0420098e94 fix: better check for existing dir 2021-12-13 21:32:52 -05:00
Jacob Fletcher
24a4bc6f19 feat: modifies form builder api 2021-12-13 12:03:28 -05:00
Jacob Fletcher
0acb49422d fix: adds error handling to meta title and prioritizes exerpt in meta description 2021-12-10 14:57:50 -05:00
Jacob Fletcher
e761eea4e6 fix: meta image upload field 2021-12-10 14:44:12 -05:00
Jacob Fletcher
d7015b5d5e fix: meta image generation 2021-12-10 14:43:56 -05:00
Jacob Fletcher
1f959f357c feat: includes subsite in meta title generation 2021-12-10 14:28:36 -05:00
Elliot DeNolf
9f80634be4 0.3.1 2021-12-10 10:27:04 -05:00
Elliot DeNolf
25ecb27aed 0.3.0 2021-12-09 17:19:51 -05:00
Elliot DeNolf
2ff2efd4b2 feat: add type generation scripts 2021-12-09 17:14:40 -05:00
Elliot DeNolf
ff7a29179d feat: bump payload version 2021-12-09 17:14:14 -05:00
Jacob Fletcher
f8f7a0893a fix: meta length indicator 2021-12-01 11:46:25 -05:00
Jacob Fletcher
8f389a5630 feat: improves meta description auto generation 2021-12-01 10:24:33 -05:00
Jacob Fletcher
1ed5fd551e fix: type errors 2021-11-30 13:40:06 -05:00
Jacob Fletcher
ce15725552 chore: bumps payload to v0.13.6 2021-11-30 13:37:36 -05:00
Jacob Fletcher
158920e57b fix: type errors 2021-11-30 11:12:47 -05:00
Jacob Fletcher
68580869ff chore: migrates payload to v0.13.5 2021-11-30 11:04:08 -05:00
Jacob Fletcher
31e0cbdce7 feat: refines seo descriptions 2021-11-19 12:15:15 -05:00
Jacob Fletcher
fc02b933bb feat: renames meta plugin to seo 2021-11-17 17:55:25 -05:00
James
6b436d38e1 fix: bug with breadcrumbs 2021-10-18 11:42:29 -04:00
James
ae93006446 chore: revises logs 2021-10-07 19:59:17 -04:00
James
fc722573bf chore: logging 2021-10-07 19:18:49 -04:00
James
3fdf23a1a0 fix: misc bugs with data safety 2021-09-15 17:47:12 -04:00
James
b72ba7fe86 feat: resaves page after create to properly generate breadcrumb 2021-09-14 11:47:17 -04:00
James
3dd777343b fix: ensures id is passed through to populateBreadcrumbs 2021-09-14 11:42:17 -04:00
Elliot DeNolf
8403f8ac2a 0.2.0 2021-09-10 17:36:01 -04:00
Elliot DeNolf
df0d4fa726 fix: proper format for server.js files 2021-09-10 17:31:14 -04:00
Elliot DeNolf
2a4bb5a11d fix: add script with shebang 2021-09-10 17:09:45 -04:00
Elliot DeNolf
2b6c5e42b5 feat: only include dist/ and package.json 2021-09-10 17:01:50 -04:00
Elliot DeNolf
a1a4765a94 refactor: rewrite in typescript (#7) 2021-09-10 16:56:37 -04:00
James
f1f7592eb2 fix: big rip 2021-09-08 20:30:21 -04:00
James
3816589e8b fix: restricts depth to 0 in search sync ops 2021-09-08 20:15:11 -04:00
James
ba70b8065e feat: improves breadcrumbs performance 2021-09-08 19:01:05 -04:00
James
9b88a47a47 feat: attempts to optimize breadcrumbs 2021-09-01 18:14:18 -04:00
James
9a747bc1eb feat: adds alerts 2021-09-01 13:42:28 -04:00
James
f82723ef33 fix: reverts plugin back to beforeRead 2021-08-31 12:49:19 -04:00
James
897f7be0f7 feat: adds author and improves breadcrumbs 2021-08-31 12:43:09 -04:00
James
80f6c7ebe1 fix: cleans breadcrumb types 2021-08-31 12:33:53 -04:00
James
9da4151642 fix: breadcrumbs plugin beforeChange 2021-08-31 12:31:38 -04:00
James
b89cbe5715 fix: breadcrumbs, fullTitle, subsite 2021-08-30 17:08:56 -04:00
James
32a69f8f36 fix: form builder types 2021-08-27 11:48:06 -04:00
James
b398a92db4 fix: who can say 2021-08-26 17:21:24 -04:00
James
3c58e51d17 feat: extends form builder plugin 2021-08-26 17:07:45 -04:00
James
6e2f43394d feat: adds title to forms 2021-08-03 14:29:34 -04:00
James
725a1d35ef feat: revises breadcrumbs and subsites to rely on depth properly 2021-08-02 22:01:58 -04:00
James
2a2a2e3a2f feat: builds breadcrumbs plugin 2021-08-02 21:08:01 -04:00
James
2fbfb5d305 feat: builds breadcrumbs plugin 2021-08-02 21:08:01 -04:00
James
eeecbbedb6 feat: builds form builder plugin 2021-07-29 08:25:20 -04:00
Elliot DeNolf
64d0bc7a16 0.1.22 2021-06-01 14:02:24 -04:00
Elliot DeNolf
b1fb43baf5 fix: remove optional chaining 2021-06-01 14:01:26 -04:00
Elliot DeNolf
bb309ca843 0.1.21 2021-05-11 23:21:21 -04:00
Elliot DeNolf
760662263f feat: tag package manager 2021-05-11 23:18:45 -04:00
Elliot DeNolf
bce5205cf1 Merge pull request #6 from payloadcms/fix/node-16-npm-peer-dependencies
fix: workaround for npm install peer dependency on node 16
2021-05-06 21:24:48 -04:00
Dan Ribbens
0b21726af6 fix: workaround for npm install peer dependency on node 16 2021-05-06 13:19:53 -04:00
Elliot DeNolf
04a7d256c5 0.1.20 2021-04-29 13:44:34 -04:00
Elliot DeNolf
8a9915b58a Merge pull request #5 from payloadcms/sentry 2021-04-29 13:44:09 -04:00
Elliot DeNolf
820e867804 feat: add payload_version tag 2021-04-29 13:33:32 -04:00
Elliot DeNolf
699314a781 feat: add sentry 2021-04-28 15:43:51 -04:00
Elliot DeNolf
86552e62ff 0.1.19 2021-04-19 11:17:53 -04:00
Elliot DeNolf
13769d3cdc feat: remove all explicit labels 2021-04-19 11:17:26 -04:00
Elliot DeNolf
158ae0de30 chore: add package.json descriptions 2021-04-19 10:43:42 -04:00
Elliot DeNolf
04056513d7 0.1.18 2021-04-06 23:06:50 -04:00
Elliot DeNolf
2b7e6dda2f feat: add blank templates 2021-04-06 23:06:25 -04:00
Elliot DeNolf
b11464542a 0.1.17 2021-04-01 09:54:07 -04:00
Elliot DeNolf
b97568f394 chore: add jsx property to ts templates 2021-04-01 09:41:38 -04:00
Elliot DeNolf
18e8839b8c 0.1.16 2021-02-04 22:44:45 -05:00
Elliot DeNolf
f5e5bfae81 chore: update README 2021-02-04 22:44:23 -05:00
Elliot DeNolf
b27ab75e07 Merge pull request #4 from payloadcms/feature/project-name-first-argument 2021-02-04 22:42:50 -05:00
Elliot DeNolf
5799e4015f Merge pull request #3 from payloadcms/feature/compatible-package-dependency-version
feat: create project use compatible version of payload dependency
2021-02-04 22:42:38 -05:00
Dan Ribbens
2f72ed78e1 feat: set the project name from first argument 2021-02-04 15:24:21 -05:00
Dan Ribbens
5f3f038a6b feat: create project use compatible version of payload dependency 2021-02-04 15:01:30 -05:00
Elliot DeNolf
5b29852c0a 0.1.15 2021-01-26 14:43:57 -05:00
Elliot DeNolf
9616e43035 fix: adjust verbiage for spinner and others 2021-01-26 12:32:49 -05:00
Elliot DeNolf
b918425e72 fix: mask encryption key input 2021-01-26 12:32:16 -05:00
Elliot DeNolf
9ed5f5b6fc feat: validate template before asking for project name 2021-01-19 14:23:09 -05:00
Elliot DeNolf
1721d118a8 feat: prompt language and show/validate template names 2021-01-19 10:51:25 -05:00
Elliot DeNolf
8dc400c65a refactor: rename template directories 2021-01-19 10:20:10 -05:00
Elliot DeNolf
a5ac793443 0.1.14 2021-01-18 18:47:54 -05:00
Elliot DeNolf
8d6d995d78 chore: missing comment 2021-01-18 18:46:14 -05:00
Elliot DeNolf
4652255d4f feat: add admin settings to todos 2021-01-18 18:44:54 -05:00
Elliot DeNolf
a274f2e5ca fix: simplify user for todo template 2021-01-18 18:38:29 -05:00
Elliot DeNolf
ed4528096a Merge pull request #2 from payloadcms/blog-template 2021-01-18 18:29:09 -05:00
Elliot DeNolf
f7946af404 feat: add blog template 2021-01-18 18:23:36 -05:00
Elliot DeNolf
26ead270a2 feat: add beforeRead hook for user 2021-01-18 16:19:29 -05:00
Elliot DeNolf
c45c784c58 feat: update blog access 2021-01-18 16:02:14 -05:00
Elliot DeNolf
6b6977cc00 feat: add blog-typescript template 2021-01-18 15:34:46 -05:00
Elliot DeNolf
41a6abd2e4 feat: retrieve latest payload and put into package.json 2021-01-18 14:45:47 -05:00
Elliot DeNolf
d59ccc0f34 0.1.13 2021-01-16 23:55:53 -05:00
Elliot DeNolf
870946d01b fix: handle if no yarn 2021-01-16 23:52:41 -05:00
Elliot DeNolf
3bf68ef9d4 0.1.12 2021-01-16 21:40:57 -05:00
Elliot DeNolf
60d7d51a0a chore: payload version 0.1.145 2021-01-16 21:40:52 -05:00
Elliot DeNolf
61deb2c873 0.1.11 2021-01-16 10:35:37 -05:00
Elliot DeNolf
0ae27d4212 0.1.10 2021-01-16 10:26:56 -05:00
Elliot DeNolf
3c96622313 chore: payload version 0.1.144 2021-01-16 10:19:16 -05:00
Elliot DeNolf
8066ce6f49 feat: add auth and adjust access on Users 2021-01-16 10:16:56 -05:00
Elliot DeNolf
b7f9ffc51a feat: use explicit Users collection instead of default, rename Todo 2021-01-14 23:42:05 -05:00
Elliot DeNolf
4a873a5ae3 fix: nodemon configs 2021-01-14 22:36:29 -05:00
Elliot DeNolf
c080deb0b8 0.1.9 2021-01-14 09:35:22 -05:00
Elliot DeNolf
8cefa8181c chore: payload version 0.1.143 2021-01-14 09:34:48 -05:00
Elliot DeNolf
a34dd651b1 0.1.8 2021-01-13 10:09:23 -05:00
Elliot DeNolf
a86041836f feat: better messaging for encryption key 2021-01-13 10:08:01 -05:00
Elliot DeNolf
6dbd760a2e 0.1.7 2021-01-09 10:51:00 -05:00
Elliot DeNolf
4181a84e9b feat: log admin url to console 2021-01-09 10:50:49 -05:00
Elliot DeNolf
b4d5168409 0.1.6 2021-01-09 01:36:45 -05:00
Elliot DeNolf
74756c0703 feat: add list name, task name, and output URLs to console 2021-01-09 01:35:34 -05:00
Elliot DeNolf
dce57d6fdd 0.1.5 2021-01-08 09:29:01 -05:00
Dan Ribbens
d55df67642 fix: create typescript project use cross-env for windows support for payload config path 2021-01-06 14:12:55 -05:00
Elliot DeNolf
769d9063d5 0.1.3 2021-01-05 19:13:44 -05:00
Elliot DeNolf
8f95a23df9 0.1.2 2021-01-05 19:13:36 -05:00
Elliot DeNolf
9816c33015 fix: template path 2021-01-05 19:11:37 -05:00
Elliot DeNolf
1d14c976f2 0.1.1 2021-01-05 19:07:57 -05:00
Elliot DeNolf
63c436e0ac fix: add shebang 2021-01-05 19:07:50 -05:00
Elliot DeNolf
a4700d7a9d 0.1.0 2021-01-05 19:04:48 -05:00
Elliot DeNolf
e5a1fe0771 chore: MIT license 2021-01-05 19:04:27 -05:00
Elliot DeNolf
b101ff86a9 feat: move cli inside bin 2021-01-05 19:03:20 -05:00
Elliot DeNolf
0c5a6044a0 feat: welcome message and better help 2021-01-05 19:00:50 -05:00
Elliot DeNolf
6fc7c0b9ad fix: js and ts template fixes 2021-01-05 18:45:22 -05:00
Elliot DeNolf
9459e82161 chore: bump payload and adjust tsconfig.json 2021-01-05 16:53:23 -05:00
Elliot DeNolf
62501eb3b8 feat: bump payload version 2021-01-05 14:44:44 -05:00
Elliot DeNolf
df000b7508 feat: add build script and update payload package 2021-01-05 13:59:53 -05:00
Elliot DeNolf
c04bde6725 feat: better header and messages 2020-12-28 21:55:04 -05:00
Elliot DeNolf
1fe8ae39cb feat: add nodemon to all templates 2020-12-28 20:43:13 -05:00
Elliot DeNolf
e2049b9564 feat: add typescript template 2020-12-28 20:29:38 -05:00
Elliot DeNolf
49d9836ab4 chore: remove unused dependencies 2020-12-28 16:16:55 -05:00
Elliot DeNolf
4ed38575bf feat: add --use-npm flag 2020-12-28 16:15:31 -05:00
Elliot DeNolf
ef166cd70d feat: write db uri and secret to .env file 2020-12-28 02:54:16 -05:00
Elliot DeNolf
d45665f092 feat: cross-platform symbols and success message formatting 2020-12-27 23:29:08 -05:00
Elliot DeNolf
10bae6dab7 feat: better messaging and documentation links 2020-12-27 23:00:38 -05:00
Elliot DeNolf
ad25c86fdd chore: add package.json name 2020-12-27 21:32:19 -05:00
Elliot DeNolf
f064ff35f3 fix: remove --name requirement 2020-12-27 21:32:05 -05:00
Elliot DeNolf
55b44b41bf feat: add help message and README 2020-12-27 21:25:14 -05:00
Elliot DeNolf
1f3e9b22f4 feat: initial commit 2020-12-27 21:03:19 -05:00
5267 changed files with 377573 additions and 161329 deletions

View File

@@ -19,3 +19,11 @@ indent_size = 2
[*.mdx]
indent_style = space
indent_size = 2
[*.json]
indent_style = space
indent_size = 2
[*.md]
indent_style = space
indent_size = 2

10
.eslintignore Normal file
View File

@@ -0,0 +1,10 @@
.tmp
**/.git
**/.hg
**/.pnp.*
**/.svn
**/.yarn/**
**/build
**/dist/**
**/node_modules
**/temp

View File

@@ -1,104 +1,38 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'@typescript-eslint',
],
extends: [
'./eslint-config',
],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
extends: ['@payloadcms'],
overrides: [
{
files: ['test/**/int.spec.ts'],
rules: {
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/consistent-type-imports': 'warn',
'jest/prefer-strict-equal': 'off',
}
extends: ['plugin:@typescript-eslint/disable-type-checked'],
files: ['*.js', '*.cjs', '*.json', '*.md', '*.yml', '*.yaml'],
},
{
files: ['test/**/e2e.spec.ts'],
extends: [
'plugin:playwright/playwright-test'
],
files: ['packages/eslint-config-payload/**'],
rules: {
'jest/consistent-test-it': 'off',
'jest/require-top-level-describe': 'off',
'jest/no-test-callback': 'off',
'jest/prefer-strict-equal': 'off',
'jest/expect-expect': 'off',
'jest-dom/prefer-to-have-attribute': 'off',
}
},
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
extends: [
'plugin:@typescript-eslint/recommended',
],
rules: {
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'import/no-unresolved': [
2,
{
ignore: [
'payload-config',
'payload/generated-types',
],
},
],
'perfectionist/sort-objects': 'off',
},
},
{
files: ['*.spec.ts'],
files: ['package.json', 'tsconfig.json'],
rules: {
'@typescript-eslint/no-use-before-define': 'off',
},
},
{
files: ['*.e2e.ts'],
rules: {
'@typescript-eslint/no-use-before-define': 'off',
'jest/expect-expect': 'off',
'perfectionist/sort-array-includes': 'off',
'perfectionist/sort-astro-attributes': 'off',
'perfectionist/sort-classes': 'off',
'perfectionist/sort-enums': 'off',
'perfectionist/sort-exports': 'off',
'perfectionist/sort-imports': 'off',
'perfectionist/sort-interfaces': 'off',
'perfectionist/sort-jsx-props': 'off',
'perfectionist/sort-keys': 'off',
'perfectionist/sort-maps': 'off',
'perfectionist/sort-named-exports': 'off',
'perfectionist/sort-named-imports': 'off',
'perfectionist/sort-object-types': 'off',
'perfectionist/sort-objects': 'off',
'perfectionist/sort-svelte-attributes': 'off',
'perfectionist/sort-union-types': 'off',
'perfectionist/sort-vue-attributes': 'off',
},
},
],
rules: {
'import/no-extraneous-dependencies': ['error', { packageDir: './' }],
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'import/prefer-default-export': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/no-unused-prop-types': 'off',
'no-console': 'warn',
'no-sparse-arrays': 'off',
'no-underscore-dangle': 'off',
'no-use-before-define': 'off',
'arrow-body-style': 0,
'@typescript-eslint/no-use-before-define': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
};
root: true,
}

18
.git-blame-ignore-revs Normal file
View File

@@ -0,0 +1,18 @@
# lint and format
ae7d6f97d205491390f15850e5104c7abded1550
1fbda85cd04a774cb978778b0f813001664c53dd
# prettier all templates
75a428ddc4672903455998eaba7ae9f9d710bf85
# re-run prettier and eslint everywhere again
cdaa0acd61d3001407609915bd573b78565d5571
# prettier write again
dfac7395fed95fc5d8ebca21b786ce70821942bb
# lint and format plugin-cloud
fb7d1be2f3325d076b7c967b1730afcef37922c2
# lint and format create-payload-app
5fd3d430001efe86515262ded5e26f00c1451181

50
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,50 @@
# Order matters. The last matching pattern takes precedence.
### Catch-all ###
* @denolfe @jmikrut @DanRibbens
.* @denolfe @jmikrut @DanRibbens
### Core ###
/packages/payload/ @denolfe @jmikrut @DanRibbens
/packages/payload/src/uploads/ @denolfe
/packages/payload/src/admin/ @jmikrut @jacobsfletch @JarrodMFlesch
### Adapters ###
/packages/bundler-*/ @denolfe @jmikrut @DanRibbens @JarrodMFlesch
/packages/db-*/ @denolfe @jmikrut @DanRibbens
/packages/richtext-*/ @denolfe @jmikrut @DanRibbens @AlessioGr
### Plugins ###
/packages/plugin-*/ @denolfe @jmikrut @DanRibbens @jacobsfletch @JarrodMFlesch @AlessioGr
/packages/plugin-cloud*/ @denolfe
/packages/plugin-form-builder/ @jacobsfletch
/packages/plugin-live-preview*/ @jacobsfletch
/packages/plugin-nested-docs/ @jacobsfletch
/packages/plugin-password-protection/ @jmikrut
/packages/plugin-redirects/ @jacobsfletch
/packages/plugin-search/ @jacobsfletch
/packages/plugin-sentry/ @JessChowdhury
/packages/plugin-seo/ @jacobsfletch
/packages/plugin-stripe/ @jacobsfletch
/packages/plugin-zapier/ @JarrodMFlesch
### Examples ###
/examples/ @jacobsfletch
/examples/testing/ @JarrodMFlesch
/examples/email/ @JessChowdhury
/examples/whitelabel/ @JessChowdhury
### Templates ###
/templates/ @jacobsfletch
/templates/blank/ @denolfe
### Misc ###
/packages/create-payload-app/ @denolfe
/packages/eslint-config-payload/ @denolfe
/packages/payload-admin-bar/ @jacobsfletch
### Root ###
/package.json @denolfe
/scripts/ @denolfe
/.github/ @denolfe
/.github/CODEOWNERS @denolfe

View File

@@ -1,6 +1,6 @@
name: Bug Report
description: Create a bug report for Payload
labels: ["possible-bug"]
labels: ['[possible-bug]']
body:
- type: markdown
attributes:
@@ -10,7 +10,12 @@ body:
id: reproduction-link
attributes:
label: Link to reproduction
description: Please add a link to a reproduction. See the fork [reproduction-guide](https://github.com/payloadcms/payload/blob/master/.github/reproduction-guide.md) for more information.
description: Want us to look into your issue faster? Follow the [reproduction-guide](https://github.com/payloadcms/payload/blob/main/.github/reproduction-guide.md) for more information.
validations:
required: false
- type: textarea
attributes:
label: Describe the Bug
validations:
required: true
- type: textarea
@@ -19,11 +24,6 @@ body:
description: Steps to reproduce the behavior, please provide a clear description of how to reproduce the issue, based on the linked minimal reproduction. Screenshots can be provided in the issue body below. If using code blocks, make sure that [syntax highlighting is correct](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) and double check that the rendered preview is not broken.
validations:
required: true
- type: textarea
attributes:
label: Describe the Bug
validations:
required: true
- type: input
id: version
attributes:
@@ -31,6 +31,11 @@ body:
description: What version of Payload are you running?
validations:
required: true
- type: input
id: adapters-plugins
attributes:
label: Adapters and Plugins
description: What adapters and plugins are you using? ie. db-mongodb, db-postgres, bundler-webpack, etc.
- type: markdown
attributes:
value: Before submitting the issue, go through the steps you've written down to make sure the steps provided are detailed and clear.

View File

@@ -2,15 +2,18 @@
<!-- Please include a summary of the pull request and any related issues it fixes. Please also include relevant motivation and context. -->
- [ ] I have read and understand the CONTRIBUTING.md document in this repository
- [ ] I have read and understand the [CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md) document in this repository.
## Type of change
<!-- Please delete options that are not relevant. -->
- [ ] Chore (non-breaking change which does not add functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Change to the [templates](https://github.com/payloadcms/payload/tree/main/templates) directory (does not affect core functionality)
- [ ] Change to the [examples](https://github.com/payloadcms/payload/tree/main/examples) directory (does not affect core functionality)
- [ ] This change requires a documentation update
## Checklist:

View File

@@ -1,14 +1,16 @@
# Reproduction Guide
1. [fork](https://github.com/payloadcms/payload/fork) this repo
2. run `yarn` to install dependencies
3. open up the `test/_community` directory
4. add any necessary `collections/globals/fields` in this directory to recreate the issue you are experiencing
5. run `yarn dev _community` to start the admin panel
1. [Fork](https://github.com/payloadcms/payload/fork) this repo
2. Optionally, create a new branch for your reproduction
3. Run `pnpm install` to install dependencies
4. Open up the `test/_community` directory
5. Add any necessary `collections/globals/fields` in this directory to recreate the issue you are experiencing
6. Run `pnpm dev _community` to start the admin panel
**NOTE:** The goal is to isolate the problem by reducing the number of `collections/globals/fields` you add to the `test/_community` folder. This folder is _not_ meant for you to copy your project into, but rather recreate the issue you are experiencing with minimal config.
## Example test directory file tree
```text
.
├── config.ts
@@ -20,39 +22,43 @@
- `config.ts` - This is the _granular_ Payload config for testing. It should be as lightweight as possible. Reference existing configs for an example
- `int.spec.ts` [Optional] - This is the test file run by jest. Any test file must have a `*int.spec.ts` suffix.
- `e2e.spec.ts` [Optional] - This is the end-to-end test file that will load up the admin UI using the above config and run Playwright tests.
- `payload-types.ts` - Generated types from `config.ts`. Generate this file by running `yarn dev:generate-types _community`.
- `payload-types.ts` - Generated types from `config.ts`. Generate this file by running `pnpm dev:generate-types _community`.
The directory split up in this way specifically to reduce friction when creating tests and to add the ability to boot up Payload with that specific config. You should modify the files in `test/_community` to get started.
<br />
## Testing is optional but encouraged
An issue does not need to have failing tests — reproduction steps with your forked repo are enough at this point. Some people like to dive deeper and we want to give you the guidance/tools to do so. Read more below:
### Running integration tests (Payload API tests)
First install [Jest Runner for VSVode](https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner).
There are a couple ways run integration tests:
- **Granularly** - you can run individual tests in vscode by installing the Jest Runner plugin and using that to run individual tests. Clicking the `debug` button will run the test in debug mode allowing you to set break points.
<img src="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/github/int-debug.png" />
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/payload/src/admin/assets/images/github/int-debug.png" />
- **Manually** - you can run all int tests in the `/test/_community/int.spec.ts` file by running the following command:
```bash
yarn test:int _community
pnpm test:int _community
```
### Running E2E tests (Admin Panel UI tests)
The easiest way to run E2E tests is to install
- [Playwright Test for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright)
- [Playwright Runner](https://marketplace.visualstudio.com/items?itemName=ortoni.ortoni)
Once they are installed you can open the `testing` tab in vscode sidebar and drill down to the test you want to run, i.e. `/test/_community/e2e.spec.ts`
<img src="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/github/e2e-debug.png" />
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/packages/payload/src/admin/assets/images/github/e2e-debug.png" />
#### Notes
- It is recommended to add the test credentials (located in `test/credentials.ts`) to your autofill for `localhost:3000/admin` as this will be required on every nodemon restart. The default credentials are `dev@payloadcms.com` as email and `test` as password.
The default credentials are `dev@payloadcms.com` as email and `test` as password. They can be found in `test/credentials.ts`. By default, these will be autofilled, so no log-in is required.

336
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,336 @@
name: build
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: ['main']
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
needs_build: ${{ steps.filter.outputs.needs_build }}
templates: ${{ steps.filter.outputs.templates }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 25
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
needs_build:
- '.github/workflows/**'
- 'packages/**'
- 'test/**'
- 'pnpm-lock.yaml'
- 'package.json'
templates:
- 'templates/**'
- name: Log all filter results
run: |
echo "needs_build: ${{ steps.filter.outputs.needs_build }}"
echo "templates: ${{ steps.filter.outputs.templates }}"
core-build:
needs: changes
if: ${{ needs.changes.outputs.needs_build == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 25
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
- run: pnpm install
- run: pnpm run build
- name: Cache build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
tests:
runs-on: ubuntu-latest
needs: core-build
strategy:
fail-fast: false
matrix:
database: [mongoose, postgres, supabase]
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: payloadtests
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
- name: Start PostgreSQL
uses: CasperWA/postgresql-action@v1.2
with:
postgresql version: '14' # See https://hub.docker.com/_/postgres for available versions
postgresql db: ${{ env.POSTGRES_DB }}
postgresql user: ${{ env.POSTGRES_USER }}
postgresql password: ${{ env.POSTGRES_PASSWORD }}
if: matrix.database == 'postgres'
- name: Install Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest
if: matrix.database == 'supabase'
- name: Initialize Supabase
run: |
supabase init
supabase start
if: matrix.database == 'supabase'
- name: Wait for PostgreSQL
run: sleep 30
if: matrix.database == 'postgres'
- name: Configure PostgreSQL
run: |
psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "CREATE ROLE runner SUPERUSER LOGIN;"
psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "SELECT version();"
echo "POSTGRES_URL=postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" >> $GITHUB_ENV
if: matrix.database == 'postgres'
- name: Configure Supabase
run: |
echo "POSTGRES_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres" >> $GITHUB_ENV
if: matrix.database == 'supabase'
- name: Component Tests
run: pnpm test:components
- name: Integration Tests
run: pnpm test:int
env:
NODE_OPTIONS: --max-old-space-size=8096
PAYLOAD_DATABASE: ${{ matrix.database }}
POSTGRES_URL: ${{ env.POSTGRES_URL }}
tests-e2e:
runs-on: ubuntu-latest
needs: core-build
strategy:
fail-fast: false
matrix:
part: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8]
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
- name: E2E Tests
uses: nick-fields/retry@v2
with:
retry_on: error
max_attempts: 2
timeout_minutes: 15
command: pnpm test:e2e --part ${{ matrix.part }} --bail
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: test-results/
retention-days: 1
tests-type-generation:
runs-on: ubuntu-latest
needs: core-build
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
- name: Generate Payload Types
run: pnpm dev:generate-types fields
- name: Generate GraphQL schema file
run: pnpm dev:generate-graphql-schema graphql-schema-gen
build-packages:
runs-on: ubuntu-latest
needs: core-build
strategy:
fail-fast: false
matrix:
pkg:
- db-mongodb
- db-postgres
- bundler-webpack
- bundler-vite
- richtext-slate
- richtext-lexical
- live-preview
- live-preview-react
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
- name: Build ${{ matrix.pkg }}
run: pnpm turbo run build --filter=${{ matrix.pkg }}
plugins:
runs-on: ubuntu-latest
needs: core-build
strategy:
fail-fast: false
matrix:
pkg:
- create-payload-app
- plugin-cloud
- plugin-cloud-storage
- plugin-form-builder
- plugin-nested-docs
- plugin-search
- plugin-sentry
- plugin-seo
steps:
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Restore build
uses: actions/cache@v3
with:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}
- name: Build ${{ matrix.pkg }}
run: pnpm turbo run build --filter=${{ matrix.pkg }}
- name: Test ${{ matrix.pkg }}
run: pnpm --filter ${{ matrix.pkg }} run test
if: matrix.pkg != 'create-payload-app' # degit doesn't work within GitHub Actions
templates:
needs: changes
if: ${{ needs.changes.outputs.templates == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
template: [blank, website, ecommerce]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 25
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: 6.0
- name: Build Template
run: |
cd templates/${{ matrix.template }}
cp .env.example .env
yarn install
yarn build
yarn generate:types

View File

@@ -1,88 +0,0 @@
name: build
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: ["master"]
jobs:
build_yarn:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
scope: "@payloadcms"
always-auth: true
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: yarn
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: yarn build
- name: Component Tests
run: yarn test:components
- name: Integration Tests
run: yarn test:int
- name: Generate Payload Types
run: yarn dev:generate-types fields
- name: Generate GraphQL schema file
run: yarn dev:generate-graphql-schema graphql-schema-gen
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: E2E Tests
run: yarn test:e2e --bail
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: test-results/
retention-days: 30
install_npm:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
scope: "@payloadcms"
always-auth: true
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-${{ env.cache-name }}-
${{ runner.os }}-npm-
${{ runner.os }}-
- run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

215
.gitignore vendored
View File

@@ -1,13 +1,19 @@
coverage
package-lock.json
dist
.idea
test-results
/.idea/*
!/.idea/runConfigurations
# Created by https://www.gitignore.io/api/node,macos,windows,webstorm,sublimetext,visualstudiocode
test-results
.devcontainer
/migrations
# Created by https://www.toptal.com/developers/gitignore/api/node,macos,windows,webstorm,sublimetext,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=node,macos,windows,webstorm,sublimetext,visualstudiocode
### macOS ###
*.DS_Store
# General
.DS_Store
.AppleDouble
.LSOverride
@@ -30,6 +36,10 @@ Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
### Node ###
# Logs
logs
@@ -37,6 +47,11 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
@@ -49,11 +64,12 @@ lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
@@ -62,15 +78,18 @@ bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
@@ -78,6 +97,15 @@ typings/
# Optional eslint cache
.eslintcache
# Optional stylelint cache
.stylelintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
@@ -87,34 +115,87 @@ typings/
# Yarn Integrity file
.yarn-integrity
# Yarn Berry
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# vuepress v2.x temp and cache directory
.temp
# Docusaurus cache and generated files
.docusaurus
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
# dotenv environment variables file
.env
### Node Patch ###
# Serverless Webpack directories
.webpack/
# Optional stylelint cache
# SvelteKit build / generate output
.svelte-kit
### SublimeText ###
# cache files for sublime text
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# workspace files are user-specific
# Workspace files are user-specific
*.sublime-workspace
# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project
# sftp configuration file
# SFTP configuration file
sftp-config.json
sftp-config-alt*.json
# Package control specific files
Package Control.last-run
@@ -134,84 +215,53 @@ GitHub.sublime-settings
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
### WebStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
.ionide
# CMake
cmake-build-debug/
cmake-build-*/
# MongoDB Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
# File-based project format
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
out/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Ruby plugin and RubyMine
/.rakeTasks
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### WebStorm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
.idea/sonarlint
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
Desktop.ini
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
@@ -219,26 +269,13 @@ $RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# End of https://www.gitignore.io/api/node,macos,windows,webstorm,sublimetext,visualstudiocode
# End of https://www.toptal.com/developers/gitignore/api/node,macos,windows,webstorm,sublimetext,visualstudiocode
# Ignore all uploads
demo/upload
demo/media
demo/files
# Ignore build folder
build
# Ignore built components
components/index.js
components/styles.css
# Ignore generated
demo/generated-types.ts
demo/generated-schema.graphql
/build

4
.husky/pre-commit Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm run lint-staged --quiet

View File

@@ -0,0 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Dev Fields" type="NodeJSConfigurationType" application-parameters="fields" path-to-js-file="node_modules/.pnpm/nodemon@3.0.1/node_modules/nodemon/bin/nodemon.js" working-dir="$PROJECT_DIR$">
<method v="2" />
</configuration>
</component>

View File

@@ -0,0 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Dev _community" type="NodeJSConfigurationType" application-parameters="_community" path-to-js-file="node_modules/.pnpm/nodemon@3.0.1/node_modules/nodemon/bin/nodemon.js" working-dir="$PROJECT_DIR$">
<method v="2" />
</configuration>
</component>

View File

@@ -1 +1 @@
v16.14.2
v18.17.1

2
.npmrc Normal file
View File

@@ -0,0 +1,2 @@
symlink=true
node-linker=isolated # due to a typescript bug, isolated mode requires @types/express-serve-static-core, terser and monaco-editor to be installed https://github.com/microsoft/TypeScript/issues/47663#issuecomment-1519138189 along with two other changes in the code which I've marked with (tsbugisolatedmode) in the code

2
.nvmrc
View File

@@ -1 +1 @@
v16.14.2
v18.17.1

11
.prettierignore Normal file
View File

@@ -0,0 +1,11 @@
.tmp
**/.git
**/.hg
**/.pnp.*
**/.svn
**/.yarn/**
**/build
**/dist/**
**/node_modules
**/temp
**/docs/**

6
.prettierrc.json Normal file
View File

@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"semi": false
}

View File

@@ -1,22 +0,0 @@
{
"verbose": true,
"git": {
"commitMessage": "chore(release): v${version}",
"requireCleanWorkingDir": true
},
"github": {
"release": true
},
"npm": {
"skipChecks": true
},
"hooks": {
"before:init": ["yarn", "yarn clean", "yarn test"]
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular",
"infile": "CHANGELOG.md"
}
}
}

16
.release-it.pre.js Normal file
View File

@@ -0,0 +1,16 @@
module.exports = {
verbose: true,
git: {
requireCleanWorkingDir: false,
commit: false,
push: false,
tag: false,
},
npm: {
skipChecks: true,
tag: 'beta',
},
hooks: {
'before:init': ['pnpm install', 'pnpm clean', 'pnpm build'],
},
}

View File

@@ -1,25 +0,0 @@
{
"verbose": true,
"git": {
"requireCleanWorkingDir": false,
"commit": false,
"push": false,
"tag": false
},
"github": {
"release": true
},
"npm": {
"skipChecks": true,
"tag": "canary"
},
"hooks": {
"before:init": ["yarn", "yarn clean", "yarn test"]
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular",
"infile": "CHANGELOG.md"
}
}
}

3
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}

180
.vscode/launch.json vendored
View File

@@ -1,22 +1,184 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"command": "yarn run dev _community",
"command": "pnpm run dev _community",
"cwd": "${workspaceFolder}",
"name": "Run Dev Community",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}"
"type": "node-terminal"
},
{
"command": "yarn run dev fields",
"name": "Run Dev Fields",
"command": "pnpm run dev plugin-cloud-storage",
"cwd": "${workspaceFolder}",
"name": "Run Dev - plugin-cloud-storage",
"request": "launch",
"type": "node-terminal",
"cwd": "${workspaceFolder}"
"env": {
"PAYLOAD_PUBLIC_CLOUD_STORAGE_ADAPTER": "s3"
}
},
]
{
"command": "pnpm run dev fields",
"cwd": "${workspaceFolder}",
"name": "Run Dev Fields",
"request": "launch",
"type": "node-terminal"
},
{
"command": "pnpm run dev:postgres fields",
"cwd": "${workspaceFolder}",
"name": "Run Dev Postgres",
"request": "launch",
"type": "node-terminal"
},
{
"command": "pnpm run dev versions",
"cwd": "${workspaceFolder}",
"name": "Run Dev Versions",
"request": "launch",
"type": "node-terminal"
},
{
"command": "pnpm run dev localization",
"cwd": "${workspaceFolder}",
"name": "Run Dev Localization",
"request": "launch",
"type": "node-terminal"
},
{
"command": "pnpm run dev uploads",
"cwd": "${workspaceFolder}",
"name": "Run Dev Uploads",
"request": "launch",
"type": "node-terminal"
},
{
"command": "PAYLOAD_BUNDLER=vite pnpm run dev fields",
"cwd": "${workspaceFolder}",
"name": "Run Dev Fields (Vite)",
"request": "launch",
"type": "node-terminal",
"env": {
"NODE_ENV": "production"
}
},
{
"command": "pnpm run test:int live-preview",
"cwd": "${workspaceFolder}",
"name": "Live Preview Int Tests",
"request": "launch",
"type": "node-terminal"
},
{
"command": "pnpm run test:int plugin-search",
"cwd": "${workspaceFolder}",
"name": "Search Plugin Int Tests",
"request": "launch",
"type": "node-terminal"
},
{
"command": "ts-node ./packages/payload/src/bin/index.ts build",
"env": {
"PAYLOAD_CONFIG_PATH": "test/fields/config.ts",
"PAYLOAD_BUNDLER": "vite",
"DISABLE_SWC": "true" // SWC messes up debugging the bin scripts
},
"name": "Build CLI - Vite",
"outputCapture": "std",
"request": "launch",
"type": "node-terminal"
},
{
"command": "ts-node ./packages/payload/src/bin/index.ts build",
"env": {
"PAYLOAD_CONFIG_PATH": "test/fields/config.ts",
"PAYLOAD_ANALYZE_BUNDLE": "true",
"DISABLE_SWC": "true" // SWC messes up debugging the bin scripts
},
"name": "Build CLI - Webpack",
"outputCapture": "std",
"request": "launch",
"type": "node-terminal"
},
{
"command": "ts-node ./packages/payload/src/bin/index.ts generate:types",
"env": {
"PAYLOAD_CONFIG_PATH": "test/_community/config.ts",
"DISABLE_SWC": "true" // SWC messes up debugging the bin scripts
},
"name": "Generate Types CLI",
"outputCapture": "std",
"request": "launch",
"type": "node-terminal"
},
{
"command": "ts-node ./packages/payload/src/bin/index.ts migrate:status",
"env": {
"PAYLOAD_CONFIG_PATH": "test/migrations-cli/config.ts",
"PAYLOAD_DATABASE": "postgres",
"DISABLE_SWC": "true" // SWC messes up debugging the bin scripts
// "PAYLOAD_DROP_DATABASE": "true",
},
"name": "Migrate CLI - status",
"outputCapture": "std",
"request": "launch",
"type": "node-terminal"
},
{
"command": "ts-node ./packages/payload/src/bin/index.ts migrate:create yass",
"env": {
"PAYLOAD_CONFIG_PATH": "test/migrations-cli/config.ts",
"PAYLOAD_DATABASE": "postgres",
"DISABLE_SWC": "true" // SWC messes up debugging the bin scripts
// "PAYLOAD_DROP_DATABASE": "true",
},
"name": "Migrate CLI - create",
"outputCapture": "std",
"request": "launch",
"type": "node-terminal"
},
{
"command": "ts-node ./packages/payload/src/bin/index.ts migrate:down",
"env": {
"PAYLOAD_CONFIG_PATH": "test/migrations-cli/config.ts",
"PAYLOAD_DATABASE": "mongoose",
"DISABLE_SWC": "true" // SWC messes up debugging the bin scripts
// "PAYLOAD_DROP_DATABASE": "true",
},
"name": "Migrate CLI - down",
"outputCapture": "std",
"request": "launch",
"type": "node-terminal"
},
{
"command": "ts-node ./packages/payload/src/bin/index.ts migrate:reset",
"env": {
"PAYLOAD_CONFIG_PATH": "test/migrations-cli/config.ts",
"PAYLOAD_DATABASE": "mongoose",
"DISABLE_SWC": "true" // SWC messes up debugging the bin scripts
// "PAYLOAD_DROP_DATABASE": "true",
},
"name": "Migrate CLI - reset",
"outputCapture": "std",
"request": "launch",
"type": "node-terminal"
},
{
"command": "ts-node ./packages/payload/src/bin/index.ts migrate:refresh",
"env": {
"PAYLOAD_CONFIG_PATH": "test/migrations-cli/config.ts",
"PAYLOAD_DATABASE": "mongoose",
"DISABLE_SWC": "true" // SWC messes up debugging the bin scripts
// "PAYLOAD_DROP_DATABASE": "true",
},
"name": "Migrate CLI - refresh",
"outputCapture": "std",
"request": "launch",
"type": "node-terminal"
}
],
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0"
}

39
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,39 @@
{
"npm.packageManager": "pnpm",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"editor.formatOnSaveMode": "file",
// All ESLint rules to 'warn' to differentate from TypeScript's 'error' level
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
"typescript.tsdk": "node_modules/typescript/lib",
// Load .git-blame-ignore-revs file
"gitlens.advanced.blame.customArguments": ["--ignore-revs-file", ".git-blame-ignore-revs"]
}

File diff suppressed because it is too large Load Diff

124
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,124 @@
# Contributing to Payload
Below you'll find a set of guidelines for how to contribute to Payload.
## Opening issues
Before you submit an issue, please check all existing [open and closed issues](https://github.com/payloadcms/payload/issues) to see if your issue has previously been resolved or is already known. If there is already an issue logged, feel free to upvote it by adding a :thumbsup: [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). If you would like to submit a new issue, please fill out our Issue Template to the best of your ability so we can accurately understand your report.
## Security issues & vulnerabilities
If you come across an issue related to security, or a potential attack vector within Payload or one of its dependencies, please DO NOT create a publicly viewable issue. Instead, please contact us directly at [`dev@payloadcms.com`](mailto:dev@payloadcms.com). We will do everything we can to respond to the issue as soon as possible.
If you find a vulnerability within the core Payload repository, and we determine that it is remediable and of significant nature, we will be happy to pay you a reward for your findings and diligence. [`Contact us`](mailto:dev@payloadcms.com) to find out more.
## Documentation edits
Payload documentation can be found directly within its codebase, and you can feel free to make changes / improvements to any of it through opening a PR. We utilize these files directly in our website and will periodically deploy documentation updates as necessary.
## Building additional features
If you're an incredibly awesome person and want to help us make Payload even better through new features or additions, we would be thrilled to work with you.
## Design Contributions
When it comes to design-related changes or additions, it's crucial for us to ensure a cohesive user experience and alignment with our broader design vision. Before embarking on any implementation that would affect the design or UI/UX, we ask that you **first share your design proposal** with us for review and approval.
Our design review ensures that proposed changes fit seamlessly with other components, both existing and planned. This step is meant to prevent unintentional design inconsistencies and to save you from investing time in implementing features that might need significant design alterations later.
### Before Starting
To help us work on new features, you can create a new feature request post in [GitHub Discussion](https://github.com/payloadcms/payload/discussions) or discuss it in our [Discord](https://discord.com/invite/payload). New functionality often has large implications across the entire Payload repo, so it is best to discuss the architecture and approach before starting work on a pull request.
### Installation & Requirements
Payload is structured as a Monorepo, encompassing not only the core Payload platform but also various plugins and packages. To install all required dependencies, you have to run `pnpm install` once in the root directory. **PNPM IS REQUIRED!** Yarn or npm will not work - you will have to use pnpm to develop in the core repository. In most systems, the easiest way to install pnpm is to run `corepack enable` in your terminal.
If you're coming from a very outdated version of payload, it is recommended to nuke the node_modules folder before running pnpm install. On UNIX systems, you can easily do that using the `pnpm clean:unix` command, which will delete all node_modules folders and build artefacts.
It is also recommended to use at least Node v18 or higher. You can check your current node version by typing `node --version` in your terminal. The easiest way to switch between different node versions is to use [nvm](https://github.com/nvm-sh/nvm#intro).
### Code
Most new functionality should keep testing in mind. All top-level directories within the `test/` directory are for testing a specific category: `fields`, `collections`, etc.
If it makes sense to add your feature to an existing test directory, please do so.
A typical directory with `test/` will be structured like this:
```text
.
├── config.ts
├── int.spec.ts
├── e2e.spec.ts
└── payload-types.ts
```
- `config.ts` - This is the _granular_ Payload config for testing. It should be as lightweight as possible. Reference existing configs for an example
- `int.spec.ts` - This is the test file run by jest. Any test file must have a `*int.spec.ts` suffix.
- `e2e.spec.ts` - This is the end-to-end test file that will load up the admin UI using the above config and run Playwright tests. These tests are typically only needed if a large change is being made to the Admin UI.
- `payload-types.ts` - Generated types from `config.ts`. Generate this file by running `pnpm dev:generate-types my-test-dir`. Replace `my-test-dir` with the name of your testing directory.
Each test directory is split up in this way specifically to reduce friction when creating tests and to add the ability to boot up Payload with that specific config.
The following command will start Payload with your config: `pnpm dev my-test-dir`. Example: `pnpm dev fields` for the test/`fields` test suite. This command will start up Payload using your config and refresh a test database on every restart. If you're using VS Code, the most common run configs are automatically added to your editor - you should be able to find them in your VS Code launch tab.
By default, payload will [automatically log you in](https://payloadcms.com/docs/authentication/config#admin-autologin) with the default credentials. To disable that, you can either pass in the --no-auto-login flag (example: `pnpm dev my-test-dir --no-auto-login`) or set the `PAYLOAD_PUBLIC_DISABLE_AUTO_LOGIN` environment variable to `false`.
The default credentials are `dev@payloadcms.com` as E-Mail and `test` as password. These are used in the auto-login.
### Testing with your own MongoDB database
If you wish to use your own MongoDB database for the `test` directory instead of using the in memory database, all you need to do is add the following env vars to the `test/dev.ts` file:
- `process.env.NODE_ENV`
- `process.env.PAYLOAD_TEST_MONGO_URL`
- Simply set `process.env.NODE_ENV` to `test` and set `process.env.PAYLOAD_TEST_MONGO_URL` to your MongoDB URL e.g. `mongodb://127.0.0.1/your-test-db`.
### Using Postgres
If you have postgres installed on your system, you can also run the test suites using postgres. By default, mongodb is used.
To do that, simply set the `PAYLOAD_DATABASE` environment variable to `postgres`.
### Running the e2e and int tests
You can run the entire test suite using `pnpm test`. If you wish to only run e2e tests, you can use `pnpm test:e2e`. If you wish to only run int tests, you can use `pnpm test:int`.
By default, `pnpm test:int` will only run int test against MongoDB. To run int tests against postgres, you can use `pnpm test:int:postgres`. You will have to have postgres installed on your system for this to work.
### Commits
We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for our commit messages. Please follow this format when creating commits. Here are some examples:
- `feat: adds new feature`
- `fix: fixes bug`
- `docs: adds documentation`
- `chore: does chore`
Here's a breakdown of the format. At the top-level, we use the following types to categorize our commits:
- `feat`: new feature that adds functionality. These are automatically added to the changelog when creating new releases.
- `fix`: a fix to an existing feature. These are automatically added to the changelog when creating new releases.
- `docs`: changes to [docs](./docs) only. These do not appear in the changelog.
- `chore`: changes to code that is neither a fix nor a feature (e.g. refactoring, adding tests, etc.). These do not appear in the changelog.
If you are committing to [templates](./templates) or [examples](./examples), use the `chore` type with the proper scope, like this:
- `chore(templates): adds feature to template`
- `chore(examples): fixes bug in example`
## Pull Requests
For all Pull Requests, you should be extremely descriptive about both your problem and proposed solution. If there are any affected open or closed issues, please leave the issue number in your PR message.
## Previewing docs
This is how you can preview changes you made locally to the docs:
1. Clone our [website repository](https://github.com/payloadcms/website)
2. Run `yarn install`
3. Duplicate the `.env.example` file and rename it to `.env`
4. Add a `DOCS_DIR` environment variable to the `.env` file which points to the absolute path of your modified docs folder. For example `DOCS_DIR=/Users/yourname/Documents/GitHub/payload/docs`
5. Run `yarn run fetchDocs:local`. If this was successful, you should see no error messages and the following output: *Docs successfully written to /.../website/src/app/docs.json*. There could be error messages if you have incorrect markdown in your local docs folder. In this case, it will tell you how you can fix it
6. You're done! Now you can start the website locally using `yarn run dev` and preview the docs under [http://localhost:3000/docs/](http://localhost:3000/docs/)

View File

@@ -6,9 +6,10 @@ To report an issue, please follow the steps below:
2. Add necessary collections/globals/fields to the `test/_community` directory to recreate the issue you are experiencing
3. Create an issue and add a link to your forked repo
**The goal is to isolate the problem by reducing the number of fields/collections you add to the test/_community folder. This folder is not meant for you to copy your project into, but to recreate the issue you are experiencing with minimal config.**
**The goal is to isolate the problem by reducing the number of fields/collections you add to the test/\_community folder. This folder is not meant for you to copy your project into, but to recreate the issue you are experiencing with minimal config.**
## Test directory file tree explanation
```text
.
├── config.ts
@@ -20,45 +21,49 @@ To report an issue, please follow the steps below:
- `config.ts` - This is the _granular_ Payload config for testing. It should be as lightweight as possible. Reference existing configs for an example
- `int.spec.ts` [Optional] - This is the test file run by jest. Any test file must have a `*int.spec.ts` suffix.
- `e2e.spec.ts` [Optional] - This is the end-to-end test file that will load up the admin UI using the above config and run Playwright tests.
- `payload-types.ts` - Generated types from `config.ts`. Generate this file by running `yarn dev:generate-types _community`.
- `payload-types.ts` - Generated types from `config.ts`. Generate this file by running `pnpm dev:generate-types _community`.
The directory split up in this way specifically to reduce friction when creating tests and to add the ability to boot up Payload with that specific config. You should modify the files in `test/_community` to get started.
## How to start test collection admin UI
To start the admin panel so you can manually recreate your issue, you can run the following command:
```bash
# This command will start up Payload using your config
# NOTE: it will wipe the test database on restart
yarn dev _community
```
```bash
# This command will start up Payload using your config
# NOTE: it will wipe the test database on restart
pnpm dev _community
```
## Testing is optional but encouraged
An issue does not need to have failing tests — reproduction steps with your forked repo are enough at this point. Some people like to dive deeper and we want to give you the guidance/tools to do so. Read more below.
### How to run integration tests (Payload API tests)
There are a couple ways to do this:
- **Granularly** - you can run individual tests in vscode by installing the Jest Runner plugin and using that to run individual tests. Clicking the `debug` button will run the test in debug mode allowing you to set break points.
<img src="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/github/int-debug.png" />
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/src/admin/assets/images/github/int-debug.png" />
- **Manually** - you can run all int tests in the `/test/_community/int.spec.ts` file by running the following command:
```bash
yarn test:int _community
pnpm test:int _community
```
### How to run E2E tests (Admin Panel UI tests)
The easiest way to run E2E tests is to install
- [Playwright Test for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright)
- [Playwright Runner](https://marketplace.visualstudio.com/items?itemName=ortoni.ortoni)
Once they are installed you can open the `testing` tab in vscode sidebar and drill down to the test you want to run, i.e. `/test/_community/e2e.spec.ts`
<img src="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/github/e2e-debug.png" />
<img src="https://raw.githubusercontent.com/payloadcms/payload/main/src/admin/assets/images/github/e2e-debug.png" />
#### Notes
- It is recommended to add the test credentials (located in `test/credentials.ts`) to your autofill for `localhost:3000/admin` as this will be required on every nodemon restart. The default credentials are `dev@payloadcms.com` as email and `test` as password.

129
README.md
View File

@@ -1,68 +1,67 @@
<p style="border: none; margin-bottom:0; padding-bottom: 0;" align="center">
<a href="https://payloadcms.com">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/payload-logo-light.svg">
<img width="350" alt="Payload Logo" src="https://raw.githubusercontent.com/payloadcms/payload/master/src/admin/assets/images/payload-logo-dark.svg">
</picture>
</a>
<a href="https://payloadcms.com"><img width="100%" src="https://github.com/payloadcms/payload/blob/main/packages/payload/src/admin/assets/images/github-banner-alt.jpg?raw=true" alt="Payload headless CMS Admin panel built with React" /></a>
<br />
<br />
<p align="left">
<a href="https://github.com/payloadcms/payload/actions"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/payloadcms/payload/main.yml?style=flat-square"></a>
&nbsp;
<a href="https://discord.gg/payload"><img alt="Discord" src="https://img.shields.io/discord/967097582721572934?label=Discord&color=7289da&style=flat-square" /></a>
&nbsp;
<a href="https://www.npmjs.com/package/payload"><img alt="npm" src="https://img.shields.io/npm/v/payload?style=flat-square" /></a>
&nbsp;
<a href="https://twitter.com/payloadcms"><img src="https://img.shields.io/badge/follow-payloadcms-1DA1F2?logo=twitter&style=flat-square" alt="Payload Twitter" /></a>
</p>
<hr/>
<h4>
<a target="_blank" href="https://payloadcms.com/docs/getting-started/what-is-payload" rel="dofollow"><strong>Explore the Docs</strong></a>&nbsp;·&nbsp;<a target="_blank" href="https://payloadcms.com/community-help" rel="dofollow"><strong>Community Help</strong></a>&nbsp;·&nbsp;<a target="_blank" href="https://demo.payloadcms.com/" rel="dofollow"><strong>Try Live Demo</strong></a>&nbsp;·&nbsp;<a target="_blank" href="https://github.com/payloadcms/payload/discussions/1539" rel="dofollow"><strong>Roadmap</strong></a>&nbsp;·&nbsp;<a target="_blank" href="https://www.g2.com/products/payload-cms/reviews#reviews" rel="dofollow"><strong>View G2 Reviews</strong></a>
</h4>
<hr/>
<h3 align="center">The most powerful TypeScript CMS</h3>
<p align="center">Code-first Headless CMS that bridges the gap between CMS and application framework</p>
> [!IMPORTANT]
> 🎉 <strong>Payload 2.0 is now available!</strong> Read more in the <a target="_blank" href="https://payloadcms.com/blog/payload-2-0" rel="dofollow"><strong>announcement post</strong></a>.
<h3 align="center">
<a target="_blank" href="https://payloadcms.com/docs/getting-started/what-is-payload" rel="dofollow"><strong>Explore the docs</strong></a>
·
<a target="_blank" href="https://demo.payloadcms.com/" rel="dofollow"><strong>Try Live Demo</strong></a>
<br />
</h3>
<h3>Benefits over a regular CMS</h3>
<ul>
<li>Dont hit some third-party SaaS API, hit your own API</li>
<li>Use your own database and own your data</li>
<li>It's just Express - do what you want outside of Payload</li>
<li>No need to learn how Payload works - if you know JS, you know Payload</li>
<li>No vendor lock-in</li>
<li>Avoid microservices hell - get everything (even auth) in one place</li>
<li>Never touch ancient WP code again</li>
<li>Build faster, never hit a roadblock</li>
<li>Both admin and backend are 100% extensible</li>
</ul>
<br />
## ☁️ Deploy instantly with Payload Cloud.
<p align="center">
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" />
</a>
&nbsp;
<a href="https://github.com/payloadcms/payload/actions">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/payloadcms/payload/tests.yml?style=flat-square">
</a>
&nbsp;
<a href="https://github.com/payloadcms/payload/commits">
<img src="https://img.shields.io/github/commit-activity/m/payloadcms/payload?style=flat-square" alt="git commit activity"/>
</a>
&nbsp;
<a href="https://discord.gg/payload">
<img alt="Discord" src="https://img.shields.io/discord/967097582721572934?label=Discord&color=7289da&style=flat-square" />
</a>
&nbsp;
<a href="https://www.npmjs.com/package/payload">
<img alt="npm" src="https://img.shields.io/npm/v/payload?style=flat-square" />
</a>
&nbsp;
<a href="https://twitter.com/payloadcms">
<img src="https://img.shields.io/badge/follow-payloadcms-1DA1F2?logo=twitter&style=flat-square" alt="Payload Twitter" />
</a>
</p>
Create a cloud account, connect your GitHub, and [deploy in minutes](https://payloadcms.com/new).
<br />
## 🚀 Get started by self-hosting completely free, forever.
<a href="https://payloadcms.com">
<img src="https://cms.payloadcms.com/media/payload-github-header.jpg" alt="Payload headless CMS Admin panel built with React" />
</a>
Before beginning to work with Payload, make sure you have all of the [required software](https://payloadcms.com/docs/getting-started/installation).
<br />
```text
npx create-payload-app@latest
```
## ⭐ Why Payload?
Alternatively, it only takes about five minutes to [create an app from scratch](https://payloadcms.com/docs/getting-started/installation#from-scratch).
Payload is a CMS that has been designed for developers from the ground up to deliver them what they need to build great digital products. If you know JavaScript, you know Payload. It's a _code-first_ CMS, which allows us to do a lot of things right:
## 🖱️ One-click templates
- Payload gives you everything you need, but then steps back and lets you build what you want in JavaScript or TypeScript - with no unnecessary complexity brought by GUIs. You'll understand how your CMS works because you will have written it exactly how you want it.
- Bring your own Express server and do whatever you need on top of Payload. Payload doesn't impose anything on you or your app.
- Completely control the Admin panel by using your own React components. Swap out fields or even entire views with ease.
- Use your data however and wherever you need thanks to auto-generated, yet fully extensible REST, GraphQL, and Local Node APIs.
Jumpstart your next project by starting with a pre-made template. These are production-ready, end-to-end solutions designed to get you to market as fast as possible.
<a target="_blank" href="https://payloadcms.com/" rel="dofollow"><strong>Read more on our website</strong></a>
### [🛒 E-Commerce](https://github.com/payloadcms/payload/tree/main/templates/ecommerce)
Eliminate the need to combine Shopify and a CMS, and instead do it all with Payload + Stripe. Comes with a beautiful, fully functional front-end complete with shopping cart, checkout, orders, and much more.
### [🌐 Website](https://github.com/payloadcms/payload/tree/main/templates/website)
Build any kind of website, blog, or portfolio from small to enterprise. Comes with a beautiful, fully functional front-end complete with posts, projects, comments, and much more.
We're constantly adding more templates to our [Templates Directory](https://github.com/payloadcms/payload/tree/main/templates). If you maintain your own template, consider adding the `payload-template` topic to your GitHub repository for others to find.
- [Official Templates](https://github.com/payloadcms/payload/tree/main/templates)
- [Community Templates](https://github.com/topics/payload-template)
## ✨ Features
@@ -86,33 +85,23 @@ Payload is a CMS that has been designed for developers from the ground up to del
<a target="_blank" href="https://github.com/payloadcms/payload/discussions"><strong>Request Feature</strong></a>
## 🚀 Quick Start
Before beginning to work with Payload, make sure you have all of the [required software](https://payloadcms.com/docs/getting-started/installation).
From there, the easiest way to get started with Payload is to use the `create-payload-app` package:
```text
npx create-payload-app
```
Alternatively, it only takes about five minutes to [create an app from scratch](https://payloadcms.com/docs/getting-started/installation#from-scratch).
## 🗒️ Documentation
Check out the [Payload website](https://payloadcms.com/docs/getting-started/what-is-payload) to find in-depth documentation for everything that Payload offers.
Migrating from v1 to v2? Check out the [2.0 Release Notes](https://github.com/payloadcms/payload/releases/tag/v2.0.0) on how to do it.
## 🙋 Contributing
If you want to add contributions to this repository, please follow the instructions in [contributing.md](./contributing.md).
If you want to add contributions to this repository, please follow the instructions in [contributing.md](./CONTRIBUTING.md).
## 📚 Examples and Templates
## 📚 Examples
The examples directory is a great resource for learning how to setup Payload in a variety of different ways. There are also a number of templates to help get you going very quickly. If you maintain your own template, consider adding the `payload-template` topic to your GitHub repository for others to find.
The [Examples Directory](./examples) is a great resource for learning how to setup Payload in a variety of different ways, but you can also find great examples in our blog and throughout our social media.
- [Examples Directory](./examples)
- [Official Templates](https://github.com/orgs/payloadcms/repositories?q=topic%3Apayload-template)
- [Community Templates](https://github.com/topics/payload-template)
- [Payload Blog](https://payloadcms.com/blog)
- [Payload YouTube](https://www.youtube.com/@payloadcms)
## 🔌 Plugins

1
auth.d.ts vendored
View File

@@ -1 +0,0 @@
export * from './dist/auth';

View File

@@ -1 +0,0 @@
module.exports = require('./dist/auth');

2
bin.js
View File

@@ -1,2 +0,0 @@
#!/usr/bin/env node
require('./dist/bin');

39
changelog.config.js Normal file
View File

@@ -0,0 +1,39 @@
module.exports = {
// gitRawCommitsOpts: {
// from: 'v2.0.9',
// path: 'packages/payload',
// },
// infile: 'CHANGELOG.md',
options: {
preset: {
name: 'conventionalcommits',
types: [
{ section: 'Features', type: 'feat' },
{ section: 'Features', type: 'feature' },
{ section: 'Bug Fixes', type: 'fix' },
{ section: 'Documentation', type: 'docs' },
],
},
},
// outfile: 'NEW.md',
writerOpts: {
commitGroupsSort: (a, b) => {
const groupOrder = ['Features', 'Bug Fixes', 'Documentation']
return groupOrder.indexOf(a.title) - groupOrder.indexOf(b.title)
},
// Scoped commits at the end, alphabetical sort
commitsSort: (a, b) => {
if (a.scope || b.scope) {
if (!a.scope) return -1
if (!b.scope) return 1
return a.scope === b.scope
? a.subject.localeCompare(b.subject)
: a.scope.localeCompare(b.scope)
}
// Alphabetical sort
return a.subject.localeCompare(b.subject)
},
},
}

View File

@@ -1,5 +0,0 @@
exports.Button = require('../dist/admin/components/elements/Button').default;
exports.Card = require('../dist/admin/components/elements/Card').default;
exports.Eyebrow = require('../dist/admin/components/elements/Eyebrow').default;
exports.Nav = require('../dist/admin/components/elements/Nav').default;
exports.Gutter = require('../dist/admin/components/elements/Gutter').Gutter;

View File

@@ -1,5 +0,0 @@
export { default as Button } from '../dist/admin/components/elements/Button';
export { default as Card } from '../dist/admin/components/elements/Card';
export { default as Eyebrow } from '../dist/admin/components/elements/Eyebrow';
export { default as Nav } from '../dist/admin/components/elements/Nav';
export { Gutter } from '../dist/admin/components/elements/Gutter';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Array/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Blocks/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/views/collections/List/Cell/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Checkbox/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Code/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/DateTime/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Email/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Group/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/JSON/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Number/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Password/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../../dist/admin/components/forms/field-types/RadioGroup/RadioInput/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../../dist/admin/components/forms/field-types/RadioGroup/types';

View File

@@ -1 +0,0 @@
export type { Props, Option, ValueWithRelation } from '../../dist/admin/components/forms/field-types/Relationship/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/RichText/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Row/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Select/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Text/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Textarea/types';

View File

@@ -1 +0,0 @@
export type { Props } from '../../dist/admin/components/forms/field-types/Upload/types';

View File

@@ -1,42 +0,0 @@
exports.useForm = require('../dist/admin/components/forms/Form/context').useForm;
/**
* @deprecated useWatchForm is no longer preferred. If you need all form fields, prefer `useAllFormFields`.
*/
exports.useWatchForm = require('../dist/admin/components/forms/Form/context').useWatchForm;
exports.useFormFields = require('../dist/admin/components/forms/Form/context').useFormFields;
exports.useAllFormFields = require('../dist/admin/components/forms/Form/context').useAllFormFields;
exports.useFormSubmitted = require('../dist/admin/components/forms/Form/context').useFormSubmitted;
exports.useFormProcessing = require('../dist/admin/components/forms/Form/context').useFormProcessing;
exports.useFormModified = require('../dist/admin/components/forms/Form/context').useFormModified;
exports.useField = require('../dist/admin/components/forms/useField').default;
/**
* @deprecated This method is now called useField. The useFieldType alias will be removed in an upcoming version.
*/
exports.useFieldType = require('../dist/admin/components/forms/useField').default;
exports.Form = require('../dist/admin/components/forms/Form').default;
exports.Text = require('../dist/admin/components/forms/field-types/Text').default;
exports.TextInput = require('../dist/admin/components/forms/field-types/Text/Input').default;
exports.Group = require('../dist/admin/components/forms/field-types/Group').default;
exports.Select = require('../dist/admin/components/forms/field-types/Select').default;
exports.SelectInput = require('../dist/admin/components/forms/field-types/Select/Input').default;
exports.Checkbox = require('../dist/admin/components/forms/field-types/Checkbox').default;
exports.Submit = require('../dist/admin/components/forms/Submit').default;
exports.Label = require('../dist/admin/components/forms/Label').default;
exports.reduceFieldsToValues = require('../dist/admin/components/forms/Form/reduceFieldsToValues').default;
exports.getSiblingData = require('../dist/admin/components/forms/Form/getSiblingData').default;
exports.withCondition = require('../dist/admin/components/forms/withCondition').default;

View File

@@ -1,38 +0,0 @@
export {
useForm,
/**
* @deprecated useWatchForm is no longer preferred. If you need all form fields, prefer `useAllFormFields`.
*/
useWatchForm,
useFormFields,
useAllFormFields,
useFormSubmitted,
useFormProcessing,
useFormModified,
} from '../dist/admin/components/forms/Form/context';
export { default as useField } from '../dist/admin/components/forms/useField';
/**
* @deprecated This method is now called useField. The useFieldType alias will be removed in an upcoming version.
*/
export { default as useFieldType } from '../dist/admin/components/forms/useField';
export { default as Form } from '../dist/admin/components/forms/Form';
export { default as Text } from '../dist/admin/components/forms/field-types/Text';
export { default as TextInput } from '../dist/admin/components/forms/field-types/Text/Input';
export { default as Group } from '../dist/admin/components/forms/field-types/Group';
export { default as Select } from '../dist/admin/components/forms/field-types/Select';
export { default as SelectInput } from '../dist/admin/components/forms/field-types/Select/Input';
export { default as Checkbox } from '../dist/admin/components/forms/field-types/Checkbox';
export { default as Submit } from '../dist/admin/components/forms/Submit';
export { default as Label } from '../dist/admin/components/forms/Label';
export { default as reduceFieldsToValues } from '../dist/admin/components/forms/Form/reduceFieldsToValues';
export { default as getSiblingData } from '../dist/admin/components/forms/Form/getSiblingData';
export { default as withCondition } from '../dist/admin/components/forms/withCondition';

View File

@@ -1 +0,0 @@
exports.useStepNav = require('../dist/admin/components/elements/StepNav').useStepNav;

View File

@@ -1 +0,0 @@
export { useStepNav } from '../dist/admin/components/elements/StepNav';

View File

@@ -1,2 +0,0 @@
exports.Chevron = require('../dist/admin/components/icons/Chevron').default;
exports.X = require('../dist/admin/components/icons/X').default;

View File

@@ -1,2 +0,0 @@
export { default as Chevron } from '../dist/admin/components/icons/Chevron';
export { default as X } from '../dist/admin/components/icons/X';

View File

@@ -1 +0,0 @@
export * from '../dist/admin/components';

View File

@@ -1 +0,0 @@
exports.usePreferences = require('../dist/admin/components/utilities/Preferences').usePreferences;

View File

@@ -1 +0,0 @@
export { usePreferences } from '../dist/admin/components/utilities/Preferences';

View File

@@ -1,3 +0,0 @@
exports.LeafButton = require('../dist/admin/components/forms/field-types/RichText/leaves/Button').default;
exports.ElementButton = require('../dist/admin/components/forms/field-types/RichText/elements/Button').default;
exports.toggleElement = require('../dist/admin/components/forms/field-types/RichText/elements/toggle').default;

View File

@@ -1,3 +0,0 @@
export { default as LeafButton } from '../dist/admin/components/forms/field-types/RichText/leaves/Button';
export { default as ElementButton } from '../dist/admin/components/forms/field-types/RichText/elements/Button';
export { default as toggleElement } from '../dist/admin/components/forms/field-types/RichText/elements/toggle';

View File

@@ -1,2 +0,0 @@
exports.DefaultTemplate = require('../dist/admin/components/templates/Default').default;
exports.MinimalTemplate = require('../dist/admin/components/templates/Minimal').default;

View File

@@ -1,2 +0,0 @@
export { default as DefaultTemplate } from '../dist/admin/components/templates/Default';
export { default as MinimalTemplate } from '../dist/admin/components/templates/Minimal';

View File

@@ -1,7 +0,0 @@
exports.Meta = require('../dist/admin/components/utilities/Meta').default;
exports.useLocale = require('../dist/admin/components/utilities/Locale').useLocale;
exports.useDocumentInfo = require('../dist/admin/components/utilities/DocumentInfo').useDocumentInfo;
exports.useConfig = require('../dist/admin/components/utilities/Config').useConfig;
exports.useAuth = require('../dist/admin/components/utilities/Auth').useAuth;
exports.useEditDepth = require('../dist/admin/components/utilities/EditDepth').useEditDepth;
exports.useTheme = require('../dist/admin/components/utilities/Theme').useTheme;

View File

@@ -1,6 +0,0 @@
export { default as Meta } from '../dist/admin/components/utilities/Meta';
export { useLocale } from '../dist/admin/components/utilities/Locale';
export { useDocumentInfo } from '../dist/admin/components/utilities/DocumentInfo';
export { useConfig } from '../dist/admin/components/utilities/Config';
export { useAuth } from '../dist/admin/components/utilities/Auth';
export { useEditDepth } from '../dist/admin/components/utilities/EditDepth';

View File

@@ -1 +0,0 @@
exports.Cell = require('../../dist/admin/components/views/collections/List/Cell').default;

View File

@@ -1,2 +0,0 @@
export { default as Cell } from '../../dist/admin/components/views/collections/List/Cell';
export type { Props } from '../../dist/admin/components/views/collections/List/Cell/types';

View File

@@ -1 +0,0 @@
exports.Dashboard = required('../../dist/admin/components/views/Dashboard/Default').default;

View File

@@ -1,3 +0,0 @@
export { default as Dashboard } from '../../dist/admin/components/views/Dashboard/Default';
export type { Props } from '../../dist/admin/components/views/Dashboard/types';

View File

@@ -1 +0,0 @@
exports.Edit = require('../../dist/admin/components/views/collections/Edit/Default').default;

View File

@@ -1,2 +0,0 @@
export { default as Edit } from '../../dist/admin/components/views/collections/Edit/Default';
export type { Props } from '../../dist/admin/components/views/collections/Edit/types';

View File

@@ -1 +0,0 @@
exports.List = require('../../dist/admin/components/views/collections/List/Default').default;

View File

@@ -1,2 +0,0 @@
export { default as List } from '../../dist/admin/components/views/collections/List/Default';
export type { Props } from '../../dist/admin/components/views/collections/List/types';

2
config.d.ts vendored
View File

@@ -1,2 +0,0 @@
export { buildConfig } from './dist/config/build';
export * from './dist/config/types';

View File

@@ -1 +0,0 @@
exports.buildConfig = require('./dist/config/build').buildConfig;

View File

@@ -1,64 +0,0 @@
# Contributing to Payload
Below you'll find a set of guidelines for how to contribute to Payload.
## Opening issues
Before you submit an issue, please check all existing [open and closed issues](https://github.com/payloadcms/payload/issues) to see if your issue has previously been resolved or is already known. If there is already an issue logged, feel free to upvote it by adding a :thumbsup: [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). If you would like to submit a new issue, please fill out our Issue Template to the best of your ability so we can accurately understand your report.
## Security issues & vulnerabilities
If you come across an issue related to security, or a potential attack vector within Payload or one of its dependencies, please DO NOT create a publicly viewable issue. Instead, please contact us directly at [`dev@payloadcms.com`](mailto:dev@payloadcms.com). We will do everything we can to respond to the issue as soon as possible.
If you find a vulnerability within the core Payload repository, and we determine that it is remediable and of significant nature, we will be happy to pay you a reward for your findings and diligence. [`Contact us`](mailto:dev@payloadcms.com) to find out more.
## Documentation edits
Payload documentation can be found directly within its codebase and you can feel free to make changes / improvements to any of it through opening a PR. We utilize these files directly in our website and will periodically deploy documentation updates as necessary.
## Building additional features
If you're an incredibly awesome person and want to help us make Payload even better through new features or additions, we would be thrilled to work with you.
### Before Starting
To help us work on new features, you can create a new feature request post in [GitHub Discussion](https://github.com/payloadcms/payload/discussions) or discuss it in our [Discord](https://discord.com/invite/payload). New functionality often has large implications across the entire Payload repo, so it is best to discuss the architecture and approach before starting work on a pull request.
### Code
Most new functionality should keep testing in mind. With 1.0, testability of new features has been vastly improved. All top-level directories within the `test/` directory are for testing a specific category: `fields`, `collections`, etc.
If it makes sense to add your feature to an existing test directory, please do so.
A typical directory with `test/` will be structured like this:
```text
.
├── config.ts
├── int.spec.ts
├── e2e.spec.ts
└── payload-types.ts
```
- `config.ts` - This is the _granular_ Payload config for testing. It should be as lightweight as possible. Reference existing configs for an example
- `int.spec.ts` - This is the test file run by jest. Any test file must have a `*int.spec.ts` suffix.
- `e2e.spec.ts` - This is the end-to-end test file that will load up the admin UI using the above config and run Playwright tests. These tests are typically only needed if a large change is being made to the Admin UI.
- `payload-types.ts` - Generated types from `config.ts`. Generate this file by running `yarn dev:generate-types my-test-dir`.
The directory split up in this way specifically to reduce friction when creating tests and to add the ability to boot up Payload with that specific config.
The following command will start Payload with your config: `yarn dev my-test-dir`. This command will start up Payload using your config and refresh a test database on every restart.
By default, it will automatically log you in with the default credentials. To disable that, you can either pass in the --no-auto-login flag (example: `yarn dev my-test-dir --no-auto-login`) or set the `PAYLOAD_PUBLIC_DISABLE_AUTO_LOGIN` environment variable to `false`.
If you wish to use to your own Mongo database for the `test` directory instead of using the in memory database, all you need to do is add the following env vars to the `test/dev.ts` file:
- `process.env.NODE_ENV`
- `process.env.PAYLOAD_TEST_MONGO_URL`
- Simply set `process.env.NODE_ENV` to `test` and set `process.env.PAYLOAD_TEST_MONGO_URL` to your mongo url e.g. `mongodb://127.0.0.1/your-test-db`.
NOTE: It is recommended to add the test credentials (located in `test/credentials.ts`) to your autofill for `localhost:3000/admin` as this will be required on every nodemon restart. The default credentials are `dev@payloadcms.com` as E-Mail and `test` as password.
## Pull Requests
For all Pull Requests, you should be extremely descriptive about both your problem and proposed solution. If there are any affected open or closed issues, please leave the issue number in your PR message.

View File

@@ -10,23 +10,24 @@ You can define Collection-level Access Control within each Collection's `access`
## Available Controls
| Function | Allows/Denies Access |
| ------------------------ | -------------------- |
| **[`create`](#create)** | Used in the `create` operation |
| **[`read`](#read)** | Used in the `find` and `findByID` operations |
| **[`update`](#update)** | Used in the `update` operation |
| **[`delete`](#delete)** | Used in the `delete` operation |
| Function | Allows/Denies Access |
| ----------------------- | -------------------------------------------- |
| **[`create`](#create)** | Used in the `create` operation |
| **[`read`](#read)** | Used in the `find` and `findByID` operations |
| **[`update`](#update)** | Used in the `update` operation |
| **[`delete`](#delete)** | Used in the `delete` operation |
#### Auth-enabled Controls
If a Collection supports [`Authentication`](/docs/authentication/overview), the following Access Controls become available:
| Function | Allows/Denies Access |
| ----------------------- | -------------------- |
| **[`admin`](#admin)** | Used to restrict access to the Payload Admin panel |
| Function | Allows/Denies Access |
| ----------------------- | -------------------------------------------------------------- |
| **[`admin`](#admin)** | Used to restrict access to the Payload Admin panel |
| **[`unlock`](#unlock)** | Used to restrict which users can access the `unlock` operation |
**Example Collection config:**
```ts
import { CollectionConfig } from 'payload/types';
@@ -50,10 +51,10 @@ Returns a boolean which allows/denies access to the `create` request.
**Available argument properties:**
| Option | Description |
| ---------- | ----------- |
| Option | Description |
| ---------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`data`** | The data passed to create the document with. |
| **`data`** | The data passed to create the document with. |
**Example:**
@@ -77,20 +78,20 @@ Read access functions can return a boolean result or optionally return a [query
**Available argument properties:**
| Option | Description |
| --------- | ----------- |
| Option | Description |
| --------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`id`** | `id` of document requested, if within `findByID` |
| **`id`** | `id` of document requested, if within `findByID` |
**Example:**
```ts
import { Access } from 'payload/config';
import { Access } from 'payload/config'
const canReadPage: Access = ({ req: { user } }) => {
// allow authenticated users
if (user) {
return true;
return true
}
// using a query constraint, guest users can access when a field named 'isPublic' is set to true
return {
@@ -99,7 +100,7 @@ const canReadPage: Access = ({ req: { user } }) => {
equals: true,
},
}
};
}
```
### Update
@@ -108,25 +109,25 @@ Update access functions can return a boolean result or optionally return a [quer
**Available argument properties:**
| Option | Description |
| ---------- | ----------- |
| Option | Description |
| ---------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`id`** | `id` of document requested to update |
| **`data`** | The data passed to update the document with |
| **`id`** | `id` of document requested to update |
| **`data`** | The data passed to update the document with |
**Example:**
```ts
import { Access } from 'payload/config';
import { Access } from 'payload/config'
const canUpdateUser: Access = ({ req: { user }, id }) => {
// allow users with a role of 'admin'
if (user.roles && user.roles.some(role => role === 'admin')) {
return true;
if (user.roles && user.roles.some((role) => role === 'admin')) {
return true
}
// allow any other users to update only oneself
return user.id === id;
};
return user.id === id
}
```
### Delete
@@ -135,10 +136,10 @@ Similarly to the Update function, returns a boolean or a [query constraint](/doc
**Available argument properties:**
| Option | Description |
| --------- | ----------- |
| Option | Description |
| --------- | --------------------------------------------------------------------------------------------------- |
| **`req`** | The Express `request` object with additional `user` property, which is the currently logged in user |
| **`id`** | `id` of document requested to delete |
| **`id`** | `id` of document requested to delete |
**Example:**
@@ -148,7 +149,7 @@ import { Access } from 'payload/config'
const canDeleteCustomer: Access = async ({ req, id }) => {
if (!id) {
// allow the admin UI to show controls to delete since it is indeterminate without the id
return true;
return true
}
// query another collection using the id
const result = await req.payload.find({
@@ -158,10 +159,10 @@ const canDeleteCustomer: Access = async ({ req, id }) => {
where: {
customer: { equals: id },
},
});
})
return result.totalDocs === 0;
};
return result.totalDocs === 0
}
```
### Admin
@@ -170,8 +171,8 @@ If the Collection is [used to access the Payload Admin panel](/docs/admin/overvi
**Available argument properties:**
| Option | Description |
| --------- | ----------- |
| Option | Description |
| --------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
### Unlock
@@ -180,6 +181,6 @@ Determines which users can [unlock](/docs/authentication/operations#unlock) othe
**Available argument properties:**
| Option | Description |
| --------- | ----------- |
| Option | Description |
| --------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |

View File

@@ -10,13 +10,14 @@ Field Access Control is specified with functions inside a field's config. All fi
## Available Controls
| Function | Purpose |
| ------------------------ | ------- |
| **[`create`](#create)** | Allows or denies the ability to set a field's value when creating a new document |
| **[`read`](#read)** | Allows or denies the ability to read a field's value |
| **[`update`](#update)** | Allows or denies the ability to update a field's value |
| Function | Purpose |
| ----------------------- | -------------------------------------------------------------------------------- |
| **[`create`](#create)** | Allows or denies the ability to set a field's value when creating a new document |
| **[`read`](#read)** | Allows or denies the ability to read a field's value |
| **[`update`](#update)** | Allows or denies the ability to update a field's value |
**Example Collection config:**
```ts
import { CollectionConfig } from 'payload/types';
@@ -44,11 +45,11 @@ Returns a boolean which allows or denies the ability to set a field's value when
**Available argument properties:**
| Option | Description |
| ----------------- | ----------- |
| Option | Description |
| ----------------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`data`** | The full data passed to create the document. |
| **`siblingData`** | Immediately adjacent field data passed to create the document. |
| **`data`** | The full data passed to create the document. |
| **`siblingData`** | Immediately adjacent field data passed to create the document. |
### Read
@@ -56,12 +57,12 @@ Returns a boolean which allows or denies the ability to read a field's value. If
**Available argument properties:**
| Option | Description |
| ----------------- | ----------- |
| Option | Description |
| ----------------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`id`** | `id` of the document being read |
| **`doc`** | The full document data. |
| **`siblingData`** | Immediately adjacent field data of the document being read. |
| **`id`** | `id` of the document being read |
| **`doc`** | The full document data. |
| **`siblingData`** | Immediately adjacent field data of the document being read. |
### Update
@@ -71,10 +72,10 @@ If `false` is returned and you attempt to update the field's value, the operatio
**Available argument properties:**
| Option | Description |
| ----------------- | ----------- |
| Option | Description |
| ----------------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`id`** | `id` of the document being updated |
| **`data`** | The full data passed to update the document. |
| **`siblingData`** | Immediately adjacent field data passed to update the document with. |
| **`doc`** | The full document data, before the update is applied. |
| **`id`** | `id` of the document being updated |
| **`data`** | The full data passed to update the document. |
| **`siblingData`** | Immediately adjacent field data passed to update the document with. |
| **`doc`** | The full document data, before the update is applied. |

View File

@@ -8,30 +8,35 @@ keywords: globals, access control, permissions, documentation, Content Managemen
You can define Global-level Access Control within each Global's `access` property. All Access Control functions accept one `args` argument.
**Available argument properties:
\*\*Available argument properties:
## Available Controls
| Function | Allows/Denies Access |
| ------------------------ | -------------------- |
| **[`read`](#read)** | Used in the `findOne` Global operation |
| **[`update`](#update)** | Used in the `update` Global operation |
| Function | Allows/Denies Access |
| ----------------------- | -------------------------------------- |
| **[`read`](#read)** | Used in the `findOne` Global operation |
| **[`update`](#update)** | Used in the `update` Global operation |
**Example Global config:**
```ts
import { GlobalConfig } from 'payload/types';
import { GlobalConfig } from 'payload/types'
const Header: GlobalConfig = {
slug: "header",
slug: 'header',
// highlight-start
access: {
read: ({ req: { user } }) => { /* */ },
update: ({ req: { user } }) => { /* */ },
read: ({ req: { user } }) => {
/* */
},
update: ({ req: { user } }) => {
/* */
},
},
// highlight-end
};
}
export default Header;
export default Header
```
### Read
@@ -40,8 +45,8 @@ Returns a boolean result or optionally a [query constraint](/docs/queries/overvi
**Available argument properties:**
| Option | Description |
| --------- | ----------- |
| Option | Description |
| --------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
### Update
@@ -50,7 +55,7 @@ Returns a boolean result or optionally a [query constraint](/docs/queries/overvi
**Available argument properties:**
| Option | Description |
| ---------- | ----------- |
| Option | Description |
| ---------- | -------------------------------------------------------------------------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`data`** | The data passed to update the global with. |
| **`data`** | The data passed to update the global with. |

View File

@@ -8,10 +8,7 @@ keywords: overview, access control, permissions, documentation, Content Manageme
Access control within Payload is extremely powerful while remaining easy and intuitive to manage. Declaring who should have access to what documents is no more complex than writing a simple JavaScript function that either returns a `boolean` or a [`query`](/docs/queries/overview) constraint to restrict which documents users can interact with.
<YouTube
id="DoPLyXG26Dg"
title="Overview of Payload Access Control"
/>
<YouTube id="DoPLyXG26Dg" title="Overview of Payload Access Control" />
**Example use cases:**
@@ -32,13 +29,18 @@ Access control within Payload is extremely powerful while remaining easy and int
const defaultPayloadAccess = ({ req: { user } }) => {
// Return `true` if a user is found
// and `false` if it is undefined or null
return Boolean(user);
return Boolean(user)
}
```
<Banner type="success">
<strong>Note:</strong><br/>
In the Local API, all Access Control functions are skipped by default, allowing your server to do whatever it needs. But, you can opt back in by setting the option <strong>overrideAccess</strong> to <strong>false</strong>.
<strong>Note:</strong>
<br />
In the Local API, all Access Control functions are skipped by default, allowing your server to do
whatever it needs. But, you can opt back in by setting the option <strong>
overrideAccess
</strong>{' '}
to <strong>false</strong>.
</Banner>
### Access Control Types
@@ -49,12 +51,13 @@ You can manage access within Payload on three different levels:
- [Fields](/docs/access-control/fields)
- [Globals](/docs/access-control/globals)
### When Access Control is Executed
<Banner type="success">
<strong>Note:</strong><br/>
Access control functions are utilized in two places. It's important to understand how and when your access control is executed.
<strong>Note:</strong>
<br />
Access control functions are utilized in two places. It's important to understand how and when
your access control is executed.
</Banner>
#### As you execute operations
@@ -70,8 +73,11 @@ To accomplish this, Payload ships with an `Access` operation, which is executed
### Argument Availability
<Banner type="warning">
<strong>Important:</strong><br/>
When your access control functions are executed via the <strong>access</strong> operation, the <strong>id</strong> and <strong>data</strong> arguments will be <strong>undefined</strong>, because Payload is executing your functions without referencing a specific document.
<strong>Important:</strong>
<br />
When your access control functions are executed via the <strong>access</strong> operation, the{' '}
<strong>id</strong> and <strong>data</strong> arguments will be <strong>undefined</strong>,
because Payload is executing your functions without referencing a specific document.
</Banner>
If you use `id` or `data` within your access control functions, make sure to check that they are defined first. If they are not, then you can assume that your access control is being executed via the `access` operation, to determine solely what the user can do within the Admin UI.

54
docs/admin/bundlers.mdx Normal file
View File

@@ -0,0 +1,54 @@
---
title: Bundlers
label: Bundlers
order: 60
desc: Bundlers are used to bundle the code that serves Payload's Admin Panel.
---
Payload has two official bundlers, the [Webpack Bundler](/docs/admin/webpack) and the [Vite Bundler](/docs/admin/vite). You must install a bundler to use the admin panel.
##### Install a bundler
Webpack (recommended):
```text
yarn add @payloadcms/bundler-webpack
```
Vite (beta):
```text
yarn add @payloadcms/bundler-vite
```
##### Configure the bundler
```ts
// payload.config.ts
import { buildConfig } from 'payload/config'
import { webpackBundler } from '@payloadcms/bundler-webpack'
// import { viteBundler } from '@payloadcms/bundler-vite'
export default buildConfig({
// highlight-start
admin: {
bundler: webpackBundler() // or viteBundler()
},
// highlight-end
})
```
### What are bundlers?
At their core, a bundler's main goal is to take a bunch of files and turn them into a few optimized files that you ship to the browser. The admin UI has a root `index.html` entry point, and from there the bundler traverses the dependency tree, bundling all of the files that are required from that point on.
Since the bundled file is sent to the browser, it can't include any server-only code. You will need to remove any server-only code from your admin UI before bundling it. You can learn more about [excluding server code](/docs/admin/excluding-server-code) section.
<Banner type="warning">
<strong>Using environment variables in the admin UI</strong>
<br />
Bundles should not contain sensitive information. By default, Payload
excludes env variables from the bundle. If you need to use env variables in your payload config,
you need to prefix them with `PAYLOAD_PUBLIC_` to make them available to the client-side code.
</Banner>

View File

@@ -6,13 +6,15 @@ desc: Fully customize your Admin Panel by swapping in your own React components.
keywords: admin, components, custom, documentation, Content Management System, cms, headless, javascript, node, react, express
---
While designing the Payload Admin panel, we determined it should be as minimal and straightforward as possible to allow easy customization and control. There are many times where you may want to completely control how a whole view or a field works. You might even want to add in your own routes entirely. In order for Payload to support that level of customization without introducing versioning / future-proofing issues, Payload provides for a pattern to supply your own React components via your Payload config.
While designing the Payload Admin panel, we determined it should be as minimal and straightforward as possible to allow easy customization and control. There are many times where you may want to completely control how a whole view or a field works. You might even want to add in new views entirely. In order for Payload to support this level of customization without introducing versioning / future-proofing issues, Payload provides for a pattern to supply your own React components via your Payload config.
To swap in your own React component, first, consult the list of available component overrides below. Determine the scope that corresponds to what you are trying to accomplish, and then author your React component accordingly.
<Banner type="success">
<strong>Tip:</strong><br />
Custom components will automatically be provided with all props that the default component would accept.
<strong>Tip:</strong>
<br />
Custom components will automatically be provided with all props that the default component normally
accepts.
</Banner>
### Base Component Overrides
@@ -21,27 +23,27 @@ You can override a set of admin panel-wide components by providing a component t
| Path | Description |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`Nav`** | Contains the sidebar and mobile Nav in its entirety. |
| **`logout.Button`** | A custom React component. |
| **`BeforeDashboard`** | Array of components to inject into the built-in Dashboard, _before_ the default dashboard contents. |
| **`AfterDashboard`** | Array of components to inject into the built-in Dashboard, _after_ the default dashboard contents. [Demo](https://github.com/payloadcms/payload/tree/master/test/admin/components/AfterDashboard/index.tsx) |
| **`BeforeLogin`** | Array of components to inject into the built-in Login, _before_ the default login form. |
| **`AfterLogin`** | Array of components to inject into the built-in Login, _after_ the default login form. |
| **`Nav`** | Contains the sidebar / mobile menu in its entirety. |
| **`BeforeNavLinks`** | Array of components to inject into the built-in Nav, _before_ the links themselves. |
| **`AfterNavLinks`** | Array of components to inject into the built-in Nav, _after_ the links. |
| **`views.Account`** | The Account view is used to show the currently logged in user's Account page. |
| **`views.Dashboard`** | The main landing page of the Admin panel. |
| **`BeforeDashboard`** | Array of components to inject into the built-in Dashboard, _before_ the default dashboard contents. |
| **`AfterDashboard`** | Array of components to inject into the built-in Dashboard, _after_ the default dashboard contents. [Demo](https://github.com/payloadcms/payload/tree/main/test/admin/components/AfterDashboard/index.tsx) |
| **`BeforeLogin`** | Array of components to inject into the built-in Login, _before_ the default login form. |
| **`AfterLogin`** | Array of components to inject into the built-in Login, _after_ the default login form. |
| **`logout.Button`** | A custom React component. |
| **`graphics.Icon`** | Used as a graphic within the `Nav` component. Often represents a condensed version of a full logo. |
| **`graphics.Logo`** | The full logo to be used in contexts like the `Login` view. |
| **`routes`** | Define your own routes to add to the Payload Admin UI. [More](#custom-routes) |
| **`providers`** | Define your own provider components that will wrap the Payload Admin UI. [More](#custom-providers) |
| **`actions`** | Array of custom components to be rendered in the Payload Admin UI header, providing additional interactivity and functionality. |
| **`views`** | Override or create new views within the Payload Admin UI. [More](#views) |
#### Full example:
Here is a full example showing how to swap some of these components for your own.
`payload.config.js`
```ts
import { buildConfig } from "payload/config";
import { buildConfig } from 'payload/config'
import {
MyCustomNav,
MyCustomLogo,
@@ -49,7 +51,8 @@ import {
MyCustomAccount,
MyCustomDashboard,
MyProvider,
} from "./customComponents";
MyCustomAdminAction,
} from './customComponents'
export default buildConfig({
admin: {
@@ -59,6 +62,7 @@ export default buildConfig({
Icon: MyCustomIcon,
Logo: MyCustomLogo,
},
actions: [MyCustomAdminAction],
views: {
Account: MyCustomAccount,
Dashboard: MyCustomDashboard,
@@ -66,47 +70,111 @@ export default buildConfig({
providers: [MyProvider],
},
},
});
})
```
_For more examples regarding how to customize components, look at the following [examples](https://github.com/payloadcms/payload/tree/master/test/admin/components)._
#### Views
You can easily swap entire views with your own by using the `admin.components.views` property. At the root level, Payload renders the following views by default, all of which can be overridden:
| Property | Description |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| **`Account`** | The Account view is used to show the currently logged in user's Account page. |
| **`Dashboard`** | The main landing page of the Admin panel. |
To swap out any of these views, simply pass in your custom component to the `admin.components.views` property of your Payload config. For example:
```ts
// payload.config.ts
{
// ...
admin: {
components: {
views: {
Account: MyCustomAccountView,
Dashboard: MyCustomDashboardView,
},
},
},
}
```
For more granular control, pass a configuration object instead. Each view corresponds to its own `<Route />` component in [React Router v5](https://v5.reactrouter.com). Payload exposes all of the properties of React Router:
| Property | Description |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| **`Component`** \* | Pass in the component that should be rendered when a user navigates to this route. |
| **`path`** \* | React Router `path`. [See the React Router docs](https://v5.reactrouter.com/web/api/Route/path-string-string) for more info. |
| **`exact`** | React Router `exact` property. [More](https://v5.reactrouter.com/web/api/Route/exact-bool) |
| **`strict`** | React Router `strict` property. [More](https://v5.reactrouter.com/web/api/Route/strict-bool) |
| **`sensitive`** | React Router `sensitive` property. [More](https://v5.reactrouter.com/web/api/Route/sensitive-bool) |
_\* An asterisk denotes that a property is required._
#### Adding new views
To add a _new_ view to the Admin Panel, simply add another key to the `views` object with at least a `path` and `Component` property. For example:
```ts
// payload.config.ts
{
// ...
admin: {
components: {
views: {
MyCustomView: {
Component: MyCustomView,
path: '/my-custom-view',
},
},
},
},
}
```
<Banner type="warning">
<strong>Note:</strong>
<br />
Routes are cascading. This means that unless explicitly given the `exact` property, they will match on URLs that simply _start_ with the route's path. This is helpful when creating catch-all routes in your application. Alternatively, you could define your nested route _before_ your parent route.
</Banner>
_For more examples regarding how to customize components, look at the following [examples](https://github.com/payloadcms/payload/tree/main/test/admin/components)._
For help on how to build your own custom view components, see [building a custom view component](#building-a-custom-view-component).
### Collections
You can override components on a Collection-by-Collection basis via each Collection's `admin` property.
You can override components on a collection-by-collection basis via the `admin.components` property.
| Path | Description |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **`views.Edit`** | Used while a document within this Collection is being edited. |
| **`views.List`** | The `List` view is used to render a paginated, filterable table of Documents in this Collection. |
| **`BeforeList`** | Array of components to inject _before_ the built-in List view |
| **`BeforeListTable`** | Array of components to inject _before_ the built-in List view's table |
| **`AfterList`** | Array of components to inject _after_ the built-in List view |
| **`AfterListTable`** | Array of components to inject _after_ the built-in List view's table |
| **`edit.SaveButton`** | Replace the default `Save` button with a custom component. Drafts must be disabled |
| **`edit.SaveDraftButton`** | Replace the default `Save Draft` button with a custom component. Drafts must be enabled and autosave must be disabled. |
| **`edit.PublishButton`** | Replace the default `Publish` button with a custom component. Drafts must be enabled. |
| **`edit.PreviewButton`** | Replace the default `Preview` button with a custom component. |
| **`BeforeList`** | Array of components to inject _before_ the built-in List view |
| **`BeforeListTable`** | Array of components to inject _before_ the built-in List view's table |
| **`AfterListTable`** | Array of components to inject _after_ the built-in List view's table |
| **`AfterList`** | Array of components to inject _after_ the built-in List view |
| **`views`** | Override or create new views within the Payload Admin UI. [More](#collection-views) |
#### Examples
Here is a full example showing how to swap some of these components for your own:
`Collection.ts`
```tsx
// Custom Buttons
import * as React from 'react'
import * as React from "react";
import {
CustomSaveButtonProps,
CustomSaveDraftButtonProps,
CustomPublishButtonProps,
CustomPreviewButtonProps,
} from "payload/types";
} from 'payload/types'
export const CustomSaveButton: CustomSaveButtonProps = ({
DefaultButton,
label,
}) => {
return <DefaultButton label={label} />;
};
export const CustomSaveButton: CustomSaveButtonProps = ({ DefaultButton, label, save }) => {
return <DefaultButton label={label} save={save} />
}
export const CustomSaveDraftButton: CustomSaveDraftButtonProps = ({
DefaultButton,
@@ -114,10 +182,8 @@ export const CustomSaveDraftButton: CustomSaveDraftButtonProps = ({
label,
saveDraft,
}) => {
return (
<DefaultButton label={label} disabled={disabled} saveDraft={saveDraft} />
);
};
return <DefaultButton label={label} disabled={disabled} saveDraft={saveDraft} />
}
export const CustomPublishButton: CustomPublishButtonProps = ({
DefaultButton,
@@ -125,8 +191,8 @@ export const CustomPublishButton: CustomPublishButtonProps = ({
label,
publish,
}) => {
return <DefaultButton label={label} disabled={disabled} publish={publish} />;
};
return <DefaultButton label={label} disabled={disabled} publish={publish} />
}
export const CustomPreviewButton: CustomPreviewButtonProps = ({
DefaultButton,
@@ -134,58 +200,271 @@ export const CustomPreviewButton: CustomPreviewButtonProps = ({
label,
preview,
}) => {
return <DefaultButton label={label} disabled={disabled} preview={preview} />;
};
return <DefaultButton label={label} disabled={disabled} preview={preview} />
}
export const MyCollection: SanitizedCollectionConfig = {
slug: 'my-collection',
admin: {
components: {
edit: {
SaveButton: CustomSaveButton,
SaveDraftButton: CustomSaveDraftButton,
PublishButton: CustomPublishButton,
PreviewButton: CustomPreviewButton,
},
},
}
}
```
##### Custom Collection List View Example
#### Collection views
Collection.ts
To swap out entire views on collections, you can use the `admin.components.views` property on the collection's config. Payload renders the following views by default, all of which can be overridden:
```tsx
import { MyListComponent } from './MyListComponent';
export const MyCollection: CollectionConfig = {
slug: 'mycollection',
| Property | Description |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| **`Edit`** | The Edit view is used to edit a single document for a given collection. |
| **`List`** | The List view is used to show a list of documents for a given collection. |
To swap out any of these views, simply pass in your custom component to the `admin.components.views` property of your Payload config. This will replace the entire view, including the page breadcrumbs, title, tabs, etc, _as well as all nested routes_.
```ts
// Collection.ts
{
// ...
admin: {
components: {
views: {
List: MyListComponent,
Edit: MyCustomEditView,
List: MyCustomListView,
},
},
},
fields: [
...
],
};
}
```
MyListComponent.tsx
_For help on how to build your own custom view components, see [building a custom view component](#building-a-custom-view-component)._
```tsx
import React from "react";
import { List, type Props } from "payload/components/views/List"; // Payload's default List view component and its props
export const MyListComponent: React.FC<Props> = (props) => (
<div>
<p>
Some text before the default list view component. If you just want to do
that, you can also use the admin.components.list.BeforeList hook
</p>
<List {...props} />
</div>
);
**Customizing Nested Views within 'Edit' in Collections**
The `Edit` view in collections consists of several nested views, each serving a unique purpose. You can customize these nested views using the `admin.components.views.Edit` property in the collection's configuration. This approach allows you to replace specific nested views while keeping the overall structure of the `Edit` view intact, including the page breadcrumbs, title, tabs, etc.
Here's an example of how you can customize nested views within the `Edit` view in collections, including the use of the `actions` property:
```ts
// Collection.ts
{
// ...
admin: {
components: {
views: {
Edit: {
Default: {
Component: MyCustomDefaultTab,
actions: [CollectionEditButton], // Custom actions for the default edit view
},
API: {
Component: MyCustomAPIView,
actions: [CollectionAPIButton], // Custom actions for API view
},
LivePreview: {
Component: MyCustomLivePreviewView,
actions: [CollectionLivePreviewButton], // Custom actions for Live Preview
},
Version: {
Component: MyCustomVersionView,
actions: [CollectionVersionButton], // Custom actions for Version view
},
Versions: {
Component: MyCustomVersionsView,
actions: [CollectionVersionsButton], // Custom actions for Versions view
},
},
List: {
actions: [CollectionListButton],
},
},
},
},
}
```
**Adding New Tabs to 'Edit' View**
You can also add _new_ tabs to the `Edit` view by adding another key to the `components.views.Edit[key]` object with a `path` and `Component` property. See [Custom Tabs](#custom-tabs) for more information.
### Globals
As with Collections, You can override components on a global-by-global basis via their `admin` property.
As with Collections, you can override components on a global-by-global basis via the `admin.components` property.
| Path | Description |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **`views.Edit`** | Used while this Global is being edited. |
| **`edit.SaveButton`** | Replace the default `Save` button with a custom component. Drafts must be disabled |
| **`edit.SaveDraftButton`** | Replace the default `Save Draft` button with a custom component. Drafts must be enabled and autosave must be disabled. |
| **`edit.PublishButton`** | Replace the default `Publish` button with a custom component. Drafts must be enabled. |
| **`edit.PreviewButton`** | Replace the default `Preview` button with a custom component. |
| Path | Description |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| **`elements.SaveButton`** | Replace the default `Save` button with a custom component. Drafts must be disabled |
| **`elements.SaveDraftButton`** | Replace the default `Save Draft` button with a custom component. Drafts must be enabled and autosave must be disabled. |
| **`elements.PublishButton`** | Replace the default `Publish` button with a custom component. Drafts must be enabled. |
| **`elements.PreviewButton`** | Replace the default `Preview` button with a custom component. |
| **`views`** | Override or create new views within the Payload Admin UI. [More](#global-views) |
#### Global views
To swap out views for globals, you can use the `admin.components.views` property on the global's config. Payload renders the following views by default, all of which can be overridden:
| Property | Description |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| **`Edit`** | The Edit view is used to edit a single document for a given Global. |
To swap out any of these views, simply pass in your custom component to the `admin.components.views` property of your Payload config. This will replace the entire view, including the page breadcrumbs, title, and tabs, _as well as all nested views_.
```ts
// Global.ts
{
// ...
admin: {
components: {
views: {
Edit: MyCustomEditView,
},
},
},
}
```
_For help on how to build your own custom view components, see [building a custom view component](#building-a-custom-view-component)._
**Customizing Nested Views within 'Edit' in Globals**
Similar to collections, Globals allow for detailed customization within the `Edit` view. This includes the ability to swap specific nested views while maintaining the overall structure of the `Edit` view. You can use the `admin.components.views.Edit` property in the Globals configuration to achieve this, and this will only replace the nested view, leaving the page breadcrumbs, title, and tabs intact.
Here's how you can customize nested views within the `Edit` view in Globals, including the use of the `actions` property:
```ts
// Global.ts
{
// ...
admin: {
components: {
views: {
Edit: {
Default: {
Component: MyCustomGlobalDefaultTab,
actions: [GlobalEditButton], // Custom actions for the default edit view
},
API: {
Component: MyCustomGlobalAPIView,
actions: [GlobalAPIButton], // Custom actions for API view
},
LivePreview: {
Component: MyCustomGlobalLivePreviewView,
actions: [GlobalLivePreviewButton], // Custom actions for Live Preview
},
Version: {
Component: MyCustomGlobalVersionView,
actions: [GlobalVersionButton], // Custom actions for Version view
},
Versions: {
Component: MyCustomGlobalVersionsView,
actions: [GlobalVersionsButton], // Custom actions for Versions view
},
},
},
},
},
}
```
You can also add _new_ tabs to the `Edit` view by adding another key to the `components.views.Edit[key]` object with a `path` and `Component` property. See [Custom Tabs](#custom-tabs) for more information.
### Custom Tabs
You can easily swap individual collection or global edit views. To do this, pass an _object_ to the `admin.components.views.Edit` property of the config. Payload renders the following views by default, all of which can be overridden:
| Property | Description |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| **`Default`** | The Default view is the primary view in which your document is edited. |
| **`Versions`** | The Versions view is used to view the version history of a single document. [More details](../versions) |
| **`Version`** | The Version view is used to view a single version of a single document for a given collection. [More details](../versions). |
| **`API`** | The API view is used to display the REST API JSON response for a given document. |
| **`LivePreview`** | The LivePreview view is used to display the Live Preview interface. [More details](../live-preview) |
Here is an example:
```ts
// Collection.ts or Global.ts
export const MyCollection: SanitizedCollectionConfig = {
slug: 'my-collection',
admin: {
components: {
views: {
Edit: { // You can also define `components.views.Edit` as a component, this will override _all_ nested views
Default: MyCustomDefaultTab,
Versions: MyCustomVersionsTab,
Version: MyCustomVersionTab,
API: MyCustomAPITab,
LivePreview: MyCustomLivePreviewTab,
},
},
},
},
}
```
To add a _new_ tab to the `Edit` view, simply add another key to `components.views.Edit[key]` with at least a `path` and `Component` property. For example:
```ts
// `Collection.ts` or `Global.ts`
export const MyCollection: SanitizedCollectionConfig = {
slug: 'my-collection',
admin: {
components: {
views: {
Edit: {
MyCustomTab: {
Component: MyCustomTab,
path: '/my-custom-tab',
// You an swap the entire tab component out for your own
Tab: MyCustomTab
},
AnotherCustomView: {
Component: AnotherCustomView,
path: '/another-custom-view',
// Or you can use the default tab component and just pass in your own label and href
Tab: {
label: 'Another Custom View',
href: '/another-custom-view',
}
},
},
},
},
},
}
```
### Building a custom view component
Your custom view components will be given all the props that a React Router `<Route />` typically would receive, as well as two props from Payload:
| Prop | Description |
| ----------------------- | ---------------------------------------------------------------------------- |
| **`user`** | The currently logged in user. Will be `null` if no user is logged in. |
| **`canAccessAdmin`** \* | If the currently logged in user is allowed to access the admin panel or not. |
<Banner type="warning">
<strong>Note:</strong>
<br />
It's up to you to secure your custom views. If your view requires a user to be logged in or to
have certain access rights, you should handle that within your view component yourself.
</Banner>
#### Example
You can find examples of custom views in the [Payload source code `/test/admin/components/views` folder](https://github.com/payloadcms/payload/tree/main/test/admin/components/views). There, you'll find two custom views:
1. A custom view that uses the `DefaultTemplate`, which is the built-in Payload template that displays the sidebar and "eyebrow nav"
1. A custom view that uses the `MinimalTemplate` - which is just a centered template used for things like logging in or out
To see how to pass in your custom views to create custom views of your own, take a look at the `admin.components.views` property of the [Payload test admin config](https://github.com/payloadcms/payload/blob/main/test/admin/config.ts).
### Fields
@@ -194,10 +473,9 @@ All Payload fields support the ability to swap in your own React components. So,
<Banner type="success">
<strong>Tip:</strong>
<br />
Don't see a built-in field type that you need? Build it! Using a combination
of custom validation and custom components, you can override the entirety of
how a component functions within the admin panel and effectively create your
own field type.
Don't see a built-in field type that you need? Build it! Using a combination of custom validation
and custom components, you can override the entirety of how a component functions within the admin
panel and effectively create your own field type.
</Banner>
**Fields support the following custom components:**
@@ -208,6 +486,15 @@ All Payload fields support the ability to swap in your own React components. So,
| **`Cell`** | Used in the `List` view's table to represent a table-based preview of the data stored in the field. [More](#cell-component) |
| **`Field`** | Swap out the field itself within all `Edit` views. [More](#field-component) |
As an alternative to replacing the entire Field component, you may want to keep the majority of the default Field component and only swap components within. This allows you to replace the **`Label`** or **`Error`** within a field component or add additional components inside the field with **`beforeInput`** or **`afterInput`**. **`beforeInput`** and **`afterInput`** are allowed in any fields that don't contain other fields, except [UI](/docs/fields/ui) and [Rich Text](/docs/fields/rich-text).
| Component | Description |
| ----------------- | --------------------------------------------------------------------------------------------------------------- |
| **`Label`** | Override the default Label in the Field Component. [More](#label-component) |
| **`Error`** | Override the default Label in the Field Component. [More](#error-component) |
| **`beforeInput`** | An array of elements that will be added before `input`/`textarea` elements. [More](#afterinput-and-beforeinput) |
| **`afterInput`** | An array of elements that will be added after `input`/`textarea` elements. [More](#afterinput-and-beforeinput) |
## Cell Component
These are the props that will be passed to your custom Cell to use in your own components.
@@ -223,15 +510,17 @@ These are the props that will be passed to your custom Cell to use in your own c
#### Example
```tsx
import React from "react";
import "./index.scss";
const baseClass = "custom-cell";
import React from 'react'
import type { Props } from 'payload/components/views/Cell'
import './index.scss'
const baseClass = 'custom-cell'
const CustomCell: React.FC<Props> = (props) => {
const { field, colIndex, collection, cellData, rowData } = props;
const { field, colIndex, collection, cellData, rowData } = props
return <span className={baseClass}>{cellData}</span>;
};
return <span className={baseClass}>{cellData}</span>
}
```
## Field Component
@@ -243,76 +532,127 @@ When writing your own custom components you can make use of a number of hooks to
When swapping out the `Field` component, you'll be responsible for sending and receiving the field's `value` from the form itself. To do so, import the `useField` hook as follows:
```tsx
import { useField } from "payload/components/forms";
import { useField } from 'payload/components/forms'
type Props = { path: string };
const CustomTextField: React.FC<Props> = ({ path }) => {
const CustomTextField: React.FC<{ path: string }> = ({ path }) => {
// highlight-start
const { value, setValue } = useField<Props>({ path });
const { value, setValue } = useField<string>({ path })
// highlight-end
return (
<input onChange={(e) => setValue(e.target.value)} value={value.path} />
);
};
return <input onChange={(e) => setValue(e.target.value)} value={value} />
}
```
<Banner type="success">
For more information regarding the hooks that are available to you while you
build custom components, including the <strong>useField</strong> hook, [click
here](/docs/admin/hooks).
For more information regarding the hooks that are available to you while you build custom
components, including the <strong>useField</strong> hook, [click here](/docs/admin/hooks).
</Banner>
## Custom routes
## Label Component
You can easily add your own custom routes to the Payload Admin panel using the `admin.components.routes` property. Payload currently uses the extremely powerful React Router v5.x and custom routes support all the properties of the React Router `<Route />` component.
These are the props that will be passed to your custom Label.
**Custom routes support the following properties:**
| Property | Description |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| **`Component`** \* | Pass in the component that should be rendered when a user navigates to this route. |
| **`path`** \* | React Router `path`. [See the React Router docs](https://v5.reactrouter.com/web/api/Route/path-string-string) for more info. |
| **`exact`** | React Router `exact` property. [More](https://v5.reactrouter.com/web/api/Route/exact-bool) |
| **`strict`** | React Router `strict` property. [More](https://v5.reactrouter.com/web/api/Route/strict-bool) |
| **`sensitive`** | React Router `sensitive` property. [More](https://v5.reactrouter.com/web/api/Route/sensitive-bool) |
_\* An asterisk denotes that a property is required._
#### Custom route components
Your custom route components will be given all the props that a React Router `<Route />` typically would receive, as well as two props from Payload:
| Prop | Description |
| ----------------------- | ---------------------------------------------------------------------------- |
| **`user`** | The currently logged in user. Will be `null` if no user is logged in. |
| **`canAccessAdmin`** \* | If the currently logged in user is allowed to access the admin panel or not. |
<Banner type="warning">
<strong>Note:</strong>
<br />
It's up to you to secure your custom routes. If your route requires a user to
be logged in or to have certain access rights, you should handle that within
your route component yourself.
</Banner>
| Property | Description |
| ---------------- | ---------------------------------------------------------------- |
| **`htmlFor`** | Property used to set `for` attribute for label. |
| **`label`** | Label value provided in field, it can be used with i18n. |
| **`required`** | A boolean value that represents if the field is required or not. |
#### Example
You can find examples of custom route views in the [Payload source code `/test/admin/components/views` folder](https://github.com/payloadcms/payload/tree/master/test/admin/components/views). There, you'll find two custom routes:
```tsx
import React from 'react'
import { useTranslation } from 'react-i18next'
1. A custom view that uses the `DefaultTemplate`, which is the built-in Payload template that displays the sidebar and "eyebrow nav"
1. A custom view that uses the `MinimalTemplate` - which is just a centered template used for things like logging in or out
import { getTranslation } from 'payload/utilities/getTranslation'
To see how to pass in your custom views to create custom routes of your own, take a look at the `admin.components.routes` property of the [Payload test admin config](https://github.com/payloadcms/payload/blob/master/test/admin/config.ts).
type Props = {
htmlFor?: string
label?: Record<string, string> | false | string
required?: boolean
}
const CustomLabel: React.FC<Props> = (props) => {
const { htmlFor, label, required = false } = props
const { i18n } = useTranslation()
if (label) {
return (<span>
{getTranslation(label, i18n)}
{required && <span className="required">*</span>}
</span>);
}
return null
}
```
## Error Component
These are the props that will be passed to your custom Error.
| Property | Description |
| ---------------- | ------------------------------------------------------------- |
| **`message`** | The error message. |
| **`showError`** | A boolean value that represents if the error should be shown. |
#### Example
```tsx
import React from 'react'
type Props = {
message: string
showError?: boolean
}
const CustomError: React.FC<Props> = (props) => {
const { message, showError } = props
if (showError) {
return <p style={{color: 'red'}}>{message}</p>
} else return null;
}
```
## afterInput and beforeInput
With these properties you can add multiple components before and after the input element. For example, you can add an absolutely positioned button to clear the current field value.
#### Example
```tsx
import React from 'react'
import { Field } from 'payload/types'
import './style.scss'
const ClearButton: React.FC = () => {
return <button onClick={() => {/* ... */}}>X</button>
}
const titleField: Field = {
name: 'title',
type: 'text',
admin: {
components: {
afterInput: [ClearButton]
}
}
}
export default titleField;
```
## Custom providers
As your admin customizations gets more complex you may want to share state between fields or other components. You can add custom providers to do add your own context to any Payload app for use in other custom components within the admin panel. Within your config add `admin.components.providers`, these can be used to share context or provide other custom functionality. Read the [React context](https://reactjs.org/docs/context.html) docs to learn more.
<Banner type="warning">
<strong>Reminder:</strong> Don't forget to pass the **children** prop through
the provider component for the admin UI to show
<strong>Reminder:</strong> Don't forget to pass the **children** prop through the provider
component for the admin UI to show
</Banner>
### Styling Custom Components
@@ -332,40 +672,40 @@ When developing custom components you can support multiple languages to be consi
For example:
```tsx
import { useTranslation } from "react-i18next";
import { useTranslation } from 'react-i18next'
const CustomComponent: React.FC = () => {
// highlight-start
const { t, i18n } = useTranslation("namespace1");
const { t, i18n } = useTranslation('namespace1')
// highlight-end
return (
<ul>
<li>{t("key", { variable: "value" })}</li>
<li>{t("namespace2:key", { variable: "value" })}</li>
<li>{t('key', { variable: 'value' })}</li>
<li>{t('namespace2:key', { variable: 'value' })}</li>
<li>{i18n.language}</li>
</ul>
);
};
)
}
```
### Getting the current locale
In any custom component you can get the selected locale with the `useLocale` hook. Here is a simple example:
In any custom component you can get the selected locale with `useLocale` hook. `useLocale` returns the full locale object, consisting of a `label`, `rtl`(right-to-left) property, and then `code`. Here is a simple example:
```tsx
import { useLocale } from "payload/components/utilities";
import { useLocale } from 'payload/components/utilities'
const Greeting: React.FC = () => {
// highlight-start
const locale = useLocale();
const locale = useLocale()
// highlight-end
const trans = {
en: "Hello",
es: "Hola",
};
en: 'Hello',
es: 'Hola',
}
return <span> {trans[locale]} </span>;
};
return <span> {trans[locale.code]} </span>
}
```

View File

@@ -13,15 +13,16 @@ You can add your own CSS by providing your base Payload config with a path to yo
To do so, provide your base Payload config with a path to your own stylesheet. It can be either a CSS or SCSS file.
**Example in payload.config.js:**
```ts
import { buildConfig } from 'payload/config';
import path from 'path';
import { buildConfig } from 'payload/config'
import path from 'path'
const config = buildConfig({
admin: {
css: path.resolve(__dirname, 'relative/path/to/stylesheet.scss'),
},
});
admin: {
css: path.resolve(__dirname, 'relative/path/to/stylesheet.scss'),
},
})
```
### Overriding built-in styles
@@ -30,7 +31,7 @@ To make it as easy as possible for you to override our styles, Payload uses [BEM
In addition to adding your own style definitions, you can also override Payload's built-in CSS variables. We use as much as possible behind the scenes, and you can override any of them that you'd like to.
You can find the built-in Payload CSS variables within [`./src/admin/scss/app.scss`](https://github.com/payloadcms/payload/blob/master/src/admin/scss/app.scss) and [`./src/admin/scss/colors.scss`](https://github.com/payloadcms/payload/blob/master/src/admin/scss/colors.scss). The following variables are defined and can be overridden:
You can find the built-in Payload CSS variables within [`./src/admin/scss/app.scss`](https://github.com/payloadcms/payload/blob/main/packages/payload/src/admin/scss/app.scss) and [`./src/admin/scss/colors.scss`](https://github.com/payloadcms/payload/blob/main/packages/payload/src/admin/scss/colors.scss). The following variables are defined and can be overridden:
- Breakpoints
- Base color shades (white to black by default)
@@ -43,7 +44,8 @@ You can find the built-in Payload CSS variables within [`./src/admin/scss/app.sc
#### Dark mode
<Banner type="warning">
If you're overriding colors or theme elevations, make sure to consider how your changes will affect dark mode.
If you're overriding colors or theme elevations, make sure to consider how your changes will
affect dark mode.
</Banner>
By default, Payload automatically overrides all `--theme-elevation`s and inverts all success / warning / error shades to suit dark mode. We also update some base theme variables like `--theme-bg`, `--theme-text`, etc.

View File

@@ -0,0 +1,27 @@
---
title: Environment Variables in Admin UI
label: Environment Variables
order: 100
desc: NEEDS TO BE WRITTEN
---
## Admin environment vars
<Banner type="warning">
<strong>Important:</strong>
<br />
Be careful about what variables you provide to your client-side code. Analyze every single one to
make sure that you're not accidentally leaking anything that an attacker could exploit. Only keys
that are safe for anyone to read in plain text should be provided to your Admin panel.
</Banner>
By default, `env` variables are **not** provided to the Admin panel for security and safety reasons.
But, Payload provides you with a way to still provide `env` vars to your frontend code.
**Payload will automatically supply any present `env` variables that are prefixed with `PAYLOAD_PUBLIC_` directly to the Admin panel.**
For example, if you've got the following environment variable:
`PAYLOAD_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_XXXXXXXXXXXXXXXXXX`
This key will automatically be made available to the Payload bundle and can be referenced in your Admin component code as `process.env.PAYLOAD_PUBLIC_STRIPE_PUBLISHABLE_KEY`.

View File

@@ -0,0 +1,206 @@
---
title: Excluding server-only code from admin UI
label: Excluding server code
order: 70
desc: Learn how to exclude server-only code from the Payload Admin UI bundle
---
Because the Admin Panel browser bundle includes your Payload Config file, files using server-only modules need to be excluded.
It's common for your config to rely on server only modules to perform logic in access control functions, hooks, and other contexts.
Any file that imports a server-only module such as `fs`, `stripe`, `authorizenet`, `nodemailer`, etc. **cannot** be included in the browser bundle.
#### Example Scenario
Say we have a collection called `Subscriptions` that has a `beforeChange` hook that creates a Stripe subscription whenever a Subscription document is created in Payload.
**Collection config**:
```ts
// collections/Subscriptions/index.ts
import { CollectionConfig } from 'payload/types'
import createStripeSubscription from './hooks/createStripeSubscription'
export const Subscription: CollectionConfig = {
slug: 'subscriptions',
hooks: {
beforeChange: [createStripeSubscription],
},
fields: [
{
name: 'stripeSubscriptionID',
type: 'text',
required: true,
},
],
}
```
**Collection hook**:
```ts
// collections/Subscriptions/hooks/createStripeSubscription.ts
// highlight-start
import Stripe from 'stripe' // <-- server-only module
// highlight-end
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY)
export const createStripeSubscription = async ({ data, operation }) => {
if (operation === 'create') {
const dataWithStripeID = { ...data }
// use Stripe to create a Stripe subscription
const subscription = await stripe.subscriptions.create({
// Configure the subscription accordingly
})
// Automatically add the Stripe subscription ID
// to the data that will be saved to this Subscription doc
dataWithStripeID.stripeSubscriptionID = subscription.id
return dataWithStripeID
}
return data
}
```
<Banner type="error">
<strong>Warning:</strong>
<br />
The above code is NOT production-ready and should not be referenced to create Stripe
subscriptions. Although creating a beforeChange hook is a completely valid spot to do things like
create subscriptions, the code above is incomplete and insecure, meant for explanation purposes
only.
</Banner>
**As-is, this collection will prevent your Admin panel from bundling or loading correctly, because Stripe relies on some Node-only packages.**
#### How to fix this
You need to make sure that you use `alias`es to tell your bundler to import "safe" files vs. attempting to import any server-side code that you need to get rid of. Depending on your bundler (Webpack, Vite, etc.) the steps involved may be slightly different.
The basic idea is to create a file that exports an empty object, and then alias import paths of any files that import server-only modules to that empty object file.
This way when your bundler goes to import a file that contains server-only modules, it will instead import the empty object file, which will not break the browser bundle.
### Aliasing server-only modules
To remove files that contain server-only modules from your bundle, you can use an `alias`.
In the Subscriptions config file above, we are importing the hook like so:
```ts
// collections/Subscriptions/index.ts
import createStripeSubscription from './hooks/createStripeSubscription'
```
By default the browser bundle will now include all the code from that file and any files down the tree. We know that the file imports `stripe`.
To fix this, we need to alias the `createStripeSubscription` file to a different file that can safely be included in the browser bundle.
First, we will create a mock file to replace the server-only file when bundling:
```js
// mocks/modules.js
export default {}
/**
* NOTE: if you are destructuring an import
* the mock file will need to export matching
* variables as the destructured object.
*
* export const namedExport = {}
*/
```
Aliasing with [Webpack](/docs/admin/webpack) can be done by:
```ts
// payload.config.ts
import { buildConfig } from 'payload/config'
import { webpackBundler } from '@payloadcms/bundler-webpack'
import { Subscriptions } from './collections/Subscriptions'
const mockModulePath = path.resolve(__dirname, 'mocks/emptyObject.js')
const fullFilePath = path.resolve(
__dirname,
'collections/Subscriptions/hooks/createStripeSubscription'
)
export default buildConfig({
collections: [Subscriptions],
admin: {
bundler: webpackBundler(),
webpack: (config) => {
return {
...config,
resolve: {
...config.resolve,
// highlight-start
alias: {
...config.resolve.alias,
[fullFilePath]: mockModulePath,
},
// highlight-end
},
}
},
},
})
```
Aliasing with [Vite](/docs/admin/vite) can be done by:
```ts
// payload.config.ts
import { buildConfig } from 'payload/config'
import { viteBundler } from '@payloadcms/bundler-vite'
import { Subscriptions } from './collections/Subscriptions'
const mockModulePath = path.resolve(__dirname, 'mocks/emptyObject.js')
export default buildConfig({
collections: [Subscriptions],
admin: {
bundler: viteBundler(),
vite: (incomingViteConfig) => {
const existingAliases = incomingViteConfig?.resolve?.alias || {};
let aliasArray: { find: string | RegExp; replacement: string; }[] = [];
// Pass the existing Vite aliases
if (Array.isArray(existingAliases)) {
aliasArray = existingAliases;
} else {
aliasArray = Object.values(existingAliases);
}
// highlight-start
// Add your own aliases using the find and replacement keys
// remember, vite aliases are exact-match only
aliasArray.push({
find: '../server-only-module',
replacement: path.resolve(__dirname, './path/to/browser-safe-module.js')
});
// highlight-end
return {
...incomingViteConfig,
resolve: {
...(incomingViteConfig?.resolve || {}),
alias: aliasArray,
}
};
},
},
})
```

View File

@@ -24,7 +24,7 @@ const CustomTextField: React.FC<Props> = ({ path }) => {
const { value, setValue } = useField<string>({ path })
// highlight-end
return <input onChange={e => setValue(e.target.value)} value={value.path} />
return <input onChange={(e) => setValue(e.target.value)} value={value.path} />
}
```
@@ -57,7 +57,8 @@ const {
There are times when a custom field component needs to have access to data from other fields, and you have a few options to do so. The `useFormFields` hook is a powerful and highly performant way to retrieve a form's field state, as well as to retrieve the `dispatchFields` method, which can be helpful for setting other fields' form states from anywhere within a form.
<Banner type="success">
<strong>This hook is great for retrieving only certain fields from form state</strong> because it ensures that it will only cause a rerender when the items that you ask for change.
<strong>This hook is great for retrieving only certain fields from form state</strong> because it
ensures that it will only cause a rerender when the items that you ask for change.
</Banner>
Thanks to the awesome package [`use-context-selector`](https://github.com/dai-shi/use-context-selector), you can retrieve a specific field's state easily. This is ideal because you can ensure you have an up-to-date field state, and your component will only re-render when _that field's state_ changes.
@@ -65,21 +66,19 @@ Thanks to the awesome package [`use-context-selector`](https://github.com/dai-sh
You can pass a Redux-like selector into the hook, which will ensure that you retrieve only the field that you want. The selector takes an argument with type of `[fields: Fields, dispatch: React.Dispatch<Action>]]`.
```tsx
import { useFormFields } from 'payload/components/forms';
import { useFormFields } from 'payload/components/forms'
const MyComponent: React.FC = () => {
// Get only the `amount` field state, and only cause a rerender when that field changes
const amount = useFormFields(([fields, dispatch]) => fields.amount);
const amount = useFormFields(([fields, dispatch]) => fields.amount)
// Do the same thing as above, but to the `feePercentage` field
const feePercentage = useFormFields(([fields, dispatch]) => fields.feePercentage);
const feePercentage = useFormFields(([fields, dispatch]) => fields.feePercentage)
if (typeof amount?.value !== 'undefined' && typeof feePercentage?.value !== 'undefined') {
return (
<span>The fee is ${(amount.value * feePercentage.value) / 100}</span>
);
return <span>The fee is ${(amount.value * feePercentage.value) / 100}</span>
}
};
}
```
### useAllFormFields
@@ -117,7 +116,7 @@ If you are building a custom component, then you should use `setValue` which is
You can send the following actions to the `dispatchFields` function.
| Action | Description |
|------------------------|----------------------------------------------------------------------------|
| ---------------------- | -------------------------------------------------------------------------- |
| **`ADD_ROW`** | Adds a row of data (useful in array / block field data) |
| **`DUPLICATE_ROW`** | Duplicates a row of data (useful in array / block field data) |
| **`MODIFY_CONDITION`** | Updates a field's conditional logic result (true / false) |
@@ -127,43 +126,521 @@ You can send the following actions to the `dispatchFields` function.
| **`REPLACE_STATE`** | Completely replaces form state |
| **`UPDATE`** | Update any property of a specific field's state |
To see types for each action supported within the `dispatchFields` hook, check out the Form types [here](https://github.com/payloadcms/payload/blob/master/src/admin/components/forms/Form/types.ts).
To see types for each action supported within the `dispatchFields` hook, check out the Form types [here](https://github.com/payloadcms/payload/blob/main/packages/payload/src/admin/components/forms/Form/types.ts).
### useForm
The `useForm` hook can be used to interact with the form itself, and sends back many methods that can be used to reactively fetch form state without causing rerenders within your components each time a field is changed. This is useful if you have action-based callbacks that your components fire, and need to interact with form state _based on a user action_.
<Banner type="warning">
<strong>Warning:</strong><br/>
This hook is optimized to avoid causing rerenders when fields change, and as such, its `fields` property will be out of date. You should only leverage this hook if you need to perform actions against the form in response to your users' actions. Do not rely on its returned "fields" as being up-to-date. They will be removed from this hook's response in an upcoming version.
<strong>Warning:</strong>
<br />
This hook is optimized to avoid causing rerenders when fields change, and as such, its `fields`
property will be out of date. You should only leverage this hook if you need to perform actions
against the form in response to your users' actions. Do not rely on its returned "fields" as being
up-to-date. They will be removed from this hook's response in an upcoming version.
</Banner>
The `useForm` hook returns an object with the following properties:
The `useForm` hook returns an object with the following properties: |
| Action | Description |
|----------------------|---------------------------------------------------------------------|
| **`fields`** | Deprecated. This property cannot be relied on as up-to-date. |
| **`submit`** | Method to trigger the form to submit |
| **`dispatchFields`** | Dispatch actions to the form field state |
| **`validateForm`** | Trigger a validation of the form state |
| **`createFormData`** | Create a `multipart/form-data` object from the current form's state |
| **`disabled`** | Boolean denoting whether or not the form is disabled |
| **`getFields`** | Gets all fields from state |
| **`getField`** | Gets a single field from state by path |
| **`getData`** | Returns the data stored in the form |
| **`getSiblingData`** | Returns form sibling data for the given field path |
| **`setModified`** | Set the form's `modified` state |
| **`setProcessing`** | Set the form's `processing` state |
| **`setSubmitted`** | Set the form's `submitted` state |
| **`formRef`** | The ref from the form HTML element |
| **`reset`** | Method to reset the form to its initial state |
<TableWithDrawers
columns={[
'Action',
'Description',
'Example',
]}
rows={[
[
{
value: <strong><code>fields</code></strong>,
},
{
value: "Deprecated. This property cannot be relied on as up-to-date.",
},
{
value: ''
}
],
[
{
value: <strong><code>submit</code></strong>,
},
{
value: "Method to trigger the form to submit",
},
{
value: ''
}
],
[
{
value: <strong><code>dispatchFields</code></strong>,
},
{
value: "Dispatch actions to the form field state",
},
{
value: ''
}
],
[
{
value: <strong><code>validateForm</code></strong>,
},
{
value: "Trigger a validation of the form state",
},
{
value: ''
}
],
[
{
value: <strong><code>createFormData</code></strong>,
},
{
value: <>Create a <code>multipart/form-data</code> object from the current form's state</>,
},
{
value: ''
}
],
[
{
value: <strong><code>disabled</code></strong>,
},
{
value: "Boolean denoting whether or not the form is disabled",
},
{
value: ''
}
],
[
{
value: <strong><code>getFields</code></strong>,
},
{
value: 'Gets all fields from state',
},
{
value: '',
}
],
[
{
value: <strong><code>getField</code></strong>,
},
{
value: 'Gets a single field from state by path',
},
{
value: '',
},
],
[
{
value: <strong><code>getData</code></strong>,
},
{
value: 'Returns the data stored in the form',
},
{
value: '',
},
],
[
{
value: <strong><code>getSiblingData</code></strong>,
},
{
value: 'Returns form sibling data for the given field path',
},
{
value: '',
},
],
[
{
value: <strong><code>setModified</code></strong>,
},
{
value: <>Set the form\'s <code>modified</code> state</>,
},
{
value: '',
},
],
[
{
value: <strong><code>setProcessing</code></strong>,
},
{
value: <>Set the form\'s <code>processing</code> state</>,
},
{
value: '',
},
],
[
{
value: <strong><code>setSubmitted</code></strong>,
},
{
value: <>Set the form\'s <code>submitted</code> state</>,
},
{
value: '',
},
],
[
{
value: <strong><code>formRef</code></strong>,
},
{
value: 'The ref from the form HTML element',
},
{
value: '',
},
],
[
{
value: <strong><code>reset</code></strong>,
},
{
value: 'Method to reset the form to its initial state',
},
{
value: '',
},
],
[
{
value: <strong><code>addFieldRow</code></strong>,
},
{
value: "Method to add a row on an array or block field",
},
{
drawerTitle: 'addFieldRow',
drawerDescription: 'A useful method to programmatically add a row to an array or block field.',
drawerSlug: 'addFieldRow',
drawerContent: (
<>
<TableWithDrawers
columns={[
'Prop',
'Description',
]}
rows={[
[
{
value: <strong><code>path</code></strong>,
},
{
value: "The path to the array or block field",
},
],
[
{
value: <strong><code>rowIndex</code></strong>,
},
{
value: "The index of the row to add. If omitted, the row will be added to the end of the array.",
},
],
[
{
value: <strong><code>data</code></strong>,
},
{
value: "The data to add to the row",
},
],
]}
/>
{' '}
<br />
{' '}
<pre>
{`import { useForm } from "payload/components/forms";
export const CustomArrayManager = () => {
const { addFieldRow } = useForm()
return (
<button
type="button"
onClick={() => {
addFieldRow({
path: "arrayField",
rowIndex: 0,
data: {
textField: "text",
// blockType: "yourBlockSlug",
// ^ if managing a block array, you need to specify the block type
},
})
}}
>
Add Row
</button>
)
}`}
</pre>
<p>An example config to go along with the custom component</p>
<pre>
{`const ExampleCollection = {
slug: "example-collection",
fields: [
{
name: "arrayField",
type: "array",
fields: [
{
name: "textField",
type: "text",
},
],
},
{
type: "ui",
name: "customArrayManager",
admin: {
components: {
Field: CustomArrayManager,
},
},
},
],
}`}
</pre>
</>
)
}
],
[
{
value: <strong><code>removeFieldRow</code></strong>,
},
{
value: "Method to remove a row from an array or block field",
},
{
drawerTitle: 'removeFieldRow',
drawerDescription: 'A useful method to programmatically remove a row from an array or block field.',
drawerSlug: 'removeFieldRow',
drawerContent: (
<>
<TableWithDrawers
columns={[
'Prop',
'Description',
]}
rows={[
[
{
value: <strong><code>path</code></strong>,
},
{
value: "The path to the array or block field",
},
],
[
{
value: <strong><code>rowIndex</code></strong>,
},
{
value: "The index of the row to remove",
},
],
]}
/>
{' '}
<br />
{' '}
<pre>
{`import { useForm } from "payload/components/forms";
export const CustomArrayManager = () => {
const { removeFieldRow } = useForm()
return (
<button
type="button"
onClick={() => {
removeFieldRow({
path: "arrayField",
rowIndex: 0,
})
}}
>
Remove Row
</button>
)
}`}
</pre>
<p>An example config to go along with the custom component</p>
<pre>
{`const ExampleCollection = {
slug: "example-collection",
fields: [
{
name: "arrayField",
type: "array",
fields: [
{
name: "textField",
type: "text",
},
],
},
{
type: "ui",
name: "customArrayManager",
admin: {
components: {
Field: CustomArrayManager,
},
},
},
],
}`}
</pre>
</>
)
}
],
[
{
value: <strong><code>replaceFieldRow</code></strong>,
},
{
value: "Method to replace a row from an array or block field",
},
{
drawerTitle: 'replaceFieldRow',
drawerDescription: 'A useful method to programmatically replace a row from an array or block field.',
drawerSlug: 'replaceFieldRow',
drawerContent: (
<>
<TableWithDrawers
columns={[
'Prop',
'Description',
]}
rows={[
[
{
value: <strong><code>path</code></strong>,
},
{
value: "The path to the array or block field",
},
],
[
{
value: <strong><code>rowIndex</code></strong>,
},
{
value: "The index of the row to replace",
},
],
[
{
value: <strong><code>data</code></strong>,
},
{
value: "The data to replace within the row",
},
],
]}
/>
{' '}
<br />
{' '}
<pre>
{`import { useForm } from "payload/components/forms";
export const CustomArrayManager = () => {
const { replaceFieldRow } = useForm()
return (
<button
type="button"
onClick={() => {
replaceFieldRow({
path: "arrayField",
rowIndex: 0,
data: {
textField: "updated text",
// blockType: "yourBlockSlug",
// ^ if managing a block array, you need to specify the block type
},
})
}}
>
Replace Row
</button>
)
}`}
</pre>
<p>An example config to go along with the custom component</p>
<pre>
{`const ExampleCollection = {
slug: "example-collection",
fields: [
{
name: "arrayField",
type: "array",
fields: [
{
name: "textField",
type: "text",
},
],
},
{
type: "ui",
name: "customArrayManager",
admin: {
components: {
Field: CustomArrayManager,
},
},
},
],
}`}
</pre>
</>
)
}
],
]}
/>
### useDocumentInfo
The `useDocumentInfo` hook provides lots of information about the document currently being edited, including the following:
| Property | Description |
|---------------------------|--------------------------------------------------------------------------------------------------------------------| |
|---------------------------|--------------------------------------------------------------------------------------------------------------------|
| **`collection`** | If the doc is a collection, its collection config will be returned |
| **`global`** | If the doc is a global, its global config will be returned |
| **`id`** | If the doc is a collection, its ID will be returned |
@@ -178,47 +655,45 @@ The `useDocumentInfo` hook provides lots of information about the document curre
**Example:**
```tsx
import { useDocumentInfo } from 'payload/components/utilities';
import { useDocumentInfo } from 'payload/components/utilities'
const LinkFromCategoryToPosts: React.FC = () => {
// highlight-start
const { id } = useDocumentInfo();
const { id } = useDocumentInfo()
// highlight-end
// id will be undefined on the create form
if (!id) {
return null;
return null
}
return (
<a href={`/admin/collections/posts?where[or][0][and][0][category][in][0]=[${id}]`} >
<a href={`/admin/collections/posts?where[or][0][and][0][category][in][0]=[${id}]`}>
View posts
</a>
)
};
}
```
### useLocale
In any custom component you can get the selected locale with the `useLocale` hook. Here is a simple example:
In any custom component you can get the selected locale object with the `useLocale` hook. `useLocale`gives you the full locale object, consisting of a `label`, `rtl`(right-to-left) property, and then `code`. Here is a simple example:
```tsx
import { useLocale } from 'payload/components/utilities';
import { useLocale } from 'payload/components/utilities'
const Greeting: React.FC = () => {
// highlight-start
const locale = useLocale();
const locale = useLocale()
// highlight-end
const trans = {
en: 'Hello',
es: 'Hola',
};
}
return (
<span> { trans[locale] } </span>
);
};
return <span> {trans[locale.code]} </span>
}
```
### useAuth
@@ -226,7 +701,7 @@ const Greeting: React.FC = () => {
Useful to retrieve info about the currently logged in user as well as methods for interacting with it. It sends back an object with the following properties:
| Property | Description |
|--------------------------|-----------------------------------------------------------------------------------------|
| ------------------------ | --------------------------------------------------------------------------------------- |
| **`user`** | The currently logged in user |
| **`logOut`** | A method to log out the currently logged in user |
| **`refreshCookie`** | A method to trigger the silent refreshing of a user's auth token |
@@ -236,18 +711,16 @@ Useful to retrieve info about the currently logged in user as well as methods fo
| **`permissions`** | The permissions of the current user |
```tsx
import { useAuth } from 'payload/components/utilities';
import { User } from '../payload-types.ts';
import { useAuth } from 'payload/components/utilities'
import { User } from '../payload-types.ts'
const Greeting: React.FC = () => {
// highlight-start
const { user } = useConfig<User>();
const { user } = useAuth<User>()
// highlight-end
return (
<span>Hi, {user.email}!</span>
);
};
return <span>Hi, {user.email}!</span>
}
```
### useConfig
@@ -255,17 +728,15 @@ const Greeting: React.FC = () => {
Used to easily fetch the full Payload config.
```tsx
import { useConfig } from 'payload/components/utilities';
import { useConfig } from 'payload/components/utilities'
const MyComponent: React.FC = () => {
// highlight-start
const config = useConfig();
const config = useConfig()
// highlight-end
return (
<span>{config.serverURL}</span>
);
};
return <span>{config.serverURL}</span>
}
```
### useEditDepth
@@ -273,19 +744,99 @@ const MyComponent: React.FC = () => {
Sends back how many editing levels "deep" the current component is. Edit depth is relevant while adding new documents / editing documents in modal windows and other cases.
```tsx
import { useEditDepth } from 'payload/components/utilities';
import { useEditDepth } from 'payload/components/utilities'
const MyComponent: React.FC = () => {
// highlight-start
const editDepth = useEditDepth();
const editDepth = useEditDepth()
// highlight-end
return (
<span>My component is {editDepth} levels deep</span>
)
return <span>My component is {editDepth} levels deep</span>
}
```
### usePreferences
Returns methods to set and get user preferences. More info can be found [here](https://payloadcms.com/docs/admin/preferences).
### useTheme
Returns the currently selected theme (`light`, `dark` or `auto`), a set function to update it and a boolean `autoMode`, used to determine if the theme value should be set automatically based on the user's device preferences.
```tsx
import { useTheme } from 'payload/components/utilities'
const MyComponent: React.FC = () => {
// highlight-start
const { autoMode, setTheme, theme } = useTheme()
// highlight-end
return (
<>
<span>The current theme is {theme} and autoMode is {autoMode}</span>
<button
type="button"
onClick={() => setTheme(prev => prev === "light" ? "dark" : "light")}
>
Toggle theme
</button>
</>
)
}
```
### useTableColumns
Returns methods to manipulate table columns
```tsx
import { useTableColumns } from 'payload/components/hooks'
const MyComponent: React.FC = () => {
// highlight-start
const { setActiveColumns } = useTableColumns()
const resetColumns = () => {
setActiveColumns(['id', 'createdAt', 'updatedAt'])
}
// highlight-end
return (
<button
type="button"
onClick={resetColumns}
>
Reset columns
</button>
)
}
```
### useDocumentEvents
The `useDocumentEvents` hook provides a way of subscribing to cross-document events, such as updates made to nested documents within a drawer. This hook will report document events that are outside the scope of the document currently being edited. This hook provides the following:
| Property | Description |
|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| **`mostRecentUpdate`** | An object containing the most recently updated document. It contains the `entitySlug`, `id` (if collection), and `updatedAt` properties |
| **`reportUpdate`** | A method used to report updates to documents. It accepts the same arguments as the `mostRecentUpdate` property. |
**Example:**
```tsx
import { useDocumentEvents } from 'payload/components/hooks'
const ListenForUpdates: React.FC = () => {
const { mostRecentUpdate } = useDocumentEvents()
return (
<span>
{JSON.stringify(mostRecentUpdate)}
</span>
)
}
```
<Banner type="info">
Right now the `useDocumentEvents` hook only tracks recently updated documents, but in the future it will track more document-related events as needed, such as document creation, deletion, etc.
</Banner>

View File

@@ -8,37 +8,45 @@ keywords: admin, components, custom, customize, documentation, Content Managemen
Payload dynamically generates a beautiful, fully functional React admin panel to manage your data. It's extremely powerful and can be customized / extended upon easily by swapping in your own React components. You can add additional views, modify how built-in views look / work, swap out Payload branding for your client's, build your own field types and much more.
The Payload Admin panel is built with Webpack, code-split, highly performant (even with 100+ fields), and written fully in TypeScript.
The Payload Admin panel can be bundled with our officially supported [Vite](/docs/admin/vite) and [webpack](/docs/admin/webpack) bundlers or you can integrate another bundler following our adapter pattern approach.
When bundled, it is code-split, highly performant (even with 100+ fields), and written fully in TypeScript.
<Banner type="success">
The Admin panel is meant to be simple enough to give you a starting point but
not bring too much complexity, so that you can easily customize it to suit the
needs of your application and your editors.
The Admin panel is meant to be simple enough to give you a starting point but not bring too much
complexity, so that you can easily customize it to suit the needs of your application and your
editors.
</Banner>
![Payload's Admin panel built in React](https://payloadcms.com/images/docs/admin.jpg)
_Screenshot of the Admin panel while editing a document from an example `AllFields` collection_
<LightDarkImage
srcLight="https://payloadcms.com/images/docs/admin.jpg"
srcDark="https://payloadcms.com/images/docs/admin-dark.jpg"
alt="Admin panel with collapsible sidebar"
caption="Redesigned admin panel with a collapsible sidebar that's open by default, providing greater extensibility and enhanced horizontal real estate."
/>
## Admin Options
All options for the Admin panel are defined in your base Payload config file.
| Option | Description |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `user` | The `slug` of a Collection that you want be used to log in to the Admin dashboard. [More](/docs/admin/overview#the-admin-user-collection) |
| `buildPath` | Specify an absolute path for where to store the built Admin panel bundle used in production. Defaults to `path.resolve(process.cwd(), 'build')`. |
| `meta` | Base meta data to use for the Admin panel. Included properties are `titleSuffix`, `ogImage`, and `favicon`. |
| `disable` | If set to `true`, the entire Admin panel will be disabled. |
| `indexHTML` | Optionally replace the entirety of the `index.html` file used by the Admin panel. Reference the [base index.html file](https://github.com/payloadcms/payload/blob/master/src/admin/index.html) to ensure your replacement has the appropriate HTML elements. |
| `css` | Absolute path to a stylesheet that you can use to override / customize the Admin panel styling. [More](/docs/admin/customizing-css). |
| `scss` | Absolute path to a Sass variables / mixins stylesheet meant to override Payload styles to make for an easy re-skinning of the Admin panel. [More](/docs/admin/customizing-css#overriding-scss-variables). |
| `dateFormat` | Global date format that will be used for all dates in the Admin panel. Any valid [date-fns](https://date-fns.org/) format pattern can be used. |
| `avatar` | Set account profile picture. Options: `gravatar`, `default` or a custom React component. |
| `components` | Component overrides that affect the entirety of the Admin panel. [More](/docs/admin/components) |
| `webpack` | Customize the Webpack config that's used to generate the Admin panel. [More](/docs/admin/webpack) |
| **`logoutRoute`** | The route for the `logout` page. |
| **`inactivityRoute`** | The route for the `logout` inactivity page. |
| Option | Description |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `bundler` | The bundler that you would like to use to bundle the admin panel. Officially supported bundlers: [Webpack](/docs/admin/webpack) and [Vite](/docs/admin/vite). |
| `user` | The `slug` of a Collection that you want be used to log in to the Admin dashboard. [More](/docs/admin/overview#the-admin-user-collection) |
| `buildPath` | Specify an absolute path for where to store the built Admin panel bundle used in production. Defaults to `path.resolve(process.cwd(), 'build')`. |
| `meta` | Base meta data to use for the Admin panel. Included properties are `titleSuffix`, `ogImage`, and `favicon`. |
| `disable` | If set to `true`, the entire Admin panel will be disabled. |
| `indexHTML` | Optionally replace the entirety of the `index.html` file used by the Admin panel. Reference the [base index.html file](https://github.com/payloadcms/payload/blob/main/packages/payload/src/admin/index.html) to ensure your replacement has the appropriate HTML elements. |
| `css` | Absolute path to a stylesheet that you can use to override / customize the Admin panel styling. [More](/docs/admin/customizing-css). |
| `scss` | Absolute path to a Sass variables / mixins stylesheet meant to override Payload styles to make for an easy re-skinning of the Admin panel. [More](/docs/admin/customizing-css#overriding-scss-variables). |
| `dateFormat` | Global date format that will be used for all dates in the Admin panel. Any valid [date-fns](https://date-fns.org/) format pattern can be used. |
| `avatar` | Set account profile picture. Options: `gravatar`, `default` or a custom React component. |
| `autoLogin` | Used to automate admin log-in for dev and demonstration convenience. [More](/docs/authentication/config). |
| `livePreview` | Enable real-time editing for instant visual feedback of your front-end application. [More](/docs/live-preview/overview). |
| `components` | Component overrides that affect the entirety of the Admin panel. [More](/docs/admin/components) |
| `webpack` | Customize the Webpack config that's used to generate the Admin panel. [More](/docs/admin/webpack) |
| `vite` | Customize the Vite config that's used to generate the Admin panel. [More](/docs/admin/vite) |
| `logoutRoute` | The route for the `logout` page. |
| `inactivityRoute` | The route for the `logout` inactivity page. |
### The Admin User Collection
@@ -54,13 +62,13 @@ To specify which Collection to use to log in to the Admin panel, pass the `admin
`payload.config.js`:
```ts
import { buildConfig } from "payload/config";
import { buildConfig } from 'payload/config'
const config = buildConfig({
admin: {
user: "admins", // highlight-line
user: 'admins', // highlight-line
},
});
})
```
By default, if you have not specified a Collection, Payload will automatically provide you with a `User` Collection which will be used to access the Admin panel. You can customize or override the fields and settings of the default `User` Collection by passing your own collection using `users` as its `slug` to Payload. When this is done, Payload will use your provided `User` Collection instead of its default version.

View File

@@ -15,8 +15,10 @@ Out of the box, Payload handles the persistence of your users' preferences in a
1. The "collapsed" state of blocks, on a document level, as users edit or interact with documents
<Banner type="warning">
<strong>Important:</strong><br/>
All preferences are stored on an individual user basis. Payload automatically recognizes the user that is reading or setting a preference via all provided authentication methods.
<strong>Important:</strong>
<br />
All preferences are stored on an individual user basis. Payload automatically recognizes the user
that is reading or setting a preference via all provided authentication methods.
</Banner>
### Use cases
@@ -30,17 +32,17 @@ This API is used significantly for internal operations of the Admin panel, as me
### Database
Payload automatically creates an internally used `_preferences` collection that stores user preferences. Each document in the `_preferences` collection contains the following shape:
Payload automatically creates an internally used `payload-preferences` collection that stores user preferences. Each document in the `payload-preferences` collection contains the following shape:
| Key | Value |
| -------------------- | -------------|
| `id` | A unique ID for each preference stored. |
| `key` | A unique `key` that corresponds to the preference. |
| `user` | The ID of the `user` that is storing its preference. |
| `userCollection` | The `slug` of the collection that the `user` is logged in as. |
| `value` | The value of the preference. Can be any data shape that you need. |
| `createdAt` | A timestamp of when the preference was created. |
| `updatedAt` | A timestamp set to the last time the preference was updated.
| Key | Value |
| ----------------- | ----------------------------------------------------------------- |
| `id` | A unique ID for each preference stored. |
| `key` | A unique `key` that corresponds to the preference. |
| `user.value` | The ID of the `user` that is storing its preference. |
| `user.relationTo` | The `slug` of the collection that the `user` is logged in as. |
| `value` | The value of the preference. Can be any data shape that you need. |
| `createdAt` | A timestamp of when the preference was created. |
| `updatedAt` | A timestamp set to the last time the preference was updated. |
### APIs

161
docs/admin/vite.mdx Normal file
View File

@@ -0,0 +1,161 @@
---
title: Vite
label: Vite
order: 90
desc: NEEDS TO BE WRITTEN
---
<Banner type="info">
The Vite bundler is currently in beta. If you would like to help us test this package, we'd love to hear from you if you find any [bugs or issues](https://github.com/payloadcms/payload/issues/)!
</Banner>
Payload has a Vite bundler that you can install and bundle the Admin Panel with. This is an alternative to the [Webpack](/docs/admin/webpack) bundler and might give some performance boosts to your development workflow.
To use Vite as your bundler, first you need to install the package:
```bash
yarn add @payloadcms/bundler-vite
```
Then you will need to add the [bundler](/docs/admin/bundlers) to your Payload config:
```ts
import { buildConfig } from '@payloadcms/config'
import { viteBundler } from '@payloadcms/bundler-vite'
export default buildConfig({
collections: [],
admin: {
bundler: viteBundler(),
}
})
```
Vite works fundamentally differently than Webpack. In development mode, it will first pre-bundle any of your dependencies that are CommonJS-only, and then it'll leverage ESM directly in your browser for a better HMR experience.
It then uses Rollup to create production builds of your admin UI. With Vite, you should see a decent performance boost—especially after your first cold start. However, that first cold start might take a few more seconds.
<Banner type="warning">
In most cases, Vite should work out of the box. But existing Payload plugins may need to make compatibility changes to support Vite.
</Banner>
This is because Vite aliases work fundamentally differently than Webpack aliases, and Payload relies on aliasing server-only code out of the Payload config to ensure that the bundled admin JS works within your browser.
Here are the main differences between how Vite aliases work and how Webpack aliases work.
**Vite aliases do not work with absolute paths.**
In Vite, alias keys must <strong>exactly match</strong> a import paths. If you have 2 files that import the same server-only module, but have different import paths, you would need to add 2 aliases to support both import paths.
```ts
// File A
import serverOnlyModule from '../server-only-module'
// File B
import serverOnlyModule from '../../server-only-module'
// payload.config.ts
// You would need to add 2 aliases to support both import paths
export const buildConfig({
collections: [],
admin: {
bundler: viteBundler(),
vite: (incomingViteConfig) => {
const existingAliases = incomingViteConfig?.resolve?.alias || {};
let aliasArray: { find: string | RegExp; replacement: string; }[] = [];
// Pass the existing Vite aliases
if (Array.isArray(existingAliases)) {
aliasArray = existingAliases;
} else {
aliasArray = Object.values(existingAliases);
}
// Add your own aliases using the find and replacement keys
aliasArray.push({
find: '../server-only-module',
replacement: path.resolve(__dirname, './path/to/browser-safe-module.js')
find: '../../server-only-module',
replacement: path.resolve(__dirname, './path/to/browser-safe-module.js')
});
return {
...incomingViteConfig,
resolve: {
...(incomingViteConfig?.resolve || {}),
alias: aliasArray,
}
};
},
}
})
```
**Vite aliases do not get applied to pre-bundled dependencies.**
This especially affects plugins, as plugins will be pre-bundled by Vite using `esbuild`. To get around this and support Vite, plugin authors need to configure an alias to their plugin at the top level, so that the alias will work accordingly.
Here's an example. Say your plugin is called `payload-plugin-cool`. It's imported as follows:
```ts
import { myCoolPlugin } from 'payload-plugin-cool'
```
That plugin should create an alias to support Vite as follows:
```ts
{
// aliases go here
find: 'payload-plugin-cool',
replacement: path.resolve(__dirname, './my-admin-plugin.js')
}
```
This will effectively alias the entire plugin and work with Vite. If the plugin requires admin-specific code, then the `./my-admin-plugin.js` alias target file should reflect any changes necessary to the admin UI that the main server-side plugin performs.
### Extending the Vite config
The Payload config supports a new property for plugins to be able to extend the Vite config specifically. That property exists on the main Payload config under `admin.vite`. You can check out the [Vite docs](https://vitejs.dev/config/shared-options.html) for more information on what you can do with the Vite config.
It's a function that takes a Vite config, and returns an updated Vite config. Here's an example:
```ts
export const buildConfig({
collections: [],
admin: {
bundler: viteBundler(),
vite: (incomingViteConfig) => {
const existingAliases = incomingViteConfig?.resolve?.alias || {};
let aliasArray: { find: string | RegExp; replacement: string; }[] = [];
// Pass the existing Vite aliases
if (Array.isArray(existingAliases)) {
aliasArray = existingAliases;
} else {
aliasArray = Object.values(existingAliases);
}
// Add your own aliases using the find and replacement keys
aliasArray.push({
find: '../server-only-module',
replacement: path.resolve(__dirname, './path/to/browser-safe-module.js')
});
return {
...incomingViteConfig,
resolve: {
...(incomingViteConfig?.resolve || {}),
alias: aliasArray,
}
};
},
}
})
```
Learn more about [aliasing server-only modules](https://payloadcms.com/docs/admin/excluding-server-code#aliasing-server-only-modules).
Even though there is a new property for Vite configs specifically, we have implemented some "compatibility" between Webpack and Vite out-of-the-box.
If your config specifies Webpack aliases, we attempt to leverage them automatically within the Vite config. They are merged into the Vite alias configuration seamlessly and may work out-of-the-box.

View File

@@ -1,176 +1,67 @@
---
title: Webpack
label: Webpack
order: 60
order: 80
desc: The Payload admin panel uses Webpack 5 and supports many common functionalities such as SCSS and Typescript out of the box to give you more freedom.
keywords: admin, webpack, documentation, Content Management System, cms, headless, javascript, node, react, express
---
Payload uses Webpack 5 to build the Admin panel. It comes with support for many common functionalities such as SCSS and Typescript out of the box, but there are many cases where you may need to add support for additional functionalities.
Payload has a Webpack (v5) bundler that you can build the Admin panel with. For now, we recommended using it because it is stable. If you are feeling a bit more adventurous you can give the [Vite](/docs/admin/vite) bundler a shot.
To extend the Webpack config, add the `webpack` key to your base Payload config, and provide a function that accepts the default Webpack config as its only argument:
Out of the box, the Webpack bundler supports common functionalities such as SCSS and Typescript, but there are many cases where you may need to add support for additional functionalities.
#### Installation
```bash
yarn add @payloadcms/bundler-webpack
```
#### Import the bundler
`payload.config.ts`
```ts
import { buildConfig } from 'payload/config';
// payload.config.ts
import { buildConfig } from 'payload/config'
import { webpackBundler } from '@payloadcms/bundler-webpack'
export default buildConfig({
admin: {
// highlight-start
webpack: (config) => {
// Do something with the config here
return config;
}
// highlight-end
}
});
// highlight-start
admin: {
bundler: webpackBundler()
},
// highlight-end
})
```
### Aliasing server-only modules
### Extending Webpack
A common use case for extending the Payload config is to alias server-only modules, thus preventing them from inclusion into the browser JavaScript bundle.
If you need to extend the Webpack config, you can do so by passing a function to the `admin.webpack` property on your Payload config.
The function will receive the Webpack config as an argument and should return the modified config.
As the Payload config is used in both server **and** client contexts, you may find yourself writing code in your Payload config that may be incompatible with browser environments.
Examples of **non** browser-friendly packages:
- `fs`
- `stripe`
- `authorizenet`
- `nodemailer`
You may rely on server-only packages such as the above to perform logic in access control functions, hooks, and other contexts (which is great!) but when you boot up your Payload app and try to view it in the browser, you'll likely run into missing dependency issues or other general incompatibilities.
<Banner type="success">
<strong>Tip:</strong><br/>
To avoid problems with server code making it to your Webpack bundle, you can use the <strong>alias</strong> Webpack feature to tell Webpack to avoid importing the modules you want to restrict to server-only.
</Banner>
<strong>For example, let's say that you have a Collection called `Subscriptions` which relies on Stripe:</strong>
<br/><br/>
`collections/Subscriptions/index.js`
```ts
import { CollectionConfig } from 'payload/types';
import createStripeSubscription from './hooks/createStripeSubscription';
// payload.config.ts
export const Subscription: CollectionConfig = {
slug: 'subscriptions',
hooks: {
beforeChange: [
createStripeSubscription,
]
},
fields: [
{
name: 'stripeSubscriptionID',
type: 'text',
required: true,
}
]
};
```
The collection above features a `beforeChange` hook that creates a Stripe subscription whenever a Subscription document is created in Payload.
<strong>That hook might look something like this:</strong>
<br/><br/>
`collections/Subscriptions/hooks/createStripeSubscription.js`
```js
import Stripe from 'stripe';
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);
const createStripeSubscription = async ({ data, operation }) => {
if (operation === 'create') {
const dataWithStripeID = {...data};
// use Stripe to create a Stripe subscription
const subscription = await stripe.subscriptions.create({
// Configure the subscription accordingly
});
// Automatically add the Stripe subscription ID
// to the data that will be saved to this Subscription doc
dataWithStripeID.stripeSubscriptionID = subscription.id;
return dataWithStripeID
}
return data;
}
export default createStripeSubscription;
```
<Banner type="error">
<strong>Warning:</strong><br/>
The above code is NOT production-ready and should not be referenced to create Stripe subscriptions. Although creating a beforeChange hook is a completely valid spot to do things like create subscriptions, the code above is incomplete and insecure, meant for explanation purposes only.
</Banner>
**As-is, this collection will prevent your Admin panel from bundling or loading correctly, because Stripe relies on some Node-only packages.**
To remedy this issue you can extend the Payload Webpack config to alias your entire `createStripeSubscription` hook to a separate, empty mock file.
Example in `payload.config.js`:
```js
import { buildConfig } from 'payload/config';
import path from 'path';
import Subscription from './collections/Subscription';
const createStripeSubscriptionPath = path.resolve(__dirname, 'collections/Subscription/hooks/createStripeSubscription.js');
const mockModulePath = path.resolve(__dirname, 'mocks/emptyObject.js');
import { buildConfig } from 'payload/config'
import { webpackBundler } from '@payloadcms/bundler-webpack'
export default buildConfig({
collections: [
Subscription
],
admin: {
webpack: (config) => ({
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve.alias,
[createStripeSubscriptionPath]: mockModulePath,
}
}
})
}
});
admin: {
bundler: webpackBundler()
// highlight-start
webpack: (config) => {
// full control of the Webpack config
return config
},
// highlight-end
},
})
```
The above code will alias the file at path `createStripeSubscriptionPath` to a mocked module, which might look like this:
`mocks/emptyObject.js`
```js
export default {};
```
Now, when Webpack sees that you're attempting to import your `createStripeSubscriptionPath` file, it'll disregard that actual file and load your mock file instead. Not only will your Admin panel now bundle successfully, you will have optimized its filesize by removing unnecessary code! And you might have learned something about Webpack, too.
<Banner type="success">
<strong>Tip:</strong><br/>
If changes to your Webpack aliases are not surfacing, they might be [cached](https://webpack.js.org/configuration/cache/) in `node_modules/.cache/webpack`. Try deleting that folder and restarting your server.
<strong>Tip:</strong>
<br />
If changes to your Webpack aliases are not surfacing, they might be
[cached](https://webpack.js.org/configuration/cache/) in `node_modules/.cache/webpack`. Try
deleting that folder and restarting your server.
</Banner>
## Admin environment vars
<Banner type="warning">
<strong>Important:</strong><br />
Be careful about what variables you provide to your client-side code. Analyze every single one to make sure that you're not accidentally leaking anything that an attacker could exploit. Only keys that are safe to be available to everyone in plain text should be provided to your Admin panel.
</Banner>
By default, `env` variables are **not** provided to the Admin panel for security and safety reasons. But, Payload provides you with a way to still provide `env` vars to your frontend code.
**Payload will automatically supply any present `env` variables that are prefixed with `PAYLOAD_PUBLIC_` directly to the Admin panel.**
For example, if you've got the following environment variable:
`PAYLOAD_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_XXXXXXXXXXXXXXXXXX`
This key will automatically be made available to the Payload bundle and can be referenced in your Admin component code as `process.env.PAYLOAD_PUBLIC_STRIPE_PUBLISHABLE_KEY`.

View File

@@ -41,8 +41,15 @@ Technically, both of these options will work for third-party integrations but th
To enable API keys on a collection, set the `useAPIKey` auth option to `true`. From there, a new interface will appear in the Admin panel for each document within the collection that allows you to generate an API key for each user in the Collection.
<Banner type="success">
User API keys are encrypted within the database, meaning that if your database
is compromised, your API keys will not be.
User API keys are encrypted within the database, meaning that if your database is compromised,
your API keys will not be.
</Banner>
<Banner type="warning">
<strong>Important:</strong>
If you change your `PAYLOAD_SECRET`, you will need to regenerate your API keys.
<br />
The secret key is used to encrypt the API keys, so if you change the secret, existing API keys will no longer be valid.
</Banner>
#### Authenticating via API Key
@@ -52,31 +59,31 @@ To authenticate REST or GraphQL API requests using an API key, set the `Authoriz
**For example, using Fetch:**
```ts
import User from '../collections/User';
import User from '../collections/User'
const response = await fetch("http://localhost:3000/api/pages", {
const response = await fetch('http://localhost:3000/api/pages', {
headers: {
Authorization: `${User.slug} API-Key ${YOUR_API_KEY}`,
},
});
})
```
Payload ensures that the same, uniform access control is used across all authentication strategies. This enables you to utilize your existing access control configurations with both API keys and the standard email/password authentication. This consistency can aid in maintaining granular control over your API keys.
#### API Key *Only* Authentication
#### API Key _Only_ Authentication
If you want to use API keys as the only authentication method for a collection, you can disable the default local strategy by setting `disableLocalStrategy` to `true` on the collection's `auth` property. This will disable the ability to authenticate with email and password, and will only allow for authentication via API key.
```ts
import { CollectionConfig } from 'payload/types';
import { CollectionConfig } from 'payload/types'
export const Customers: CollectionConfig = {
slug: 'customers',
auth: {
useAPIKey: true,
disableLocalStrategy: true,
}
};
},
}
```
### Forgot Password
@@ -90,17 +97,16 @@ Function that accepts one argument, containing `{ req, token, user }`, that allo
<Banner type="success">
<strong>Tip:</strong>
<br />
HTML templating can be used to create custom email templates, inline CSS
automatically, and more. You can make a reusable function that standardizes
all email sent from Payload, which makes sending custom emails more DRY.
Payload doesn't ship with an HTML templating engine, so you are free to choose
your own.
HTML templating can be used to create custom email templates, inline CSS automatically, and more.
You can make a reusable function that standardizes all email sent from Payload, which makes
sending custom emails more DRY. Payload doesn't ship with an HTML templating engine, so you are
free to choose your own.
</Banner>
Example:
```ts
import { CollectionConfig } from 'payload/types';
import { CollectionConfig } from 'payload/types'
export const Customers: CollectionConfig = {
slug: 'customers',
@@ -109,7 +115,7 @@ export const Customers: CollectionConfig = {
// highlight-start
generateEmailHTML: ({ req, token, user }) => {
// Use the token provided to allow your user to reset their password
const resetPasswordURL = `https://yourfrontend.com/reset-password?token=${token}`;
const resetPasswordURL = `https://yourfrontend.com/reset-password?token=${token}`
return `
<!doctype html>
@@ -123,22 +129,21 @@ export const Customers: CollectionConfig = {
</p>
</body>
</html>
`;
}
`
},
// highlight-end
}
}
};
},
},
}
```
<Banner type="warning">
<strong>Important:</strong>
<br />
If you specify a different URL to send your users to for resetting their
password, such as a page on the frontend of your app or similar, you need to
handle making the call to the Payload REST or GraphQL reset-password operation
yourself on your frontend, using the token that was provided for you. Above,
it was passed via query parameter.
If you specify a different URL to send your users to for resetting their password, such as a page
on the frontend of your app or similar, you need to handle making the call to the Payload REST or
GraphQL reset-password operation yourself on your frontend, using the token that was provided for
you. Above, it was passed via query parameter.
</Banner>
**`generateEmailSubject`**
@@ -173,8 +178,7 @@ Function that accepts one argument, containing `{ req, token, user }`, that allo
Example:
```ts
import { CollectionConfig } from 'payload/types';
import { CollectionConfig } from 'payload/types'
export const Customers: CollectionConfig = {
slug: 'customers',
@@ -183,24 +187,23 @@ export const Customers: CollectionConfig = {
// highlight-start
generateEmailHTML: ({ req, token, user }) => {
// Use the token provided to allow your user to verify their account
const url = `https://yourfrontend.com/verify?token=${token}`;
const url = `https://yourfrontend.com/verify?token=${token}`
return `Hey ${user.email}, verify your email by clicking here: ${url}`;
}
return `Hey ${user.email}, verify your email by clicking here: ${url}`
},
// highlight-end
}
}
};
},
},
}
```
<Banner type="warning">
<strong>Important:</strong>
<br />
If you specify a different URL to send your users to for email verification,
such as a page on the frontend of your app or similar, you need to handle
making the call to the Payload REST or GraphQL verification operation yourself
on your frontend, using the token that was provided for you. Above, it was
passed via query parameter.
If you specify a different URL to send your users to for email verification, such as a page on the
frontend of your app or similar, you need to handle making the call to the Payload REST or GraphQL
verification operation yourself on your frontend, using the token that was provided for you.
Above, it was passed via query parameter.
</Banner>
**`generateEmailSubject`**
@@ -231,9 +234,8 @@ As of Payload `1.0.0`, you can add additional authentication strategies to Paylo
Behind the scenes, Payload uses PassportJS to power its local authentication strategy, so most strategies listed on the PassportJS website will work seamlessly. Combined with adding custom components to the admin panel's `Login` view, you can create advanced authentication strategies directly within Payload.
<Banner type="warning">
This is an advanced feature, so only attempt this if you are an experienced
developer. Otherwise, just let Payload's built-in authentication handle user
auth for you.
This is an advanced feature, so only attempt this if you are an experienced developer. Otherwise,
just let Payload's built-in authentication handle user auth for you.
</Banner>
The `strategies` property is an array that takes objects with the following properties:
@@ -249,3 +251,42 @@ If you pass a strategy to the `strategy` property directly, the `name` property
However, if you pass a function to `strategy`, `name` is a required property.
In either case, Payload will prefix the strategy name with the collection `slug` that the strategy is passed to.
### Admin autologin
For testing and demo purposes you may want to skip forcing the admin user to login in order to access the panel.
The `admin.autologin` property is used to configure the how visitors are handled when accessing the admin panel.
The default is that all users will have to login and this should not be enabled for environments where data needs to protected.
#### autoLogin Options
| Option | Description |
| ----------------- | --------------------------------------------------------------------------------------------------------------- |
| **`email`** | The email address of the user to login as |
| **`password`** | The password of the user to login as |
| **`prefillOnly`** | If set to true, the login credentials will be prefilled but the user will still need to click the login button. |
The recommended way to use this feature is behind an environment variable to ensure it is disabled when in production.
**Example:**
```ts
export default buildConfig({
admin: {
user: 'users',
// highlight-start
autoLogin:
process.env.PAYLOAD_PUBLIC_ENABLE_AUTOLOGIN === 'true'
? {
email: 'test@example.com',
password: 'test',
prefillOnly: true,
}
: false,
// highlight-end
},
collections: [
/** */
],
})
```

View File

@@ -17,6 +17,7 @@ The Access operation returns what a logged in user can and can't do with the col
`GET http://localhost:3000/api/access`
Example response:
```ts
{
canAccessAdmin: true,
@@ -77,6 +78,7 @@ Returns either a logged in user with token or null when there is no logged in us
`GET http://localhost:3000/api/[collection-slug]/me`
Example response:
```ts
{
user: { // The JWT "payload" ;) from the logged in user
@@ -108,6 +110,7 @@ query {
Accepts an `email` and `password`. On success, it will return the logged in user as well as a token that can be used to authenticate. In the GraphQL and REST APIs, this operation also automatically sets an HTTP-only cookie including the user's token. If you pass an Express `res` to the Local API operation, Payload will set a cookie there as well.
**Example REST API login**:
```ts
const res = await fetch('http://localhost:3000/api/[collection-slug]/login', {
method: 'POST',
@@ -117,10 +120,10 @@ const res = await fetch('http://localhost:3000/api/[collection-slug]/login', {
body: JSON.stringify({
email: 'dev@payloadcms.com',
password: 'this-is-not-our-password...or-is-it?',
})
}),
})
const json = await res.json();
const json = await res.json()
// JSON will be equal to the following:
/*
@@ -168,6 +171,7 @@ const result = await payload.login({
As Payload sets HTTP-only cookies, logging out cannot be done by just removing a cookie in JavaScript, as HTTP-only cookies are inaccessible by JS within the browser. So, Payload exposes a `logout` operation to delete the token in a safe way.
**Example REST API logout**:
```ts
const res = await fetch('http://localhost:3000/api/[collection-slug]/logout', {
method: 'POST',
@@ -194,6 +198,7 @@ This operation requires a non-expired token to send back a new one. If the user'
If successful, this operation will automatically renew the user's HTTP-only cookie and will send back the updated token in JSON.
**Example REST API token refresh**:
```ts
const res = await fetch('http://localhost:3000/api/[collection-slug]/refresh-token', {
method: 'POST',
@@ -202,7 +207,7 @@ const res = await fetch('http://localhost:3000/api/[collection-slug]/refresh-tok
},
})
const json = await res.json();
const json = await res.json()
// JSON will be equal to the following:
/*
@@ -233,7 +238,10 @@ mutation {
```
<Banner type="success">
The Refresh operation will automatically find the user's token in either a JWT header or the HTTP-only cookie. But, you can specify the token you're looking to refresh by providing the REST API with a `token` within the JSON body of the request, or by providing the GraphQL resolver a `token` arg.
The Refresh operation will automatically find the user's token in either a JWT header or the
HTTP-only cookie. But, you can specify the token you're looking to refresh by providing the REST
API with a `token` within the JSON body of the request, or by providing the GraphQL resolver a
`token` arg.
</Banner>
### Verify by Email
@@ -241,13 +249,14 @@ mutation {
If your collection supports email verification, the Verify operation will be exposed which accepts a verification token and sets the user's `_verified` property to `true`, thereby allowing the user to authenticate with the Payload API.
**Example REST API user verification**:
```ts
const res = await fetch(`http://localhost:3000/api/[collection-slug]/verify/${TOKEN_HERE}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
});
})
```
**Example GraphQL Mutation**:
@@ -274,6 +283,7 @@ If a user locks themselves out and you wish to deliberately unlock them, you can
To restrict who is allowed to unlock users, you can utilize the [`unlock`](/docs/access-control/overview#unlock) access control function.
**Example REST API unlock**:
```ts
const res = await fetch(`http://localhost:3000/api/[collection-slug]/unlock`, {
method: 'POST',
@@ -308,6 +318,7 @@ The link to reset the user's password contains a token which is what allows the
By default, the Forgot Password operations send users to the Payload Admin panel to reset their password, but you can customize the generated email to send users to the frontend of your app instead by [overriding the email HTML](/docs/authentication/config#forgot-password).
**Example REST API Forgot Password**:
```ts
const res = await fetch(`http://localhost:3000/api/[collection-slug]/forgot-password`, {
method: 'POST',
@@ -317,7 +328,7 @@ const res = await fetch(`http://localhost:3000/api/[collection-slug]/forgot-pass
body: JSON.stringify({
email: 'dev@payloadcms.com',
}),
});
})
```
**Example GraphQL Mutation**:
@@ -336,13 +347,18 @@ const token = await payload.forgotPassword({
data: {
email: 'dev@payloadcms.com',
},
disableEmail: false // you can disable the auto-generation of email via local API
});
disableEmail: false, // you can disable the auto-generation of email via local API
})
```
<Banner type="success">
<strong>Tip:</strong><br/>
You can stop the reset-password email from being sent via using the local API. This is helpful if you need to create user accounts programmatically, but not set their password for them. This effectively generates a reset password token which you can then use to send to a page you create, allowing a user to "complete" their account by setting their password. In the background, you'd use the token to "reset" their password.
<strong>Tip:</strong>
<br />
You can stop the reset-password email from being sent via using the local API. This is helpful if
you need to create user accounts programmatically, but not set their password for them. This
effectively generates a reset password token which you can then use to send to a page you create,
allowing a user to "complete" their account by setting their password. In the background, you'd
use the token to "reset" their password.
</Banner>
### Reset Password
@@ -350,6 +366,7 @@ const token = await payload.forgotPassword({
After a user has "forgotten" their password and a token is generated, that token can be used to send to the reset password operation along with a new password which will allow the user to reset their password securely.
**Example REST API Reset Password**:
```ts
const res = await fetch(`http://localhost:3000/api/[collection-slug]/reset-password`, {
method: 'POST',

View File

@@ -12,13 +12,14 @@ keywords: authentication, config, configuration, overview, documentation, Conten
/>
<Banner>
Payload provides for highly secure and customizable user Authentication out of the box, which allows for users to identify themselves to Payload.
Payload provides for highly secure and customizable user Authentication out of the box, which
allows for users to identify themselves to Payload.
</Banner>
Authentication is used within the Payload Admin panel itself as well as throughout your app(s) themselves however you determine necessary.
![Authentication admin panel functionality](https://payloadcms.com/images/docs/auth-admin.jpg)
*Admin panel screenshot depicting an Admins Collection with Auth enabled*
_Admin panel screenshot depicting an Admins Collection with Auth enabled_
**Here are some common use cases of Authentication outside of Payload's dashboard itself:**
@@ -38,7 +39,7 @@ Every Payload Collection can opt-in to supporting Authentication by specifying t
Simple example collection:
```ts
import { CollectionConfig } from 'payload/types';
import { CollectionConfig } from 'payload/types'
export const Admins: CollectionConfig = {
slug: 'admins',
@@ -62,7 +63,7 @@ export const Admins: CollectionConfig = {
'editor',
'developer',
],
}
},
],
}
```
@@ -81,11 +82,16 @@ Once enabled, each document that is created within the Collection can be thought
### Token-based auth
Successfully logging in returns a `JWT` (JSON web token) which is how a user will identify themselves to Payload. By providing this JWT via either an HTTP-only cookie or an `Authorization` header, Payload will automatically identify the user and add its user JWT data to the Express `req`, which is available throughout Payload including within access control, hooks, and more.
Successfully logging in returns a `JWT` (JSON web token) which is how a user will identify themselves to Payload. By providing this JWT via either an HTTP-only cookie or an `Authorization: JWT` or `Authorization: Bearer` header, Payload will automatically identify the user and add its user JWT data to the Express `req`, which is available throughout Payload including within access control, hooks, and more.
You can specify what data gets encoded to the JWT token by setting `saveToJWT` to true in your auth collection fields. If you wish to use a different key other than the field `name`, you can provide it to `saveToJWT` as a string. It is also possible to use `saveToJWT` on fields that are nested in inside groups and tabs. If a group has a `saveToJWT` set it will include the object with all sub-fields in the token. You can set `saveToJWT: false` for any fields you wish to omit. If a field inside a group has `saveToJWT` set, but the group does not, the field will be included at the top level of the token.
<Banner type="success">
<strong>Tip:</strong><br/>
You can access the logged in user from access control functions and hooks via the Express <strong>req</strong>. The logged in user is automatically added as the <strong>user</strong> property.
<strong>Tip:</strong>
<br />
You can access the logged-in user from access control functions and hooks via the Express{' '}
<strong>req</strong>. The logged-in user is automatically added as the <strong>user</strong>{' '}
property.
</Banner>
### HTTP-only cookies
@@ -105,16 +111,19 @@ Fetch example, including credentials:
```ts
const response = await fetch('http://localhost:3000/api/pages', {
credentials: 'include',
});
})
const pages = await response.json();
const pages = await response.json()
```
For more about how to automatically include cookies in requests from your app to your Payload API, [click here](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Sending_a_request_with_credentials_included).
<Banner type="success">
<strong>Tip:</strong><br/>
To make sure you have a Payload cookie set properly in your browser after logging in, you can use Chrome's Developer Tools - Application - Cookies - [your-domain-here]. The Chrome Developer tools will still show HTTP-only cookies, even when JavaScript running on the page can't.
<strong>Tip:</strong>
<br />
To make sure you have a Payload cookie set properly in your browser after logging in, you can use
Chrome's Developer Tools - Application - Cookies - [your-domain-here]. The Chrome Developer tools
will still show HTTP-only cookies, even when JavaScript running on the page can't.
</Banner>
### CSRF Protection
@@ -126,28 +135,33 @@ For example, let's say you have a very popular app running at coolsite.com. This
So, if a user of coolsite.com is logged in and just browsing around on the internet, they might stumble onto a page with bad intentions. That bad page might automatically make requests to all sorts of sites to see if they can find one that they can log into - and coolsite.com might be on their list. If your user was logged in while they visited that evil site, the attacker could do whatever they wanted as if they were your coolsite.com user by just sending requests to the coolsite API (which would automatically include the auth cookie). They could send themselves a bunch of money from your user's account, change the user's password, etc. This is what a CSRF attack is.
<Banner type="warning">
<strong>To protect against CSRF attacks, Payload only accepts cookie-based authentication from domains that you explicitly whitelist.</strong>
<strong>
To protect against CSRF attacks, Payload only accepts cookie-based authentication from domains
that you explicitly whitelist.
</strong>
</Banner>
To define domains that should allow users to identify themselves via the Payload HTTP-only cookie, use the `csrf` option on the base Payload config to whitelist domains that you trust.
`payload.config.ts`:
```ts
import { buildConfig } from 'payload/config';
import { buildConfig } from 'payload/config'
const config = buildConfig({
collections: [
// collections here
],
// highlight-start
csrf: [ // whitelist of domains to allow cookie auth from
csrf: [
// whitelist of domains to allow cookie auth from
'https://your-frontend-app.com',
'https://your-other-frontend-app.com',
],
// highlight-end
});
})
export default config;
export default config
```
### Identifying users via the Authorization Header
@@ -155,11 +169,12 @@ export default config;
In addition to authenticating via an HTTP-only cookie, you can also identify users via the `Authorization` header on an HTTP request.
Example:
```ts
const request = await fetch('http://localhost:3000', {
headers: {
Authorization: `JWT ${token}`
}
Authorization: `JWT ${token}`,
},
})
```

View File

@@ -11,48 +11,46 @@ Because Payload uses your existing Express server, you are free to add whatever
This approach has a ton of benefits - it's great for isolation of concerns and limiting scope, but it also means that your additional routes won't have access to Payload's user authentication.
<Banner type="success">
You can make full use of Payload's built-in authentication within your own
custom Express endpoints by adding Payload's authentication middleware.
You can make full use of Payload's built-in authentication within your own custom Express
endpoints by adding Payload's authentication middleware.
</Banner>
<Banner type="warning">
Payload must be initialized before the `payload.authenticate` middleware can
be used. This is done by calling `payload.init()` prior to adding the
middleware.
Payload must be initialized before the `payload.authenticate` middleware can be used. This is done
by calling `payload.init()` prior to adding the middleware.
</Banner>
Example in `server.js`:
```ts
import express from "express";
import payload from "payload";
import express from 'express'
import payload from 'payload'
const app = express();
const app = express()
const start = async () => {
await payload.init({
secret: "PAYLOAD_SECRET_KEY",
mongoURL: "mongodb://localhost/payload",
secret: 'PAYLOAD_SECRET_KEY',
express: app,
});
})
const router = express.Router();
const router = express.Router()
// Note: Payload must be initialized before the `payload.authenticate` middleware can be used
router.use(payload.authenticate); // highlight-line
router.use(payload.authenticate) // highlight-line
router.get("/", (req, res) => {
router.get('/', (req, res) => {
if (req.user) {
return res.send(`Authenticated successfully as ${req.user.email}.`);
return res.send(`Authenticated successfully as ${req.user.email}.`)
}
return res.send("Not authenticated");
});
return res.send('Not authenticated')
})
app.use("/some-route-here", router);
app.use('/some-route-here', router)
app.listen(3000);
};
app.listen(3000)
}
start();
start()
```

View File

@@ -11,10 +11,10 @@ keywords: configuration, config, settings, project, cloud, payload cloud, deploy
Once you have created a project, you will need to select your plan. This will determine the resources that are allocated to your project and the features that are available to you.
<Banner type="success">
Note: All Payload Cloud teams that deploy a project require a card on file.
This helps us prevent fraud and abuse on our platform. If you select a plan
with a free trial, you will not be charged until your trial period is over.
Well remind you 7 days before your trial ends and you can cancel anytime.
Note: All Payload Cloud teams that deploy a project require a card on file. This helps us prevent
fraud and abuse on our platform. If you select a plan with a free trial, you will not be charged
until your trial period is over. Well remind you 7 days before your trial ends and you can cancel
anytime.
</Banner>
### Project Details
@@ -44,8 +44,8 @@ If you are deploying a new project from a template, the following settings will
Any of the features in Payload Cloud that require environment variables will automatically be provided to your application. If your app requires any custom environment variables, you can set them here.
<Banner type="warning">
Note: For security reasons, any variables you wish to provide to the Admin
panel must be prefixed with `PAYLOAD_PUBLIC_`.  Learn more
Note: For security reasons, any variables you wish to provide to the Admin panel must be prefixed
with `PAYLOAD_PUBLIC_`.  Learn more
[here](https://payloadcms.com/docs/admin/webpack#admin-environment-vars).
</Banner>
@@ -54,9 +54,8 @@ Any of the features in Payload Cloud that require environment variables will aut
Payment methods can be set per project and can be updated any time. You can use teams default payment method, or add a new one. Modify your payment methods in your Project settings / Team settings.
<Banner type="success">
<strong>Note:</strong> All Payload Cloud teams that deploy a project require a
card on file. This helps us prevent fraud and abuse on our platform. If you
select a plan with a free trial, you will not be charged until your trial
period is over. Well remind you 7 days before your trial ends and you can
cancel anytime.
<strong>Note:</strong> All Payload Cloud teams that deploy a project require a card on file. This
helps us prevent fraud and abuse on our platform. If you select a plan with a free trial, you will
not be charged until your trial period is over. Well remind you 7 days before your trial ends and
you can cancel anytime.
</Banner>

Some files were not shown because too many files have changed in this diff Show More