Compare commits

..

1188 Commits

Author SHA1 Message Date
James
e9c1f3177c chore(release): v0.5.3 2021-04-01 16:49:17 -04:00
James
23c45f137a fix: unique indices 2021-04-01 16:48:02 -04:00
James
bfb3d12290 chore(release): v0.5.2 2021-03-31 19:13:34 -04:00
James Mikrut
785609b66e Merge pull request #120 from payloadcms/fix/richtext-relationship-modal
fix: modal issues with richtext relationship
2021-03-31 19:11:21 -04:00
James
8ea4407f04 fix: modal issues with richtext relationship 2021-03-31 12:15:03 -04:00
James
3c9d71df6f chore(release): v0.5.1 2021-03-29 14:31:44 -04:00
James
c8f99da853 Merge branch 'master' of github.com:payloadcms/payload 2021-03-29 14:24:45 -04:00
James
23e1fc3f73 fix: base auth / upload fields no longer cause validation issues 2021-03-29 14:24:34 -04:00
James Mikrut
eb6fe42259 Update CHANGELOG.md 2021-03-29 08:55:06 -04:00
James
3b0f3eca2c chore(release): v0.5.0 2021-03-29 08:53:11 -04:00
James Mikrut
dce581acd7 Merge pull request #116 from payloadcms/fix/admin-thumbnail-absolute-url
fix: allows absolute urls within adminThumbnail
2021-03-29 08:43:19 -04:00
James Mikrut
79c2f1ea5e Merge pull request #110 from payloadcms/feat/global-api-tweak
Suggestion: Payloads Local api should use 'slug' instead of 'global' for Global operations
2021-03-29 08:41:38 -04:00
James Mikrut
471727b769 Merge pull request #113 from payloadcms/feat/consistent-readonly
feat: applies readOnly consistently within create and update ops
2021-03-29 08:41:16 -04:00
James Mikrut
ff7400f2b1 Merge pull request #108 from payloadcms/chore/update-package-maintainers-author
chore: update maintainers and author in package.json
2021-03-29 08:41:04 -04:00
James Mikrut
4c58e3e10d Merge pull request #112 from payloadcms/fix/moving-nested-arrays
fix: moving nested arrays now properly persists row count
2021-03-29 08:40:55 -04:00
James Mikrut
d4742a6233 Merge pull request #114 from payloadcms/feat/richtext-blur-selection
feat: saves cursor position when relationship element is added to richText field
2021-03-29 08:40:44 -04:00
James
51b46d44b0 fix: allows absolute urls within adminThumbnail 2021-03-29 08:39:41 -04:00
Elliot DeNolf
5b42a9c76e Merge pull request #101 from payloadcms/ci-more-node-versions
ci: add node 14 and 15
2021-03-25 21:09:26 -04:00
James
d24b3f72ce feat: saves cursor position when relationship element is added to richText 2021-03-24 20:53:40 -04:00
James
6edf947c26 Merge branch 'fix/moving-nested-arrays' of github.com:payloadcms/payload into fix/moving-nested-arrays 2021-03-24 16:05:48 -04:00
James
c4a66c2cd9 fix: handles empty indices within array field data 2021-03-24 16:05:20 -04:00
James
d47e2c5786 fix: handles empty indices within array field data 2021-03-24 15:57:06 -04:00
James
50b99370d2 fix: validation consistency within admin 2021-03-24 12:38:50 -04:00
James
c4a5f2aea2 featapplies readOnly consistently within create and update ops 2021-03-23 22:46:49 -04:00
James
5f9a5c859e fix: moving nested arrays now properly persists row count 2021-03-23 22:40:53 -04:00
Jarrod Flesch
c71ba2b079 feat: changes global find and update payload api from global to slug as the key to find/update with 2021-03-22 09:15:55 -04:00
Dan Ribbens
8117425de8 chore: update maintainers and author in package.json 2021-03-16 19:09:07 -04:00
James
39000bdcb2 chore(release): v0.4.7 2021-03-15 19:06:46 -04:00
James
ab9bf1a4c6 chore: bumps config-provider 2021-03-15 19:03:11 -04:00
James
f5fdec6bf8 chore(release): v0.4.6 2021-03-14 16:30:12 -04:00
James
e76dc76684 chore:update author 2021-03-14 16:26:35 -04:00
James Mikrut
1aa59a3918 Merge pull request #104 from payloadcms/feat/admin-thumbnail-function
Feat/admin thumbnail function
2021-03-14 15:59:49 -04:00
James
5e1ddb552e feat: only runs adminThumbnail func if image type 2021-03-14 15:53:00 -04:00
James
521b49afbf docs: adminThumbnail feature 2021-03-14 15:50:44 -04:00
James
b6a9fe4bcf feat: allows admin thumbnail to be set programmatically 2021-03-14 15:44:35 -04:00
James Mikrut
3dfd8314f1 Merge pull request #103 from payloadcms/feat/provide-field-access-data
Feat/provide field access data
2021-03-14 13:43:40 -04:00
James Mikrut
3e8ad0ab60 Merge pull request #96 from payloadcms/docs/fix-broken-links
docs: fix broken links graphql playground and collections preview
2021-03-14 13:43:31 -04:00
James
339f7503a4 feat: provides field access control with document data 2021-03-14 13:40:45 -04:00
James
36aae5c37f feat: exports collection field hook types from payload/types 2021-03-14 13:25:56 -04:00
James
65c81c7c2a docs: spelling 2021-03-14 12:59:19 -04:00
James
39b30da10f docs: corrections to field hooks 2021-03-14 12:59:12 -04:00
James
3c42e6e6af feat: reorders uploads to provide beforeChange hooks with upload data 2021-03-13 14:17:00 -05:00
James
71a15b5e6d docs: clarity around afterRead S3 hook 2021-03-13 13:55:01 -05:00
Elliot DeNolf
1adca7b09d ci: add node 14 and 15 2021-03-13 12:16:09 -05:00
Dan Ribbens
2f18647f87 docs: fix broken links graphql playground and collections preview 2021-03-11 00:02:50 -05:00
Dan Ribbens
f35cfae566 chore: update changelog 2021-03-10 22:18:37 -05:00
Dan Ribbens
cd9c02094a 0.4.5 2021-03-10 22:18:06 -05:00
Dan Ribbens
4d04a40b84 Merge pull request #95 from payloadcms/fix/config-validation-allow-admin-dashboard
fix: config validation allow admin dashboard
2021-03-10 22:06:35 -05:00
Dan Ribbens
30b9bd0f9c Merge pull request #88 from payloadcms/chore/update-docs-admin
chore: fix docs admin folder casing
2021-03-10 22:06:04 -05:00
Dan Ribbens
2d1d1b4f32 fix: config validation allow admin dashboard 2021-03-10 22:02:50 -05:00
Dan Ribbens
f060d2d8a4 chore: changelog v0.4.4 2021-03-09 14:15:33 -05:00
Dan Ribbens
b33bca32b9 0.4.4 2021-03-09 14:14:58 -05:00
Dan Ribbens
f0f698fa73 Merge pull request #91 from payloadcms/fix/verification-token
fix: email verification template missing token
2021-03-09 14:09:20 -05:00
Dan Ribbens
93ed664920 fix: email verification template missing token 2021-03-09 13:30:16 -05:00
Dan Ribbens
3afefbe592 chore: fix docs admin folder casing 2021-03-04 11:52:33 -05:00
James
33e0136201 chore: merges master 2021-03-04 10:15:45 -05:00
Dan Ribbens
1e59d8d730 chore: bump version 2021-03-04 09:58:36 -05:00
Dan Ribbens
ae4c704a1b chore: update changelog 2021-03-04 09:36:26 -05:00
Dan Ribbens
580e3fe653 0.4.1 2021-03-04 09:34:40 -05:00
Dan Ribbens
a897631251 Merge pull request #87 from payloadcms/docs/fix-broken-links
docs: fixed broken links throughout docs
2021-03-04 08:12:58 -05:00
Dan Ribbens
fbf82fc205 docs: fixed broken links throughout docs 2021-03-04 08:01:20 -05:00
James
4cc34ad203 docs: fixes broken link 2021-03-03 12:28:55 -05:00
Dan Ribbens
1617556158 Merge pull request #84 from payloadcms/chore/update-license-20210228
chore: update license document
2021-03-01 09:25:58 -05:00
James
23c0f14fec 0.4.2 2021-03-01 09:13:03 -05:00
James
aadcd5a8f8 chore: bumps dependencies 2021-03-01 09:12:50 -05:00
James
ded8c3cd32 0.4.1 2021-03-01 08:40:19 -05:00
James
fef1b98cf1 docs: fixes a few links 2021-03-01 08:39:31 -05:00
James
568c6bb7b2 docs: revises licensing 2021-03-01 08:39:23 -05:00
James
f19f688770 chore: updates changelog 2021-02-28 20:03:53 -05:00
James
7e1ce9ce61 0.4.0 2021-02-28 19:19:28 -05:00
James
3f982703ef chore: bumps config-provider version 2021-02-28 19:19:05 -05:00
James Mikrut
4162010853 Merge pull request #82 from payloadcms/feat/new-billing-support
Feat/new billing support
2021-02-28 19:10:56 -05:00
James Mikrut
30db1d1c39 Merge pull request #81 from payloadcms/feat/simplify-update
Feat/simplify update
2021-02-28 19:10:07 -05:00
Dan Ribbens
cc70f85c5a chore: update license document 2021-02-28 18:12:32 -05:00
James Mikrut
566cc9caec Merge pull request #83 from payloadcms/fix/preview-button
fix: reverts preview to only returning string
2021-02-28 14:28:16 -05:00
James
8197d060d3 fix: preview types 2021-02-28 14:24:50 -05:00
James
ca14e66a58 fix: reverts preview to only returning string 2021-02-28 14:18:34 -05:00
James
b563f9a039 chore: bumps config provider 2021-02-28 11:26:42 -05:00
James
c97ddeb2d9 feat: implements unauthorized user view 2021-02-28 11:17:33 -05:00
James
e268e25719 feat: simplifies collection update operation 2021-02-27 21:24:19 -05:00
James
4de5605931 feat: removes requirement of returning value from field hooks 2021-02-27 20:14:41 -05:00
James
b2037ecf6f chore: update changelog 2021-02-23 10:54:25 -05:00
James
75ee5f83f1 0.3.0 2021-02-23 10:50:23 -05:00
James Mikrut
6ecf834cfc Merge pull request #80 from payloadcms/fix/update-hidden-fields
fix: removes overwrite from update operation
2021-02-23 10:46:04 -05:00
James
40f5901526 fix: forces depth to 0 in update operation 2021-02-23 10:38:56 -05:00
James Mikrut
b1c8ac94a7 Merge pull request #79 from payloadcms/fix/scss-export
fix: properly exposes scss for reuse
2021-02-23 10:28:36 -05:00
James
a8e2cc11af fix: removes overwrite from update operation 2021-02-23 10:15:09 -05:00
James
c1b2301650 fix: properly exposes scss for reuse 2021-02-23 08:54:36 -05:00
Dan Ribbens
a4ee7981c6 0.2.13 2021-02-20 20:40:09 -05:00
Dan Ribbens
7c13ab22d5 chore: update changelog 2021-02-20 20:39:52 -05:00
James Mikrut
ad5f070286 Merge pull request #74 from payloadcms/feat/detach-localization-mongoose
Feat/detach localization from Mongoose
2021-02-20 18:19:59 -05:00
James Mikrut
c2c65326a1 Merge pull request #69 from payloadcms/fix/mongoose-connection-error-log
fix: log mongoose connect error message
2021-02-20 18:19:50 -05:00
James Mikrut
30dbf782d6 Merge pull request #76 from payloadcms/docs/remove-upload-hasMany
docs: removes incorrect hasMany from upload field type
2021-02-20 18:19:32 -05:00
James Mikrut
a1cbfd5cad Merge pull request #75 from payloadcms/fix/preview-button
Fix/preview button
2021-02-20 18:19:22 -05:00
James Mikrut
d343add43e Merge pull request #78 from payloadcms/fix/block-conditional
fix: infinite loop caused within block component
2021-02-20 18:19:11 -05:00
James
9e42d119e4 fix: infinite loop caused within block component 2021-02-20 18:16:40 -05:00
James
e549298ad5 docs: removes incorrect hasMany from upload field type 2021-02-19 09:46:24 -05:00
James
2bc5c59fec fix: sets sparse true if field localized and unique 2021-02-19 09:02:12 -05:00
James
72a5886191 fix: casts incoming number field data as string 2021-02-19 09:02:01 -05:00
Jacob Fletcher
6b6297fb2d feat: supports newTab in Button, updates generatePreviewURL api to forward through PreviewButton 2021-02-18 19:26:43 -05:00
Jacob Fletcher
9b9d0f24b5 fix: returns entire doc to generatePreviewURL callback of PreviewButton 2021-02-18 19:06:07 -05:00
James
162ec74445 feat: detaches localization from mongoose entirely 2021-02-17 22:31:53 -05:00
Dan Ribbens
8e022cd48c test: update collection rich text 2021-02-16 17:23:00 -05:00
Dan Ribbens
e36c7d269c fix: log mongoose connect error message 2021-02-14 20:49:47 -05:00
Dan Ribbens
c5d1e5cbf5 0.2.12 2021-02-10 16:43:16 -05:00
Dan Ribbens
a8190154d1 chore: update changelog 2021-02-10 16:42:41 -05:00
Dan Ribbens
d307aa5d38 Merge pull request #65 from payloadcms/fix/upload-file-size
fix: file size in local operations
2021-02-10 16:37:27 -05:00
Dan Ribbens
3cbf82d33a Merge pull request #66 from payloadcms/fix/uploads-cors
fix: middleware for cors set up on static files
2021-02-10 16:36:06 -05:00
Dan Ribbens
55e0de1719 fix: middleware for cors set up on static files 2021-02-09 15:39:41 -05:00
Dan Ribbens
0feb7b7379 fix: file size in local operations 2021-02-09 15:12:29 -05:00
Dan Ribbens
9d51af3bf8 fix: windows compatible upload filename paths 2021-02-05 17:21:51 -05:00
Dan Ribbens
973f6f94c6 chore: update changelog v0.2.11 2021-02-05 16:28:49 -05:00
Dan Ribbens
6c3fb84310 0.2.11 2021-02-05 16:21:53 -05:00
James Mikrut
4a33223645 Merge pull request #43 from payloadcms/fix/add-file-to-local-operations
fix: add file to create and update local operations
2021-02-05 15:16:03 -06:00
James Mikrut
2c87b67661 Merge pull request #60 from payloadcms/fix/localized-within-blocks
Fix/localized within blocks
2021-02-05 15:15:49 -06:00
James Mikrut
0899299ebf Merge pull request #57 from payloadcms/docs/updates-meta-descriptions
Feat: adds meta descriptions to docs
2021-02-05 15:14:48 -06:00
James
1a590287ea feat: allows upload through Local API 2021-02-05 16:09:53 -05:00
James
fd01715b5b Merge branch 'fix/add-file-to-local-operations' of github.com:payloadcms/payload into fix/add-file-to-local-operations 2021-02-05 15:20:29 -05:00
James
300536033f fix: forces fallbackLocale to null in update ops 2021-02-05 14:47:09 -05:00
Dan Ribbens
79c3ca8611 fix: update operation handles localized arrays as merge and not overwrite 2021-02-05 11:35:14 -05:00
James
e50fc1f314 fix: localized fields within blocks 2021-02-05 10:33:25 -05:00
Dan Ribbens
2e54872d66 0.2.10 2021-02-04 14:13:26 -05:00
Dan Ribbens
4f494e5444 chore: update changelog v0.2.10 2021-02-04 14:11:53 -05:00
Dan Ribbens
8916e8af45 Merge pull request #58 from payloadcms/fix/scss-variable-defaults
fix: flag scss variables with default
2021-02-04 12:38:04 -05:00
Dan Ribbens
399ddbe14b Merge pull request #56 from payloadcms/feature/mongoose-connection-options
feat: add support for setting mongoose connection options
2021-02-04 12:37:33 -05:00
Dan Ribbens
bb9f5f7a16 fix: flag scss variables with default 2021-02-04 12:10:48 -05:00
Jessica Boezwinkle
3999400049 fix: removes outdated link from docs-config-overview 2021-02-04 11:41:56 -05:00
Jessica Boezwinkle
1ed189cfb9 fix: reverts ESLint syntax changes to mdx files 2021-02-04 11:36:09 -05:00
Dan Ribbens
82c489841c feat: add support for setting mongoose connection options 2021-02-04 11:28:46 -05:00
Jessica Boezwinkle
7c5d582757 Merge branch 'master' of https://github.com/payloadcms/payload into docs/updates-meta-descriptions 2021-02-04 11:07:48 -05:00
Jessica Boezwinkle
da61feb73b feat: adds meta descriptions to docs 2021-02-04 11:04:18 -05:00
James Mikrut
3facbf99d8 Merge pull request #55 from payloadcms/fix/relationship-hasmany-false
fix: relationship component hasMany bug
2021-02-03 16:59:35 -06:00
James
d5407060d0 fix: relationship component hasMany bug 2021-02-03 17:55:19 -05:00
Dan Ribbens
3bd0de0a0b Merge pull request #53 from payloadcms/fix/hide-force-unlock-on-create-admin-ui
fix: hide force unlock in admin ui when creating auth collection item
2021-02-03 14:58:14 -05:00
Dan Ribbens
1ad98ed4a4 fix: hide force unlock in admin ui when creating auth collection item 2021-02-03 14:51:50 -05:00
Dan Ribbens
4f4e70c99e Merge pull request #50 from payloadcms/feature/create-first-user-confirm-password
feat: admin ui create first user add confirm password field
2021-02-03 13:38:46 -05:00
Dan Ribbens
60453fec9e feat: admin ui create first user add confirm password field 2021-02-03 11:13:55 -05:00
Dan Ribbens
51c021d3be fix: add file to create and update local operations 2021-01-29 12:54:40 -05:00
Dan Ribbens
1358a35580 0.2.9 2021-01-27 01:00:28 -05:00
Dan Ribbens
3d1ee33521 Merge pull request #41 from payloadcms/fix/validation-type-allow-promise
fix: field valiation type can return promise
2021-01-27 00:58:53 -05:00
Dan Ribbens
06ddab1249 fix: field valiation type can return promise 2021-01-27 00:54:41 -05:00
Dan Ribbens
1b6f1b5a77 0.2.8 2021-01-26 21:09:21 -05:00
Dan Ribbens
0c9a6e9449 Merge pull request #39 from payloadcms/chore/package-keywords
chore: add bugs and keywords to package.json
2021-01-26 21:05:08 -05:00
Dan Ribbens
37f5b32833 chore: add bugs and keywords to package.json 2021-01-26 17:29:04 -05:00
Elliot DeNolf
e0b1aa2f4d chore: update changelog 2021-01-25 22:30:01 -05:00
Elliot DeNolf
853963ff61 0.2.6 2021-01-25 15:43:53 -05:00
Elliot DeNolf
ebb1a602be chore: fix package.json version 2021-01-25 15:35:03 -05:00
Elliot DeNolf
928230cc5d chore: add blank line to CHANGELOG.md 2021-01-25 15:30:58 -05:00
Elliot DeNolf
7998c4e36c chore: add CHANGELOG.md 2021-01-25 15:22:23 -05:00
Elliot DeNolf
a263df5bf4 chore: add registry url to package.json 2021-01-25 15:19:35 -05:00
Elliot DeNolf
ed37064e09 chore: full build for pretest 2021-01-25 15:12:33 -05:00
Elliot DeNolf
468df67384 chore: release-it publishConfig changes 2021-01-25 15:08:34 -05:00
Elliot DeNolf
fca7a4c31e chore: release-it skip npm checks 2021-01-25 14:55:38 -05:00
Elliot DeNolf
fd539e0a35 Merge pull request #35 from payloadcms/fix/field-gutter-styles
fix: field gutter padding
2021-01-25 14:41:45 -05:00
James
90d20786c3 fix: field gutter padding 2021-01-25 14:20:04 -05:00
Elliot DeNolf
c9b8a68b43 Merge pull request #34 from payloadcms/release-it-changelog 2021-01-25 09:33:34 -05:00
Elliot DeNolf
cc35c3d012 chore: adjust release-it configuration 2021-01-25 09:27:45 -05:00
Elliot DeNolf
3a2fe5ae96 chore: add release-it and needed scripts 2021-01-25 09:16:06 -05:00
James
8218343b6c fix: richtext sticky toolbar within block 2021-01-24 15:03:03 -05:00
James
72427f8f39 0.2.4 2021-01-24 13:50:11 -05:00
James Mikrut
01a3bf930e Merge pull request #30 from payloadcms/fix/blocks-css
fix: block field styles
2021-01-24 13:45:58 -05:00
James
36f0bd81eb fix: block field styles 2021-01-24 13:12:53 -05:00
James
f1fdad5023 0.2.3 2021-01-24 12:37:22 -05:00
James Mikrut
90f222ccfb Merge pull request #29 from payloadcms/fix/modal-height
fix: ensures modal heights are 100% of viewport
2021-01-24 12:36:31 -05:00
James
7edab5d354 fix: ensures modal heights are 100% of viewport 2021-01-24 12:35:05 -05:00
James
c84288c0d9 0.2.2 2021-01-24 12:00:49 -05:00
James Mikrut
5d0175e007 Merge pull request #28 from payloadcms/feat/restrict-serverurl-path
Feat/restrict serverurl path
2021-01-24 11:57:40 -05:00
James
174fa99ecd chore: removes old config schema validation 2021-01-24 11:52:22 -05:00
James
75056e2e13 feat: adds better serverURL validation 2021-01-24 11:49:23 -05:00
James
fce56a0e82 Merge branch 'master' of github.com:payloadcms/payload into feat/restrict-serverurl-path 2021-01-24 11:26:25 -05:00
Elliot DeNolf
7914106953 Merge pull request #27 from payloadcms/server-url-fix 2021-01-24 11:26:05 -05:00
Elliot DeNolf
e638efa847 docs: revert serverURL changes 2021-01-24 11:23:11 -05:00
Elliot DeNolf
f558bd2733 fix: revert serverURL config change 2021-01-24 11:13:33 -05:00
Elliot DeNolf
bd446b60b8 Revert "docs: configuration overview describe serverURL and removed from code examples where not needed"
This reverts commit 5af3520aca.
2021-01-24 11:12:58 -05:00
James
e538598e81 docs: fixes broken link 2021-01-24 10:47:35 -05:00
James
f995ec1682 chore: moves config paths from user-facing to internal type 2021-01-24 10:47:29 -05:00
James
625ff078fe 0.2.1 2021-01-24 10:33:31 -05:00
James Mikrut
1760d41729 Merge pull request #25 from payloadcms/feat/expose-types
feat: exposes further types
2021-01-24 10:32:47 -05:00
James
e056348850 feat: exposes further types 2021-01-24 10:29:57 -05:00
Elliot DeNolf
53f7c60267 0.2.0 2021-01-23 16:06:21 -05:00
Elliot DeNolf
2f4be13018 Merge pull request #23 from payloadcms/tsconfig-target
fix: target es2019, optional chaining not supported for Node < 14
2021-01-23 16:01:36 -05:00
Elliot DeNolf
52a0096d3b fix: target es2019, optional chaining not supported for Node < 14 2021-01-23 15:58:50 -05:00
Elliot DeNolf
c8d656f1d9 Merge pull request #10 from payloadcms/feature/allow-admin-verify 2021-01-23 15:54:47 -05:00
Elliot DeNolf
08c6628fbd Merge pull request #20 from payloadcms/fix/filter-operators
fix: migrates Condition UI value/operator pattern
2021-01-23 15:53:29 -05:00
Elliot DeNolf
4102ca37dc Merge pull request #19 from payloadcms/fix/button-css-order
fix: button css specificity
2021-01-23 15:52:53 -05:00
Elliot DeNolf
5bfddbf71c Merge pull request #9 from alexander-chi/patch-1
Update fields.mdx to add missing comma
2021-01-23 15:51:01 -05:00
Elliot DeNolf
02a89626f0 Merge pull request #22 from payloadcms/feature/contributing
feat: adds contributing guidelines
2021-01-23 15:49:46 -05:00
James
de5bf6ea28 feat: adds contributing guidelines 2021-01-23 12:43:42 -05:00
Elliot DeNolf
cd3f0af79b chore: add pr template 2021-01-22 21:54:46 -05:00
James
dd31818051 docs: typo in graphql 2021-01-22 17:15:39 -05:00
James
2139eb410f feat: auto-removes verificationToken upon manual user verify 2021-01-22 17:13:27 -05:00
James
d23cc20b3d fix: migrates Condition UI value/operator pattern 2021-01-22 16:17:13 -05:00
James
d8b52337b2 fix: button css specificity 2021-01-22 15:49:39 -05:00
Dan Ribbens
9126268a32 Merge pull request #18 from payloadcms/0.1.147
0.1.147
2021-01-19 14:46:57 -05:00
Dan Ribbens
ca89368782 release: v0.1.147 2021-01-19 14:42:38 -05:00
Dan Ribbens
b41028cf37 Merge remote-tracking branch 'origin/fix/sendemail-error-catch' 2021-01-19 14:23:33 -05:00
Dan Ribbens
0f9c6b6ff2 Merge remote-tracking branch 'origin/feat/serverurl-not-required' 2021-01-19 14:16:27 -05:00
Elliot DeNolf
e2c7742265 0.1.146 2021-01-17 22:45:52 -05:00
Elliot DeNolf
1f40afb2fc Merge pull request #15 from payloadcms/fix/14/localized-groups
fix: localized groups
2021-01-17 22:43:18 -05:00
Elliot DeNolf
e4ef946020 Merge pull request #16 from payloadcms/fix-13-textarea-validation 2021-01-17 22:43:04 -05:00
Elliot DeNolf
5d7b9af23e test: add field validations for text, textarea, password 2021-01-17 22:39:57 -05:00
Elliot DeNolf
ba31397ac1 fix: textarea handle undefined 2021-01-17 22:39:50 -05:00
James
f38e0fce98 fix: localized groups 2021-01-17 21:20:38 -05:00
Elliot DeNolf
c12d4757a4 chore: add issue templates 2021-01-17 14:50:49 -05:00
Elliot DeNolf
191a71ab67 chore: use og-image for readme 2021-01-17 10:39:44 -05:00
Elliot DeNolf
a4e7cd1fb9 0.1.145 2021-01-16 21:37:42 -05:00
Elliot DeNolf
5e60b8617e fix: minLength field validation error messages 2021-01-16 21:24:03 -05:00
Elliot DeNolf
2c98087c6f fix: add minLength and maxLength to textarea field validations 2021-01-16 21:23:26 -05:00
James
a6a23e3b15 feat: allows admins to autoverify via admin 2021-01-16 18:23:26 -05:00
Alexander Chi
6e9f2afd61 Update fields.mdx to add missing comma 2021-01-16 22:38:26 +00:00
Dan Ribbens
5af3520aca docs: configuration overview describe serverURL and removed from code examples where not needed 2021-01-16 16:51:21 -05:00
Dan Ribbens
4770f24adb feat: serverURL no longer required in config 2021-01-16 16:48:09 -05:00
Elliot DeNolf
b57239e2e7 0.1.144 2021-01-16 09:58:09 -05:00
Elliot DeNolf
ba02ad66c7 chore: add build:watch script 2021-01-15 23:54:26 -05:00
Elliot DeNolf
45681d632a ci: update pretest build step 2021-01-15 23:53:01 -05:00
Elliot DeNolf
b2d05c781d fix: add default user to collections before checking for valid relationships 2021-01-15 23:39:16 -05:00
Elliot DeNolf
c303711813 fix: handle user collection 'auth: true' 2021-01-15 15:51:17 -05:00
Dan Ribbens
ea47736274 fix: better error handler when sendMail fails 2021-01-14 16:00:09 -05:00
James
45708771b0 docs: fixes broken link 2021-01-13 21:15:19 -05:00
James
7865a37998 0.1.143 2021-01-13 21:12:29 -05:00
James Mikrut
0964b449b9 Merge pull request #3 from payloadcms/feature/allow-undefined-collections
feat: allows undefined collections
2021-01-13 21:09:20 -05:00
James
afbc8a4638 chore: improves typing within incLoginAttempts method 2021-01-13 21:06:13 -05:00
James
f41f35b0ae chore: removes unused import 2021-01-13 21:03:01 -05:00
James
1b582f5935 chore: updates webpack types 2021-01-13 20:59:43 -05:00
James
6bb58cecd8 feat: allows undefined collections 2021-01-13 20:39:18 -05:00
Dan Ribbens
bd92b0a94b fix: payload schema validation allow '*' 2021-01-09 21:52:53 -05:00
Elliot DeNolf
d6ca920589 0.1.142 2021-01-09 10:40:52 -05:00
Elliot DeNolf
0575ab8125 docs: add desc and keywords 2021-01-09 10:32:22 -05:00
James
196c5bf1d7 Merge branch 'master' of github.com:payloadcms/payload 2021-01-09 08:09:40 -05:00
James
1304c8a95d docs: licensing grammar issues 2021-01-09 08:09:38 -05:00
Elliot DeNolf
8db73bbec2 feat: add getAdminURL and getAPIURL functions 2021-01-09 00:48:39 -05:00
James Mikrut
335df19226 Merge pull request #2 from payloadcms/fix/collections-schema-validation
fix: adds disableDuplicate to schema validation of collections config
2021-01-08 14:12:24 -05:00
Jacob Fletcher
e9ed7ee4bd fix: adds disableDuplicate to schema validation of collections config 2021-01-08 14:11:27 -05:00
Elliot DeNolf
6f713572e3 chore: add tweet link to readme 2021-01-07 22:59:25 -05:00
James
04c24c5dc1 docs: fixes broken links 2021-01-07 20:05:32 -05:00
James
617fe14dbe docs: fixes broken links 2021-01-07 19:58:24 -05:00
James
37f3633e0c Merge branch 'feature/disable-gql' of github.com:payloadcms/payload 2021-01-07 19:55:10 -05:00
James
87a1717dca feat: adds build to CI 2021-01-07 18:08:00 -05:00
James
ba5aceb5c6 0.1.141 2021-01-07 18:01:44 -05:00
James
f49326395d fix: properly exports ES6 components 2021-01-07 18:00:19 -05:00
James
f3cf99aa5c docs: licensing improvements 2021-01-07 17:23:28 -05:00
James
c4eec6dc12 docs: fixes licensing code example 2021-01-07 17:21:28 -05:00
James
1b49c18767 0.1.140 2021-01-07 16:48:14 -05:00
James
423df3f83a fix: admin field error messages 2021-01-07 16:46:49 -05:00
Dan Ribbens
d78c76e0b4 feat: disable graphQL flag that will bypass gql on payload init 2021-01-06 15:43:42 -05:00
James
149781af9e docs: adds some excitement to quickstart 2021-01-06 12:08:26 -05:00
James
51539e6d44 docs: spelling error 2021-01-06 10:14:49 -05:00
James
ce6e8b7412 0.1.139 2021-01-06 09:21:27 -05:00
James
d22a5ad840 docs: adds callout to license in installation 2021-01-06 09:21:14 -05:00
James
e3385e1243 docs: licensing additions 2021-01-06 09:13:44 -05:00
James
d329d9f282 chore: updates webpack-cli 2021-01-06 08:57:43 -05:00
James
644519c539 fix: improves typing in delete op 2021-01-06 08:57:35 -05:00
James
2aab4dfb9d Merge branch 'master' of github.com:payloadcms/payload 2021-01-06 08:37:42 -05:00
James
2b37bfd93e docs: lowercases dir names 2021-01-06 08:37:29 -05:00
Elliot DeNolf
4d6871abc8 fix: use FileSize and ImageSize types 2021-01-06 00:07:47 -05:00
Elliot DeNolf
f059d5b59a docs: small create-payload-app functionality correction 2021-01-05 22:57:42 -05:00
Elliot DeNolf
82d8d28b2c chore: add badges to readme and rename workflow 2021-01-05 22:28:21 -05:00
James
2624b0c34b 0.1.138 2021-01-05 19:29:51 -05:00
James
8f568411de docs: licensing and preventing abuse revisions 2021-01-05 19:29:13 -05:00
James
6066f2896a fix: removes old css 2021-01-05 18:44:10 -05:00
Dan Ribbens
c6bc387a88 Merge branch 'master' of github.com:payloadcms/payload 2021-01-05 17:23:41 -05:00
Dan Ribbens
5e0ee919d7 docs: production preventing abuse 2021-01-05 17:22:47 -05:00
James
9fd545070b 0.1.137 2021-01-05 14:51:25 -05:00
James
680863702e fix: removes prod devtool 2021-01-05 14:51:19 -05:00
James
f20f6d70a0 0.1.136 2021-01-05 14:31:31 -05:00
James
983a939952 chore: bumps config-provider 2021-01-05 14:30:58 -05:00
Dan Ribbens
b579ec7bbd Merge branch 'master' of github.com:trouble/payload 2021-01-05 14:26:17 -05:00
Dan Ribbens
9703c34f4d docs: payload license documentation 2021-01-05 14:26:08 -05:00
James
d3dd1844dc 0.1.135 2021-01-05 14:21:13 -05:00
James
54405732c9 0.1.134 2021-01-05 14:18:56 -05:00
James
6bf141c6d4 fix: updates payload-config path within webpack 2021-01-05 14:18:50 -05:00
James
3be1cf16ef 0.1.133 2021-01-05 14:11:53 -05:00
James
0cd585d09b 0.1.132 2021-01-05 14:10:21 -05:00
James
c0636dfe22 fix: renames webpack config alias 2021-01-05 14:10:12 -05:00
James
0367ce5d5a 0.1.131 2021-01-05 13:47:20 -05:00
James
38bc2e68fe 0.1.130 2021-01-05 13:46:28 -05:00
James
b71483f557 chore: bumps config provider 2021-01-05 13:46:23 -05:00
James
3557480838 0.1.129 2021-01-05 13:44:12 -05:00
James
13cd1bd060 chore: adds default values for descructured props 2021-01-05 13:44:05 -05:00
James
ed24292f55 chore: references license 2021-01-05 13:38:45 -05:00
James
b58a441109 0.1.128 2021-01-05 13:28:17 -05:00
James
eb8b9e2542 references license 2021-01-05 13:28:08 -05:00
James
587a71c1b6 Merge branch 'master' of github.com:keen-studio/payload 2021-01-05 13:18:02 -05:00
James
06a722ffdb chore: updates all references from @payloadcms/payload to payload 2021-01-05 13:17:59 -05:00
Elliot DeNolf
e8ba315b20 chore: update readme 2021-01-05 13:09:30 -05:00
James
95180f4737 docs: uses live URLs 2021-01-05 12:38:26 -05:00
James
558e6839bc docs: readme 2021-01-05 12:38:20 -05:00
James
f52eb88b70 docs: adds access control args clarity 2021-01-04 21:24:34 -05:00
James
cab10e2028 docs: adds examples and descriptions to access control 2021-01-04 21:19:19 -05:00
James
6ee2a762e8 docs: deployment improvements 2021-01-04 18:55:57 -05:00
James
4d092ab9cb Merge branch 'master' of github.com:keen-studio/payload 2021-01-04 18:45:29 -05:00
James
da6e6c4441 docs: deployment 2021-01-04 18:45:26 -05:00
Elliot DeNolf
2f9b9931e4 docs: add globals access control 2021-01-04 17:00:55 -05:00
James
43af9146d8 docs: adds max login attempts stub to preventing-abuse 2021-01-04 16:54:00 -05:00
James
99b3499044 docs: renames security to preventing-abuse, misc updates 2021-01-04 16:10:47 -05:00
Elliot DeNolf
cef864a80e docs: add field access control and collection admin access control 2021-01-03 23:56:42 -05:00
James
44a4a99b92 docs: adds adminThumbnail to upload example 2021-01-03 12:41:41 -05:00
James
34c785557d docs: improves Admin 2021-01-03 12:40:13 -05:00
James
b83abf944b docs: finishes upload 2021-01-03 12:37:40 -05:00
James
85658c7017 docs: spelling, REST auth ops, Upload progress 2021-01-03 12:00:35 -05:00
James
a0bf503f88 fix: issues with select hasMany 2021-01-03 11:45:09 -05:00
James
87aaccac94 docs: Local API 2021-01-03 10:46:23 -05:00
James
d43ff8b4a7 feat: types this within crreate op 2021-01-03 09:57:54 -05:00
James
e093e06926 fix: removes old reliance on config.email 2021-01-03 09:53:32 -05:00
James
baecb27712 Merge branch 'feature/email-docs' of github.com:keen-studio/payload 2021-01-03 09:38:59 -05:00
Dan Ribbens
faec969752 fix: payload config remove types for email 2021-01-03 03:20:29 -05:00
Dan Ribbens
cf89d4cb56 fix: default config value for email removed as the property was moved out of config 2021-01-03 03:17:18 -05:00
Dan Ribbens
57d2c8602f fix: demo email start on payload init 2021-01-03 03:15:54 -05:00
Dan Ribbens
3233e903d9 docs: adds email documentation 2021-01-03 03:15:13 -05:00
Dan Ribbens
5d6a3bc833 refactor: email build changed to be more readable and work according to docs 2021-01-03 03:13:23 -05:00
Elliot DeNolf
5eca243af9 docs: rough collection access control 2021-01-03 00:14:41 -05:00
James
2683bec738 Merge branch 'master' of github.com:keen-studio/payload 2021-01-02 22:19:55 -05:00
James
0838b6837b docs: scaffolds access control 2021-01-02 22:19:51 -05:00
Elliot DeNolf
885c73c838 fix: reinstate explicit labels for AllFields collection 2021-01-02 22:07:30 -05:00
James
730d472008 docs: rest, pagination 2021-01-02 21:18:40 -05:00
James
7b11dd053b docs: adds rich text serialization 2021-01-02 20:31:51 -05:00
James
c85d72317c docs: queries 2021-01-02 20:31:43 -05:00
James
d76c1f862c docs: graphql 2021-01-02 19:25:00 -05:00
James
f1c5cfe1a5 docs: adapts hooks docs to new formatting 2021-01-02 18:28:11 -05:00
James
68e0e5cbdd Merge branch 'master' of github.com:keen-studio/payload 2021-01-02 16:28:11 -05:00
James
97ff9eeb1b docs: finishes authentication 2021-01-02 16:28:08 -05:00
Dan Ribbens
e8eabde889 chore: add license.md 2021-01-02 15:28:26 -05:00
James
7d05069f36 feat: allows for refresh operation to accept a deliberately specified token 2021-01-02 14:50:40 -05:00
James
4d871c27f6 fix: graphQL access 2021-01-02 14:21:21 -05:00
James
709cc9c294 fix: graphQL logout 2021-01-02 14:21:06 -05:00
James
cd9b360292 docs: removes unused files 2021-01-02 13:29:46 -05:00
James
1f6666785e docs: finishes auth config 2021-01-02 13:24:33 -05:00
James
53f8570a53 docs: auth config 2021-01-02 12:58:09 -05:00
James
094b0399cb docs: auth overview 2021-01-02 11:23:50 -05:00
James
fd917e6bae docs: Admin 2021-01-02 10:38:17 -05:00
James
b3c254e34f docs: fields overview, small fields adjustments 2020-12-31 14:01:28 -05:00
James
22a7ddfd28 docs: rich text 2020-12-31 13:18:34 -05:00
James
0eda6b5c47 docs: finishes individual field docs 2020-12-31 11:55:41 -05:00
James
cd0becb7ba docs: field types 2020-12-31 11:19:59 -05:00
James
19b92c4748 docs: orders fields 2020-12-31 09:58:08 -05:00
James
c572057706 fix: config validation of block imageURL 2020-12-31 09:53:19 -05:00
James
c86731aaf7 docs: array and blocks 2020-12-31 09:30:50 -05:00
James
ffa0ea4756 chore: better names block image types 2020-12-31 09:30:25 -05:00
James
0f7046b98e fix: improves edit view layout constraints 2020-12-30 19:44:55 -05:00
James
f582a254cd fix: adds default thumbnail size 2020-12-30 19:44:28 -05:00
James
e067fa12b2 fix: Edit view main / sidebar widths 2020-12-30 19:35:30 -05:00
James
a5310ac1b3 Merge branch 'master' of github.com:keen-studio/payload 2020-12-30 19:13:21 -05:00
James
fa4c9ba796 0.1.127 2020-12-30 19:13:03 -05:00
James
662839fb06 fix: converts class methods to arrow functions 2020-12-30 19:12:55 -05:00
Jarrod Flesch
d07259d0dc Merge branch 'master' of github.com:trouble/payload 2020-12-30 17:49:03 -05:00
Jarrod Flesch
4fa942f3a0 fix: removes delete and unlock from baseField type and schema 2020-12-30 17:48:52 -05:00
Jarrod Flesch
e2d0fc3e10 Merge branch 'master' of github.com:trouble/payload 2020-12-30 17:40:19 -05:00
Jarrod Flesch
5e0ece5d72 removes delete and unlock from baseField type and schema 2020-12-30 17:40:06 -05:00
James
6b5ab50f71 0.1.126 2020-12-30 15:50:50 -05:00
James
d7d906bc86 Merge branch 'master' of github.com:keen-studio/payload 2020-12-30 15:50:38 -05:00
James
8cb80cecf8 chore: bumps payload config provider 2020-12-30 15:50:32 -05:00
Jarrod Flesch
5823a864f9 fix: lowecases joi like everywhere else in payload 2020-12-30 15:30:34 -05:00
Jarrod Flesch
36d51de201 fix: adds delete and unlock to joi baseField schema 2020-12-30 14:59:54 -05:00
Jarrod Flesch
60c1d1d3d9 doc: stubs out all fields so docs are not broken 2020-12-30 13:47:28 -05:00
Jarrod Flesch
f0a45281b5 merges with master 2020-12-30 13:29:51 -05:00
Jarrod Flesch
86584900b2 doc: text fine tuning 2020-12-30 13:29:36 -05:00
James
a7603bcc6b 0.1.125 2020-12-30 12:19:41 -05:00
James
eeea06d6aa fix: removes prod source maps 2020-12-30 12:19:23 -05:00
Jarrod Flesch
e3c3516283 doc: adjusts concepts/depth 2020-12-30 12:12:19 -05:00
James
5a45e60a73 0.1.124 2020-12-30 12:08:49 -05:00
James
e2413baf10 docs: stubs fields 2020-12-30 12:08:39 -05:00
James
0c6a08da76 chore: bumps config-provider 2020-12-30 12:08:18 -05:00
Jarrod Flesch
8401400129 fix: webpack config override 2020-12-30 10:10:43 -05:00
James
e614a6fc70 docs: few fixes 2020-12-30 10:09:29 -05:00
Jarrod Flesch
5f302dd046 Merge branch 'master' of github.com:trouble/payload into fix/datePickerTypes 2020-12-30 09:51:04 -05:00
James
480bc0ad9d chore: moves webpack customization to admin config 2020-12-29 13:28:48 -05:00
James
7274b1692d docs: adds customizing css and webpack 2020-12-29 13:17:02 -05:00
Jarrod Flesch
e263a9c9d4 chore: removes blank line 2020-12-29 12:52:58 -05:00
Jarrod Flesch
34153dc85b Merge branch 'master' of github.com:trouble/payload into typescript/datePicker 2020-12-29 12:48:24 -05:00
Jarrod Flesch
5100fd35dc fix: updates typing on DatePicker component and joi schema 2020-12-29 12:41:15 -05:00
James
d10954b788 docs: customizing scss, express, localization 2020-12-29 11:37:47 -05:00
James
544a4dbd3a feat: allows for adding custom CSS in addition to SCSS overrides 2020-12-29 11:37:36 -05:00
James
c84bcde0a1 docs: localization 2020-12-29 09:12:12 -05:00
James
85a765959b docs: collection and global configs 2020-12-29 08:09:14 -05:00
James
3ce6a45121 chore: removes unknown key on date field schema 2020-12-28 17:40:42 -05:00
James
3248740f04 docs: progress to collection config 2020-12-28 17:40:21 -05:00
James
30e28603a7 Merge branch 'master' of github.com:keen-studio/payload 2020-12-28 17:36:55 -05:00
James
0c03c2e3af fix: type issues that arose from reorganizing certain config props 2020-12-28 17:36:43 -05:00
Jarrod Flesch
4e48a4ffc5 Merge pull request #472 from trouble/refactor/sectionTitle
simplifies SectionTitle, addresses #471
2020-12-28 17:23:12 -05:00
James
f65e91dc74 docs: further stubs out access control 2020-12-28 17:20:40 -05:00
James
6df3b381ef chore: better organizes collection preview 2020-12-28 17:20:29 -05:00
Jarrod Flesch
d849367a12 fixes fieldGutter #473 2020-12-28 17:17:32 -05:00
Jarrod Flesch
af4c6fb15a simplifies SectionTitle, addresses #471 2020-12-28 16:24:25 -05:00
James
2856e0213f docs: config, getting started, collections 2020-12-28 16:05:26 -05:00
James
4fbf8aa0bf chore: continues docs 2020-12-28 13:32:12 -05:00
James
24788b8282 chore: centralizes express config options 2020-12-28 13:32:05 -05:00
James
8090b2a23b fix: disables inline sourcemaps for admin dist 2020-12-28 13:31:37 -05:00
James
64cf32146a fix: disable requiring default props in eslint 2020-12-28 13:31:15 -05:00
James
15e6ee7dac 0.1.123 2020-12-27 21:53:03 -05:00
James
8bda6eaa76 fix: prod webpack publicPath 2020-12-27 21:52:55 -05:00
James
b8ad84c525 fix: allows config validation to accept esmodules as components 2020-12-27 21:47:09 -05:00
James
72b5817276 0.1.122 2020-12-27 21:24:07 -05:00
James
1fff7374d4 fix: safely accesses field permissions 2020-12-27 21:24:01 -05:00
James
fec718e9e5 feat: sends config through babel/register 2020-12-27 21:23:41 -05:00
James
efe0b40aca feat: splits tsconfig between admin and server 2020-12-27 21:02:20 -05:00
James
db135129d8 fix: improves field schema validation 2020-12-27 21:01:39 -05:00
James
b1a15f6e33 0.1.121 2020-12-27 15:22:52 -05:00
James
9037e6c64b 0.1.20 2020-12-27 15:22:02 -05:00
James
604922a26e feat: improves edit scroll UX in Account and Globals 2020-12-27 15:21:53 -05:00
James
0117f18eb1 fix: removes unnecessary meta defaults in admin config 2020-12-27 15:21:33 -05:00
James
a715a4206e feat: improves scrolling UX in Edit views 2020-12-27 15:16:14 -05:00
James
6e83edc988 fix: production webpack css 2020-12-27 15:15:46 -05:00
James
9f1ebaf850 0.1.19 2020-12-27 14:38:40 -05:00
James
8571dc3965 feat: flattens build into one command 2020-12-27 14:38:32 -05:00
James
5b8c721292 fix: copyfiles, autocomplete transition 2020-12-27 14:34:36 -05:00
James
e2248a066d 0.1.18 2020-12-27 14:03:41 -05:00
James
62dea6d52a exposes additional types 2020-12-27 14:03:29 -05:00
James
fe380bd943 0.1.17 2020-12-27 13:45:02 -05:00
James
b266ae1356 remedies ts error in me collection 2020-12-27 13:42:57 -05:00
James
4abcad67b7 0.1.16 2020-12-27 13:38:34 -05:00
James Mikrut
0243371c71 Merge pull request #469 from trouble/ts-final
Migrates to Typescript
2020-12-27 13:36:55 -05:00
James
15323a6b6d removes location state clear on route change 2020-12-27 13:31:39 -05:00
James
f5b9d32317 restricts ActionPanel to only show add button when max rows not met 2020-12-27 13:13:37 -05:00
James
71ed0ad0ca migrates object-to-formdata 2020-12-27 13:07:01 -05:00
James
b4fd2b1976 adds default value to block field schema validation 2020-12-27 13:06:53 -05:00
James
b6d2c95ee7 disables hover on read only DraggableSections 2020-12-27 13:06:34 -05:00
James
238232cf51 fixes hover states in read-only radio group 2020-12-27 12:38:05 -05:00
James
04cf39749b upgrades dependencies 2020-12-27 12:28:37 -05:00
James
c9616b01ac removes old code 2020-12-27 12:19:43 -05:00
James
dede06ad76 removes serverModules, removes publicENV and better structures webpack configs 2020-12-27 12:15:57 -05:00
James
843d65f494 removes PropTypes 2020-12-27 11:45:08 -05:00
James
58788c327f mobile improvements 2020-12-27 11:02:53 -05:00
James
0124ae8812 ensures returned documents from create / update do not include fallbacks 2020-12-26 21:13:07 -05:00
James
3d08222c29 resolves remaining type errors 2020-12-26 21:04:41 -05:00
James
f6c0251a6c types operations, GraphQL 2020-12-26 20:24:28 -05:00
James
cf32ee460c lays operation type pattern 2020-12-26 16:25:58 -05:00
James
569ce08174 further types to admin 2020-12-26 14:51:07 -05:00
James
e2d370a415 field typing changes due to useFieldType updates 2020-12-26 13:12:29 -05:00
James
152799ecc7 finishes admin field typing 2020-12-26 12:23:08 -05:00
James
087ac31533 removes _id from relationships 2020-12-24 12:24:58 -05:00
James
b184b26a4e types RichText 2020-12-24 12:15:00 -05:00
James
f86e90b072 revises Config type 2020-12-24 10:47:14 -05:00
James
be04310810 flattens dist folder 2020-12-24 10:28:41 -05:00
James
d510961f6c ensures relationship fields can be cleared 2020-12-24 09:57:41 -05:00
James
d29f6775a8 streamlines Select, ReactSelect, Relationship 2020-12-20 17:19:38 -05:00
James
7be836cced Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-12-20 15:17:36 -05:00
James
4528586849 typing progress, refactor Relationship 2020-12-20 15:17:33 -05:00
Elliot DeNolf
47e82cb069 lots of operation typing 2020-12-20 15:09:12 -05:00
Elliot DeNolf
d38c6f8118 buildSchema types and exclude tests from tsconfig 2020-12-20 11:42:36 -05:00
James
757c8647bf adds option type 2020-12-20 11:36:24 -05:00
James
ba6c1b9439 progress to field typing 2020-12-20 11:11:35 -05:00
James
ac92e1289b further typing 2020-12-20 09:13:25 -05:00
James
6a49bffa9a Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-12-18 07:56:52 -05:00
Elliot DeNolf
a95aada35a misc gql types 2020-12-12 22:50:43 -05:00
Elliot DeNolf
8fd430819b add more graphql schema typing 2020-12-09 11:02:37 -05:00
Elliot DeNolf
396760d523 More graphql typing 2020-12-09 09:35:08 -05:00
Elliot DeNolf
6ab15fce1c ci: use registry-url 2020-12-08 13:33:40 -05:00
Elliot DeNolf
81ca30c9d4 ci: try always-auth 2020-12-08 11:59:06 -05:00
Elliot DeNolf
a5085b6e56 ci: auth against npm 2020-12-08 11:52:36 -05:00
Elliot DeNolf
4cb8bbd2f4 type traverseFields and other misc 2020-12-08 11:36:00 -05:00
Elliot DeNolf
b9c597af92 add global request handler types 2020-12-03 15:00:40 -05:00
Elliot DeNolf
47b6bb683b docs(access): stub out access control configuration 2020-12-03 12:00:46 -05:00
Elliot DeNolf
d3df6c606c chore: add build:watch script 2020-12-03 11:50:39 -05:00
Elliot DeNolf
1cd578ef44 fix: handle access result gracefully 2020-12-03 11:50:08 -05:00
James
55dd4768b9 Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-12-03 10:32:32 -05:00
Elliot DeNolf
66946c8697 fix: undo property fix, field exists - bad typing 2020-12-02 21:50:54 -05:00
Elliot DeNolf
1e4e6e9619 more typing in src/fields 2020-12-02 21:36:40 -05:00
Elliot DeNolf
c97fb62228 fix basefield types 2020-12-02 17:03:20 -05:00
James
cd5a24e308 0.1.15 2020-12-02 16:33:43 -05:00
James
c17a03ef60 fixes schema validation for custom graphics 2020-12-02 16:33:38 -05:00
James
abfad8c088 0.1.14 2020-12-02 15:28:00 -05:00
James
82b4042b26 0.1.13 2020-12-02 15:24:26 -05:00
James
1129711f75 adds sort to local find operation 2020-12-02 15:24:14 -05:00
James
69582b2e8c 0.1.12 2020-12-02 10:35:47 -05:00
James
00821bf0a2 stubs dotenv for webpack 2020-12-02 10:35:38 -05:00
James
4a313ee7c3 Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-12-02 10:35:03 -05:00
Elliot DeNolf
85f3a8b038 test: ignore dist 2020-12-01 23:04:57 -05:00
Elliot DeNolf
5fe4cb9eee add missing operation typings 2020-12-01 23:04:31 -05:00
James
0e120093cf Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-12-01 17:35:13 -05:00
James
064ab8846d 0.1.11 2020-12-01 17:34:43 -05:00
James
1d5338a8dc fixes bugs with local payload 2020-12-01 17:34:38 -05:00
Elliot DeNolf
4ac08dac65 type some collection operations 2020-12-01 16:38:27 -05:00
James
41df1c447f 0.1.10 2020-12-01 16:17:52 -05:00
James
808a283f74 exports PayloadCollectionConfig type 2020-12-01 16:15:17 -05:00
Dan Ribbens
be69ff5849 Merge branch 'ts-final' of github.com:trouble/payload into ts-final 2020-12-01 11:47:24 -05:00
Dan Ribbens
9d94c509e7 bring back collection after error hook for restful calls 2020-12-01 11:47:07 -05:00
James
282f575cab further types to Elements 2020-12-01 10:48:08 -05:00
Dan Ribbens
6b61714d7e types for error handler 2020-12-01 09:46:57 -05:00
James
dc8ffa34e4 type progress to Elements 2020-12-01 08:04:31 -05:00
James
8c8c49c66d builds a type guard for determining if field has subfields 2020-12-01 08:04:25 -05:00
James
bb7c829c5e progress to typing Blocks and Arrays 2020-11-30 20:12:15 -05:00
James
6bf60ff5d6 Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-11-30 17:31:29 -05:00
James
100d1e7220 further types 2020-11-30 17:31:05 -05:00
Elliot DeNolf
c97732cef3 add some collection/graphql types 2020-11-30 15:11:38 -05:00
James
c398c8b2a2 further types 2020-11-30 14:41:53 -05:00
James
cee40169f3 renames tests to js 2020-11-30 14:36:08 -05:00
James
7d3b6d12e3 further types 2020-11-30 14:29:14 -05:00
James
98b62df792 further types 2020-11-30 14:16:55 -05:00
James
e2d9cd1eed Merge branch 'ts-final' of github.com:keen-studio/payload into admin-types 2020-11-30 11:40:15 -05:00
James
f873a84f08 begins form typing 2020-11-30 10:59:57 -05:00
Elliot DeNolf
c1b1b81774 add requesthandlers to bindings 2020-11-30 10:56:40 -05:00
Elliot DeNolf
7333cc25d8 fix CollectionConfig type, boolean unions will have been sanitized 2020-11-30 10:56:03 -05:00
Elliot DeNolf
32957833f3 add requestHandler types 2020-11-30 10:55:26 -05:00
James
20fabb81e8 further types 2020-11-30 08:47:58 -05:00
James
7644b031c1 further typing 2020-11-30 08:42:06 -05:00
James
dbc403319d instantiates auth forgot password 2020-11-29 20:46:10 -05:00
James
c1d025e241 better sanitization pattern 2020-11-29 20:38:10 -05:00
James
c3c3f3fc88 replaces sanitization 2020-11-29 20:08:06 -05:00
James
6f1d61aabc ensures loadConfig returns a full config 2020-11-29 17:55:45 -05:00
James
3d282d2523 revises payload.authenticate type 2020-11-29 17:52:17 -05:00
James
ba66a0e801 merge 2020-11-29 15:41:03 -05:00
James
0fcd3d8f28 further types 2020-11-29 15:40:11 -05:00
Dan Ribbens
ddda183090 merge ts-final 2020-11-29 15:39:54 -05:00
Dan Ribbens
f19fc9057d replace payloadconfig with config in places 2020-11-29 15:33:03 -05:00
James
17e4d78bdc further typing 2020-11-29 14:27:56 -05:00
James
9ef954f430 defines pattern for request handler types 2020-11-29 14:18:23 -05:00
James
767b68b0bd fixes tests 2020-11-29 12:41:13 -05:00
James
53d78e995b few type fixes 2020-11-29 11:42:34 -05:00
James
0119965287 fixes build script 2020-11-29 11:36:01 -05:00
James
45dc3cab11 sets defaults for auth and upload 2020-11-29 11:35:52 -05:00
James
73d27be947 fixes bug in RenderFields 2020-11-29 11:35:37 -05:00
James
a5bbb338b9 resets ts error truncation 2020-11-29 11:35:28 -05:00
James
fd7cd0324d validates field types 2020-11-28 17:34:32 -05:00
James
aa795d19d5 converts demo to ts 2020-11-28 16:07:54 -05:00
James
9019cc9101 merges and WIP - field types 2020-11-27 14:40:16 -05:00
James
cd64238a51 progress to joi validation 2020-11-27 13:05:22 -05:00
James
5ffa0ed6ee swaps out ajv for joi 2020-11-26 15:22:34 -05:00
Elliot DeNolf
1889f00f8f more field type adjustments 2020-11-26 11:44:14 -05:00
James
0e2fbe0e8f enables build w/ typescript, refines the way configs are found 2020-11-25 18:57:17 -05:00
Dan Ribbens
70a84d90ad cleanup in payload init 2020-11-25 17:36:51 -05:00
James
56072e952d 0.1.9 2020-11-25 15:14:18 -05:00
James
f88f482837 properly formats bin 2020-11-25 15:14:12 -05:00
James
ca55c4e55f 0.1.8 2020-11-25 15:11:07 -05:00
James
a00809db8e further types frontend 2020-11-25 15:10:59 -05:00
James
e930abe741 0.1.7 2020-11-25 13:43:05 -05:00
James
b584d22b3a adds bin executable 2020-11-25 13:43:01 -05:00
James
254524ab1b updates webpack 5 dependencies 2020-11-25 11:31:36 -05:00
James
472a6cb232 13639$ types 13639$ 2020-11-25 11:23:03 -05:00
James
ed8d7f2106 adds paths to local ts declarations 2020-11-25 10:50:35 -05:00
James
4239f8e592 Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-11-25 08:09:53 -05:00
James
55deb3f01b types hooks 2020-11-25 08:09:51 -05:00
Dan Ribbens
d09fba47f1 webpack config windows safe path names 2020-11-25 06:33:49 -05:00
James
2420969375 Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-11-24 21:04:29 -05:00
James
055ff455fe builds unlicensed route 2020-11-24 21:04:19 -05:00
James
f3be1fcc62 0.1.6 2020-11-24 20:05:37 -05:00
James
ec00edcdad merges admin-types and adds asset types 2020-11-24 20:05:29 -05:00
Elliot DeNolf
e36be704a5 add types for most of graphql 2020-11-24 20:03:41 -05:00
James
75e557b894 0.1.5 2020-11-24 19:40:30 -05:00
James
41a26289b3 0.1.4 2020-11-24 19:34:38 -05:00
James
c9cb1ea05c adds unlicensed view 2020-11-24 19:34:02 -05:00
James
b3f326fead 0.1.3 2020-11-24 18:38:37 -05:00
James
a1f4168d50 adds babel config to package 2020-11-24 18:38:31 -05:00
James
8d946f225e 0.1.2 2020-11-24 18:34:03 -05:00
James
26a01afa1a fixes access bug 2020-11-24 18:33:24 -05:00
James
35686a7dca adds more files to package 2020-11-24 18:33:03 -05:00
Jessica Boezwinkle
34942daf94 element typescript updates 2020-11-24 17:58:25 -05:00
James
0bdd159fb9 0.1.1 2020-11-24 14:03:50 -05:00
James
d6e7211539 0.1.0 2020-11-24 14:03:03 -05:00
James
713673bc42 bumps payload config provider 2020-11-24 14:02:56 -05:00
James
d75da16fef Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-11-24 12:53:11 -05:00
James
cfdacea210 changes access permissions structure to be more typescript-friendly 2020-11-24 12:53:09 -05:00
Elliot DeNolf
924eb1d0b5 fix(webpack): more require.resolves needed 2020-11-24 10:40:08 -05:00
Elliot DeNolf
6fcf4ebc48 add types for errors 2020-11-23 22:43:35 -05:00
Elliot DeNolf
badd59ac38 fix(webpack): use require.resolve for modules 2020-11-23 21:36:00 -05:00
Elliot DeNolf
5b6392009d add types for buildQuery 2020-11-23 20:56:36 -05:00
James
777a2292dc fixes bug in rate limit definitions 2020-11-23 20:36:41 -05:00
James
352f70a9e4 supports typescript configs 2020-11-23 20:36:28 -05:00
James
09f267c378 merges 2020-11-23 19:37:44 -05:00
James
c2d2702a59 - abstracts AuthProvider and ConfigProvider
- updates Webpack and React
- adds further typing
2020-11-23 19:29:11 -05:00
Elliot DeNolf
062771e0a7 type field validations 2020-11-23 19:25:05 -05:00
Jessica Boezwinkle
d2571fa798 elements to TS 2020-11-23 17:44:57 -05:00
Elliot DeNolf
eafc0876a1 type uploads and images 2020-11-23 13:55:39 -05:00
Jessica Boezwinkle
56ce92e012 Icons to TS 2020-11-23 13:32:12 -05:00
Elliot DeNolf
51958c25ac ci: use tsc-silent for pretest 2020-11-23 11:21:36 -05:00
Elliot DeNolf
8789dae155 fix: add missing webpack dep path-browserify 2020-11-23 10:32:09 -05:00
Elliot DeNolf
d10f3f140f add hook types 2020-11-23 10:23:04 -05:00
Elliot DeNolf
7670a23611 more types and intellisense comments 2020-11-22 18:29:27 -05:00
James
53811b2324 re-implements custom view in CustomComponents, types a few files 2020-11-22 13:41:44 -05:00
James
3344656e6a updates to webpack 5 2020-11-22 13:41:26 -05:00
Elliot DeNolf
e4eece0352 handle singular and plural slugs for auto-label 2020-11-22 08:24:42 -05:00
Dan Ribbens
2a4b821c34 merge ts-final 2020-11-22 01:35:16 -05:00
Dan Ribbens
4a4c4223e6 more typescript types 2020-11-22 01:30:38 -05:00
Elliot DeNolf
314ea43e6d revise field types and type buildSchema 2020-11-22 01:22:28 -05:00
Elliot DeNolf
fdbdf93250 add types for all field-types, and other type tweaks 2020-11-22 00:46:19 -05:00
Dan Ribbens
cb33417924 more typescript errors resolved 2020-11-22 00:01:47 -05:00
Dan Ribbens
cbf12524fe added types to basefields and collection sanitize 2020-11-21 23:07:26 -05:00
James
8b34cab19a Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-11-21 21:00:54 -05:00
James
05a99b5798 revises build script 2020-11-21 21:00:51 -05:00
Elliot DeNolf
f1a83de772 type out the majority of auth 2020-11-21 20:47:22 -05:00
Elliot DeNolf
eb3d299521 more typing 2020-11-21 20:46:02 -05:00
James
60afdd239c revises admin source maps 2020-11-21 20:38:27 -05:00
James
307840edd1 fixes webpack bugs 2020-11-21 20:12:45 -05:00
James
95b8df6d70 adds copyfiles 2020-11-21 18:52:15 -05:00
James
700f28c3ac adds copyfiles 2020-11-21 18:43:39 -05:00
James
1487c3ff16 updates main entrypoint, fixes bad path in /errrors 2020-11-21 18:35:33 -05:00
James
b94772bfcd begins typing admin, fixes editorconfig 2020-11-21 16:11:40 -05:00
James
44d79d2153 removes unused dependencies 2020-11-21 15:12:03 -05:00
James
09f3008569 passing tests 2020-11-21 14:56:49 -05:00
James
e5043e73e3 bumps secret to payload context 2020-11-21 14:34:38 -05:00
James
16d308f452 adds yarn build:tsc 2020-11-21 14:27:43 -05:00
James
3e9ad427ec enables typescript intellisense in buildConfig 2020-11-21 13:53:54 -05:00
James
16d0289c36 progress to buildConfig, splitting out type organization 2020-11-21 12:22:38 -05:00
James
894a400b86 client tests pass 2020-11-21 10:05:10 -05:00
James
9134b51985 merge 2020-11-21 10:03:18 -05:00
James
e00321a101 int tests pass 2020-11-21 10:02:46 -05:00
Elliot DeNolf
75d0b5bb50 add email typing and others 2020-11-21 06:28:07 -05:00
Elliot DeNolf
b774d09b4b type payload logger and format 2020-11-21 03:45:14 -05:00
Elliot DeNolf
a91451e946 chore(nodemon): watch ts files 2020-11-21 03:31:06 -05:00
Elliot DeNolf
983bf713b3 feat: add initial types 2020-11-21 03:30:47 -05:00
Elliot DeNolf
f0ac9d6935 fix conflicts 2020-11-21 02:11:20 -05:00
James
d2572ba4e4 everything works? 2020-11-20 17:12:39 -05:00
James
51307f29c5 fixes bugs with gql 2020-11-20 15:38:01 -05:00
Dan Ribbens
a608a799aa merge ts-final 2020-11-20 15:37:19 -05:00
Dan Ribbens
e7822f7a51 refactor ts graphql index 2020-11-20 15:36:04 -05:00
James
e3277cf120 Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-11-20 15:24:27 -05:00
James
2ffb2b5200 adds jest types 2020-11-20 15:24:14 -05:00
Dan Ribbens
18698a9f18 refactor graphql and utilities 2020-11-20 15:23:32 -05:00
James
95c96247d9 Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-11-20 15:15:26 -05:00
James
f2f65952b2 Merge branch 'ts-final' of github.com:keen-studio/payload into ts-final 2020-11-20 15:15:14 -05:00
Elliot DeNolf
afe5f16af0 convert some errors 2020-11-20 15:15:13 -05:00
James
6a7da1e603 converts auth and email 2020-11-20 15:15:10 -05:00
Elliot DeNolf
bc9adb9fe5 convert src/uploads 2020-11-20 15:10:11 -05:00
Elliot DeNolf
9e1153639e convert src/express and src/fields 2020-11-20 15:05:51 -05:00
Elliot DeNolf
59e5a73e49 convert src/collections 2020-11-20 14:54:47 -05:00
James
8d1856ae2d merges 2020-11-20 14:54:22 -05:00
James
1eeee4854a converts auth and email 2020-11-20 14:53:45 -05:00
Elliot DeNolf
3bea32883d more module conversion 2020-11-20 14:42:36 -05:00
Elliot DeNolf
4f2891836e fix conflicts 2020-11-20 14:42:05 -05:00
James
63e86c4147 further module conversion 2020-11-20 14:39:35 -05:00
James
dfc77f0a3f further module conversion 2020-11-20 14:34:32 -05:00
James
1aaed161eb converts modules 2020-11-20 14:29:49 -05:00
James
7d411622c6 progress to build 2020-11-20 14:21:48 -05:00
Elliot DeNolf
a106fa62fe reinstate all collections in config 2020-11-20 13:41:54 -05:00
Elliot DeNolf
551c249e39 refactor: migrate to typescript 2020-11-20 13:39:18 -05:00
Elliot DeNolf
38028dd36b fix conflicts 2020-11-20 12:02:31 -05:00
James
5b22d91579 0.0.141 2020-11-20 08:45:47 -05:00
James
09b9ce60ad Merge branch 'master' of github.com:keen-studio/payload 2020-11-20 08:45:34 -05:00
James
e20a07e06f 0.0.140 2020-11-20 08:45:10 -05:00
James
0204aa962c moves types into separate folder 2020-11-20 08:45:06 -05:00
Jarrod Flesch
d46051435f Merge branch 'master' of github.com:trouble/payload 2020-11-19 16:52:40 -05:00
Jarrod Flesch
0d56cf4496 properly passes overrideAccess through populationPromise when finding by ID 2020-11-19 16:52:33 -05:00
James
61dae53fc3 Merge branch 'master' of github.com:keen-studio/payload 2020-11-19 10:27:18 -05:00
James
f5377120c4 yarn 2020-11-19 10:27:15 -05:00
James
780106c7f6 declares type for sanitizeConfig 2020-11-19 10:27:09 -05:00
James
811e4bb265 avoids eslint on typescript files 2020-11-19 10:26:56 -05:00
James
111cab1564 runs editorconfig on ts files 2020-11-19 10:26:08 -05:00
Elliot DeNolf
131dd51c39 feat: use react-toastify for notifications 2020-11-19 10:00:48 -05:00
James
0d333ce7da exports Forbidden 2020-11-18 16:02:31 -05:00
James
fa7ad6e9ed adds locale back to admin 2020-11-17 21:25:33 -05:00
James
9b6dd0c771 Merge branch 'master' of github.com:keen-studio/payload 2020-11-17 21:00:27 -05:00
James
a7a0624235 removes requirement of field-level hooks to returrn value 2020-11-17 21:00:00 -05:00
James
8f08269916 better identifies field-level access control 2020-11-17 20:59:35 -05:00
Elliot DeNolf
dbd305acc5 feat: show email creds when explicitly set to 'mock' 2020-11-17 17:33:05 -05:00
Elliot DeNolf
83d32e4449 feat: validate admin user 2020-11-17 16:59:36 -05:00
James
78d7aa7707 0.0.139 2020-11-17 16:45:57 -05:00
Jacob Fletcher
a3ecd7324a - removes duplicative user lookup in login operation
- enables depth and access control in login operation
2020-11-17 16:41:15 -05:00
Jarrod Flesch
87525001f7 adds payload to the express router globally 2020-11-17 15:50:05 -05:00
Elliot DeNolf
f52836a7e3 fix: missed a file 2020-11-17 15:01:50 -05:00
Elliot DeNolf
fe536f0628 refactor: pull all base fields out of collection sanitize 2020-11-17 14:39:10 -05:00
James
1de5ac8cba 0.0.138 2020-11-17 11:27:33 -05:00
Elliot DeNolf
2624ad5f7e fix: properly concat verification and locking fields 2020-11-17 11:24:33 -05:00
Dan Ribbens
7fb23ab6be Merge pull request #451 from trouble/feature/timestamps-default-true
timestamps default to true for collections
2020-11-17 08:53:14 -05:00
Dan Ribbens
208e6fe47a timestamps default to true for collections 2020-11-17 08:51:05 -05:00
Elliot DeNolf
9a1c1f64c0 feat: add blind index for encrypting API Keys 2020-11-16 14:59:47 -05:00
Elliot DeNolf
65fe6c2f95 fix unnecessary reducing of locales 2020-11-15 20:19:41 -05:00
Elliot DeNolf
65ade57c94 /me return null if wrong user collection 2020-11-15 19:34:25 -05:00
Elliot DeNolf
2565005cc0 feat: add license key to access routej 2020-11-15 19:20:20 -05:00
Elliot DeNolf
de4538bf5f docs(hooks): add beforeOperation hook 2020-11-15 15:01:01 -05:00
James
2b80020393 Merge branch 'master' of github.com:keen-studio/payload 2020-11-14 16:40:51 -05:00
James
1166e85fad removes potentially unused code in hookPromise 2020-11-13 22:07:58 -05:00
James
e5193476c4 reorders removeInternalFields 2020-11-13 22:07:08 -05:00
James
5dbf276e82 adds beforeOperation hook, cleans operations 2020-11-13 13:54:10 -05:00
Elliot DeNolf
a6f3230915 docs(guides): blog API draft 2020-11-13 07:32:34 -05:00
Elliot DeNolf
0694a09abd fix: auth json schema didn't allow auth as boolean 2020-11-13 05:59:17 -05:00
Elliot DeNolf
dceeeaac6a fix: allow e-mail to be unconfigured, remove default fromName and fromAddress 2020-11-13 05:30:28 -05:00
James
bdc92bcdf0 Merge branch 'master' of github.com:keen-studio/payload 2020-11-12 16:43:47 -05:00
Elliot DeNolf
06a6056e1c docs(rest-api): first draft 2020-11-12 12:39:08 -05:00
James
4b951279a8 0.0.137 2020-11-12 11:36:31 -05:00
Jacob Fletcher
3984f8b36c exposes express json options in config 2020-11-12 11:35:34 -05:00
Elliot DeNolf
b9b3a0dcc7 docs(fields): add line highlighting, move common options to bottom 2020-11-11 20:32:01 -05:00
Elliot DeNolf
7caa025278 docs(fields): add common options 2020-11-11 15:39:21 -05:00
Elliot DeNolf
27e5dc4d55 docs(hooks): move Lifecycle section down 2020-11-11 15:38:50 -05:00
Elliot DeNolf
63fc9b76be docs(fields): first pass 2020-11-11 13:42:39 -05:00
James
5c1e2846a2 0.0.136 2020-11-10 16:30:04 -05:00
Jarrod Flesch
73c45944f4 adds res cookie options from collection config to logout route 2020-11-10 16:29:27 -05:00
Dan Ribbens
86171c500f Merge pull request #444 from trouble/rename-auth-verify-email
auth email verify anyOf type to allow one or both subject and html
2020-11-10 11:16:36 -05:00
Dan Ribbens
1010334f76 improve auth veryify description 2020-11-10 11:14:18 -05:00
Dan Ribbens
f44869f7cb auth email verify anyOf type to allow one or both subject and html properties 2020-11-10 11:12:08 -05:00
James
4b0c5cc9a2 Merge branch 'master' of github.com:keen-studio/payload 2020-11-10 09:18:35 -05:00
James
36b8f46f7e 0.0.135 2020-11-10 09:18:16 -05:00
James
d5ecbc96a3 fixes bug with not using formatted vals in buildQuery 2020-11-10 09:17:33 -05:00
Elliot DeNolf
760114b718 Merge pull request #443 from trouble/docs-hooks 2020-11-10 00:38:48 -05:00
Elliot DeNolf
76068637fb docs(hooks): add examples 2020-11-10 00:36:48 -05:00
Elliot DeNolf
bed0b1c04e docs(hooks): add lifecycle and more collection hooks 2020-11-10 00:29:21 -05:00
Elliot DeNolf
8a1cdc3f7d fix(hooks): incorrect hook executing for field-level afterChange 2020-11-09 22:27:50 -05:00
Elliot DeNolf
462f7f1f42 docs(hooks): first pass 2020-11-09 16:28:38 -05:00
James
10a657e9d7 0.0.134 2020-11-09 14:53:18 -05:00
James
ae7a94bf47 Merge branch 'master' of github.com:keen-studio/payload 2020-11-09 14:47:35 -05:00
James
e12bdb320d fixes bug with removing internal fields 2020-11-09 14:47:26 -05:00
Dan Ribbens
f667937aef Merge pull request #442 from trouble/rename-auth-verify-email
rename collection auth email verification to verify and add to collec…
2020-11-09 14:26:35 -05:00
Dan Ribbens
20c508cb12 remove default auth property for collection schema 2020-11-09 14:21:58 -05:00
Dan Ribbens
c00e5e8904 rename collection auth email verification to verify and add to collection schema json 2020-11-09 14:10:37 -05:00
Dan Ribbens
c6b00c9aca Merge pull request #430 from trouble/schema-json
Schema json
2020-11-09 08:26:12 -05:00
James
7154a1e35c 0.0.133 2020-11-08 14:52:38 -05:00
James
734662a9b4 includes docs in npm export 2020-11-08 14:52:29 -05:00
James
b11aa62001 ensures token is delivered properly within verification email 2020-11-08 14:48:56 -05:00
James
f4c066e475 allows async email html generation 2020-11-08 14:48:43 -05:00
James
1d7a789604 0.0.132 2020-11-08 10:32:24 -05:00
James
3f74eff0fe adds additional docs 2020-11-08 10:31:59 -05:00
James
2a2d33cd0b fixes bug with delete operation and hasWhereAccess 2020-11-08 10:31:53 -05:00
James
4e61ae84f7 adds installation doc 2020-11-08 08:32:00 -05:00
James
165634d127 scaffolds more docs 2020-11-07 15:51:05 -05:00
James
082c6d010c Merge branch 'master' of github.com:keen-studio/payload 2020-11-07 13:27:46 -05:00
James
62f65d5ffb updates docs 2020-11-07 13:27:43 -05:00
Elliot DeNolf
738698edad add key to collection list 2020-11-05 11:48:56 -05:00
James
a83064ed97 lints buildQuery 2020-11-04 09:08:27 -05:00
James
5ef407ba17 0.0.131 2020-11-04 09:07:26 -05:00
James
21fabfcb29 Merge branch 'master' of github.com:keen-studio/payload 2020-11-04 09:07:12 -05:00
James
521f250688 re-yarn 2020-11-04 09:07:09 -05:00
James
df33ceca79 sanitizes null strings provided to relationship queries 2020-11-04 09:07:02 -05:00
James
0ffbd2ee0f removes leftover autopopulate in schema construction 2020-11-04 09:05:54 -05:00
Dan Ribbens
4d64569c34 merge master 2020-11-02 16:01:32 -05:00
Dan Ribbens
32c025a2fa enforce boolean timestamps on collection schema 2020-11-02 15:53:47 -05:00
Dan Ribbens
58fa48a4da validates some parts of payload config schema and collections 2020-11-02 15:31:33 -05:00
Elliot DeNolf
699aa1b60f remove console.log 2020-11-02 13:44:02 -05:00
Elliot DeNolf
a00c565a62 allow unlock from admin UI 2020-11-02 13:42:06 -05:00
James
90bac7f4ab 0.0.130 2020-10-28 16:20:48 -04:00
James
ec2cda20cf exposes exp in login 2020-10-28 16:20:41 -04:00
James
1702261a15 0.0.129 2020-10-28 16:15:58 -04:00
James
bd85d621f5 Merge branch 'master' of github.com:keen-studio/payload 2020-10-28 16:15:51 -04:00
Jacob Fletcher
61bc485bf1 extracts exp from user 2020-10-28 16:15:32 -04:00
James
eaf89794ab 0.0.128 2020-10-28 10:33:59 -04:00
Jacob Fletcher
6a6b23d3d6 Merge branch 'master' of github.com:trouble/payload 2020-10-28 10:33:30 -04:00
Jacob Fletcher
5bb8a6d6d5 migrates away from optional chaining in express/responses/formatError 2020-10-28 10:33:21 -04:00
James
cc73db9bf0 0.0.127 2020-10-28 10:30:19 -04:00
James
48d2e230a3 Merge branch 'master' of github.com:keen-studio/payload 2020-10-28 10:29:40 -04:00
James
0ac24bc4f2 removes optional chaining 2020-10-28 10:29:37 -04:00
James
29e148763a adds custom component to docs 2020-10-27 09:46:19 -04:00
Elliot DeNolf
354d1527e1 fix: only allow /logout on current user's collection 2020-10-26 20:41:59 -04:00
Elliot DeNolf
ffa56e6c81 fix: /me only works on current user's collection 2020-10-26 20:41:49 -04:00
James
edcc6b56c8 Merge branch 'master' of github.com:keen-studio/payload 2020-10-26 16:56:31 -04:00
James
7e2f3e21ba updates docs for testing purposes 2020-10-26 16:56:26 -04:00
James
0d238085ba exports banner 2020-10-26 16:56:12 -04:00
James
082bf2fba4 adds ability to override depth on auth user 2020-10-26 16:56:03 -04:00
Elliot DeNolf
56a3ccaee8 rename useAuthentication to useAuth 2020-10-26 16:34:46 -04:00
Dan Ribbens
3f4c66467d add trustProxy to payload config and set express trust proxy on payload init (#429) 2020-10-26 16:17:49 -04:00
Dan Ribbens
85ccd80906 fix package import 2020-10-26 06:20:54 -04:00
Dan Ribbens
de539d00b6 schema validation using ajv with collections and assign default values 2020-10-26 06:01:33 -04:00
Dan Ribbens
f37c9eec04 WIP: add schema validation for payload config 2020-10-25 17:03:35 -04:00
James
9fd3e8d84f Merge branch 'master' of github.com:keen-studio/payload 2020-10-24 12:15:49 -04:00
James
07c917e33d adds webpack cli 2020-10-24 12:15:44 -04:00
Dan Ribbens
10c51f11c5 Merge branch 'rest-gql-errors' into schema-json 2020-10-23 13:14:35 -04:00
Dan Ribbens
5431b8ebcc Merge pull request #428 from trouble/rest-gql-errors
Rest gql errors
2020-10-23 13:12:40 -04:00
Dan Ribbens
e233551d0b cleanup graphql init 2020-10-23 13:11:16 -04:00
Dan Ribbens
5d4d1bf60c add trustProxy to payload config and set express trust proxy on payload init 2020-10-23 13:06:07 -04:00
Dan Ribbens
e6bfe00843 add cross-env to build scripts 2020-10-23 11:11:39 -04:00
Dan Ribbens
5c3b20643a Merge pull request #426 from trouble/rest-gql-errors
validation error respone and handling change
2020-10-22 17:07:22 -04:00
Dan Ribbens
e9600802a8 handle validation error data object to display field level error messages 2020-10-22 16:44:25 -04:00
Dan Ribbens
0aa2e5138c rest errorHandler now returns the same object as graphql for validation errors 2020-10-22 16:39:36 -04:00
James
27dad40d5c 0.0.126 2020-10-21 18:02:42 -04:00
James
646b46528d removes breaking optional chaining in graphql error handler 2020-10-21 18:02:36 -04:00
James
e097e924f2 0.0.125 2020-10-21 17:59:02 -04:00
James
777aaf9afd Merge branch 'master' of github.com:keen-studio/payload 2020-10-21 17:58:49 -04:00
James
221ec0bb10 takes copy of all docs found by ID in case they were memoized 2020-10-21 17:58:36 -04:00
Dan Ribbens
67ff273a9e use logger in graphql error handler 2020-10-20 09:45:57 -04:00
Dan Ribbens
397d36291d Merge pull request #425 from trouble/graphql-errors
gql errors include formatted field validation data
2020-10-20 09:36:27 -04:00
Dan Ribbens
a4066e4802 gql errors include formatted field validation data 2020-10-20 01:14:19 -04:00
Elliot DeNolf
88e24ba452 add ability to disable graphql playground in production 2020-10-19 20:18:24 -04:00
Elliot DeNolf
c7b377b84c fix: use proper user object in me operation 2020-10-18 01:34:36 -04:00
James
05a06a9aa8 allows for auth to be specified as true with no options 2020-10-17 15:08:39 -04:00
Elliot DeNolf
90a686ea0b Merge pull request #422 from trouble/query-exists 2020-10-16 21:45:41 -04:00
Elliot DeNolf
215df7ff9e handle graphql exists type 2020-10-16 21:42:55 -04:00
Elliot DeNolf
0758f01120 wip: exists query 2020-10-16 17:13:52 -04:00
James
bb7a910377 0.0.124 2020-10-16 16:05:32 -04:00
James
078293833d exposes local verifyEmail operation 2020-10-16 14:17:12 -04:00
James
99f61150d6 Merge branch 'master' of github.com:keen-studio/payload 2020-10-16 11:26:02 -04:00
James
ac64013a07 improves error messages in verifyEmail operation 2020-10-16 10:10:13 -04:00
James
5735b4bbec adds specificity to verified users 2020-10-16 08:48:33 -04:00
James
f0374d5772 adds an option to show hidden fields within local operations 2020-10-15 18:12:19 -04:00
James
20a9dcf6fe ensures hidden fields do not get added to graphql schemas 2020-10-15 16:48:02 -04:00
James
d0ef42a16b improves email api 2020-10-15 16:47:35 -04:00
James
18077d98bf allows for generating custom emails via collection config 2020-10-15 16:47:04 -04:00
James
cda4792ff7 simplifies verification view 2020-10-15 16:44:59 -04:00
Elliot DeNolf
76df2bc75a adjust FileGraphic to fill thumbnail area 2020-10-15 15:00:16 -04:00
Elliot DeNolf
e52b639e64 fix: upload sort from SelectExisting 2020-10-15 14:07:53 -04:00
Elliot DeNolf
75604e9b6c add 'date' to sortable field types 2020-10-15 11:21:54 -04:00
Elliot DeNolf
e058933192 test: add automatic account unlock test 2020-10-14 22:15:25 -04:00
Elliot DeNolf
a12ae0a1b6 test: add account lock test 2020-10-14 22:15:19 -04:00
Elliot DeNolf
5e0fd00b4e Merge pull request #420 from trouble/verify-tests 2020-10-14 16:45:15 -04:00
Elliot DeNolf
b4a43475ac test: add user verification test 2020-10-14 16:42:22 -04:00
Elliot DeNolf
f0bc59dd0c test: remove faker 2020-10-14 15:08:47 -04:00
Elliot DeNolf
c5aba71aa7 fix: show field requirement of 1 when Array/Blocks are required but no minRows specified 2020-10-14 11:49:26 -04:00
Elliot DeNolf
cac6a8869b test: split out collection tests into multiple files 2020-10-14 10:39:00 -04:00
Elliot DeNolf
787691859d remove verificationToken after verified 2020-10-13 16:48:06 -04:00
Elliot DeNolf
bf0d20461a fix: handle undefined in DateCell and DatePicker, homogenize formatting 2020-10-13 13:27:55 -04:00
Elliot DeNolf
7da73626ac fix: less_than_equal filter 2020-10-13 12:22:38 -04:00
James
8086120703 Merge branch 'master' of github.com:keen-studio/payload 2020-10-12 18:24:23 -04:00
James
7afa815467 0.0.123 2020-10-12 18:24:03 -04:00
James
5400500360 implements custom date and email gql scalars 2020-10-12 18:23:55 -04:00
Elliot DeNolf
ccae4014ec Merge pull request #416 from trouble/upload-tests 2020-10-12 16:59:32 -04:00
Elliot DeNolf
02279a769d test: upload with same name 2020-10-12 16:56:49 -04:00
Elliot DeNolf
c766a5a40e test: update upload 2020-10-12 16:31:05 -04:00
Elliot DeNolf
7ac2d0dcff test: remove beforeRead hook, messes with tests 2020-10-12 16:22:40 -04:00
James
6dfa1616ea 0.0.122 2020-10-12 16:14:13 -04:00
James
8a0411d6b1 condenses exports 2020-10-12 16:14:05 -04:00
Elliot DeNolf
fc63a692be test: add update upload 2020-10-12 15:21:36 -04:00
James
2b9b504573 0.0.121 2020-10-12 15:13:46 -04:00
James
fd9453889e sanitizes json before it comes out of global and collection find operations 2020-10-12 15:13:37 -04:00
James
dea21a0aae 0.0.120 2020-10-12 13:30:58 -04:00
James
12c520c3b1 re-adds node-sass as dependency 2020-10-12 13:30:51 -04:00
James
abc0383ecc 0.0.119 2020-10-12 13:24:32 -04:00
James
bb4dce09df allows for disableErrors to be passed through local findByID 2020-10-12 13:24:28 -04:00
James
6b932168ce 0.0.118 2020-10-12 12:41:48 -04:00
James
681bba82a9 removes mongoose-hidden, updates globals accordingly 2020-10-12 12:41:31 -04:00
Elliot DeNolf
4cfde3eba7 fix: do not attempt to delete upload if file doesn't exist 2020-10-12 11:04:57 -04:00
Elliot DeNolf
71633b1c8d test: check for actual files on create 2020-10-12 10:56:16 -04:00
Elliot DeNolf
2eb863aff0 test: extract out headers 2020-10-12 10:40:50 -04:00
Elliot DeNolf
5aede8affb fix component compilation 2020-10-11 14:29:46 -04:00
Elliot DeNolf
09dfb9793a fix webpack paths for both unix and windows 2020-10-11 14:14:21 -04:00
Elliot DeNolf
09897de77d add sort complex 2020-10-11 14:10:42 -04:00
Dan Ribbens
0362290d40 fix windows compatibility with webpack 2020-10-11 12:04:26 -04:00
James
57ef9fe623 fixes broken tests 2020-10-10 18:37:31 -04:00
James
38f08d54e3 0.0.117 2020-10-10 18:28:27 -04:00
James
84191ec8fd renames client to admin, sets up component library 2020-10-10 18:28:17 -04:00
James
e88be6b251 0.0.116 2020-10-09 13:39:14 -04:00
James
3bec424d05 Merge branch 'master' of github.com:keen-studio/payload 2020-10-09 13:39:07 -04:00
James
fc56a42fb0 fixes issue with relationship field and null value 2020-10-09 13:39:02 -04:00
James
05a5cc16bd further removes dependency on mongoose-hidden 2020-10-09 13:38:51 -04:00
Elliot DeNolf
c99b2f35f4 add disableScrollOnSuccess per-collection 2020-10-09 12:24:17 -04:00
Elliot DeNolf
8ae7457a3f add missing autoComplete attribute on password fields 2020-10-09 12:06:29 -04:00
Elliot DeNolf
bb8a04dd7b add style and width props for Group, Array, and Blocks 2020-10-09 11:45:58 -04:00
James
a681f5f725 builds unlock operation 2020-10-09 11:04:36 -04:00
Elliot DeNolf
613552de0a add style and width props for Blocks 2020-10-09 10:07:16 -04:00
Elliot DeNolf
cd38d37242 enforce maxRows on Arrays and Blocks 2020-10-09 10:07:10 -04:00
James
6b6b503ef0 0.0.115 2020-10-09 08:04:13 -04:00
James
f880072697 fixes bug with adding blocks and arrays due to async buildStateFromSchema 2020-10-08 23:03:37 -04:00
James
ffc3f10177 adds indication for readOnly Array and Blocks when no rows are present 2020-10-08 21:41:47 -04:00
James
f9b7e3239e adds both singular and plural labels to Blocks and Array, adjusts impacted files accordingly 2020-10-08 21:33:37 -04:00
James
09cc61c96a fixes modal scroll 2020-10-08 20:09:00 -04:00
James
a6325c69f4 Merge branch 'master' of github.com:keen-studio/payload 2020-10-08 19:32:36 -04:00
James
2f1b1a02b1 enables default values in new rows of array / block fields 2020-10-08 19:32:10 -04:00
James
727c5a4a53 styles baseline richText 2020-10-08 19:31:42 -04:00
James
918d3bd2bc fixes bug with clearing hasMany relationship field values 2020-10-08 19:31:26 -04:00
Elliot DeNolf
2d7bacad09 don't render 'Add Blocks' button when readOnly 2020-10-08 17:00:41 -04:00
James
234ed07ad6 Merge branch 'master' of github.com:keen-studio/payload 2020-10-08 16:18:08 -04:00
Elliot DeNolf
964fdf779a make rich text respect readOnly 2020-10-08 16:05:23 -04:00
Elliot DeNolf
40afb5e8fa add default value test for normal fields 2020-10-08 10:16:05 -04:00
James
72c0145816 0.0.114 2020-10-08 09:15:24 -04:00
James
12eb33b5c9 fixes bug with fromAddress in sanitizeConfig 2020-10-08 09:14:50 -04:00
Elliot DeNolf
ddb238c7e4 add blocks cell tests 2020-10-08 07:09:24 -04:00
Elliot DeNolf
32980fcafc Merge pull request #410 from trouble/tests-reorg 2020-10-08 06:29:30 -04:00
Elliot DeNolf
db6315a621 fix date cell test for timezone in CI 2020-10-08 06:27:19 -04:00
Elliot DeNolf
6bf0c2aab6 ci: add client tests 2020-10-08 05:53:47 -04:00
Elliot DeNolf
3dc9ddcb52 add some cell type tests 2020-10-08 05:50:07 -04:00
Elliot DeNolf
352dfa9a09 finish configuring client tests 2020-10-08 05:20:52 -04:00
Elliot DeNolf
60a3e680dd move tests dir to root 2020-10-08 05:01:48 -04:00
Elliot DeNolf
18f98e24e5 disable logging during tests, remove unused test:unit script, and add 'test' task to run all 2020-10-08 04:55:06 -04:00
Elliot DeNolf
c599522e44 isolate api tests inside tests/api 2020-10-08 04:50:33 -04:00
Elliot DeNolf
64fef7d380 implement basic react testing suite 2020-10-07 17:20:10 -04:00
James
6381d4cf6b 0.0.113 2020-10-07 16:52:58 -04:00
James
91016ec206 removes image-size in favor of probe-image-size to handle CMYK jpgs 2020-10-07 16:52:48 -04:00
James
9aeab9548d ensures default values work for Group and Array 2020-10-07 16:43:08 -04:00
James
69d7f21b56 partially working buildStateFromSchema 2020-10-07 16:26:56 -04:00
James
9de596605b fixes bug with localization 2020-10-07 16:18:01 -04:00
James
650edcf56a reduces padding on position-panel 2020-10-07 16:17:49 -04:00
James
2c4dedff2c only loads uploads if modal is open 2020-10-07 15:55:25 -04:00
James
870e39961c implements env-based bundle analyzer 2020-10-07 15:55:16 -04:00
James
319148ca68 adds default value collection 2020-10-07 15:54:53 -04:00
James
6dac68606b adds build scripts 2020-10-07 15:54:42 -04:00
James
9716d008a9 Merge branch 'master' of github.com:keen-studio/payload 2020-10-07 15:39:08 -04:00
James
b5fd68c3dc 0.0.112 2020-10-07 15:10:48 -04:00
James
eea9d14749 ensures modals have proper Z index, allows Upload field to handle deleted files gracefully 2020-10-07 15:10:39 -04:00
Elliot DeNolf
77de6e4b60 fix: initial form state 2020-10-07 14:53:55 -04:00
James
58f68e3bda 0.0.111 2020-10-07 14:51:50 -04:00
James
1ea3763185 better handles failed form submissions, allows customization of file uploads 2020-10-07 14:51:42 -04:00
James
920251f296 0.0.110 2020-10-07 12:42:41 -04:00
James
dffb554ebe fixes bug in Number field type 2020-10-07 12:42:32 -04:00
James
7255f6108f 0.0.109 2020-10-06 14:40:57 -04:00
James
078392f2c5 0.0.107 2020-10-06 14:40:52 -04:00
James
c2e9407f50 removes unused arg in findByID memoization 2020-10-06 14:39:53 -04:00
James
a5a4f1490e Merge branch 'master' of github.com:keen-studio/payload 2020-10-06 14:39:10 -04:00
James Mikrut
e20555f9cf Memoize populate (#408)
* Revert "0.0.108"

This reverts commit 7aafe49662.

* Revert "swaps out fast-memoize for micro-memoize that supports async"

This reverts commit 33d8ec8a13.

* Revert "implements a named populate function to memoize"

This reverts commit fb73e772af.

* Revert "0.0.107"

This reverts commit c2692e9b4a.

* reverts back to 106

* memoizes findByID
2020-10-06 14:38:20 -04:00
James
791a222d28 reverts back to 106 2020-10-06 13:16:36 -04:00
James
cb97090d88 Revert "0.0.107"
This reverts commit c2692e9b4a.
2020-10-06 13:15:33 -04:00
James
923cdc7b6a Revert "implements a named populate function to memoize"
This reverts commit fb73e772af.
2020-10-06 13:15:09 -04:00
James
19369b4c33 Revert "swaps out fast-memoize for micro-memoize that supports async"
This reverts commit 33d8ec8a13.
2020-10-06 13:15:00 -04:00
James
4ec230e8a0 Revert "0.0.108"
This reverts commit 7aafe49662.
2020-10-06 13:14:52 -04:00
James
7aafe49662 0.0.108 2020-10-06 09:47:13 -04:00
James
33d8ec8a13 swaps out fast-memoize for micro-memoize that supports async 2020-10-06 09:47:05 -04:00
James
fb73e772af implements a named populate function to memoize 2020-10-06 09:11:09 -04:00
James
c2692e9b4a 0.0.107 2020-10-06 08:58:30 -04:00
James
a0d6fe5ca7 memoizes the Populate function 2020-10-06 08:58:25 -04:00
James
7f65e68e82 0.0.106 2020-10-05 22:14:44 -04:00
James
d9f78fc5bf removes unused salt and hash hidden options 2020-10-05 22:14:11 -04:00
James
b2a5279bcb hides fields manually, removes isLocked virtual in favor of a defined Payload field 2020-10-05 22:12:33 -04:00
James
28baba822b 0.0.105 2020-10-05 21:43:13 -04:00
James
3b4875b754 fixes bug with incoming richText stringified JSON 2020-10-05 21:42:47 -04:00
James
8ce88deda2 fixes bug with create / update improperly reducing locales 2020-10-05 21:37:31 -04:00
James
4527658027 misc responsive fixes 2020-10-05 21:18:29 -04:00
James
8057c0ecb8 abstracts performFieldOperations into functions for performance reasons 2020-10-05 20:26:04 -04:00
James
eb74a42386 0.0.104 2020-10-05 17:09:12 -04:00
James
d589a90a42 allows for local payload initialization 2020-10-05 17:08:59 -04:00
James
bf3d05cb40 fixes bug with registerFirstUser 2020-10-05 17:08:44 -04:00
James
7bd4859a31 0.0.103 2020-10-05 10:40:22 -04:00
James
9af097c39c restores required initialState via form context 2020-10-05 10:40:14 -04:00
James
7f47cdacbb enables lean mongoose queries for all find operations 2020-10-05 10:25:35 -04:00
James
d85cbde7a7 0.0.102 2020-10-04 20:42:50 -04:00
James
79284941db fixes a grave mistake 2020-10-04 20:42:36 -04:00
James
35c11aa7aa 0.0.101 2020-10-04 15:31:15 -04:00
James
5ac2b1fb3d adds richText Relationship WIP 2020-10-04 15:30:47 -04:00
James
0a5e8ab618 implements maxDepth 2020-10-04 15:30:38 -04:00
James
5ae267f743 updates styles of RichText, improves its API 2020-10-04 12:50:14 -04:00
James
bc48e92aea fixes bug with autocompleted input fields 2020-10-04 12:41:03 -04:00
James
98af494dd6 further styles RichText and its Link element 2020-10-03 15:55:59 -04:00
James
31487fb022 adds a method to deserialize pasted HTML into RichText 2020-10-03 15:55:38 -04:00
James
e00a2eeef7 fixes fields with less than 100% width on mobile 2020-10-03 15:55:21 -04:00
James
c5ea2dcd2a revises the way that negative field type gutter works 2020-10-03 15:55:07 -04:00
James
e9c2b46c97 extends Popup to be more usable 2020-10-03 15:54:19 -04:00
James
043d3fffbf fixes bug with window info breakpoints 2020-10-03 15:54:00 -04:00
James
febe213e80 implements accessibility measures and finishes Link richText element 2020-10-03 13:04:15 -04:00
James
0764f34c64 adds accessibility to buttons 2020-10-03 11:38:33 -04:00
James
3dbf9ac27c properly sets user to null when logged out 2020-10-03 11:20:35 -04:00
James
eccb4383a1 fixes DeleteDocument and leaveWithoutSaving incompatibility 2020-10-03 11:07:06 -04:00
James
31180bfc2b 0.0.99 2020-10-02 21:36:15 -04:00
James
c6105d9ed3 ensures NODE_ENV is set properly within client 2020-10-02 21:36:02 -04:00
James
3b82d1ccba runs admin static through compression middleware 2020-10-02 21:28:40 -04:00
James
9fe8a09ac9 0.0.98 2020-10-02 21:11:20 -04:00
James
18a59f84ab migrates all custom components to new pattern 2020-10-02 21:11:08 -04:00
James
c28f78cb8a further optimizes webpack bundle 2020-10-02 20:46:08 -04:00
James
18baefed0d progress to code-splitting 2020-10-02 18:47:43 -04:00
James
f56eeddff4 0.0.97 2020-10-02 15:46:46 -04:00
James
f5561b4b4f adds safety checks for building initial form state with no blockType 2020-10-02 15:46:27 -04:00
James
d42171d465 Merge branch 'master' of github.com:keen-studio/payload 2020-10-02 15:02:41 -04:00
Elliot DeNolf
f3d56fe435 add code cell type 2020-10-02 12:37:00 -04:00
Elliot DeNolf
52e9e4daa7 fix default checkbox cell value 2020-10-02 12:34:28 -04:00
Elliot DeNolf
dde76572e3 disappearing cancel button was bothering me 2020-10-02 12:06:59 -04:00
Elliot DeNolf
df4563274b disable scroll on save for upload media modal 2020-10-02 11:04:02 -04:00
Elliot DeNolf
6e93bd006e fix checkbox style 2020-10-02 10:27:33 -04:00
Elliot DeNolf
814cc9658c add checkbox cell type for boolean values 2020-10-02 10:21:23 -04:00
Elliot DeNolf
efc6d0adf1 fix graphQL tests 2020-10-02 09:45:58 -04:00
James
f37fe42c70 0.0.96 2020-10-01 14:58:07 -04:00
James
3359cd4e9b ensures reset password sends back a new user 2020-10-01 14:57:59 -04:00
Elliot DeNolf
2b80c5fda6 remove unused email props 2020-10-01 13:20:07 -04:00
Elliot DeNolf
4c2bcb2933 fix no data in useAsTitle field 2020-10-01 13:20:01 -04:00
James
96c1362a5d flattens me auth type to match collection type 2020-10-01 11:37:20 -04:00
James
5f3b1aec0a increases max rateLimit 2020-10-01 11:37:04 -04:00
James
942afd96fe returns user with login 2020-10-01 11:36:58 -04:00
James
39ddde082c 0.0.95 2020-10-01 09:17:45 -04:00
James
9b384e8192 removes dependency of passing publicENV through options on init 2020-10-01 09:17:37 -04:00
James
09543831b9 fixes webpack prod env config 2020-10-01 09:02:15 -04:00
James
eb0b5870a3 Merge branch 'master' of github.com:keen-studio/payload 2020-10-01 08:51:55 -04:00
James
49c03135a9 0.0.94 2020-10-01 08:51:37 -04:00
James
22ba992b6d removes dotenv-webpack for a more declarative approach 2020-10-01 08:51:25 -04:00
Elliot DeNolf
553d3ebd48 disable pointer events if code field is readOnly 2020-09-30 22:25:30 -04:00
James
f80bda89b6 0.0.93 2020-09-30 12:13:25 -04:00
James
722f2fc88d merges master 2020-09-30 12:13:19 -04:00
James
c89d2e0f01 Merge branch 'master' of github.com:keen-studio/payload 2020-09-30 12:13:10 -04:00
James
7aab4214b7 implements a way to skip over certain ips in rate limiter 2020-09-30 12:12:59 -04:00
Elliot DeNolf
6294333c88 highlight token field on generation 2020-09-30 11:03:55 -04:00
James
98afd9c53b 0.0.92 2020-09-30 10:34:20 -04:00
James
6ccca08319 tries to export appropriate files once more 2020-09-30 10:34:15 -04:00
James
f497fdde22 0.0.91 2020-09-30 10:31:54 -04:00
James
d73fdf6572 includes more files in npm export 2020-09-30 10:31:50 -04:00
James
0e6f790734 Merge branch 'master' of github.com:keen-studio/payload 2020-09-30 08:54:25 -04:00
James
18774c05ea 0.0.90 2020-09-30 08:53:38 -04:00
James
b3dda3c070 standardizes custom component naming to proper nouns 2020-09-30 08:53:15 -04:00
James
d9e62e9a6d fixes bug with graphql maxComplexity default value 2020-09-30 07:49:29 -04:00
Elliot DeNolf
3f5518aa3a Merge pull request #401 from trouble/token-gen-confirm
add token generation confirmation modal
2020-09-29 22:31:16 -04:00
Elliot DeNolf
0c12b8dfda add token generation confirmation modal 2020-09-29 22:29:30 -04:00
James
a53ac62164 0.0.89 2020-09-28 18:26:06 -04:00
James
8fa63c7131 fixes paths for custom icon and logo 2020-09-28 18:25:54 -04:00
James
5599b8bd30 0.0.88 2020-09-28 18:15:30 -04:00
James
5694258b74 cleans performFieldOperations 2020-09-28 18:15:26 -04:00
James
a974c908b5 fixes bug in Upload cell, returns nullAsUndefineds to object-to-formdata 2020-09-28 18:15:08 -04:00
James
6d7d996d61 properly runs exported field-types and hooks through babel 2020-09-28 16:25:42 -04:00
James
da4d9c5e71 0.0.87 2020-09-28 16:02:53 -04:00
James
c409ac985c removes console logs 2020-09-28 16:02:41 -04:00
James
62072e2d0f 0.0.86 2020-09-28 15:49:36 -04:00
James
18e08ad5a7 revises RichText structure and functionality 2020-09-28 15:49:20 -04:00
Elliot DeNolf
ae8cc7b9ed fix: upload cell prop validation errors 2020-09-28 15:35:01 -04:00
Elliot DeNolf
06fd32786d fix: add back image field 2020-09-28 15:18:43 -04:00
Elliot DeNolf
2f5c13aac3 fix: select cell component handle strings and arrays of strings 2020-09-28 15:16:54 -04:00
Elliot DeNolf
5025972450 add select cell component 2020-09-28 13:37:18 -04:00
Elliot DeNolf
e7d3f77560 Merge pull request #400 from trouble/tune-package
add files whitelist to package.json
2020-09-28 12:50:04 -04:00
Elliot DeNolf
f171adc88d add files whitelist to package.json 2020-09-28 12:48:10 -04:00
Elliot DeNolf
e24428c42c Merge pull request #399 from trouble/cell-components 2020-09-28 10:30:40 -04:00
Elliot DeNolf
e849f0f49e add upload cell component 2020-09-28 10:27:02 -04:00
Elliot DeNolf
b011163d90 use singular label from block items 2020-09-28 00:46:54 -04:00
Elliot DeNolf
0492603ac7 add custom cell types for array, textarea, and richtext 2020-09-28 00:05:10 -04:00
James
15a488c03f creates a better pattern for how to render table cells 2020-09-27 15:33:49 -04:00
James
77096cb252 Merge branch 'master' of github.com:keen-studio/payload 2020-09-27 15:07:46 -04:00
James
6efeafe819 fixes modals scrolling to top of screen 2020-09-27 15:07:32 -04:00
Elliot DeNolf
dabc5749d4 Merge pull request #398 from trouble/graphql-query-complexity 2020-09-27 15:03:55 -04:00
Elliot DeNolf
79fc3f72a6 implement graphql query complexity limits 2020-09-27 15:01:35 -04:00
Elliot DeNolf
7c2de28de9 Merge pull request #397 from trouble/lock-adjustments
some adjustments to how locking and verification work
2020-09-26 23:48:07 -04:00
Elliot DeNolf
83f77d3a05 some adjustments to how locking and verification work 2020-09-26 23:46:09 -04:00
James
5b71a3cb60 0.0.85 2020-09-26 17:52:35 -04:00
James
04650a86a5 handles either relative or absolute paths for upload directories 2020-09-26 17:50:12 -04:00
James
69b4f9f59f 0.0.84 2020-09-25 16:27:40 -04:00
James
4df979565e re-adds baseFields 2020-09-25 16:24:26 -04:00
James
193cdbbe5e Merge branch 'master' of github.com:keen-studio/payload 2020-09-25 16:21:11 -04:00
Elliot DeNolf
a634a5c00c Merge pull request #396 from trouble/rate-limiter 2020-09-25 14:29:43 -04:00
Elliot DeNolf
c19ccd5df4 implement account locking on too many attempts and unlocking after time window 2020-09-25 14:22:13 -04:00
Elliot DeNolf
57c6afa3a9 implement basic rate limiting for /api routes 2020-09-24 23:25:59 -04:00
Elliot DeNolf
9354d86af2 feat(ts): add collection hook types
Signed-off-by: Elliot DeNolf <denolfe@gmail.com>
2020-09-24 17:20:21 -04:00
Elliot DeNolf
791de301cc Merge pull request #395 from trouble/verify-graphql 2020-09-24 17:08:07 -04:00
Elliot DeNolf
87ccdae795 implement verify graphql resolver 2020-09-24 16:39:38 -04:00
Elliot DeNolf
a412e68e89 update typescript types 2020-09-24 11:19:41 -04:00
Elliot DeNolf
98e2f2be08 fix: NotFound bad call to useConfig 2020-09-24 11:08:13 -04:00
Elliot DeNolf
b8b5ca17ed Merge pull request #390 from trouble/verify-view 2020-09-24 10:56:42 -04:00
Elliot DeNolf
96ccebdedd add 'already activated' response 2020-09-24 10:54:42 -04:00
James
59da900a1d 0.0.83 2020-09-24 09:36:27 -04:00
James
fbc4429648 fixes bug with combining AND clauses, extends graphql id operations 2020-09-24 09:36:21 -04:00
James
3feec809e6 0.0.82 2020-09-23 20:15:45 -04:00
James
8dd3298f9a performance improvements 2020-09-23 20:14:27 -04:00
Elliot DeNolf
0c3986917f implement verify view 2020-09-23 16:04:19 -04:00
James
4c11134141 0.0.81 2020-09-23 12:31:08 -04:00
James
45c824c042 allows entire client folder to be parsed by babel/register 2020-09-23 12:31:02 -04:00
James
181d27e33d 0.0.80 2020-09-23 12:20:52 -04:00
James
0e225e1ab1 properly runs babel/register against @payloadcms/payload as a node module 2020-09-23 12:20:44 -04:00
Jarrod Flesch
5676f22ede adds h2-h6 to the rich text editor and style tweaks 2020-09-23 11:22:17 -04:00
James
e9cc178ed7 fixes bug with PurpleBackground demo 2020-09-23 10:04:37 -04:00
James
09a3c859c1 finishes RichText PoC 2020-09-23 10:02:48 -04:00
James
628d68ed2d ensures tests work with new babel config 2020-09-21 21:58:16 -04:00
James
fe99952561 implements babel transpilation of config, removes customComponents logic 2020-09-21 17:31:19 -04:00
James
9c28086ba4 preloads all custom elements and leaves within RichText 2020-09-20 19:01:34 -04:00
James
f8c225316b WIP richText refactor 2020-09-20 18:29:12 -04:00
James
df1f381354 Merge branch 'master' of github.com:keen-studio/payload 2020-09-19 19:32:04 -04:00
James
939a2923d3 implements an easier pattern of pointing to files within config 2020-09-19 19:31:04 -04:00
Elliot DeNolf
0e15f8376c underscore prefix verification fields 2020-09-19 15:03:47 -04:00
Elliot DeNolf
c9d9d5269d make verified hidden 2020-09-19 14:53:06 -04:00
Elliot DeNolf
97f8f2b749 Merge pull request #389 from trouble/verify-jwt-and-apikey
check verification for jwt and apikey
2020-09-19 14:51:38 -04:00
Elliot DeNolf
ea21480230 check verification for jwt and apikey 2020-09-19 14:49:19 -04:00
Elliot DeNolf
2918bbeeca Merge pull request #388 from trouble/verified-login
only allow verified accounts to login
2020-09-19 14:32:08 -04:00
Elliot DeNolf
ac1aea23dc only allow verified accounts to login 2020-09-19 14:29:19 -04:00
Elliot DeNolf
d478bd0e34 Merge pull request #387 from trouble/email-verification 2020-09-19 13:41:25 -04:00
Elliot DeNolf
1695e4e685 implement verification of email against db 2020-09-19 13:39:51 -04:00
James
20bf4680db 0.0.79 2020-09-19 12:15:53 -04:00
James
4f3dd59d25 removes server-config babel plugin in favor of manually blacklisting server modules 2020-09-19 12:15:24 -04:00
James
dde3a35b16 converts radio graphql types to enum 2020-09-19 08:33:03 -04:00
James
a964860e55 0.0.78 2020-09-17 09:19:12 -04:00
James
41dcdabe9c Merge branch 'master' of github.com:keen-studio/payload 2020-09-17 09:19:02 -04:00
James
8ad96452a0 additional field sanitization 2020-09-17 09:18:53 -04:00
Elliot DeNolf
9f426913a2 export all interfaces 2020-09-16 22:06:12 -04:00
Elliot DeNolf
e8376a5662 Merge pull request #386 from trouble/typescript-support 2020-09-16 21:53:17 -04:00
Elliot DeNolf
08dcd7f8b2 better typing for payload function responses 2020-09-16 21:51:34 -04:00
Elliot DeNolf
03e1b730b5 type remaining fields in payload config 2020-09-16 21:08:14 -04:00
James
8252c409d4 0.0.77 2020-09-16 17:22:02 -04:00
James
70ae5b1a19 fixes bug with Relationship field needlessly fetchinig options 2020-09-16 17:21:53 -04:00
James
0d42060882 0.0.76 2020-09-16 13:56:20 -04:00
James
e35b212781 builds relationship whereInput graphQL type 2020-09-16 13:56:02 -04:00
Elliot DeNolf
08731594cb implement payload types module 2020-09-16 12:04:42 -04:00
Elliot DeNolf
c439297223 wip: implement sendVerificationEmail 2020-09-16 10:47:21 -04:00
James
88d80aec55 0.0.75 2020-09-16 09:05:10 -04:00
James
6f6289a069 allows for proper extension of graphql queries / mutations 2020-09-16 09:04:50 -04:00
Elliot DeNolf
af65787862 implement basic typescript support 2020-09-16 00:25:12 -04:00
Elliot DeNolf
a39cec2b76 use crypto for verification token 2020-09-15 14:26:55 -04:00
Elliot DeNolf
f20feae4d9 conditionally add email verification fields to schema 2020-09-15 14:20:28 -04:00
James
2d1169ac66 removes leftover reference to auth update 2020-09-15 11:40:43 -04:00
James
966dd7a40f allows for user override in local operations 2020-09-15 08:57:49 -04:00
James
eee835696c adds control over overrideAccess in findByID 2020-09-14 21:53:11 -04:00
James
e95edbd3e4 fixes css imports like an adult 2020-09-14 21:25:11 -04:00
James
b462fe5f77 stringifies globals before sending, fixes async bug 2020-09-14 21:21:13 -04:00
James
a1865ed5fb Merge branch 'master' of github.com:keen-studio/payload 2020-09-14 21:04:44 -04:00
James
209d812239 fixes bug with relationship population in graphql resolver 2020-09-14 21:04:17 -04:00
James
4e3cc2bc05 comments out breaking graphql errors 2020-09-14 21:04:02 -04:00
James
f5731f2fc8 moves position of beforeRead operation 2020-09-14 21:03:50 -04:00
James
29b608d6f8 properly imports css in DatePicker 2020-09-14 21:03:06 -04:00
James
a10dd738c0 removes old lines in gitignore 2020-09-14 21:02:52 -04:00
James
0fb96ff3e9 fixes bug with loading css in DatePicker 2020-09-14 21:02:40 -04:00
Elliot DeNolf
55488c5c2e Merge pull request #384 from trouble/global-update-access
fix global update's execution of access
2020-09-14 20:50:43 -04:00
Elliot DeNolf
5345eb993a fix global update's execution of access 2020-09-14 17:34:56 -04:00
Elliot DeNolf
8f67ee4ac3 Merge pull request #382 from trouble/local-crud-globals 2020-09-14 17:03:21 -04:00
James
9f8b1d9521 fixes bug with ensuring hasMany relationships have initial values 2020-09-13 12:24:04 -04:00
James
d4c4418a3e 0.0.74 2020-09-13 12:06:14 -04:00
James
bb5f747052 flattens create / register, update / authUpdate 2020-09-13 12:06:02 -04:00
Elliot DeNolf
f2f8ffbbb2 implement global update 2020-09-13 08:40:28 -04:00
James
fab4c0ed76 fixes accidentally running hooks for non-populated subdocs, waits for hooks before running population 2020-09-12 22:56:15 -04:00
James
7b3cefd4ef fixes bug with zero-based radio values 2020-09-12 22:55:18 -04:00
James
ad483da837 changes timestamps to opt-out 2020-09-12 22:55:05 -04:00
James
01d49ccd36 removes console log 2020-09-12 17:48:46 -04:00
James
7ceadc15a3 just wasted about a half hour of time on this 2020-09-12 17:45:55 -04:00
James
3caf81d9f7 redirects to NotFound properly when editing a document that does not exist 2020-09-12 16:42:04 -04:00
James
dd6740e109 only shows LeaveWithoutSaving if user is logged in 2020-09-12 16:36:23 -04:00
James
28e4cf6726 fixes bug in code field 2020-09-12 16:33:14 -04:00
James
95e38a568f adds Code field 2020-09-12 16:24:03 -04:00
James
43f1f41179 0.0.73 2020-09-11 15:12:17 -04:00
James
698a9ead04 fixes bug with field sanitization and JWT graphql type 2020-09-11 15:12:02 -04:00
James
bd3f628d55 Merge branch 'master' of github.com:keen-studio/payload 2020-09-11 14:11:51 -04:00
James
14d702ff8d improves graphql name formatting 2020-09-11 14:11:33 -04:00
James
dd5acae76f only sets nullable gql type if no admin condition 2020-09-11 14:11:23 -04:00
James
9de51bbf02 fixes gql in relationships with many relations 2020-09-11 14:11:10 -04:00
James
9c44a159b9 formats radio values as strings within validation 2020-09-11 12:50:41 -04:00
James
43e3162c7d fixes bug within FileDetails when no sizes present 2020-09-11 12:49:44 -04:00
Elliot DeNolf
2b81e887ad implement global find 2020-09-11 11:33:26 -04:00
Elliot DeNolf
bfd492b7ed Merge pull request #377 from trouble/validate-relationships 2020-09-10 21:49:46 -04:00
Elliot DeNolf
bf452c23bc Add tests for sanitizeFields 2020-09-10 21:47:55 -04:00
Elliot DeNolf
da3495cb4b fix MissingFieldType missing export 2020-09-10 21:18:01 -04:00
Elliot DeNolf
899a158843 fix parameter ordering for sanitizeFields calls 2020-09-10 21:17:46 -04:00
Elliot DeNolf
163daf5816 validate global relationships 2020-09-10 19:35:55 -04:00
Elliot DeNolf
7fbab16b22 validate relationships within blocks, gettin' recursive with it 2020-09-10 19:17:57 -04:00
Elliot DeNolf
17b8335c3c validate relationTo on fields 2020-09-10 18:07:07 -04:00
Elliot DeNolf
93930d1125 Merge pull request #376 from trouble/mongoose-indexing
Disable auto-indexing, index if set to true or if unique
2020-09-10 16:41:54 -04:00
Elliot DeNolf
9cb630f98d Disable auto-indexing, index if set to true or if unique 2020-09-10 13:02:09 -04:00
Jarrod Flesch
f695bd8c1d increases font size on date picker times 2020-09-09 14:25:12 -04:00
Jarrod Flesch
8a8222995f better date validation, date-picker style updates 2020-09-08 15:11:18 -04:00
Jarrod Flesch
ca24263c17 removes duplicate key from babel-loader removeObjectProperties 2020-09-08 13:31:25 -04:00
James
0bf0dd7d5e 0.0.72 2020-09-08 10:47:25 -04:00
James
ef3a70cc38 bumps slate 2020-09-08 10:47:21 -04:00
James
6fe09c8264 fixes bugs within auth / graphQL 2020-09-07 14:47:03 -04:00
James
4616e7fa16 sends fields on mount within useFieldType 2020-09-05 17:44:41 -04:00
James
d99788f6f7 0.0.71 2020-09-05 12:25:29 -04:00
James
8a1bd762ba implements a way to add custom express middleware 2020-09-05 12:23:39 -04:00
James
c760863f8c enables Upload GraphQL field resolver 2020-09-05 12:19:32 -04:00
James
ed5c3b55f1 0.0.70 2020-09-01 18:22:04 -04:00
James
7d0e2820cc implements cookie expiration, streamlines cookie options on collection config level 2020-09-01 18:21:51 -04:00
James
f381b9261a 0.0.69 2020-08-29 16:24:35 -04:00
James
01f170ba73 further revises initialState fixes to Array, Blocks 2020-08-29 16:24:27 -04:00
James
a53e24904f fixes state initialization in Array and Blocks 2020-08-29 12:08:26 -04:00
James
423cdbd63f removes field from state if failing condition 2020-08-29 12:08:12 -04:00
James
e38c0e687f fixes bug in Radio field type 2020-08-29 12:07:32 -04:00
James
9e82f9d02e fixes bugs with GraphQL when no locale is present 2020-08-29 12:07:06 -04:00
James
5f9c48494a fixes bug in refresh resolver 2020-08-29 12:06:12 -04:00
James
155db092c4 adds safety check to getExtractJWT 2020-08-29 12:05:40 -04:00
James
87522ff7d6 0.0.68 2020-08-28 15:07:22 -04:00
James
e6b435e88e fixes bug with forgotPassword 2020-08-28 15:07:16 -04:00
James
8c78a0a773 0.0.67 2020-08-28 13:43:29 -04:00
James
597f7d3075 fixes bugs with columns in List, logs errors within email config, creates local delete operation 2020-08-28 13:43:17 -04:00
James
9da8aca015 Merge branch 'master' of github.com:keen-studio/payload 2020-08-28 11:29:34 -04:00
Elliot DeNolf
13aa1eb13d Merge pull request #367 from trouble/better-error-logging
Handle values other than string in APIError
2020-08-26 23:35:38 -04:00
Elliot DeNolf
918228c9dc Handle values other than string in APIError 2020-08-26 23:14:28 -04:00
James
92a25867ff 0.0.66 2020-08-26 18:34:59 -04:00
James
f698594137 implements lowercasing in forgotPassword 2020-08-26 18:34:39 -04:00
James
c15dff4afb Merge branch 'master' of github.com:keen-studio/payload 2020-08-26 18:31:31 -04:00
James
985db67d48 ensures login is done with lowercase 2020-08-26 18:31:25 -04:00
Elliot DeNolf
30c5eeaff9 Merge pull request #364 from trouble/favicon
Implement favicon and og image
2020-08-25 21:39:06 -04:00
Elliot DeNolf
fd81085b54 Implement favicon and og image 2020-08-25 21:37:17 -04:00
James
9955621f0a 0.0.65 2020-08-25 16:06:27 -04:00
James
599a693f5b fixes bugs with columns in List view 2020-08-25 16:06:21 -04:00
James
da6a9a2ba7 0.0.64 2020-08-25 14:39:33 -04:00
James
7002752744 adds serverURL to CSRF 2020-08-25 14:39:27 -04:00
James
53ed79ecbc code splits heavy field types 2020-08-25 12:21:37 -04:00
James
1e342f8bee further improvements to splitting browser and server code 2020-08-25 11:05:19 -04:00
James
d19576978b implements the removal of server-side code from client bundle 2020-08-25 10:36:34 -04:00
James
af59822510 implements pattern for removing properties from config 2020-08-25 09:44:53 -04:00
James
f45f93ce38 0.0.63 2020-08-24 20:35:35 -04:00
James
0d1ffdcb4b removes webpack bundle analyzer 2020-08-24 20:35:25 -04:00
James
b197d780c1 passes id of document to access operations where required 2020-08-24 17:02:03 -04:00
James
45da1369ca 0.0.62 2020-08-24 12:55:16 -04:00
James
478d1cf5ee removes webpack-node-externals 2020-08-24 12:55:02 -04:00
James
ec0b2c6a5b 0.0.61 2020-08-24 12:19:27 -04:00
James
3a5881cc48 lowercases email on registration, adds node-webpack-externals to dev webpack cfg 2020-08-24 12:19:24 -04:00
Dan Ribbens
13c857f753 Merge pull request #360 from trouble/gql-spec-bug
fix gql random test failures
2020-08-23 18:56:57 -04:00
Dan Ribbens
5091a40e96 fix gql random test failures 2020-08-23 18:53:10 -04:00
Dan Ribbens
1cf45f7fa9 Merge pull request #359 from trouble/select-field-validation
Select field validation
2020-08-23 18:38:30 -04:00
Dan Ribbens
b49b531ce4 select field validation for hasMany fields 2020-08-23 18:35:28 -04:00
James
7553e14a8b merges master 2020-08-23 18:12:53 -04:00
James
cb984f4d54 implements webpack-node-externals 2020-08-23 18:10:47 -04:00
Dan Ribbens
9630c2c3b2 add validation and schema enum to radio field type 2020-08-23 17:15:40 -04:00
Dan Ribbens
8bfc892f7c radio field validation on options 2020-08-23 16:49:51 -04:00
Dan Ribbens
756d275edf select field validation on options 2020-08-23 16:48:01 -04:00
Dan Ribbens
bfe7a139af Merge pull request #357 from trouble/remove-hash-salt-auth-responses
set hide option for salt and hash in auth collections
2020-08-23 16:09:56 -04:00
Dan Ribbens
95352f47ea set hide option for salt and hash in auth collections 2020-08-23 16:07:06 -04:00
Elliot DeNolf
98a9eb8d23 Merge pull request #356 from trouble/custom-index 2020-08-23 07:33:34 -04:00
Elliot DeNolf
9a62c2ab5d Use payload/config alias in Meta 2020-08-23 07:28:59 -04:00
Elliot DeNolf
9c928d497c Implement custom index 2020-08-23 07:26:02 -04:00
Elliot DeNolf
6f777dd09c Merge pull request #355 from trouble/page-titles
Implement page titles based upon active view
2020-08-22 19:59:18 -04:00
Elliot DeNolf
5777868eba Implement page titles based upon active view 2020-08-22 19:53:57 -04:00
Dan Ribbens
063b3b86c8 Merge pull request #354 from trouble/cookie-same-site
add samesite config setting to auth
2020-08-22 00:14:58 -04:00
Dan Ribbens
9ef9cca948 add samesite config setting to auth 2020-08-22 00:08:46 -04:00
James
74ac23dbc6 0.0.60 2020-08-21 17:44:05 -04:00
James
b2145a0a59 fixes Add Upload modal 2020-08-21 17:42:04 -04:00
James
fe307ecfeb fixes inability to remove file from upload field 2020-08-21 17:30:32 -04:00
James
80b99653cf fixes bugs with LeaveWithoutSaving modal 2020-08-21 17:25:51 -04:00
James
75aa92952a 0.0.59 2020-08-21 16:25:36 -04:00
James
3375963449 fixes bugs within Update operation 2020-08-21 16:25:09 -04:00
James
f91c47bb37 fixes bug introduced with csrf 2020-08-21 15:44:03 -04:00
James
60552d9d86 implements potential csrf protection 2020-08-21 15:20:21 -04:00
James
857cf088f6 roughs out pattern for awaiting ensureIndex on all models 2020-08-21 15:19:50 -04:00
James
5c506a1db7 0.0.58 2020-08-20 16:30:31 -04:00
James
b81c7917a9 fixes a bug with block fields not being iterated through in perforFieldOperations, fixes checkboxes being sent as strings 2020-08-20 16:30:01 -04:00
James
5802011eea fixes errorHandler tests 2020-08-20 09:16:50 -04:00
James
c91f4d9e0d 0.0.57 2020-08-19 16:29:48 -04:00
James
b5690cf721 fixes bug with CORS headers 2020-08-19 16:29:35 -04:00
James
aaee4d16d1 0.0.56 2020-08-18 18:05:16 -04:00
James
5148a21769 fixes bug with forgotPassword custom expiration 2020-08-18 18:05:03 -04:00
James
ec461e2440 0.0.55 2020-08-18 17:24:40 -04:00
James
ada2b79054 implements html override in forgotPassword 2020-08-18 17:24:33 -04:00
James
3d652b2c9a 0.0.54 2020-08-18 14:50:21 -04:00
James
63bc00e8da fixese bug in auth update operation 2020-08-18 14:50:07 -04:00
James
8162b1fc93 0.0.53 2020-08-18 13:16:55 -04:00
James
a009387461 fixes bad syntax in login operation 2020-08-18 13:16:51 -04:00
James
8dbf10dc4a 0.0.52 2020-08-18 13:15:07 -04:00
James
954cd9437b Merge branch 'master' of github.com:keen-studio/payload 2020-08-18 13:14:57 -04:00
James
1c532d3719 0.0.51 2020-08-18 13:14:35 -04:00
James
273351103d adds fields within rows and other types to JWT if necessary 2020-08-18 13:14:28 -04:00
Jarrod Flesch
fd15b06773 fix: removes section title input bg, removes right gutter border line on parent hover 2020-08-18 09:15:11 -04:00
James
9efb5e881b removes a bug-producing effect in Checkbox that sets value on mount 2020-08-14 16:45:36 -04:00
1059 changed files with 43881 additions and 15753 deletions

View File

@@ -4,7 +4,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.js]
[*.{js,ts,tsx}]
indent_style = space
indent_size = 2
@@ -15,3 +15,7 @@ indent_size = 2
[*.scss]
indent_style = space
indent_size = 2
[*.mdx]
indent_style = space
indent_size = 2

View File

@@ -1,15 +1,63 @@
module.exports = {
parser: "babel-eslint",
extends: "@trbl",
rules: {
"import/no-unresolved": [
2,
{
ignore: [
'payload/config',
'payload/unsanitizedConfig',
]
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'@typescript-eslint',
],
extends: [
'@trbl',
],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
overrides: [
{
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',
],
},
],
}
},
],
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-underscore-dangle': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
};

33
.github/ISSUE_TEMPLATE/BUG_REPORT.md vendored Normal file
View File

@@ -0,0 +1,33 @@
---
name: Bug Report
about: Create a bug report for Payload
labels: 'bug'
---
# Bug Report
<!--- Provide a general summary of the issue in the Title above -->
## Expected Behavior
<!--- Tell us what should happen -->
## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
## Steps to Reproduce
<!--- Steps to reproduce this bug. Include any code, if relevant -->
1.
2.
3.
4.
## Detailed Description
<!--- Provide any other additional details -->
<!--- Payload version, browser, etc -->

View File

@@ -0,0 +1,18 @@
---
name: Feature Request
about: Suggest an idea for improving Payload
labels: 'enhancement'
---
# Feature Request
<!--- Provide a general summary of the proposed feature -->
<!--- Is it related to a problem you are having? -->
## Use-Case
<!-- Describe your specific use-case and why you think this feature would be beneficial -->
## Additional Detail
<!-- Add any other relevant detail -->

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Question about Payload
url: https://github.com/payloadcms/payload/discussions
about: Please ask Payload-related questions in our GitHub Discussions

20
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,20 @@
## Description
<!-- 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
## Type of change
<!-- Please delete options that are not relevant. -->
- [ ] 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)
- [ ] This change requires a documentation update
## Checklist:
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] Existing test suite passes locally with my changes
- [ ] I have made corresponding changes to the documentation

View File

@@ -1,4 +1,4 @@
name: Node.js CI
name: build
on: [push]
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x]
node-version: [10.x, 12.x, 14.x, 15.x]
steps:
- uses: actions/checkout@v2
@@ -15,6 +15,9 @@ jobs:
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:
@@ -25,6 +28,10 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- run: yarn
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: yarn build
- run: yarn test:client
- run: yarn test:int # In-memory db + api tests
env:
CI: true

13
.gitignore vendored
View File

@@ -215,15 +215,16 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk
# End of https://www.gitignore.io/api/node,macos,windows,webstorm,sublimetext,visualstudiocode
# Ignores compiled CSS
src/**/*.css
demo**/*.css
dist
# Ignore all uploads
demo/upload
demo/media
demo/files
# Ignore build folder
build
# Ignore built components
components/index.js
components/styles.css

21
.release-it.json Normal file
View File

@@ -0,0 +1,21 @@
{
"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"
}
}
}

51
.vscode/launch.json vendored
View File

@@ -14,27 +14,7 @@
"--runInBand"
],
"env": {
"PAYLOAD_CONFIG_PATH": "demo/payload.config.js"
},
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229,
"skipFiles": [
"<node_internals>/**"
]
},
{
"name": "Debug Jest Test - Current File",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"${fileBasename}",
"--runInBand"
],
"env": {
"PAYLOAD_CONFIG_PATH": "demo/payload.config.js"
"PAYLOAD_CONFIG_PATH": "demo/payload.config.ts"
},
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
@@ -48,12 +28,35 @@
"request": "launch",
"name": "Launch Program",
"env": {
"PAYLOAD_CONFIG_PATH": "demo/payload.config.js"
"PAYLOAD_CONFIG_PATH": "demo/payload.config.ts",
"BABEL_ENV": "development"
},
"program": "${workspaceFolder}/demo/server.js",
"program": "${workspaceFolder}/demo/index.js",
"skipFiles": [
"<node_internals>/**"
]
],
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/babel-node",
"runtimeArgs": [
"--nolazy"
],
},
{
"type": "node",
"request": "launch",
"name": "Launch Program - Production",
"env": {
"PAYLOAD_CONFIG_PATH": "demo/payload.config.ts",
"NODE_ENV": "production",
"BABEL_ENV": "development"
},
"program": "${workspaceFolder}/demo/index.js",
"skipFiles": [
"<node_internals>/**"
],
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/babel-node",
"runtimeArgs": [
"--nolazy"
],
},
{
"type": "chrome",

655
CHANGELOG.md Normal file
View File

@@ -0,0 +1,655 @@
## [0.5.3](https://github.com/payloadcms/payload/compare/v0.5.2...v0.5.3) (2021-04-01)
### Bug Fixes
* unique indices ([23c45f1](https://github.com/payloadcms/payload/commit/23c45f137ac97c99ed38969bed64928f2ce2795e))
## [0.5.2](https://github.com/payloadcms/payload/compare/v0.5.1...v0.5.2) (2021-03-31)
### Bug Fixes
* modal issues with richtext relationship ([8ea4407](https://github.com/payloadcms/payload/commit/8ea4407f04fd4b63df6afffbe15301f7d5746016))
## [0.5.1](https://github.com/payloadcms/payload/compare/v0.5.0...v0.5.1) (2021-03-29)
### Bug Fixes
* base auth / upload fields no longer cause validation issues ([23e1fc3](https://github.com/payloadcms/payload/commit/23e1fc3f73673d4694763908bb819c77bf600702))
# [0.5.0](https://github.com/payloadcms/payload/compare/v0.4.7...v0.5.0) (2021-03-29)
### BREAKING CHANGES
* changes global find and update payload api from global to slug as the key to find/update with ([c71ba2b](https://github.com/payloadcms/payload/commit/c71ba2b079d109d4028d74f76603905d9382d364))
### Bug Fixes
* allows absolute urls within adminThumbnail ([51b46d4](https://github.com/payloadcms/payload/commit/51b46d44b0c88387d8b23859129f163b581bf1cc))
* handles empty indices within array field data ([d47e2c5](https://github.com/payloadcms/payload/commit/d47e2c57868667f2ff9ca87aa9ad862687bd985e))
* moving nested arrays now properly persists row count ([5f9a5c8](https://github.com/payloadcms/payload/commit/5f9a5c859eca8854592b2a7a32bef50db4584709))
* validation consistency within admin ([50b9937](https://github.com/payloadcms/payload/commit/50b99370d2b849e858fd64e6018ebf0e94103998))
### Features
* saves cursor position when relationship element is added to richText ([d24b3f7](https://github.com/payloadcms/payload/commit/d24b3f72ce222e4551c12e202238f171f9cc4b97))
## [0.4.7](https://github.com/payloadcms/payload/compare/v0.4.6...v0.4.7) (2021-03-15)
## [0.4.6](https://github.com/payloadcms/payload/compare/v0.4.5...v0.4.6) (2021-03-14)
### Features
* allows admin thumbnail to be set programmatically ([b6a9fe4](https://github.com/payloadcms/payload/commit/b6a9fe4bcfc85815a60a3fe8d3cb38b7ae673424))
* exports collection field hook types from payload/types ([36aae5c](https://github.com/payloadcms/payload/commit/36aae5c37f8ea8c5dde16a898a28b9301efa6a5b))
* only runs adminThumbnail func if image type ([5e1ddb5](https://github.com/payloadcms/payload/commit/5e1ddb552ee9fc8972c9537eee62cddc93a24f42))
* provides field access control with document data ([339f750](https://github.com/payloadcms/payload/commit/339f7503a41802421bb38c8cf5da0f0f1573bdd6))
* reorders uploads to provide beforeChange hooks with upload data ([3c42e6e](https://github.com/payloadcms/payload/commit/3c42e6e6af849a8acc45e93017b0eafea74ecdba))
## [0.4.5](https://github.com/payloadcms/payload/compare/v0.4.4...v0.4.5) (2021-03-04)
### Bug Fixes
* config validation allow admin dashboard ([2d1d1b4](https://github.com/payloadcms/payload/commit/2d1d1b4f32bcc6ee1ce709208ae28369611e5bdd))
## [0.4.4](https://github.com/payloadcms/payload/compare/v0.4.3...v0.4.4) (2021-03-04)
### Bug Fixes
* email verification template missing token ([93ed664](https://github.com/payloadcms/payload/commit/93ed6649201511edfaea14c199022f05623c404c))
## [0.4.1](https://github.com/payloadcms/payload/compare/v0.4.0...v0.4.3) (2021-03-04)
### Documentation
* fixed broken links throughout docs ([3afefbe](https://github.com/payloadcms/payload/commit/3afefbe5922ee7aff496a96c61ff9a5270d6a7cb))
## [0.4.0](https://github.com/payloadcms/payload/compare/v0.3.0...v0.4.0) (2021-02-28)
### Breaking Changes
* reverts preview function to only requiring the return of a preview URL ([ca14e66](https://github.com/payloadcms/payload/commit/ca14e66a580fea94ef71416edf6c8caffcf446b0))
### Features
* implements new billing model, including new Personal license which is free forever ([c97ddeb](https://github.com/payloadcms/payload/commit/c97ddeb2d96f949604d46212166c4784330cc72d))
* simplifies logic in update operations ([e268e25](https://github.com/payloadcms/payload/commit/e268e25719dd4ebd1a6818dca86d12dc057386ca))
* removes the requirement of returning a value from field hooks ([4de5605](https://github.com/payloadcms/payload/commit/4de56059319a6d13b6f0ec20ac4d344f265446bf))
### Bug Fixes
* properly exposes scss variables for re-use ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9))
* explicitly sets modal z-index and css breakpoints ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9))
* removes `overwrite` from update operation to ensure hidden fields don't get lost on document update ([a8e2cc1](https://github.com/payloadcms/payload/commit/a8e2cc11af177641409ff7726ed8c4f1a154dee4))
## [0.3.0](https://github.com/payloadcms/payload/compare/v0.2.13...v0.3.0) (2021-02-23)
### Bug Fixes
* properly exposes scss variables for re-use ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9))
* explicitly sets modal z-index and css breakpoints ([c1b2301](https://github.com/payloadcms/payload/commit/c1b230165033ed3cf382a6e42b590815489525f9))
* removes `overwrite` from update operation to ensure hidden fields don't get lost on document update ([a8e2cc1](https://github.com/payloadcms/payload/commit/a8e2cc11af177641409ff7726ed8c4f1a154dee4))
## [0.2.13](https://github.com/payloadcms/payload/compare/v0.2.12...v0.2.13) (2021-02-20)
### Breaking Changes
* Preview function now no longer takes form field state as an arg and instead takes a copy of the document itself
### Features
* supports newTab in Button, updates generatePreviewURL api to forward through PreviewButton ([6b6297f](https://github.com/payloadcms/payload/commit/6b6297fb2d22b813f45729429b7efbe9a6ab97da))
* detaches localization from mongoose entirely ([162ec74](https://github.com/payloadcms/payload/commit/162ec74445c51a79cd50f75ffb56de8e4bcf9ace))
### Bug Fixes
* infinite loop caused within block component ([9e42d11](https://github.com/payloadcms/payload/commit/9e42d119e471b0efe0d6f69e99d0e31ba5e9237f))
* sets sparse true if field localized and unique ([2bc5c59](https://github.com/payloadcms/payload/commit/2bc5c59fec842cd5c5adf201084cdba9b0cab310))
* returns entire doc to generatePreviewURL callback of PreviewButton ([9b9d0f2](https://github.com/payloadcms/payload/commit/9b9d0f24b54d46c24734f30ed9640d25e6c19097))
* log mongoose connect error message ([e36c7d2](https://github.com/payloadcms/payload/commit/e36c7d269c4b5b49d6c85f416b26196999aadfc0))
### Documentation
* removes incorrect hasMany from upload field type ([e549298](https://github.com/payloadcms/payload/commit/e549298ad5a9a6116659258bb738f5d87abe4ff7))
## [0.2.12](https://github.com/payloadcms/payload/compare/v0.2.11...v0.2.12) (2021-02-1-0)
### Bug Fixes
* middleware for cors set up on static files
* windows compatible upload filename paths
## [0.2.11](https://github.com/payloadcms/payload/compare/v0.2.11...v0.2.12) (2021-02-05)
### Bug Fixes
* middleware for cors set up on static files ([55e0de1](https://github.com/payloadcms/payload/commit/55e0de1719ec387e2182bf33922602243f7eda94))
* file size in local operations ([0feb7b7](https://github.com/payloadcms/payload/commit/0feb7b7379de6429cf5cb1cdbdad0142f72cc5dc))
## [0.2.11](https://github.com/payloadcms/payload/compare/v0.2.10...v0.2.11) (2021-02-05)
### Features
* allows upload through Local API ([1a59028](https://github.com/payloadcms/payload/commit/1a590287ea181e4548c8e75d8cdb25ada5cbbdbf))
### Bug Fixes
* fix localization within blocks ([e50fc1f](https://github.com/payloadcms/payload/commit/e50fc1f3142ae5e387cef3c778988c473b04417e))
* forces fallbackLocale to null in update ops ([3005360](https://github.com/payloadcms/payload/commit/300536033ffe50a2eaedd2a714e844a5282f2ef0))
## [0.2.10](https://github.com/payloadcms/payload/compare/v0.2.9...v0.2.10) (2021-02-04)
### Features
* add support for setting mongoose connection options ([82c4898](https://github.com/payloadcms/payload/commit/82c489841c418b953c7f08d30c8b19751ff050f4))
* admin ui create first user add confirm password field (https://github.com/payloadcms/payload/commit/60453fec9ee17e8f83f7e98c5e2b2e39bc6d0365)
### Bug Fixes
* flag scss variables with default ([8916e8a](https://github.com/payloadcms/payload/commit/8916e8af45e179748bf6f2a75216e8d1c35958f2))
* relationship component hasMany bug ([d540706](https://github.com/payloadcms/payload/commit/d5407060d079c333081b0298e45dfe866d31b86e))
* hide force unlock in admin ui when creating auth collection item ([3bd0de0](https://github.com/payloadcms/payload/commit/3bd0de0a0b6832f5940474c8c40fd85f6fcd1b74))
## [0.2.9](https://github.com/payloadcms/payload/compare/v0.2.6...v0.2.9) (2021-01-27)
### Bug Fixes
* field validation type can return promise ([06ddab1](https://github.com/payloadcms/payload/commit/06ddab124919b28b74667e36e315682a0c9cf459))
## [0.2.8](https://github.com/payloadcms/payload/compare/v0.2.6...v0.2.8) (2021-01-25)
### Chore
* add bugs and keywords to package.json ([37f5b32](https://github.com/payloadcms/payload/commit/37f5b3283363220caa63a5066011b1cb9841812d))
## [0.2.6](https://github.com/payloadcms/payload/compare/v0.2.5...v0.2.6) (2021-01-25)
## [0.2.5](https://github.com/payloadcms/payload/compare/v0.2.4...v0.2.5) (2021-01-25)
### Bug Fixes
* field gutter padding ([90d2078](https://github.com/payloadcms/payload/commit/90d20786c33b2ef4ea937e75769c023c5776db1b))
* richtext sticky toolbar within block ([8218343](https://github.com/payloadcms/payload/commit/8218343b6cf629faed0f752fb27b546684580ec4))
## [0.2.4](https://github.com/payloadcms/payload/compare/v0.2.3...v0.2.4) (2021-01-24)
### Bug Fixes
* block field styles ([36f0bd8](https://github.com/payloadcms/payload/commit/36f0bd81eb340b6d8ac3011a4b10e828e79c20d8))
## [0.2.3](https://github.com/payloadcms/payload/compare/v0.2.2...v0.2.3) (2021-01-24)
### Bug Fixes
* ensures modal heights are 100% of viewport ([7edab5d](https://github.com/payloadcms/payload/commit/7edab5d3543db27c444b180548fc076dd483848a))
## [0.2.2](https://github.com/payloadcms/payload/compare/v0.2.1...v0.2.2) (2021-01-24)
### Bug Fixes
* revert serverURL config change ([f558bd2](https://github.com/payloadcms/payload/commit/f558bd2733a82f1ed9d14604f8b3dea5bb5e8ef5))
### Features
* adds better serverURL validation ([75056e2](https://github.com/payloadcms/payload/commit/75056e2e13c4d5f9a2d4341282b6c1f4c42e1609))
### Reverts
* Revert "docs: configuration overview describe serverURL and removed from code examples where not needed" ([bd446b6](https://github.com/payloadcms/payload/commit/bd446b60b8c56857fb99cda5a9f8a93216efc8b0))
## [0.2.1](https://github.com/payloadcms/payload/compare/v0.2.0...v0.2.1) (2021-01-24)
### Features
* exposes further types ([e056348](https://github.com/payloadcms/payload/commit/e056348850638f3c621072668a4a9232492c209b))
# [0.2.0](https://github.com/payloadcms/payload/compare/v0.1.146...v0.2.0) (2021-01-23)
### Bug Fixes
* better error handler when sendMail fails ([ea47736](https://github.com/payloadcms/payload/commit/ea47736274b3b176da534b461907da4ddeffa5e9))
* button css specificity ([d8b5233](https://github.com/payloadcms/payload/commit/d8b52337b2d34785817b536fe7017853bbc3b5a6))
* migrates Condition UI value/operator pattern ([d23cc20](https://github.com/payloadcms/payload/commit/d23cc20b3d0fa061a2b8111f65e04dd5d35a5557))
* target es2019, optional chaining not supported for Node < 14 ([52a0096](https://github.com/payloadcms/payload/commit/52a0096d3b8eca47a8afdef42d47117d028b754d))
### Features
* adds contributing guidelines ([de5bf6e](https://github.com/payloadcms/payload/commit/de5bf6ea280f771e96de703b3732f851903b1fe5))
* allows admins to autoverify via admin ([a6a23e3](https://github.com/payloadcms/payload/commit/a6a23e3b154802e5ec874760b3d3e44e90f56e7c))
* auto-removes verificationToken upon manual user verify ([2139eb4](https://github.com/payloadcms/payload/commit/2139eb410f8c95505ef7b90e35a099b0955d4e12))
* serverURL no longer required in config ([4770f24](https://github.com/payloadcms/payload/commit/4770f24adb50367ec6f6637cafc3f076023b0416))
## [0.1.146](https://github.com/payloadcms/payload/compare/v0.1.145...v0.1.146) (2021-01-18)
### Bug Fixes
* localized groups ([f38e0fc](https://github.com/payloadcms/payload/commit/f38e0fce981a188b0adb2050cfe8a8e0f047e606))
* textarea handle undefined ([ba31397](https://github.com/payloadcms/payload/commit/ba31397ac15402eb3837bcbe454e0aaf82ecbf03))
## [0.1.145](https://github.com/payloadcms/payload/compare/v0.1.144...v0.1.145) (2021-01-17)
### Bug Fixes
* add minLength and maxLength to textarea field validations ([2c98087](https://github.com/payloadcms/payload/commit/2c98087c6f40c32dcbccf557aa61ebf8fc1fe17f))
* minLength field validation error messages ([5e60b86](https://github.com/payloadcms/payload/commit/5e60b8617e715378831f10b90dedd017ed8d4a8c))
## [0.1.144](https://github.com/payloadcms/payload/compare/v0.1.143...v0.1.144) (2021-01-16)
### Bug Fixes
* add default user to collections before checking for valid relationships ([b2d05c7](https://github.com/payloadcms/payload/commit/b2d05c781d7751bbede9e37996cbdc0736d07a66))
* handle user collection 'auth: true' ([c303711](https://github.com/payloadcms/payload/commit/c3037118133a242769dfa4a31914e8e61068edcf))
## [0.1.143](https://github.com/payloadcms/payload/compare/v0.1.142...v0.1.143) (2021-01-14)
### Bug Fixes
* payload schema validation allow '*' ([bd92b0a](https://github.com/payloadcms/payload/commit/bd92b0a94ba3562b01000a58a4bc0e0071c1f35b))
### Features
* allows undefined collections ([6bb58ce](https://github.com/payloadcms/payload/commit/6bb58cecd8bc0b8faa42bc8995ec5da0421375db))
## [0.1.142](https://github.com/payloadcms/payload/compare/v0.1.141...v0.1.142) (2021-01-09)
### Bug Fixes
* adds disableDuplicate to schema validation of collections config ([e9ed7ee](https://github.com/payloadcms/payload/commit/e9ed7ee4bdc99bdcc0d86272816f3d5c6904ac2b))
### Features
* add getAdminURL and getAPIURL functions ([8db73bb](https://github.com/payloadcms/payload/commit/8db73bbec22646bc626d17bb783b10ea2d837520))
* adds build to CI ([87a1717](https://github.com/payloadcms/payload/commit/87a1717dcae8ec30892cebc46e88cabe8e62bf4c))
* disable graphQL flag that will bypass gql on payload init ([d78c76e](https://github.com/payloadcms/payload/commit/d78c76e0b4b7e2c2cc834a2a1288ec75468852ec))
## [0.1.141](https://github.com/payloadcms/payload/compare/v0.1.140...v0.1.141) (2021-01-07)
### Bug Fixes
* properly exports ES6 components ([f493263](https://github.com/payloadcms/payload/commit/f49326395dba523c2193c46a8ca4142ff761f3fd))
## [0.1.140](https://github.com/payloadcms/payload/compare/v0.1.139...v0.1.140) (2021-01-07)
### Bug Fixes
* admin field error messages ([423df3f](https://github.com/payloadcms/payload/commit/423df3f83af0f899b4a9eafa041ab7c79ccfac78))
## [0.1.139](https://github.com/payloadcms/payload/compare/v0.1.138...v0.1.139) (2021-01-06)
### Bug Fixes
* improves typing in delete op ([644519c](https://github.com/payloadcms/payload/commit/644519c539f6fda29d7b61978416b70306d0ea35))
* use FileSize and ImageSize types ([4d6871a](https://github.com/payloadcms/payload/commit/4d6871abc854385121c761eea4e4705f45c35832))
## [0.1.138](https://github.com/payloadcms/payload/compare/v0.1.137...v0.1.138) (2021-01-06)
### Bug Fixes
* removes old css ([6066f28](https://github.com/payloadcms/payload/commit/6066f2896a5c1e21137d41404f2a6161ef6de7a2))
## [0.1.137](https://github.com/payloadcms/payload/compare/v0.1.136...v0.1.137) (2021-01-05)
### Bug Fixes
* removes prod devtool ([6808637](https://github.com/payloadcms/payload/commit/680863702e67d69dc4ec8d6a48b0e1402164cc97))
## [0.1.136](https://github.com/payloadcms/payload/compare/v0.1.135...v0.1.136) (2021-01-05)
## [0.1.135](https://github.com/payloadcms/payload/compare/v0.1.134...v0.1.135) (2021-01-05)
## [0.1.134](https://github.com/payloadcms/payload/compare/v0.1.133...v0.1.134) (2021-01-05)
### Bug Fixes
* updates payload-config path within webpack ([6bf141c](https://github.com/payloadcms/payload/commit/6bf141c6d4707e622f56f5df4f8f3f366d847173))
## [0.1.133](https://github.com/payloadcms/payload/compare/v0.1.132...v0.1.133) (2021-01-05)
## [0.1.132](https://github.com/payloadcms/payload/compare/v0.1.131...v0.1.132) (2021-01-05)
### Bug Fixes
* renames webpack config alias ([c0636df](https://github.com/payloadcms/payload/commit/c0636dfe220b72c129c4e2b144e5714755a20043))
## [0.1.131](https://github.com/payloadcms/payload/compare/v0.1.130...v0.1.131) (2021-01-05)
## [0.1.130](https://github.com/payloadcms/payload/compare/v0.1.129...v0.1.130) (2021-01-05)
## [0.1.129](https://github.com/payloadcms/payload/compare/v0.1.128...v0.1.129) (2021-01-05)
## [0.1.128](https://github.com/payloadcms/payload/compare/v0.1.127...v0.1.128) (2021-01-05)
### Bug Fixes
* adds default thumbnail size ([f582a25](https://github.com/payloadcms/payload/commit/f582a254cd6b6f56bb8146923f3ab0130a4b7859))
* config validation of block imageURL ([c572057](https://github.com/payloadcms/payload/commit/c572057706f58f7759e167a724837f84e88d0d10))
* default config value for email removed as the property was moved out of config ([cf89d4c](https://github.com/payloadcms/payload/commit/cf89d4cb56add645e68cf0be31d943b734dabe39))
* demo email start on payload init ([57d2c86](https://github.com/payloadcms/payload/commit/57d2c8602fb81a5d67d34a38c25a0429c2b9c44b))
* Edit view main / sidebar widths ([e067fa1](https://github.com/payloadcms/payload/commit/e067fa12b2465d4767bc35b5f1ec0de8096f7439))
* graphQL access ([4d871c2](https://github.com/payloadcms/payload/commit/4d871c27f6eefea26ec55302e654fc3b0f4a2933))
* graphQL logout ([709cc9c](https://github.com/payloadcms/payload/commit/709cc9c294d959913b382e24dd0d7002d6a7c9cd))
* improves edit view layout constraints ([0f7046b](https://github.com/payloadcms/payload/commit/0f7046b98efd82caf98d0d872bd6e68b076452a1))
* issues with select hasMany ([a0bf503](https://github.com/payloadcms/payload/commit/a0bf503f888b7fde0c9660e9f8a461da2fab5d67))
* lowecases joi like everywhere else in payload ([5823a86](https://github.com/payloadcms/payload/commit/5823a864f926bc6441267a21277059a368410b92))
* payload config remove types for email ([faec969](https://github.com/payloadcms/payload/commit/faec969752622c70e9175cc226d888bf32ec732c))
* reinstate explicit labels for AllFields collection ([885c73c](https://github.com/payloadcms/payload/commit/885c73c838c597ac03f79558af9946686274969f))
* removes delete and unlock from baseField type and schema ([4fa942f](https://github.com/payloadcms/payload/commit/4fa942f3a02089c8320e483b896a59627c28f11e))
* removes old reliance on config.email ([e093e06](https://github.com/payloadcms/payload/commit/e093e06926e55916ddb0bdb6f17e0317dfab951c))
### Features
* allows for refresh operation to accept a deliberately specified token ([7d05069](https://github.com/payloadcms/payload/commit/7d05069f361d30ff36d990e0926a60b1c374149a))
* types this within crreate op ([d43ff8b](https://github.com/payloadcms/payload/commit/d43ff8b4a764dd203fa7eebda28b09dc21a88e31))
## [0.1.127](https://github.com/payloadcms/payload/compare/v0.1.126...v0.1.127) (2020-12-31)
### Bug Fixes
* converts class methods to arrow functions ([662839f](https://github.com/payloadcms/payload/commit/662839fb06e95001bb0ef20c4f318cc4c2fccc31))
## [0.1.126](https://github.com/payloadcms/payload/compare/v0.1.125...v0.1.126) (2020-12-30)
### Bug Fixes
* adds delete and unlock to joi baseField schema ([36d51de](https://github.com/payloadcms/payload/commit/36d51de201b27ef91f43f05992d980ad306ba9f3))
## [0.1.125](https://github.com/payloadcms/payload/compare/v0.1.124...v0.1.125) (2020-12-30)
### Bug Fixes
* removes prod source maps ([eeea06d](https://github.com/payloadcms/payload/commit/eeea06d6aaa84efdfb479baf1baad7bdf038d7cd))
## [0.1.124](https://github.com/payloadcms/payload/compare/v0.1.123...v0.1.124) (2020-12-30)
### Bug Fixes
* disable requiring default props in eslint ([64cf321](https://github.com/payloadcms/payload/commit/64cf32146ad75d8ce3e5f3e8e690391ac7884819))
* disables inline sourcemaps for admin dist ([8090b2a](https://github.com/payloadcms/payload/commit/8090b2a23bb6298fdd998d9a72c6f596e7473cb0))
* type issues that arose from reorganizing certain config props ([0c03c2e](https://github.com/payloadcms/payload/commit/0c03c2e3af34657e3dde1c3f2b675840147f78ec))
* updates typing on DatePicker component and joi schema ([5100fd3](https://github.com/payloadcms/payload/commit/5100fd35dc796c5862ef9fd7261abdcba925b020))
* webpack config override ([8401400](https://github.com/payloadcms/payload/commit/84014001297519ce7f82f691fb2c4d1c525222f9))
### Features
* allows for adding custom CSS in addition to SCSS overrides ([544a4db](https://github.com/payloadcms/payload/commit/544a4dbd3ab17e1c8c9ed864fe17b7359883d845))
## [0.1.123](https://github.com/payloadcms/payload/compare/v0.1.123...v0.1.123) (2020-12-28)
### Bug Fixes
* allows config validation to accept esmodules as components ([b8ad84c](https://github.com/payloadcms/payload/commit/b8ad84c525e597e237caf05e00832ded30668a6b))
* prod webpack publicPath ([8bda6ea](https://github.com/payloadcms/payload/commit/8bda6eaa762dff0027036d918155f4618740a84c))
## [0.1.122](https://github.com/payloadcms/payload/compare/v0.1.121...v0.1.122) (2020-12-28)
### Bug Fixes
* improves field schema validation ([db13512](https://github.com/payloadcms/payload/commit/db135129d84bab9df03516ebfa2b667acead3cc9))
* safely accesses field permissions ([1fff737](https://github.com/payloadcms/payload/commit/1fff7374d43921d203b9b655ac64dbed3867ad2a))
### Features
* sends config through babel/register ([fec718e](https://github.com/payloadcms/payload/commit/fec718e9e523b1e92ca2dc216d99eef2dcbed83a))
* splits tsconfig between admin and server ([efe0b40](https://github.com/payloadcms/payload/commit/efe0b40aca4b88084c71f851604d08cae1d62a9a))
## [0.1.121](https://github.com/payloadcms/payload/compare/v0.1.120...v0.1.121) (2020-12-27)
## [0.1.20](https://github.com/payloadcms/payload/compare/v0.1.19...v0.1.20) (2020-12-27)
### Bug Fixes
* production webpack css ([6e83edc](https://github.com/payloadcms/payload/commit/6e83edc988e9284ec52164fc6399f45ab5851652))
* removes unnecessary meta defaults in admin config ([0117f18](https://github.com/payloadcms/payload/commit/0117f18eb1dd163143e18cd8061a4b96d41c411e))
### Features
* improves edit scroll UX in Account and Globals ([604922a](https://github.com/payloadcms/payload/commit/604922a26e7aabde71b470c96ff1b27e0f7b6fc8))
* improves scrolling UX in Edit views ([a715a42](https://github.com/payloadcms/payload/commit/a715a4206ed2cedc9b02b58339e44354c571fec5))
## [0.1.19](https://github.com/payloadcms/payload/compare/v0.1.18...v0.1.19) (2020-12-27)
### Bug Fixes
* copyfiles, autocomplete transition ([5b8c721](https://github.com/payloadcms/payload/commit/5b8c721292140e4cd0ed55d13e97c1d4cd359c98))
### Features
* flattens build into one command ([8571dc3](https://github.com/payloadcms/payload/commit/8571dc396591487d2a2854b9fe93f5338eb10659))
## [0.1.18](https://github.com/payloadcms/payload/compare/v0.1.17...v0.1.18) (2020-12-27)
## [0.1.17](https://github.com/payloadcms/payload/compare/v0.1.16...v0.1.17) (2020-12-27)
## [0.1.16](https://github.com/payloadcms/payload/compare/v0.1.15...v0.1.16) (2020-12-27)
### Bug Fixes
* handle access result gracefully ([1cd578e](https://github.com/payloadcms/payload/commit/1cd578ef445499ceb3704ab28d736baaae123cbd))
* undo property fix, field exists - bad typing ([66946c8](https://github.com/payloadcms/payload/commit/66946c86973c252585e98aa3f0a453cae9dff598))
## [0.1.15](https://github.com/payloadcms/payload/compare/v0.1.14...v0.1.15) (2020-12-02)
## [0.1.14](https://github.com/payloadcms/payload/compare/v0.1.13...v0.1.14) (2020-12-02)
## [0.1.13](https://github.com/payloadcms/payload/compare/v0.1.12...v0.1.13) (2020-12-02)
## [0.1.12](https://github.com/payloadcms/payload/compare/v0.1.11...v0.1.12) (2020-12-02)
## [0.1.11](https://github.com/payloadcms/payload/compare/v0.1.10...v0.1.11) (2020-12-01)
## [0.1.10](https://github.com/payloadcms/payload/compare/v0.1.9...v0.1.10) (2020-12-01)
## [0.1.9](https://github.com/payloadcms/payload/compare/v0.1.8...v0.1.9) (2020-11-25)
## [0.1.8](https://github.com/payloadcms/payload/compare/v0.1.7...v0.1.8) (2020-11-25)
## [0.1.7](https://github.com/payloadcms/payload/compare/v0.1.6...v0.1.7) (2020-11-25)
## [0.1.6](https://github.com/payloadcms/payload/compare/v0.1.5...v0.1.6) (2020-11-25)
## [0.1.5](https://github.com/payloadcms/payload/compare/v0.1.4...v0.1.5) (2020-11-25)
## [0.1.4](https://github.com/payloadcms/payload/compare/v0.1.3...v0.1.4) (2020-11-25)
## [0.1.3](https://github.com/payloadcms/payload/compare/v0.1.2...v0.1.3) (2020-11-24)
## [0.1.2](https://github.com/payloadcms/payload/compare/v0.1.1...v0.1.2) (2020-11-24)
## [0.1.1](https://github.com/payloadcms/payload/compare/v0.1.0...v0.1.1) (2020-11-24)
# [0.1.0](https://github.com/payloadcms/payload/compare/v0.0.141...v0.1.0) (2020-11-24)
### Bug Fixes
* **webpack:** more require.resolves needed ([924eb1d](https://github.com/payloadcms/payload/commit/924eb1d0b566eb7bb3912018e06cf431e5a85524))
* **webpack:** use require.resolve for modules ([badd59a](https://github.com/payloadcms/payload/commit/badd59ac38e10e9caf700eece5761e7d65341c21))
* add missing webpack dep path-browserify ([8789dae](https://github.com/payloadcms/payload/commit/8789dae155bbb93fdef5104cc616e0a29b1b6409))
### Features
* add initial types ([983bf71](https://github.com/payloadcms/payload/commit/983bf713b395a68d2374f2446a8a759aeda48579))
## [0.0.141](https://github.com/payloadcms/payload/compare/v0.0.140...v0.0.141) (2020-11-20)
## [0.0.140](https://github.com/payloadcms/payload/compare/v0.0.139...v0.0.140) (2020-11-20)
### Features
* show email creds when explicitly set to 'mock' ([dbd305a](https://github.com/payloadcms/payload/commit/dbd305acc5b083cea08227cbff8afebe8aa4c374))
* use react-toastify for notifications ([131dd51](https://github.com/payloadcms/payload/commit/131dd51c39b08c2235582d23deb53188a04e5d80))
* validate admin user ([83d32e4](https://github.com/payloadcms/payload/commit/83d32e44498460584bbc82512df91848bcf7cf47))
## [0.0.139](https://github.com/payloadcms/payload/compare/v0.0.138...v0.0.139) (2020-11-17)
### Bug Fixes
* missed a file ([f52836a](https://github.com/payloadcms/payload/commit/f52836a7e342ecccd7409ba382eade43adb18d90))
## [0.0.138](https://github.com/payloadcms/payload/compare/v0.0.137...v0.0.138) (2020-11-17)
### Bug Fixes
* allow e-mail to be unconfigured, remove default fromName and fromAddress ([dceeeaa](https://github.com/payloadcms/payload/commit/dceeeaac6a1a9057cdd9f973c7500b3763514f0a))
* auth json schema didn't allow auth as boolean ([0694a09](https://github.com/payloadcms/payload/commit/0694a09abdde59eb8e785301230ed4e8e244c84a))
* properly concat verification and locking fields ([2624ad5](https://github.com/payloadcms/payload/commit/2624ad5f7e50332eb9212877d0eefcdcb2fa399b))
### Features
* add blind index for encrypting API Keys ([9a1c1f6](https://github.com/payloadcms/payload/commit/9a1c1f64c0ea0066b679195f50e6cb1ac4bf3552))
* add license key to access routej ([2565005](https://github.com/payloadcms/payload/commit/2565005cc099797a6e3b8995e0984c28b7837e82))
## [0.0.137](https://github.com/payloadcms/payload/commit/5c1e2846a2694a80cc8707703406c2ac1bb6af8a) (2020-11-12)

View File

@@ -1,21 +1,77 @@
# Payload
<h1 align="center">Payload</h1>
<p align="center">A self-hosted, JavaScript headless CMS & application framework built with Express, MongoDB and React.</p>
<p align="center">
<a href="https://github.com/payloadcms/payload/actions">
<img src="https://github.com/payloadcms/payload/workflows/build/badge.svg">
</a>
<a href="https://www.npmjs.com/package/payload">
<img alt="npm" src="https://img.shields.io/npm/v/payload">
</a>
Headless CMS and application framework
<a href="https://twitter.com/intent/tweet?text=Payload%20-%20A%20self-hosted%2C%20headless%20JavaScript%20CMS%20%26%20application%20framework&url=https%3A%2F%2Fgithub.com%2Fpayloadcms%2Fpayload">
<img alt="Tweet Payload" src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social">
</a>
</p>
*TODO: More on why to use it and some features*
<a href="https://payloadcms.com">
<img src="https://payloadcms.com/images/og-image.jpg" alt="Payload headless CMS Admin panel built with React" />
</a>
### Quick Start
```
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.
### Features
- [GraphQL](https://payloadcms.com/docs/graphql/overview), [REST](https://payloadcms.com/docs/rest-api/overview), and [Local](https://payloadcms.com/docs/local-api/overview) APIs
- [Easily customizable ReactJS Admin](https://payloadcms.com/docs/admin/overview)
- [Fully self-hosted](https://payloadcms.com/docs/production/deployment)
- [Extensible Authentication](https://payloadcms.com/docs/authentication/overview)
- [Local file storage & upload](https://payloadcms.com/docs/upload/overview)
- [Field-based Localization](https://payloadcms.com/docs/configuration/localization)
- [Block-based Layout Builder](https://payloadcms.com/docs/fields/blocks)
- [Extensible SlateJS rich text editor](https://payloadcms.com/docs/fields/rich-text)
- [Array field type](https://payloadcms.com/docs/fields/array)
- [Field conditional logic](https://payloadcms.com/docs/fields/overview#conditional-logic)
- Extremely granular [Access Control](https://payloadcms.com/docs/access-control/overview)
- [Document and field-level hooks](https://payloadcms.com/docs/hooks/overview) for every action Payload provides
- Built with Typescript & very Typescript-friendly
- Intensely fast API
- Highly secure thanks to HTTP-only cookies, CSRF protection, and more
### Code-first
If you know JavaScript, you know Payload. Payload is a _code-first_ CMS, which allows us to do a lot of things right:
- 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.
### Free forever for personal use and small projects
Payload is 100% free for personal projects or small use cases where only one admin user is required. You can also get started without an account whatsoever while running on `localhost`.
## Installation
`yarn add @payloadcms/payload` or `npm install @payloadcms/payload`
Before beginning to work with Payload, make sure you have all of the [required software](https://payloadcms.com/docs/getting-started/installation).
## Usage
From there, the easiest way to get started with Payload is to use the `create-payload-app` package:
*TODO: Show basic usage and link to docs*
```
npx create-payload-app
```
## Contributing
*TODO: Create Contributing.md*
Alternatively, it only takes about five minutes to [write out your own app from scratch](https://payloadcms.com/docs/getting-started/installation#from-scratch).
## License
*TODO: Create License.md*
Find the Payload license [here](https://github.com/payloadcms/payload/blob/master/license.md).

1
auth.d.ts vendored Normal file
View File

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

1
auth.js Normal file
View File

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

3
babel.config.js Normal file
View File

@@ -0,0 +1,3 @@
const config = require('./src/babel.config');
module.exports = config;

2
bin.js Executable file
View File

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

19
components/forms.js Normal file
View File

@@ -0,0 +1,19 @@
export {
useForm,
useWatchForm,
useFormSubmitted,
useFormProcessing,
useFormModified,
} from '../dist/admin/components/forms/Form/context';
export { default as useFieldType } from '../dist/admin/components/forms/useFieldType';
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 Group } from '../dist/admin/components/forms/field-types/Group';
export { default as Select } from '../dist/admin/components/forms/field-types/Select';
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 reduceFieldsToValues } from '../dist/admin/components/forms/Form/reduceFieldsToValues';

3
components/rich-text.js Normal file
View File

@@ -0,0 +1,3 @@
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';

2
components/views.js Normal file
View File

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

2
config.d.ts vendored Normal file
View File

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

1
config.js Normal file
View File

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

33
contributing.md Normal file
View File

@@ -0,0 +1,33 @@
# Contributing to Payload CMS
Below you'll find a set of guidelines for how to contribute to Payload CMS.
## Payload is proprietary software
Even though you can read Payload's source code, it's technically not "open source". Payload requires an active license to be used in all production purposes. That said, we do not expect PRs from the public, but we still welcome pull requests of any kind.
## 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. If your proposed feature is accepted by our team and is significant enough, pending our discretion, we'd be happy to hook you up with a pro-bono license.
To help us work on new features, you can reach out to our Development team at [`dev@payloadcms.com`](mailto:dev@payloadcms.com). Be as complete and descriptive as possible regarding your vision and we'll go from there!
## 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.
By opening a Pull Request against Payload's codebase, you automatically give the entirety of the contribution within your PR to Payload CMS, LLC and retain no personal ownership whatsoever afterward. For more information, please read the full [Payload license](https://github.com/payloadcms/payload/blob/master/license.md).

View File

@@ -6,11 +6,7 @@
*/
const checkRole = (allRoles, user) => {
if (user) {
if (allRoles.some((role) => {
return user.roles && user.roles.some((individualRole) => {
return individualRole === role;
});
})) {
if (allRoles.some((role) => user.roles && user.roles.some((individualRole) => individualRole === role))) {
return true;
}
}
@@ -18,4 +14,4 @@ const checkRole = (allRoles, user) => {
return false;
};
module.exports = checkRole;
export default checkRole;

View File

@@ -1,4 +1,4 @@
module.exports = [
export default [
'admin',
'editor',
'moderator',

View File

@@ -1,4 +1,6 @@
module.exports = {
import { Block } from '../../src/fields/config/types';
const CTA: Block = {
slug: 'cta',
labels: {
singular: 'Call to Action',
@@ -16,8 +18,9 @@ module.exports = {
name: 'url',
label: 'URL',
type: 'text',
height: 100,
required: true,
},
],
};
export default CTA;

View File

@@ -1,4 +1,6 @@
module.exports = {
import { Block } from '../../src/fields/config/types';
const Email: Block = {
slug: 'email',
labels: {
singular: 'Email',
@@ -9,8 +11,9 @@ module.exports = {
name: 'testEmail',
label: 'Test Email Field',
type: 'email',
maxLength: 100,
required: true,
},
],
};
export default Email;

View File

@@ -1,4 +1,6 @@
module.exports = {
import { Block } from '../../src/fields/config/types';
const NumberBlock: Block = {
slug: 'number',
labels: {
singular: 'Number',
@@ -9,8 +11,10 @@ module.exports = {
name: 'testNumber',
label: 'Test Number Field',
type: 'number',
maxLength: 100,
max: 100,
required: true,
},
],
};
export default NumberBlock;

View File

@@ -1,5 +1,7 @@
module.exports = {
blockImage: '/static/assets/images/generic-block-image.svg',
import { Block } from '../../src/fields/config/types';
const Quote: Block = {
imageURL: '/static/assets/images/generic-block-image.svg',
slug: 'quote',
labels: {
singular: 'Quote',
@@ -17,7 +19,6 @@ module.exports = {
name: 'quote',
label: 'Quote',
type: 'textarea',
height: 100,
required: true,
},
{
@@ -29,3 +30,5 @@ module.exports = {
},
],
};
export default Quote;

View File

@@ -1,9 +0,0 @@
import PageList from '../collections/Page/components/List';
const components = {
pages: {
List: PageList,
},
};
export default components;

View File

@@ -1,5 +0,0 @@
import React from 'react';
const Sidebar = () => <div className="sidebar">fake sidebar</div>
export default Sidebar;

View File

@@ -0,0 +1,33 @@
@import '../../../../../../../scss/vars.scss';
.button-rich-text-button {
.btn {
margin-right: base(1);
}
&__modal {
display: flex;
align-items: center;
height: 100%;
&.payload__modal-item--enterDone {
@include blur-bg;
}
}
&__header {
width: 100%;
margin-bottom: $baseline;
display: flex;
justify-content: space-between;
h3 {
margin: 0;
}
svg {
width: base(1.5);
height: base(1.5);
}
}
}

View File

@@ -0,0 +1,124 @@
import React, { Fragment, useCallback } from 'react';
import { Modal, useModal } from '@faceless-ui/modal';
import { Transforms } from 'slate';
import { useSlate, ReactEditor } from 'slate-react';
import MinimalTemplate from '../../../../../../../src/admin/components/templates/Minimal';
import { ElementButton } from '../../../../../../../components/rich-text';
import X from '../../../../../../../src/admin/components/icons/X';
import Button from '../../../../../../../src/admin/components/elements/Button';
import { Form, Text, Checkbox, Select, Submit, reduceFieldsToValues } from '../../../../../../../components/forms';
import './index.scss';
const baseClass = 'button-rich-text-button';
const initialFormData = {
style: 'primary',
};
const insertButton = (editor, { href, label, style, newTab = false }: any) => {
const text = { text: ' ' };
const button = {
type: 'button',
href,
style,
newTab,
label,
children: [
text,
],
};
const nodes = [button, { children: [{ text: '' }] }];
if (editor.blurSelection) {
Transforms.select(editor, editor.blurSelection);
}
Transforms.insertNodes(editor, nodes);
const currentPath = editor.selection.anchor.path[0];
const newSelection = { anchor: { path: [currentPath + 1, 0], offset: 0 }, focus: { path: [currentPath + 1, 0], offset: 0 } };
Transforms.select(editor, newSelection);
ReactEditor.focus(editor);
};
const ToolbarButton: React.FC<{path: string}> = ({ path }) => {
const { open, closeAll } = useModal();
const editor = useSlate();
const handleAddButton = useCallback((fields) => {
const data = reduceFieldsToValues(fields);
insertButton(editor, data);
closeAll();
}, [editor, closeAll]);
const modalSlug = `${path}-add-button`;
return (
<Fragment>
<ElementButton
className={baseClass}
format="button"
onClick={() => open(modalSlug)}
>
Button
</ElementButton>
<Modal
slug={modalSlug}
className={`${baseClass}__modal`}
>
<MinimalTemplate>
<header className={`${baseClass}__header`}>
<h3>Add button</h3>
<Button
buttonStyle="none"
onClick={closeAll}
>
<X />
</Button>
</header>
<Form
onSubmit={handleAddButton}
initialData={initialFormData}
>
<Text
label="Label"
name="label"
required
/>
<Text
label="URL"
name="href"
required
/>
<Select
label="Style"
name="style"
options={[
{
label: 'Primary',
value: 'primary',
},
{
label: 'Secondary',
value: 'secondary',
},
]}
/>
<Checkbox
label="Open in new tab"
name="newTab"
/>
<Submit>
Add button
</Submit>
</Form>
</MinimalTemplate>
</Modal>
</Fragment>
);
};
export default ToolbarButton;

View File

@@ -0,0 +1,19 @@
@import '../../../../../../../scss/vars.scss';
.rich-text-button {
margin: $baseline 0;
}
.rich-text-button__button {
padding: base(.5) base(1.5);
border-radius: $style-radius-s;
&--primary {
background-color: $color-dark-gray;
color: white;
}
&--secondary {
background-color: $color-light-gray;
}
}

View File

@@ -0,0 +1,44 @@
import React from 'react';
import PropTypes from 'prop-types';
import './index.scss';
const baseClass = 'rich-text-button';
const ButtonElement: React.FC = ({ attributes, children, element }) => {
const { style = 'primary', label } = element;
return (
<div
className={baseClass}
contentEditable={false}
>
<span
{...attributes}
className={[
`${baseClass}__button`,
`${baseClass}__button--${style}`,
].join(' ')}
>
{label}
{children}
</span>
</div>
);
};
ButtonElement.defaultProps = {
attributes: {},
children: null,
};
ButtonElement.propTypes = {
attributes: PropTypes.shape({}),
children: PropTypes.node,
element: PropTypes.shape({
style: PropTypes.oneOf(['primary', 'secondary']),
label: PropTypes.string,
}).isRequired,
};
export default ButtonElement;

View File

@@ -0,0 +1,12 @@
import Button from './Button';
import Element from './Element';
import plugin from './plugin';
export default {
name: 'button',
Button,
Element,
plugins: [
plugin,
],
};

View File

@@ -0,0 +1,12 @@
import { Editor } from 'slate';
const withButton = (incomingEditor: Editor): Editor => {
const editor = incomingEditor;
const { isVoid } = editor;
editor.isVoid = (element) => (element.type === 'button' ? true : isVoid(element));
return editor;
};
export default withButton;

View File

@@ -0,0 +1,10 @@
import React from 'react';
import { LeafButton } from '../../../../../../../components/rich-text';
const Button = () => (
<LeafButton format="purple-background">
Purple Background
</LeafButton>
);
export default Button;

View File

@@ -0,0 +1,23 @@
import React from 'react';
import PropTypes from 'prop-types';
const PurpleBackground: React.FC<any> = ({ attributes, children }) => (
<span
{...attributes}
style={{ backgroundColor: 'purple' }}
>
{children}
</span>
);
PurpleBackground.defaultProps = {
attributes: {},
children: null,
};
PurpleBackground.propTypes = {
attributes: PropTypes.shape({}),
children: PropTypes.node,
};
export default PurpleBackground;

View File

@@ -0,0 +1,8 @@
import Button from './Button';
import Leaf from './Leaf';
export default {
name: 'purple-background',
Button,
Leaf,
};

View File

@@ -1,12 +1,13 @@
const roles = require('../access/roles');
const checkRole = require('../access/checkRole');
import { PayloadCollectionConfig } from '../../src/collections/config/types';
import roles from '../access/roles';
import checkRole from '../access/checkRole';
const access = ({ req: { user } }) => {
const result = checkRole(['admin'], user);
return result;
};
module.exports = {
const Admin: PayloadCollectionConfig = {
slug: 'admins',
labels: {
singular: 'Admin',
@@ -20,9 +21,17 @@ module.exports = {
admin: () => true,
},
auth: {
tokenExpiration: 7200,
tokenExpiration: 7200, // 2 hours
verify: false,
maxLoginAttempts: 5,
lockTime: 600 * 1000, // lock time in ms
useAPIKey: true,
secureCookie: process.env.NODE_ENV === 'production',
depth: 0,
cookies: {
secure: false,
sameSite: 'lax',
domain: undefined,
},
},
fields: [
{
@@ -37,6 +46,7 @@ module.exports = {
},
{
name: 'apiKey',
type: 'text',
access: {
read: ({ req: { user } }) => {
if (checkRole(['admin'], user)) {
@@ -59,3 +69,5 @@ module.exports = {
useAsTitle: 'email',
},
};
export default Admin;

View File

@@ -1,10 +1,11 @@
const checkRole = require('../access/checkRole');
const Email = require('../blocks/Email');
const Quote = require('../blocks/Quote');
const NumberBlock = require('../blocks/Number');
const CallToAction = require('../blocks/CallToAction');
import { PayloadCollectionConfig } from '../../src/collections/config/types';
import checkRole from '../access/checkRole';
import Email from '../blocks/Email';
import Quote from '../blocks/Quote';
import NumberBlock from '../blocks/Number';
import CallToAction from '../blocks/CallToAction';
const AllFields = {
const AllFields: PayloadCollectionConfig = {
slug: 'all-fields',
labels: {
singular: 'All Fields',
@@ -12,13 +13,13 @@ const AllFields = {
},
admin: {
useAsTitle: 'text',
},
preview: (doc, token) => {
if (doc && doc.text) {
return `http://localhost:3000/previewable-posts/${doc.text.value}?preview=true&token=${token}`;
}
preview: (doc, token) => {
if (doc && doc.text) {
return `http://localhost:3000/previewable-posts/${doc.text}?preview=true&token=${token}`;
}
return null;
return null;
},
},
access: {
read: () => true,
@@ -84,6 +85,37 @@ const AllFields = {
required: true,
hasMany: true,
},
{
name: 'dateFieldExample',
label: 'Day and Time',
type: 'date',
admin: {
date: {
timeIntervals: 30,
},
},
},
{
name: 'dayOnlyDateFieldExample',
label: 'Day Only',
type: 'date',
admin: {
date: {
pickerAppearance: 'dayOnly',
monthsToShow: 2,
},
},
},
{
name: 'timeOnlyDateFieldExample',
label: 'Time Only',
type: 'date',
admin: {
date: {
pickerAppearance: 'timeOnly',
},
},
},
{
name: 'radioGroupExample',
label: 'Radio Group Example',
@@ -100,6 +132,9 @@ const AllFields = {
}],
defaultValue: 'option-2',
required: true,
admin: {
readOnly: true,
},
},
{
type: 'row',
@@ -151,11 +186,18 @@ const AllFields = {
label: 'Array Text 1',
type: 'text',
required: true,
}, {
admin: {
width: '50%',
},
},
{
name: 'arrayText2',
label: 'Array Text 2',
type: 'text',
required: true,
admin: {
width: '50%',
},
access: {
read: ({ req: { user } }) => Boolean(user),
update: ({ req: { user } }) => checkRole(['admin'], user),
@@ -171,6 +213,11 @@ const AllFields = {
readOnly: true,
},
},
{
name: 'checkbox',
label: 'Checkbox',
type: 'checkbox',
},
],
},
{
@@ -178,7 +225,6 @@ const AllFields = {
label: 'Blocks Content',
name: 'blocks',
minRows: 2,
singularLabel: 'Block',
blocks: [Email, NumberBlock, Quote, CallToAction],
localized: true,
required: true,
@@ -226,8 +272,34 @@ const AllFields = {
position: 'sidebar',
},
},
{
name: 'richText',
type: 'richText',
label: 'Rich Text',
required: true,
admin: {
elements: [
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'blockquote',
'ul',
'ol',
'link',
],
leaves: [
'bold',
'italic',
'underline',
'strikethrough',
],
},
},
],
timestamps: true,
};
module.exports = AllFields;
export default AllFields;

View File

@@ -0,0 +1,12 @@
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const AutoLabel: PayloadCollectionConfig = {
slug: 'auto-label',
fields: [{
name: 'text',
type: 'text',
label: 'Text',
}],
};
export default AutoLabel;

View File

@@ -1,26 +0,0 @@
const Email = require('../blocks/Email');
const Quote = require('../blocks/Quote');
const NumberBlock = require('../blocks/Number');
const CallToAction = require('../blocks/CallToAction');
module.exports = {
slug: 'blocks',
labels: {
singular: 'Blocks',
plural: 'Blocks',
},
access: {
read: () => true,
},
fields: [
{
name: 'layout',
label: 'Layout Blocks',
singularLabel: 'Block',
type: 'blocks',
blocks: [Email, NumberBlock, Quote, CallToAction],
localized: true,
required: true,
},
],
};

View File

@@ -0,0 +1,43 @@
import { PayloadCollectionConfig } from '../../src/collections/config/types';
import Email from '../blocks/Email';
import Quote from '../blocks/Quote';
import NumberBlock from '../blocks/Number';
import CallToAction from '../blocks/CallToAction';
const Blocks: PayloadCollectionConfig = {
slug: 'blocks',
labels: {
singular: 'Blocks',
plural: 'Blocks',
},
access: {
read: () => true,
},
fields: [
{
name: 'layout',
label: 'Layout Blocks',
labels: {
singular: 'Block',
plural: 'Blocks',
},
type: 'blocks',
blocks: [Email, NumberBlock, Quote, CallToAction],
localized: true,
required: true,
},
{
name: 'nonLocalizedLayout',
label: 'Non Localized Layout',
labels: {
singular: 'Layout',
plural: 'Layouts',
},
type: 'blocks',
blocks: [Email, NumberBlock, Quote, CallToAction],
required: true,
},
],
};
export default Blocks;

View File

@@ -1,4 +1,6 @@
const Code = {
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const Code: PayloadCollectionConfig = {
slug: 'code',
labels: {
singular: 'Code',
@@ -10,8 +12,11 @@ const Code = {
type: 'code',
label: 'Code',
required: true,
admin: {
language: 'js',
},
},
],
};
module.exports = Code;
export default Code;

View File

@@ -1,4 +1,6 @@
const Conditions = {
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const Conditions: PayloadCollectionConfig = {
slug: 'conditions',
labels: {
singular: 'Conditions',
@@ -50,4 +52,4 @@ const Conditions = {
],
};
module.exports = Conditions;
export default Conditions;

View File

@@ -1,5 +0,0 @@
import React from 'react';
const Cell = () => <div className="description">fake description cell</div>;
export default Cell;

View File

@@ -0,0 +1,5 @@
import React from 'react';
const Cell: React.FC = () => <div className="description">fake description cell</div>;
export default Cell;

View File

@@ -1,5 +0,0 @@
import React from 'react';
const Description = () => <div className="description">fake description field</div>
export default Description;

View File

@@ -0,0 +1,5 @@
import React from 'react';
const Description: React.FC = () => <div className="description">fake description field</div>;
export default Description;

View File

@@ -1,26 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import './index.scss';
const Filter = ({ onChange, value }) => {
return (
<input
className="custom-description-filter"
type="text"
onChange={e => onChange(e.target.value)}
value={value}
/>
);
};
Filter.defaultProps = {
value: '',
};
Filter.propTypes = {
onChange: PropTypes.func.isRequired,
value: PropTypes.string,
};
export default Filter;

View File

@@ -0,0 +1,15 @@
import React from 'react';
import { Props } from './types';
import './index.scss';
const Filter: React.FC<Props> = ({ onChange, value }) => (
<input
className="custom-description-filter"
type="text"
onChange={(e) => onChange(e.target.value)}
value={value}
/>
);
export default Filter;

View File

@@ -0,0 +1,4 @@
export type Props = {
value?: string
onChange?: (value: string) => void
}

View File

@@ -1,14 +1,12 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Group } from '../../../../../../../field-types';
import { Group } from '../../../../../../../components/forms';
const CustomGroup = (props) => {
return (
<div className="custom-group">
<Group {...props} />
</div>
);
};
const CustomGroup: React.FC = (props) => (
<div className="custom-group">
<Group {...props} />
</div>
);
CustomGroup.defaultProps = {
value: '',

View File

@@ -1,25 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import DefaultList from '../../../../../../src/client/components/views/collections/List/Default';
import './index.scss';
const CustomListView = (props) => {
return (
<div className="custom-list">
<p>This is a custom Pages list view</p>
<p>Sup</p>
<DefaultList {...props} />
</div>
);
};
CustomListView.propTypes = {
collection: PropTypes.shape({
labels: PropTypes.shape({
plural: PropTypes.string,
}),
}).isRequired,
};
export default CustomListView;

View File

@@ -0,0 +1,14 @@
import React from 'react';
import DefaultList from '../../../../../../src/admin/components/views/collections/List/Default';
import './index.scss';
const CustomListView: React.FC = (props) => (
<div className="custom-list">
<p>This is a custom Pages list view</p>
<p>Sup</p>
<DefaultList {...props} />
</div>
);
export default CustomListView;

View File

@@ -1,6 +1,14 @@
const path = require('path');
import { PayloadCollectionConfig } from '../../../src/collections/config/types';
import DescriptionField from './components/fields/Description/Field';
import DescriptionCell from './components/fields/Description/Cell';
import DescriptionFilter from './components/fields/Description/Filter';
import NestedArrayField from './components/fields/NestedArrayCustomField/Field';
import GroupField from './components/fields/Group/Field';
import NestedGroupField from './components/fields/NestedGroupCustomField/Field';
import NestedText1Field from './components/fields/NestedText1/Field';
import ListView from './components/views/List';
module.exports = {
const CustomComponents: PayloadCollectionConfig = {
slug: 'custom-components',
labels: {
singular: 'Custom Component',
@@ -20,14 +28,13 @@ module.exports = {
name: 'description',
label: 'Description',
type: 'textarea',
height: 100,
required: true,
localized: true,
admin: {
components: {
field: path.resolve(__dirname, 'components/fields/Description/Field/index.js'),
cell: path.resolve(__dirname, 'components/fields/Description/Cell/index.js'),
filter: path.resolve(__dirname, 'components/fields/Description/Filter/index.js'),
Field: DescriptionField,
Cell: DescriptionCell,
Filter: DescriptionFilter,
},
},
},
@@ -42,7 +49,7 @@ module.exports = {
label: 'Nested Array Custom Field',
admin: {
components: {
field: path.resolve(__dirname, 'components/fields/NestedArrayCustomField/Field/index.js'),
Field: NestedArrayField,
},
},
},
@@ -54,7 +61,7 @@ module.exports = {
type: 'group',
admin: {
components: {
field: path.resolve(__dirname, 'components/fields/Group/Field/index.js'),
Field: GroupField,
},
},
fields: [
@@ -64,7 +71,7 @@ module.exports = {
label: 'Nested Group Custom Field',
admin: {
components: {
field: path.resolve(__dirname, 'components/fields/NestedGroupCustomField/Field/index.js'),
Field: NestedGroupField,
},
},
},
@@ -79,7 +86,7 @@ module.exports = {
type: 'text',
admin: {
components: {
field: path.resolve(__dirname, 'components/fields/NestedText1/Field/index.js'),
Field: NestedText1Field,
},
},
}, {
@@ -95,8 +102,10 @@ module.exports = {
useAsTitle: 'title',
components: {
views: {
List: path.resolve(__dirname, 'components/views/List/index.js'),
List: ListView,
},
},
},
};
export default CustomComponents;

View File

@@ -0,0 +1,287 @@
import { PayloadCollectionConfig } from '../../src/collections/config/types';
import checkRole from '../access/checkRole';
import Email from '../blocks/Email';
import Quote from '../blocks/Quote';
import NumberBlock from '../blocks/Number';
import CallToAction from '../blocks/CallToAction';
const DefaultValues: PayloadCollectionConfig = {
slug: 'default-values',
labels: {
singular: 'Default Value Test',
plural: 'Default Value Tests',
},
admin: {
useAsTitle: 'text',
},
access: {
read: () => true,
},
fields: [
{
name: 'text',
type: 'text',
label: 'Text',
defaultValue: 'Default Value',
unique: true,
access: {
create: ({ req: { user } }) => checkRole(['admin'], user),
update: ({ req: { user } }) => checkRole(['admin'], user),
read: ({ req: { user } }) => Boolean(user),
},
},
{
name: 'image',
type: 'upload',
label: 'Image',
relationTo: 'media',
},
{
name: 'select',
label: 'Select',
type: 'select',
options: [{
value: 'option-1',
label: 'Option 1 Label',
}, {
value: 'option-2',
label: 'Option 2 Label',
}, {
value: 'option-3',
label: 'Option 3 Label',
}, {
value: 'option-4',
label: 'Option 4 Label',
}],
defaultValue: 'option-1',
},
{
name: 'selectMany',
label: 'Select w/ hasMany',
type: 'select',
options: [{
value: 'option-1',
label: 'Option 1 Label',
}, {
value: 'option-2',
label: 'Option 2 Label',
}, {
value: 'option-3',
label: 'Option 3 Label',
}, {
value: 'option-4',
label: 'Option 4 Label',
}],
defaultValue: ['option-1', 'option-4'],
hasMany: true,
},
{
name: 'radioGroupExample',
label: 'Radio Group Example',
type: 'radio',
options: [{
value: 'option-1',
label: 'Options 1 Label',
}, {
value: 'option-2',
label: 'Option 2 Label',
}, {
value: 'option-3',
label: 'Option 3 Label',
}],
defaultValue: 'option-2',
},
{
type: 'row',
fields: [
{
name: 'email',
label: 'Email',
type: 'email',
defaultValue: 'some@email.com',
}, {
name: 'number',
label: 'Number',
type: 'number',
defaultValue: 5,
},
],
},
{
type: 'group',
label: 'Group',
name: 'group',
defaultValue: {
nestedText1: 'neat',
},
fields: [
{
type: 'row',
fields: [
{
name: 'nestedText1',
label: 'Nested Text 1',
type: 'text',
defaultValue: 'nested default text 1',
}, {
name: 'nestedText2',
label: 'Nested Text 2',
type: 'text',
defaultValue: 'nested default text 2',
},
],
},
],
},
{
type: 'array',
label: 'Array',
name: 'array',
admin: {
readOnly: true,
},
defaultValue: [
{
arrayText1: 'Get out',
},
],
fields: [
{
type: 'row',
fields: [
{
name: 'arrayText1',
label: 'Array Text 1',
type: 'text',
admin: {
width: '50%',
},
defaultValue: 'default array text',
},
{
name: 'arrayText2',
label: 'Array Text 2',
type: 'text',
admin: {
width: '50%',
},
access: {
read: ({ req: { user } }) => Boolean(user),
update: ({ req: { user } }) => checkRole(['admin'], user),
},
},
],
},
{
type: 'text',
name: 'arrayText3',
label: 'Array Text 3',
admin: {
readOnly: true,
},
},
{
name: 'checkbox',
label: 'Checkbox',
type: 'checkbox',
defaultValue: true,
},
],
},
{
type: 'blocks',
label: 'Blocks Content',
name: 'blocks',
labels: {
singular: 'Block',
plural: 'Blocks',
},
blocks: [Email, NumberBlock, Quote, CallToAction],
localized: true,
admin: {
readOnly: true,
},
defaultValue: [
{
blockType: 'email',
testEmail: 'dev@payloadcms.com',
},
],
},
{
type: 'relationship',
label: 'Relationship to One Collection',
name: 'relationship',
relationTo: 'conditions',
},
{
type: 'relationship',
label: 'Relationship hasMany',
name: 'relationshipHasMany',
relationTo: 'localized-posts',
hasMany: true,
},
{
type: 'relationship',
label: 'Relationship to Multiple Collections',
name: 'relationshipMultipleCollections',
relationTo: ['localized-posts', 'conditions'],
},
{
type: 'textarea',
label: 'Textarea',
name: 'textarea',
defaultValue: 'my textarea text',
},
{
name: 'slug',
type: 'text',
label: 'Slug',
admin: {
position: 'sidebar',
},
localized: true,
unique: true,
defaultValue: 'my-slug',
},
{
name: 'checkbox',
type: 'checkbox',
label: 'Checkbox',
admin: {
position: 'sidebar',
},
defaultValue: true,
},
{
name: 'richText',
type: 'richText',
label: 'Rich Text',
admin: {
elements: [
'h1',
'h2',
'h3',
'h4',
'h5',
'h6',
'blockquote',
'ul',
'ol',
'link',
],
leaves: [
'bold',
'italic',
'underline',
'strikethrough',
],
},
defaultValue: [{
children: [{ text: 'Cookin now' }],
}],
},
],
timestamps: true,
};
export default DefaultValues;

View File

@@ -1,5 +1,5 @@
const path = require('path');
const checkRole = require('../access/checkRole');
import { PayloadCollectionConfig } from '../../src/collections/config/types';
import checkRole from '../access/checkRole';
const access = ({ req: { user } }) => {
const isAdmin = checkRole(['admin'], user);
@@ -15,9 +15,11 @@ const access = ({ req: { user } }) => {
},
};
}
return false;
};
module.exports = {
const Files: PayloadCollectionConfig = {
slug: 'files',
labels: {
singular: 'File',
@@ -25,7 +27,7 @@ module.exports = {
},
upload: {
staticURL: '/files',
staticDir: path.resolve(__dirname, '../files'),
staticDir: './files',
},
access: {
create: () => true,
@@ -64,3 +66,5 @@ module.exports = {
useAsTitle: 'filename',
},
};
export default Files;

View File

@@ -1,4 +1,6 @@
const HiddenFields = {
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const HiddenFields: PayloadCollectionConfig = {
slug: 'hidden-fields',
labels: {
singular: 'Hidden Fields',
@@ -15,7 +17,9 @@ const HiddenFields = {
name: 'hiddenAdmin',
type: 'text',
label: 'Hidden on Admin',
hidden: 'admin',
admin: {
hidden: true,
},
required: true,
},
{
@@ -28,4 +32,4 @@ const HiddenFields = {
],
};
module.exports = HiddenFields;
export default HiddenFields;

View File

@@ -1,5 +1,8 @@
/* eslint-disable no-param-reassign */
module.exports = {
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const Hooks: PayloadCollectionConfig = {
slug: 'hooks',
labels: {
singular: 'Hook',
@@ -25,7 +28,7 @@ module.exports = {
beforeChange: [
(operation) => {
if (operation.req.headers.hook === 'beforeChange') {
operation.req.body.description += '-beforeChangeSuffix';
operation.data.description += '-beforeChangeSuffix';
}
return operation.data;
},
@@ -82,10 +85,11 @@ module.exports = {
name: 'description',
label: 'Description',
type: 'textarea',
height: 100,
required: true,
localized: true,
},
],
timestamps: true,
};
export default Hooks;

View File

@@ -1,4 +1,6 @@
const LocalOperations = {
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const LocalOperations: PayloadCollectionConfig = {
slug: 'local-operations',
labels: {
singular: 'Local Operation',
@@ -12,7 +14,12 @@ const LocalOperations = {
collection: 'localized-posts',
});
const blocksGlobal = await req.payload.findGlobal({
global: 'blocks-global',
});
formattedData.localizedPosts = localizedPosts;
formattedData.blocksGlobal = blocksGlobal;
return formattedData;
},
@@ -28,4 +35,4 @@ const LocalOperations = {
],
};
module.exports = LocalOperations;
export default LocalOperations;

View File

@@ -1,52 +0,0 @@
module.exports = {
slug: 'localized-posts',
labels: {
singular: 'Localized Post',
plural: 'Localized Posts',
},
admin: {
useAsTitle: 'title',
defaultColumns: [
'title',
'priority',
'createdAt',
],
},
access: {
read: () => true,
},
preview: (doc, token) => {
if (doc && doc.title) {
return `http://localhost:3000/posts/${doc.title.value}?preview=true&token=${token}`;
}
return null;
},
fields: [
{
name: 'title',
label: 'Title',
type: 'text',
maxLength: 100,
required: true,
unique: true,
localized: true,
},
{
name: 'description',
label: 'Description',
type: 'textarea',
height: 100,
required: true,
localized: true,
},
{
name: 'priority',
label: 'Priority',
type: 'number',
required: true,
localized: true,
},
],
timestamps: true,
};

View File

@@ -0,0 +1,124 @@
import { PayloadCollectionConfig } from '../../src/collections/config/types';
import { Block } from '../../src/fields/config/types';
const RichTextBlock: Block = {
slug: 'richTextBlock',
labels: {
singular: 'Rich Text Block',
plural: 'Rich Text Blocks',
},
fields: [
{
name: 'content',
localized: true,
type: 'richText',
},
],
};
const LocalizedPosts: PayloadCollectionConfig = {
slug: 'localized-posts',
labels: {
singular: 'Localized Post',
plural: 'Localized Posts',
},
admin: {
useAsTitle: 'title',
defaultColumns: [
'title',
'priority',
'createdAt',
],
enableRichTextRelationship: true,
},
access: {
read: () => true,
},
fields: [
{
name: 'title',
label: 'Title',
type: 'text',
maxLength: 100,
required: true,
unique: true,
localized: true,
},
{
name: 'summary',
label: 'Summary',
type: 'text',
index: true,
},
{
name: 'description',
label: 'Description',
type: 'textarea',
required: true,
localized: true,
},
{
type: 'richText',
name: 'richText',
label: 'Rich Text',
},
{
name: 'priority',
label: 'Priority',
type: 'number',
required: true,
localized: true,
},
{
name: 'localizedGroup',
label: 'Localized Group',
type: 'group',
localized: true,
fields: [
{
type: 'text',
name: 'text',
label: 'Text',
},
],
},
{
name: 'nonLocalizedGroup',
label: 'Non-Localized Group',
type: 'group',
fields: [
{
type: 'text',
name: 'text',
label: 'Text',
localized: true,
},
],
},
{
type: 'array',
label: 'Non-Localized Array',
name: 'nonLocalizedArray',
maxRows: 3,
fields: [
{
type: 'text',
name: 'localizedEmbeddedText',
label: 'Localized Embedded Text',
localized: true,
},
],
},
{
label: 'Blocks',
name: 'richTextBlocks',
type: 'blocks',
blocks: [
RichTextBlock,
],
},
],
timestamps: true,
};
export default LocalizedPosts;

View File

@@ -1,4 +1,18 @@
const LocalizedArrays = {
import { PayloadCollectionConfig } from '../../src/collections/config/types';
import { FieldAccess } from '../../src/fields/config/types';
import checkRole from '../access/checkRole';
const PublicReadabilityAccess: FieldAccess = ({ req: { user }, siblingData }) => {
if (checkRole(['admin'], user)) {
return true;
}
if (siblingData.allowPublicReadability) return true;
return false;
};
const LocalizedArrays: PayloadCollectionConfig = {
slug: 'localized-arrays',
labels: {
singular: 'Localized Array',
@@ -20,16 +34,31 @@ const LocalizedArrays = {
{
type: 'row',
fields: [
{
name: 'allowPublicReadability',
label: 'Allow Public Readability',
type: 'checkbox',
},
{
name: 'arrayText1',
label: 'Array Text 1',
type: 'text',
required: true,
}, {
admin: {
width: '50%',
},
access: {
read: PublicReadabilityAccess,
},
},
{
name: 'arrayText2',
label: 'Array Text 2',
type: 'text',
required: true,
admin: {
width: '50%',
},
},
],
},
@@ -47,4 +76,4 @@ const LocalizedArrays = {
timestamps: true,
};
module.exports = LocalizedArrays;
export default LocalizedArrays;

View File

@@ -1,7 +1,6 @@
const path = require('path');
const checkRole = require('../access/checkRole');
import { PayloadCollectionConfig } from '../../src/collections/config/types';
module.exports = {
const Media: PayloadCollectionConfig = {
slug: 'media',
labels: {
singular: 'Media',
@@ -10,10 +9,13 @@ module.exports = {
access: {
read: () => true,
},
admin: {
enableRichTextRelationship: true,
},
upload: {
staticURL: '/media',
staticDir: path.resolve(__dirname, '../media'),
adminThumbnail: 'mobile',
staticDir: './media',
adminThumbnail: ({ doc }) => `/media/${doc.filename}`,
imageSizes: [
{
name: 'tablet',
@@ -41,26 +43,9 @@ module.exports = {
type: 'text',
required: true,
localized: true,
hooks: {
afterRead: [
({ value }) => `${value} alt`,
],
},
},
{
name: 'sizes',
fields: [
{
name: 'icon',
access: {
read: ({ req: { user } }) => {
const result = checkRole(['admin'], user);
return result;
},
},
},
],
},
],
timestamps: true,
};
export default Media;

View File

@@ -1,4 +1,6 @@
const NestedArray = {
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const NestedArray: PayloadCollectionConfig = {
slug: 'nested-arrays',
labels: {
singular: 'Nested Array',
@@ -23,7 +25,7 @@ const NestedArray = {
{
name: 'parentIdentifier',
label: 'Parent Identifier',
defaultValue: '',
defaultValue: ' ',
type: 'text',
required: true,
},
@@ -55,7 +57,6 @@ const NestedArray = {
name: 'grandchildIdentifier',
label: 'Grandchild Identifier',
type: 'text',
required: true,
},
],
},
@@ -67,4 +68,4 @@ const NestedArray = {
timestamps: true,
};
module.exports = NestedArray;
export default NestedArray;

View File

@@ -1,4 +1,6 @@
module.exports = {
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const Preview: PayloadCollectionConfig = {
slug: 'previewable-post',
labels: {
singular: 'Previewable Post',
@@ -6,13 +8,13 @@ module.exports = {
},
admin: {
useAsTitle: 'title',
},
preview: (doc, token) => {
if (doc.title) {
return `http://localhost:3000/previewable-posts/${doc.title.value}?preview=true&token=${token}`;
}
preview: (doc, token) => {
if (doc.title) {
return `http://localhost:3000/previewable-posts/${doc.title}?preview=true&token=${token}`;
}
return null;
return null;
},
},
fields: [
{
@@ -27,3 +29,5 @@ module.exports = {
],
timestamps: true,
};
export default Preview;

View File

@@ -1,8 +1,9 @@
const checkRole = require('../access/checkRole');
import checkRole from '../access/checkRole';
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const access = ({ req: { user } }) => checkRole(['admin'], user);
module.exports = {
const PublicUsers: PayloadCollectionConfig = {
slug: 'public-users',
labels: {
singular: 'Public User',
@@ -32,7 +33,14 @@ module.exports = {
},
auth: {
tokenExpiration: 300,
secureCookie: process.env.NODE_ENV === 'production',
verify: true,
maxLoginAttempts: 5,
lockTime: 600 * 1000, // lock time in ms
cookies: {
secure: process.env.NODE_ENV === 'production',
sameSite: 'lax',
domain: undefined,
},
},
fields: [
{
@@ -49,3 +57,5 @@ module.exports = {
],
timestamps: true,
};
export default PublicUsers;

View File

@@ -1,20 +0,0 @@
module.exports = {
slug: 'relationship-a',
access: {
read: () => true,
},
labels: {
singular: 'Relationship A',
plural: 'Relationship A',
},
fields: [
{
name: 'post',
label: 'Post',
type: 'relationship',
relationTo: 'relationship-b',
localized: false,
},
],
timestamps: true,
};

View File

@@ -0,0 +1,48 @@
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const RelationshipA: PayloadCollectionConfig = {
slug: 'relationship-a',
access: {
read: () => true,
},
labels: {
singular: 'Relationship A',
plural: 'Relationship A',
},
fields: [
{
name: 'post',
label: 'Post',
type: 'relationship',
relationTo: 'relationship-b',
localized: true,
},
{
name: 'LocalizedPost',
label: 'Localized Post',
type: 'relationship',
relationTo: 'localized-posts',
hasMany: true,
localized: true,
},
{
name: 'postLocalizedMultiple',
label: 'Localized Post Multiple',
type: 'relationship',
relationTo: ['localized-posts', 'all-fields'],
hasMany: true,
localized: true,
},
{
name: 'postManyRelationships',
label: 'Post Many Relationships',
type: 'relationship',
relationTo: ['relationship-b'],
localized: true,
hasMany: false,
},
],
timestamps: true,
};
export default RelationshipA;

View File

@@ -1,21 +0,0 @@
module.exports = {
slug: 'relationship-b',
access: {
read: () => true,
},
labels: {
singular: 'Relationship B',
plural: 'Relationship B',
},
fields: [
{
name: 'post',
label: 'Post',
type: 'relationship',
relationTo: 'relationship-a',
localized: false,
hasMany: true,
},
],
timestamps: true,
};

View File

@@ -0,0 +1,33 @@
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const RelationshipB: PayloadCollectionConfig = {
slug: 'relationship-b',
access: {
read: () => true,
},
labels: {
singular: 'Relationship B',
plural: 'Relationship B',
},
fields: [
{
name: 'post',
label: 'Post',
type: 'relationship',
relationTo: 'relationship-a',
localized: false,
hasMany: true,
},
{
name: 'postManyRelationships',
label: 'Post Many Relationships',
type: 'relationship',
relationTo: ['relationship-a'],
localized: true,
hasMany: false,
},
],
timestamps: true,
};
export default RelationshipB;

View File

@@ -1,19 +0,0 @@
const RichText = {
slug: 'rich-text',
labels: {
singular: 'Rich Text',
plural: 'Rich Texts',
},
fields: [
{
name: 'richText',
type: 'richText',
label: 'Rich Text',
required: true,
disabledElements: [],
disabledMarks: [],
},
],
};
module.exports = RichText;

View File

@@ -0,0 +1,38 @@
import Button from '../client/components/richText/elements/Button';
import PurpleBackground from '../client/components/richText/leaves/PurpleBackground';
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const RichText: PayloadCollectionConfig = {
slug: 'rich-text',
labels: {
singular: 'Rich Text',
plural: 'Rich Texts',
},
fields: [
{
name: 'defaultRichText',
type: 'richText',
label: 'Default Rich Text',
required: true,
},
{
name: 'customRichText',
type: 'richText',
label: 'Customized Rich Text',
required: true,
admin: {
elements: [
'h2',
'h3',
Button,
],
leaves: [
'bold',
PurpleBackground,
],
},
},
],
};
export default RichText;

View File

@@ -0,0 +1,45 @@
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const Select: PayloadCollectionConfig = {
slug: 'select',
labels: {
singular: 'Select',
plural: 'Selects',
},
fields: [
{
name: 'Select',
type: 'select',
options: [{
value: 'one',
label: 'One',
}, {
value: 'two',
label: 'Two',
}, {
value: 'three',
label: 'Three',
}],
label: 'Select From',
required: true,
},
{
name: 'Radio',
type: 'radio',
options: [{
value: 'one',
label: 'One',
}, {
value: 'two',
label: 'Two',
}, {
value: 'three',
label: 'Three',
}],
label: 'Choose From',
required: true,
},
],
};
export default Select;

View File

@@ -1,6 +1,7 @@
const checkRole = require('../access/checkRole');
import { PayloadCollectionConfig } from '../../src/collections/config/types';
import checkRole from '../access/checkRole';
module.exports = {
const StrictAccess: PayloadCollectionConfig = {
slug: 'strict-access',
labels: {
singular: 'Strict Access',
@@ -71,3 +72,5 @@ module.exports = {
],
timestamps: true,
};
export default StrictAccess;

View File

@@ -0,0 +1,25 @@
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const Uniques: PayloadCollectionConfig = {
slug: 'uniques',
labels: {
singular: 'Unique',
plural: 'Uniques',
},
fields: [
{
name: 'title',
type: 'text',
label: 'Title',
required: true,
unique: true,
},
{
name: 'description',
type: 'textarea',
label: 'Description',
},
],
};
export default Uniques;

View File

@@ -1,4 +1,6 @@
module.exports = {
import { PayloadCollectionConfig } from '../../src/collections/config/types';
const Validations: PayloadCollectionConfig = {
slug: 'validations',
labels: {
singular: 'Validation',
@@ -106,5 +108,6 @@ module.exports = {
],
},
],
timestamps: true,
};
export default Validations;

15
demo/custom-index.html Normal file
View File

@@ -0,0 +1,15 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="application-name" content="My Payload Application" />
</head>
<body>
<div id="app"></div>
<div id="portal"></div>
</body>
</html>

View File

@@ -0,0 +1,5 @@
import React from 'react';
const CustomAccountView: React.FC = () => <div>fake account view</div>;
export default CustomAccountView;

View File

@@ -0,0 +1,5 @@
import React from 'react';
const CustomDashboardView: React.FC = () => <div>fake dashboard view</div>;
export default CustomDashboardView;

View File

@@ -1,8 +1,9 @@
const checkRole = require('../access/checkRole');
const Quote = require('../blocks/Quote');
const CallToAction = require('../blocks/CallToAction');
import checkRole from '../access/checkRole';
import Quote from '../blocks/Quote';
import CallToAction from '../blocks/CallToAction';
import { PayloadGlobalConfig } from '../../src/globals/config/types';
module.exports = {
export default {
slug: 'blocks-global',
label: 'Blocks Global',
access: {
@@ -18,4 +19,4 @@ module.exports = {
localized: true,
},
],
};
} as PayloadGlobalConfig;

View File

@@ -1,6 +1,7 @@
const checkRole = require('../access/checkRole');
import { PayloadGlobalConfig } from '../../src/globals/config/types';
import checkRole from '../access/checkRole';
module.exports = {
export default {
slug: 'global-with-access',
label: 'Global with Strict Access',
access: {
@@ -31,4 +32,4 @@ module.exports = {
required: true,
},
],
};
} as PayloadGlobalConfig;

View File

@@ -1,6 +1,7 @@
const checkRole = require('../access/checkRole');
import { PayloadGlobalConfig } from '../../src/globals/config/types';
import checkRole from '../access/checkRole';
module.exports = {
export default {
slug: 'navigation-array',
label: 'Navigation Array',
access: {
@@ -24,4 +25,4 @@ module.exports = {
}],
},
],
};
} as PayloadGlobalConfig;

14
demo/index.js Normal file
View File

@@ -0,0 +1,14 @@
const babelConfig = require('../babel.config');
require('@babel/register')({
...babelConfig,
extensions: ['.ts', '.tsx', '.js', '.jsx'],
env: {
development: {
sourceMaps: 'inline',
retainLines: true,
},
},
});
require('./server.ts');

View File

@@ -1,99 +0,0 @@
const path = require('path');
const Admin = require('./collections/Admin');
const AllFields = require('./collections/AllFields');
const Code = require('./collections/Code');
const Conditions = require('./collections/Conditions');
const CustomComponents = require('./collections/CustomComponents');
const File = require('./collections/File');
const Blocks = require('./collections/Blocks');
const HiddenFields = require('./collections/HiddenFields');
const Hooks = require('./collections/Hooks');
const Localized = require('./collections/Localized');
const LocalizedArray = require('./collections/LocalizedArray');
const LocalOperations = require('./collections/LocalOperations');
const Media = require('./collections/Media');
const NestedArrays = require('./collections/NestedArrays');
const Preview = require('./collections/Preview');
const PublicUsers = require('./collections/PublicUsers');
const RelationshipA = require('./collections/RelationshipA');
const RelationshipB = require('./collections/RelationshipB');
const RichText = require('./collections/RichText');
const StrictPolicies = require('./collections/StrictPolicies');
const Validations = require('./collections/Validations');
const BlocksGlobal = require('./globals/BlocksGlobal');
const NavigationArray = require('./globals/NavigationArray');
const GlobalWithStrictAccess = require('./globals/GlobalWithStrictAccess');
module.exports = {
admin: {
user: 'admins',
disable: false,
components: {
layout: {
// Sidebar: path.resolve(__dirname, 'client/components/layout/Sidebar/index.js'),
},
},
},
collections: [
Admin,
AllFields,
Code,
Conditions,
CustomComponents,
File,
Blocks,
HiddenFields,
Hooks,
Localized,
LocalizedArray,
LocalOperations,
Media,
NestedArrays,
Preview,
PublicUsers,
RelationshipA,
RelationshipB,
RichText,
StrictPolicies,
Validations,
],
globals: [
NavigationArray,
GlobalWithStrictAccess,
BlocksGlobal,
],
cookiePrefix: 'payload',
serverURL: 'http://localhost:3000',
cors: ['http://localhost', 'http://localhost:8080', 'http://localhost:8081'],
routes: {
api: '/api',
admin: '/admin',
graphQL: '/graphql',
graphQLPlayground: '/graphql-playground',
},
defaultDepth: 2,
compression: {},
paths: {
scss: path.resolve(__dirname, 'client/scss/overrides.scss'),
},
graphQL: {
mutations: {},
queries: {},
},
localization: {
locales: [
'en',
'es',
],
defaultLocale: 'en',
fallback: true,
},
productionGraphQLPlayground: false,
hooks: {
afterError: () => {
console.error('global error config handler');
},
},
webpack: (config) => config,
};

139
demo/payload.config.ts Normal file
View File

@@ -0,0 +1,139 @@
import path from 'path';
import { buildConfig } from '../src/config/build';
import Admin from './collections/Admin';
import AllFields from './collections/AllFields';
import AutoLabel from './collections/AutoLabel';
import Code from './collections/Code';
import Conditions from './collections/Conditions';
import CustomComponents from './collections/CustomComponents';
import File from './collections/File';
import Blocks from './collections/Blocks';
import DefaultValues from './collections/DefaultValues';
import HiddenFields from './collections/HiddenFields';
import Hooks from './collections/Hooks';
import Localized from './collections/Localized';
import LocalizedArray from './collections/LocalizedArray';
import LocalOperations from './collections/LocalOperations';
import Media from './collections/Media';
import NestedArrays from './collections/NestedArrays';
import Preview from './collections/Preview';
import PublicUsers from './collections/PublicUsers';
import RelationshipA from './collections/RelationshipA';
import RelationshipB from './collections/RelationshipB';
import RichText from './collections/RichText';
import Select from './collections/Select';
import StrictPolicies from './collections/StrictPolicies';
import Validations from './collections/Validations';
import Uniques from './collections/Uniques';
import BlocksGlobal from './globals/BlocksGlobal';
import NavigationArray from './globals/NavigationArray';
import GlobalWithStrictAccess from './globals/GlobalWithStrictAccess';
export default buildConfig({
cookiePrefix: 'payload',
serverURL: 'http://localhost:3000',
admin: {
user: 'admins',
indexHTML: path.resolve(__dirname, './client/index.html'),
// meta: {
// titleSuffix: '- Payload Demo',
// // ogImage: '/static/find-image-here.jpg',
// // favicon: '/img/whatever.png',
// },
disable: false,
scss: path.resolve(__dirname, './client/scss/overrides.scss'),
components: {
// Nav: () => (
// <div>Hello</div>
// ),
views: {
// Dashboard: CustomDashboardView,
// Account: CustomAccountView,
},
},
webpack: (config) => config,
},
collections: [
Admin,
AllFields,
AutoLabel,
Code,
Conditions,
CustomComponents,
File,
DefaultValues,
Blocks,
HiddenFields,
Hooks,
Localized,
LocalizedArray,
LocalOperations,
Media,
NestedArrays,
Preview,
PublicUsers,
RelationshipA,
RelationshipB,
RichText,
Select,
StrictPolicies,
Validations,
Uniques,
],
globals: [
NavigationArray,
GlobalWithStrictAccess,
BlocksGlobal,
],
cors: [
'http://localhost',
'http://localhost:3000',
'http://localhost:8080',
'http://localhost:8081',
],
csrf: [
'http://localhost:3000',
'https://other-app-here.com',
],
routes: {
api: '/api',
admin: '/admin',
graphQL: '/graphql',
graphQLPlayground: '/graphql-playground',
},
defaultDepth: 2,
graphQL: {
maxComplexity: 1000,
mutations: {},
queries: {},
disablePlaygroundInProduction: true,
disable: false,
},
// rateLimit: {
// window: 15 * 60 * 100,
// max: 100,
// trustProxy: true,
// skip: (req) => req.ip === '127.0.0.1',
// },
maxDepth: 10,
localization: {
locales: [
'en',
'es',
],
defaultLocale: 'en',
fallback: true,
},
hooks: {
afterError: (err) => {
console.error('global error config handler', err);
},
},
upload: {
limits: {
fileSize: 10000000, // 10MB
},
},
});

View File

@@ -1,55 +0,0 @@
/* eslint-disable no-console */
const express = require('express');
const path = require('path');
const payload = require('../src');
const logger = require('../src/utilities/logger')();
const expressApp = express();
expressApp.use('/static', express.static(path.resolve(__dirname, 'client/static')));
payload.init({
email: {
provider: 'mock',
},
secret: 'SECRET_KEY',
mongoURL: 'mongodb://localhost/payload',
express: expressApp,
onInit: () => {
logger.info('Payload is initialized');
// console.log('Payload is initialized');
},
});
const externalRouter = express.Router();
externalRouter.use(payload.authenticate);
externalRouter.get('/', (req, res) => {
if (req.user) {
return res.send(`Authenticated successfully as ${req.user.email}.`);
}
return res.send('Not authenticated');
});
expressApp.use('/external-route', externalRouter);
exports.start = (cb) => {
const server = expressApp.listen(3000, async () => {
logger.info(`listening on ${3000}...`);
if (cb) cb();
const creds = await payload.getMockEmailCredentials();
logger.info(`Mock email account username: ${creds.user}`);
logger.info(`Mock email account password: ${creds.pass}`);
logger.info(`Log in to mock email provider at ${creds.web}`);
});
return server;
};
// when server.js is launched directly
if (module.id === require.main.id) {
exports.start();
}

40
demo/server.ts Normal file
View File

@@ -0,0 +1,40 @@
/* eslint-disable no-console */
import express from 'express';
import path from 'path';
import payload from '../src';
const expressApp = express();
expressApp.use('/static', express.static(path.resolve(__dirname, 'client/static')));
payload.init({
secret: 'SECRET_KEY',
mongoURL: 'mongodb://localhost/payload',
express: expressApp,
email: {
fromName: 'Payload',
fromAddress: 'hello@payloadcms.com',
},
onInit: (app) => {
app.logger.info('Payload Demo Initialized');
},
});
const externalRouter = express.Router();
externalRouter.use(payload.authenticate);
externalRouter.get('/', (req, res) => {
if (req.user) {
return res.send(`Authenticated successfully as ${req.user.email}.`);
}
return res.send('Not authenticated');
});
expressApp.use('/external-route', externalRouter);
expressApp.listen(3000, async () => {
payload.logger.info(`Admin URL on ${payload.getAdminURL()}`);
payload.logger.info(`API URL on ${payload.getAPIURL()}`);
});

View File

@@ -0,0 +1,106 @@
---
title: Collection Access Control
label: Collections
order: 20
desc: With Collection-level Access Control you can define which users can create, read, update or delete Collections.
keywords: collections, access control, permissions, documentation, Content Management System, cms, headless, javascript, node, react, express
---
You can define Collection-level Access Control within each Collection's `access` property. All Access Control functions accept one `args` argument.
## 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 |
#### 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 |
| **[`unlock`](#unlock)** | Used to restrict which users can access the `unlock` operation |
**Example Collection config:**
```js
export default {
slug: "posts",
// highlight-start
access: {
create: ({ req: { user } }) => { ... },
read: ({ req: { user } }) => { ... },
update: ({ req: { user } }) => { ... },
delete: ({ req: { user } }) => { ... },
admin: ({ req: { user } }) => { ... },
},
// highlight-end
};
```
### Create
Returns a boolean which allows/denies access to the `create` request.
**Available argument properties :**
| Option | Description |
| --------- | ----------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
### Read
Read access functions can return a boolean result or optionally return a [query constraint](/docs/queries/overview) which limits the documents that are returned to only those that match the constraint you provide. This can be helpful to restrict users' access to only certain documents however you specify.
**Available argument properties :**
| Option | Description |
| --------- | ----------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`id`** | `id` of document requested, if within `findByID`. Otherwise, `id` is undefined. |
### Update
Update access functions can return a boolean result or optionally return a [query constraint](/docs/queries/overview) to limit the document(s) that can be updated by the currently authenticated user. For example, returning a `query` from the `update` Access Control is helpful in cases where you would like to restrict a user to only being able to update the documents containing a `createdBy` relationship field equal to the user's ID.
**Available argument properties :**
| Option | Description |
| --------- | ----------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`id`** | `id` of document requested to update |
### Delete
Similarly to the Update function, returns a boolean or a [query constraint](/docs/queries/overview) to limit which documents can be deleted by which users.
**Available argument properties :**
| 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 |
### Admin
If the Collection is [used to access the Payload Admin panel](/docs/admin/overview#the-admin-user-collection), the `Admin` Access Control function determines whether or not the currently logged in user can access the admin UI.
**Available argument properties :**
| Option | Description |
| --------- | ----------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
### Unlock
Determines which users can [unlock](/docs/authentication/operations#unlock) other users who may be blocked from authenticating successfully due to [failing too many login attempts](/docs/authentication/config#options).
**Available argument properties :**
| Option | Description |
| --------- | ----------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |

View File

@@ -0,0 +1,76 @@
---
title: Field-level Access Control
label: Fields
order: 30
desc: Field-level Access Control is specified within a field's config, and allows you to define which users can create, read or update Fields.
keywords: fields, access control, permissions, documentation, Content Management System, cms, headless, javascript, node, react, express
---
Field Access Control is specified with functions inside a field's config. All field-level Controls return a boolean value to allow or deny access for the specified operation. No field-level Access Controls support returning query constraints. All Access Control functions accept one `args` argument.
## 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 |
**Example Collection config:**
```js
export default {
slug: 'posts',
fields: [
{
name: 'title',
label: 'Title',
type: 'text',
// highlight-start
access: {
create: ({ req: { user } }) => { ... },
read: ({ req: { user } }) => { ... },
update: ({ req: { user } }) => { ... },
},
// highlight-end
};
],
}
```
### Create
Returns a boolean which allows or denies the ability to set a field's value when creating a new document. If `false` is returned, any passed values will be discarded.
**Available argument properties:**
| 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. |
### Read
Returns a boolean which allows or denies the ability to read a field's value. If `false`, the entire property is omitted from the resulting document.
**Available argument properties:**
| Option | Description |
| ----------------- | ----------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
| **`id`** | `id` of the document being read |
| **`data`** | The full data of the document being read. |
| **`siblingData`** | Immediately adjacent field data of the document being read. |
### Update
Returns a boolean which allows or denies the ability to update a field's value. If `false` is returned, any passed values will be discarded.
**Available argument properties:**
| 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. |

View File

@@ -0,0 +1,51 @@
---
title: Globals Access Control
label: Globals
order: 40
desc: Global-level Access Control is specified within each Global's `access` property and allows you to define which users can read or update Globals.
keywords: globals, access control, permissions, documentation, Content Management System, cms, headless, javascript, node, react, express
---
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 Controls
| Function | Allows/Denies Access |
| ------------------------ | -------------------- |
| **[`read`](#read)** | Used in the `findOne` Global operation |
| **[`update`](#update)** | Used in the `update` Global operation |
**Example Global config:**
```js
export default {
slug: "header",
// highlight-start
access: {
read: ({ req: { user } }) => { ... },
update: ({ req: { user } }) => { ... },
},
// highlight-end
};
```
### Read
Returns a boolean result to allow or deny a user's ability to read the Global.
**Available argument properties:**
| Option | Description |
| --------- | ----------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |
### Update
Returns a boolean result to allow or deny a user's ability to update the Global.
**Available argument properties:**
| Option | Description |
| --------- | ----------- |
| **`req`** | The Express `request` object containing the currently authenticated `user` |

View File

@@ -0,0 +1,45 @@
---
title: Access Control
label: Overview
order: 10
desc: Payload makes it simple to define and manage access control. By declaring roles, you can set permissions and restrict what your users can interact with.
keywords: overview, access control, permissions, documentation, Content Management System, cms, headless, javascript, node, react, express
---
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.
**Example use cases:**
- Allowing anyone `read` access to all `Post`s
- Only allowing public access to `Post`s where a `status` field is equal to `published`
- Giving only `User`s with a `role` field equal to `admin` the ability to delete `Page`(s)
- Allowing anyone to create `ContactSubmission`s, but only logged in users to `read`, `update` or `delete` them
- Restricting a `User` to only be able to see their own `Order`(s), but no others
- Allowing `User`s that belong to a certain `Organization` to access only that `Organization`'s `Resource`s
### Default Settings
**By default, all Collections and Globals require that a user is logged in to be able to interact in any way.** The default Access Control function evaluates the `user` from the Express `req` and returns `true` if a user is logged in, and `false` if not.
**Default Access function:**
```js
const defaultPayloadAccess = ({ req: { user } }) => {
// Return `true` if a user is found
// and `false` if it is undefined or null
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>true</strong>.
</Banner>
### Access Control Types
You can manage access within Payload on three different levels:
- [Collections](/docs/access-control/collections)
- [Fields](/docs/access-control/fields)
- [Globals](/docs/access-control/globals)

108
docs/admin/components.mdx Normal file
View File

@@ -0,0 +1,108 @@
---
title: Swap in your own React components
label: Custom Components
order: 20
desc: Fully customize your Admin Panel by swapping in your own React components. Add fields, remove views, update routes and change functions to sculpt your perfect Dashboard.
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.
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.
</Banner>
### Base Component Overrides
You can override a set of admin panel-wide components by providing a component to your base Payload config's `admin.components` property. The following options are available:
| Path | Description |
| --------------------- | -------------|
| **`Nav`** | Contains the sidebar and mobile Nav in its entirety. |
| **`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. |
| **`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. |
#### Full example:
`payload.config.js`
```js
import { buildConfig } from 'payload/config';
import { MyCustomNav, MyCustomLogo, MyCustomIcon, MyCustomAccount, MyCustomDashboard } from './customComponents.js';
export default buildConfig({
serverURL: 'http://localhost:3000',
admin: {
components: {
Nav: MyCustomNav,
graphics: {
Icon: MyCustomIcon,
Logo: MyCustomLogo,
},
views: {
Account: MyCustomAccount,
Dashboard: MyCustomDashboard,
}
}
}
})
```
*For more examples regarding how to customize components, look at the [demo app](https://github.com/payloadcms/payload/tree/master/demo).*
### Collections
You can override components on a Collection-by-Collection basis via each Collection's `admin` 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. |
### Globals
As with Collections, You can override components on a global-by-global basis via their `admin` property.
| Path | Description |
| ---------------- | -------------|
| **`views.Edit`** | Used while this Global is being edited. |
### Fields
All Payload fields support the ability to swap in your own React components. So, for example, instead of rendering a default Text input, you might need to render a color picker that provides the editor with a custom color picker interface to restrict the data entered to colors only.
<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.
</Banner>
**Fields support the following custom components:**
| Component | Description |
| --------------- | -------------|
| **`Filter`** | Override the text input that is presented in the `List` view when a user is filtering documents by the customized field. |
| **`Cell`** | Used in the `List` view's table to represent a table-based preview of the data stored in the field. |
| **`Field`** | Swap out the field itself within all `Edit` views. |
#### Sending and receiving values from the form
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 `useFieldType` hook as follows:
```js
import { useFieldType } from 'payload/components/forms';
const CustomTextField = ({ path }) => {
const { value, setValue } = useFieldType({ path });
return (
<input
onChange={(e) => setValue(e.target.value)}
value={value}
/>
)
}
```

View File

@@ -0,0 +1,63 @@
---
title: Customizing CSS & SCSS
label: Customizing CSS
order: 30
desc: Customize your Payload admin panel further by adding your own CSS or SCSS style sheet to the configuration, powerful theme and design options are waiting for you.
keywords: admin, css, scss, documentation, Content Management System, cms, headless, javascript, node, react, express
---
### Adding your own CSS / SCSS
You can add your own CSS by providing your base Payload config with a path to your own CSS or SCSS. Customize the styling of any part of the Payload dashboard as necessary.
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:**
```js
import { buildConfig } from 'payload/config';
import path from 'path';
const config = buildConfig({
serverURL: 'http://localhost:3000',
admin: {
css: path.resolve(__dirname, 'relative/path/to/stylesheet.scss'),
},
})
```
### Overriding SCSS variables
You can specify your own SCSS variable stylesheet that will allow for the override of Payload's base theme. This unlocks a ton of powerful theming and design options such as:
- Changing dashboard font families
- Modifying color palette
- Creating a dark theme
- Etc.
To do so, provide your base Payload config with a path to your own SCSS variable sheet.
**Example in payload.config.js:**
```js
import { buildConfig } from 'payload/config';
import path from 'path';
const config = buildConfig({
serverURL: 'http://localhost:3000',
admin: {
scss: path.resolve(__dirname, 'relative/path/to/vars.scss'),
},
})
```
**Example stylesheet override:**
```scss
$font-body: 'Papyrus';
$style-radius-m: 10px;
```
To reference all Sass variables that you can override, look at the default [SCSS variable stylesheet](https://github.com/payloadcms/payload/blob/master/src/admin/scss/vars.scss) within the Payload source code.
<Banner type="error">
<strong>Warning:</strong><br />
Only SCSS variables, mixins, functions, and extends are allowed in <strong>your SCSS overrides</strong>. Do not attempt to add any CSS declarations to this file, as this variable stylesheet is imported by many components throughout the Payload Admin panel and will result in your CSS definition(s) being duplicated many times. If you need to add real CSS definitions, see "Adding your own CSS / SCSS" the top of this page.
</Banner>

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