Compare commits

...

478 Commits

Author SHA1 Message Date
Elliot DeNolf
d383a00b65 chore(release): db-mongodb/1.0.5 [skip ci] 2023-10-30 12:28:47 -04:00
Elliot DeNolf
d6ff8e3e69 chore(release): payload/2.0.14 [skip ci] 2023-10-30 12:26:26 -04:00
Jacob Fletcher
20373903fd chore: adds e2e tests for versions tab and route (#3908) 2023-10-30 11:39:24 -04:00
Patrik
6d94e57225 docs: adds Props import to cell-component example (#3931) 2023-10-30 11:17:22 -04:00
Jarrod Flesch
a14b15200a chore: add save prop to docs custom save button example 2023-10-30 08:52:59 -04:00
Nathan Clevenger
0da3b59daf docs: fix broken link to Microsoft's Monaco Docs (#3921) 2023-10-30 01:24:44 +01:00
Jarrod Flesch
46fc41cbd9 fix: incorrect duplication of data in admin ui (#3907) 2023-10-27 22:41:33 -04:00
Patrik
237eebdf87 fix: enables nested AND/OR queries (#3834) 2023-10-27 15:18:25 -04:00
Hristiyan Dodov
422c803da6 fix: disable webpack hot reload on production (#3891) 2023-10-27 15:12:12 -04:00
Jarrod Flesch
7e919aa87c fix: adds null to non-required field unions (#3870) 2023-10-27 15:02:40 -04:00
Jarrod Flesch
d393225289 fix: set date to 12UTC for default, dayOnly and monthOnly fields (#3887) 2023-10-27 14:43:36 -04:00
Jessica Chowdhury
a4f36aa8a0 fix: only apply focal manipulation when necessary (#3902)
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
2023-10-27 14:40:26 -04:00
Dan Ribbens
3404bab83f fix: generate new block ids on create (#3871) 2023-10-27 13:32:20 -04:00
Dan Ribbens
89f273bf89 fix: duplicate document copying to incorrect locale (#3874) 2023-10-27 13:31:52 -04:00
Dan Ribbens
4d8d4c214a fix: unique field error handling (#3888) 2023-10-27 13:31:14 -04:00
Dan Ribbens
dc13b101f7 fix(payload): graphql query errors transaction race condition (#3795) 2023-10-27 13:29:51 -04:00
Patrik
42d8d11fd7 fix: ensures compare-version select field cannot be cleared (#3901) 2023-10-27 12:15:36 -04:00
Alessio Gravili
56e58e9ec7 fix(db-mongodb): improve find query performance (#3836)
Fixes #3904

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* wip: changelog script

* wippppp

* chore: this worked

* wip: changelog working

* chore(script): working changelog gen

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

* test: add int tests for payload-preferences

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

* feat: abstracts syncWithSearch

* feat: attaches payload to beforeSync hook

* feat: enables defaultPriorities

* fix: syncWithSearch args and return type

* 0.0.2

* feat: uses config provider to format linkToDoc

* feat: supports versions api

* 0.0.4

* chore: bumps payload to v0.15.6

* 0.0.5

* chore: updates react peerDep

* 0.0.6

* chore: updates payload and package scope

* 1.0.0

* chore: correct import directive in readme code sample

* chore: exports types (#5)

* chore: eslint and prettier

* chore: migrates demo to payload v1.8.2

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

* 1.0.1

* chore(plugin-search): cleanup after import

* chore(plugin-search): lint

* chore(plugin-search): format

* chore: force pnpm-lock.yaml

---------

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

* chore: clean up dist imports

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

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

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

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

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

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

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

* feat(richtext-lexical): HTML Serializer

* chore(richtext-lexical): adjust comment

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

* chore: working html converter field, improve various exports

* feat: link and heading html serializers

* fix: populationPromises not being added properly

* feat: allow html serializers to be async

* feat: upload html serializer

* feat: text format => html

* feat: lists => html

* feat: Quote => html

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

* fix: initial request context not set for all operations

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

* feat: add context to props of global hooks

* chore: add global tests for global and field props

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

* ci: copy .env.example

* ci: add mongo

* ci: add other templates via matrix

* ci: move templates to separate workflow

* ci: implement paths-filter

* chore: trigger template filter

* chore: refine filters

* chore: adjust needs_build

* chore: undo trigger
2023-10-20 14:57:47 -04:00
Kalon Robson
ec5e35ff71 chore(templates): fix e-commerce template jsx component type error (#3717) 2023-10-20 13:37:21 -04:00
Kalon Robson
55b9bf40df chore(templates): fix website template unused ts-expect-error (#3652) 2023-10-20 13:37:02 -04:00
Elliot DeNolf
5282673746 chore(templates): revert unintentional change 2023-10-20 11:58:35 -04:00
Elliot DeNolf
298ca0b7ae chore(templates): copy yarn.lock in Dockerfile (#3787) 2023-10-20 10:52:00 -04:00
Elliot DeNolf
71407e19e2 chore(deps): bump sharp for CVE-2023-4863 (#3786) 2023-10-20 10:40:59 -04:00
Jarrod Flesch
09078bdb40 fix(examples): ensure next middleware is built, removes unnecessary alias (#3771) 2023-10-20 07:47:07 -04:00
Elliot DeNolf
e84f5ded28 chore: update changelog 2023-10-19 17:34:33 -04:00
Elliot DeNolf
a475b9b28b chore(release): live-preview-react/0.1.5 [skip ci] 2023-10-19 16:42:58 -04:00
Elliot DeNolf
baad7d3360 chore(release): live-preview/0.1.5 [skip ci] 2023-10-19 16:42:33 -04:00
Jacob Fletcher
7fcb972dfa fix(live-preview): blocks field (#3753) 2023-10-19 16:40:16 -04:00
Elliot DeNolf
01245b07f8 chore(release): richtext-lexical/0.1.14 [skip ci] 2023-10-19 16:14:06 -04:00
James Mikrut
c9844f2958 Update README.md 2023-10-15 10:01:58 -04:00
Jacob Fletcher
7bbd292efa Merge remote-tracking branch 'plugin-form-builder/main' into chore/plugin-form-builder 2023-10-15 02:31:29 -04:00
Jacob Fletcher
b0a62442e5 Merge remote-tracking branch 'plugin-stripe/main' into chore/plugin-stripe 2023-10-15 01:42:42 -04:00
Jacob Fletcher
c6ce6024d2 Merge remote-tracking branch 'plugin-search/main' into chore/plugin-search 2023-10-15 01:30:02 -04:00
Elliot DeNolf
927a1ab049 chore(release): plugin-nested-stripe/0.0.15 2023-10-13 10:57:48 -04:00
Elliot DeNolf
f23ae28d45 chore(deps): add payload 2.0 to peer deps 2023-10-13 10:56:46 -04:00
Elliot DeNolf
2a549438e0 chore(release): plugin-cloud-storage/1.1.1 2023-10-12 15:54:45 -04:00
Elliot DeNolf
46121b5891 chore(release): plugin-cloud-storage/1.1.0 2023-10-12 15:48:49 -04:00
Elliot DeNolf
f3b6e49781 chore: update peer deps 2023-10-12 15:45:12 -04:00
Elliot DeNolf
36740b70d4 0.0.15-beta.0 2023-10-06 11:49:53 -04:00
PatrikKozak
5d1677a84e Merge pull request #29 from payloadcms/chore/alias-pattern
chore: improves alias pattern
2023-10-06 10:55:29 -04:00
Elliot DeNolf
c73113565a 1.1.0-beta.1 2023-10-06 09:41:41 -04:00
James
ad924c8d7b Merge branch 'master' of github.com:payloadcms/plugin-cloud-storage 2023-10-06 09:02:15 -04:00
James
bb6956cd32 chore: plugin alias specificity 2023-10-06 09:02:08 -04:00
Patrik Kozak
4fab26db9d chore: updates local dev aliases 2023-10-05 22:29:51 -04:00
Patrik Kozak
56cf767e18 chore: improves alias pattern 2023-10-05 15:37:01 -04:00
Elliot DeNolf
5c97d05acf 1.1.0-beta.0 2023-10-05 14:15:02 -04:00
James
6bad383a95 chore: working local dev aliases 2023-10-05 13:28:22 -04:00
James
4b726eb139 chore: improves alias pattern 2023-10-05 12:35:14 -04:00
Daniel Kirchhof
e13d8da7c2 fix: skip following code if form.emails list is empty (#54) 2023-08-28 19:15:09 +02:00
Jacob Fletcher
0a45389a25 0.0.14 2023-08-04 13:28:23 -04:00
Jacob Fletcher
2abdce31f8 feat: allows turning off rest proxy (#22) 2023-08-04 13:27:48 -04:00
Jacob Fletcher
ced5ad8b76 1.0.1 2023-06-27 14:30:02 -04:00
Jacob Fletcher
11429135ee fix: adjusts payload peer dep range (#8) 2023-06-27 14:29:15 -04:00
Elliot DeNolf
3d5858ca6d 1.0.19 2023-06-26 14:23:23 -04:00
James Mikrut
5456695728 Merge pull request #62 from lucyawrey/individual-prefixes
Add support for 'prefix' field on individual uploads, takes priority over global prefix field
2023-06-26 14:22:04 -04:00
Lucy Awrey
b79da5920a Add support for 'prefix' field on individual uploads, takes priority over global prefix field
squashed a few commits testing different approaches to this
2023-06-26 13:18:36 -04:00
Elliot DeNolf
a0a92952eb 1.0.18 2023-06-23 17:13:57 -04:00
Elliot DeNolf
a687dfdb16 docs: arg comments and dev readme formatting 2023-06-23 17:13:10 -04:00
Elliot DeNolf
b9d7e82052 chore: add region aws adapter example in readme 2023-06-23 14:42:15 -04:00
TomDo1234
fb10af8365 docs: mention usage with AWS EC2 IAM Role (#30)
Specified that you don't need to provide any credentials when using a correct IAM Role. IAM Roles are recommended by AWS over direct credentials due to superior security.
2023-06-23 11:40:08 -04:00
Seth Syberg
53427443a7 fix: allow empty config on s3 adapter (#60) 2023-06-23 11:39:04 -04:00
vvvctr
62fae5520d chore: fix email link (#44)
Fix mail link in readme.
2023-06-23 11:33:23 -04:00
DireWolf707
8b186dbf83 docs: add default value for GCS_CREDENTIALS (#48)
without default value, it gives error in payload admin page (in console of browser)

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

as envs are not availabe in payload admin GCS_CREDENTIALS gives undefined
resulting JSON.parse(undefined) raises this error
2023-06-23 11:32:02 -04:00
Elliot DeNolf
4ede3384f0 1.0.17 2023-06-12 10:54:34 -04:00
Elliot DeNolf
008eb640f0 1.0.17-beta.1 2023-06-12 10:51:57 -04:00
Elliot DeNolf
019ef358a5 chore: proper fsMock location 2023-06-11 19:37:39 -04:00
Elliot DeNolf
72950b2b82 1.0.17-beta.0 2023-06-11 19:06:41 -04:00
Elliot DeNolf
5b2ea583d2 chore: version sync 2023-06-11 19:06:35 -04:00
Elliot DeNolf
6fb0289e71 chore: add enabled to plugin options section in readme 2023-06-11 18:49:25 -04:00
Elliot DeNolf
f2bbe662f2 feat: add enabled property to conditionally enable/disable (#57) 2023-06-11 18:39:58 -04:00
Jacob Fletcher
7633922ec1 Merge pull request #7 from payloadcms/chore/eslint
chore: eslint and prettier
2023-05-18 14:34:32 -04:00
Jacob Fletcher
c4c7c20c8c chore: migrates demo to payload v1.8.2 2023-05-18 14:33:17 -04:00
Jacob Fletcher
ee403b79f4 chore: eslint and prettier 2023-05-18 14:33:13 -04:00
Jacob Fletcher
0221394c06 Merge pull request #19 from payloadcms/chore/eslint
chore: eslint and prettier
2023-05-18 14:29:18 -04:00
Jacob Fletcher
741ab0487d bumps demo to payload v1.8.2 2023-05-18 14:28:46 -04:00
Jacob Fletcher
8a513ba7af chore: eslint and prettier 2023-05-18 14:28:41 -04:00
Jacob Fletcher
3de43379e7 1.0.15 2023-05-16 09:00:51 -04:00
Jacob Fletcher
6c3a5d9c85 1.0.14 2023-05-16 00:03:38 -04:00
Jacob Fletcher
fcca4a46f9 chore: lints DynamicPriceSelector 2023-05-16 00:03:33 -04:00
Jacob Fletcher
32dc030e17 1.0.14-canary.0 2023-05-15 17:26:11 -04:00
Jarrod Flesch
8769d042f9 chore: adds use client directive atop custom react components (#42) 2023-05-15 13:29:06 -04:00
Jacob Fletcher
76c9704850 fix: correctly types width fields #37 (#41) 2023-05-15 12:27:34 -04:00
Jacob Fletcher
f8da32a9bd feat: explicitly exports fields for reuse #35 (#39) 2023-05-15 11:56:34 -04:00
Jacob Fletcher
a89df757bf chore: eslint and prettier (#40) 2023-05-15 11:23:29 -04:00
Alberto Maghini
a12240b71e fix: threads locale through findByID (#31) 2023-05-15 17:14:07 +02:00
Jacob Fletcher
dfb9a93547 0.0.13 2023-05-01 17:40:57 -04:00
Jacob Fletcher
a2e336470a Merge pull request #18 from payloadcms/fix/deletion-hook
fix: safely retrieves stripe resource before deletion #17
2023-05-01 17:40:20 -04:00
Jacob Fletcher
f6994e57dd fix: safely retrieves stripe resource before deletion #17 2023-05-01 17:36:40 -04:00
James
297e7f8c1d 1.0.16 2023-04-27 16:38:21 -04:00
James
5c9a01aa1c 1.0.15 2023-04-27 16:37:34 -04:00
James
df7499483a chore: merge conflicts 2023-04-27 16:35:08 -04:00
James
131333fc3a fix: #34, only deletes files with valid filename 2023-04-27 16:30:44 -04:00
James
60cf803e8d fix: #43, not deleting old files 2023-04-27 16:28:16 -04:00
James
7eb8d8bed1 fix: uses fallback for stream to prevent webpack error 2023-04-27 13:00:02 -04:00
Dan Ribbens
2f799a9420 feat: azure upload file stream (#46) 2023-04-10 17:04:28 -04:00
Ssor Onid
09584940d1 chore: Update README.md (#24) 2023-04-10 09:15:42 -04:00
Dan Ribbens
87063a03c4 chore: show MIT license in package.json 2023-04-07 17:07:50 -04:00
Dan Ribbens
b7e2f2a57b Merge pull request #45 from alamit/feat/azure-partial-content 2023-04-07 15:39:44 -04:00
alamit
25c4d858e9 Update staticHandler.ts 2023-04-07 04:36:18 +02:00
alamit
02c83b65ef feat(azure): Add support for partial content requests 2023-04-07 03:06:46 +02:00
Jacob Fletcher
bfe8de3fd6 0.0.12 2023-03-29 13:27:09 -04:00
Jacob Fletcher
bd16e9fb53 chore: conditionally logs webhook events #15 (#16) 2023-03-29 13:25:27 -04:00
Elliot DeNolf
6cb8794c5a 1.0.14 2023-02-09 14:01:57 -05:00
Elliot DeNolf
e56518e702 fix: properly alias fs at the package level, not dev 2023-02-09 14:01:09 -05:00
Elliot DeNolf
20cfd61dbf 1.0.13 2023-02-09 13:13:20 -05:00
Elliot DeNolf
65899766d6 feat: add proper prepublishOnly script
chore: remove dev/yarn.lock during clean, prevents publish

chore: make dev package.json private

chore: adjust payload peer dep version
2023-02-09 13:06:00 -05:00
Elliot DeNolf
17dbc1e484 chore: add lib-storage to dev deps, needed for dev and build 2023-02-09 12:13:13 -05:00
Elliot DeNolf
ee62c2a722 chore: additional webpack mock for dev 2023-02-09 12:12:12 -05:00
Elliot DeNolf
1f7f5e5cdb feat(s3): implement multipart upload 2023-02-09 11:56:53 -05:00
Elliot DeNolf
7ab9c386ca fix: change upload fields from disabled to hidden 2023-02-08 13:31:30 -05:00
Elliot DeNolf
b4b66e2f16 chore: explicit type for S3 storage client 2023-02-07 14:37:51 -05:00
Elliot DeNolf
bd64ec3c49 chore: add some eslint ignores for dev dir 2023-02-07 14:27:04 -05:00
Jacob Fletcher
8ddbb67f07 0.0.11 2023-02-02 14:28:23 -05:00
Jacob Fletcher
715e154817 chore: exports types (#5) 2023-02-01 17:41:28 -05:00
Elliot DeNolf
4c8f33e098 feat(s3): support large uploads (#37)
* feat(s3): implement multipart upload

* feat(s3): support tempFilePath and using read stream for uploads
2023-02-01 16:31:07 -05:00
Jacob Fletcher
42f1a23b7f 1.0.13 2023-01-23 09:36:09 -05:00
Jacob Fletcher
da4d9018c1 feat: spreads overrides into configs #25 (#29) 2023-01-23 09:34:31 -05:00
Jacob Fletcher
e8458f84bc fix: removes conditional return of formattedEmails in sendEmail hook #26 (#28) 2023-01-23 09:00:26 -05:00
Jacob Fletcher
5b6705b4f6 fix: properly overrides form submission relationTo #19 (#27) 2023-01-23 08:59:52 -05:00
bencun
b4d1eaf1fb feat: field localization
* Localize field labels and values.

* More localization.
2023-01-23 14:59:15 +01:00
Jacob Fletcher
93b049288b 1.0.12 2023-01-18 08:07:06 -05:00
Jacob Fletcher
35e14cf044 fix: uses form slug from config in form relationship field #19 (#23) 2023-01-18 08:04:11 -05:00
Jacob Fletcher
76e715aa6d chore: reverts cb0197e 2023-01-18 08:00:09 -05:00
Jessica Chowdhury
2c8ea533af feat: adds cc field to email 2023-01-13 18:00:03 +00:00
Jacob Fletcher
60c14557ff Merge pull request #14 from payloadcms/chore/13
chore: handles stripe test keys
2023-01-04 16:53:56 -05:00
Jacob Fletcher
a38b43dc4f chore: handles stripe test keys 2023-01-04 16:53:18 -05:00
Jacob Fletcher
12e85f654e Merge pull request #12 from payloadcms/fix/7
fix: auto-generates password for webhook-created users
2023-01-04 10:18:26 -05:00
Jacob Fletcher
c02463be69 fix: auto-generates password for webhook-created users 2023-01-04 10:16:41 -05:00
Jacob Fletcher
1b6d0cf4da Merge pull request #11 from payloadcms/feat/type-exports
fix: properly exports types
2023-01-04 09:58:03 -05:00
Jacob Fletcher
e59e6ed65e fix: properly exports types 2023-01-04 09:44:15 -05:00
Jacob Fletcher
d6a11921e0 Merge pull request #10 from Velua/patch-2
feat: accepts generic in StripeWebhookHandler
2023-01-04 08:57:25 -05:00
Jacob Fletcher
a8b366992a 1.0.11 2023-01-04 00:48:54 -05:00
Jacob Fletcher
4841dbf7ab Merge pull request #17 from payloadcms/fix/15
fix: custom form fields
2023-01-04 00:46:10 -05:00
Jacob Fletcher
9ee7041f9f Merge pull request #18 from payloadcms/fix/type-exports
fix: properly exports types
2023-01-04 00:45:37 -05:00
Jacob Fletcher
856962c6c6 fix: properly exports types 2023-01-04 00:39:10 -05:00
Jacob Fletcher
ba0651cecf fix: custom form fields 2023-01-03 23:26:13 -05:00
John Williamson
573c8de380 accept generic 2022-12-29 17:11:33 +10:00
Jacob Fletcher
a64297b376 1.0.10 2022-12-23 17:24:55 -05:00
Jacob Fletcher
9f5ec1784c fix: build errors 2022-12-23 17:24:46 -05:00
Jacob Fletcher
caf9e5699e Merge pull request #13 from andr-ec/latestPayload
Updated to payload 1.3.0
2022-12-23 17:01:54 -05:00
Andre Carrera
505d58f7b6 updated to payload 1.3.0 2022-12-14 21:43:19 -07:00
Elliot DeNolf
e11a0fb285 docs: add more detail on S3 configuration 2022-11-21 10:01:16 -05:00
Jacob Fletcher
9d43805242 1.0.9 2022-11-17 17:05:28 -05:00
Jacob Fletcher
0dd39bcad2 chore: types 2022-11-17 17:04:47 -05:00
Jacob Fletcher
fd9cbd2cdb chore: ignores package-lock 2022-11-16 14:05:19 -05:00
Jacob Fletcher
e3278bf981 chore: adds .env.example to demo 2022-11-16 12:47:33 -05:00
Jacob Fletcher
71057aa5ef docs: adds development documentation 2022-11-16 12:25:45 -05:00
Jacob Fletcher
246c78c6c7 chore: bumps payload deps 2022-11-16 10:39:42 -05:00
Jacob Fletcher
37efc13c1e chore: seeds demo 2022-11-15 18:01:26 -05:00
Jacob Fletcher
2a85bb9fa9 chore: ignores .DS_Store 2022-11-15 12:55:36 -05:00
Jacob Fletcher
c069f46f4c docs: adds troubleshooting section 2022-11-15 12:07:42 -05:00
Elliot DeNolf
eb65340923 chore: add installation section to readme 2022-11-14 12:47:22 -05:00
Jacob Fletcher
64bb16a6ff Merge pull request #6 from yagee/main
Update README and little fix to email template
2022-11-10 07:01:20 -08:00
Roman Ryzhikov
6f6e3cabe7 close <div> tag in html email template 2022-11-07 15:56:27 +02:00
Roman Ryzhikov
e9b5309a39 update method miss-spelling 2022-11-07 15:54:58 +02:00
Jarrod Flesch
175d44b0ae fix: thread through collection admin config properties - #5 2022-10-20 09:59:25 -04:00
Jacob Fletcher
e7ac1819ce 0.0.10 2022-10-19 14:51:29 -04:00
Jacob Fletcher
288ff2b094 feat: inforces stripeArgs array 2022-10-19 14:51:11 -04:00
Jacob Fletcher
aca534ec59 0.0.9 2022-10-19 14:27:39 -04:00
Jacob Fletcher
a8951cb741 fix: safely passes args through stripe proxy method handler 2022-10-19 14:26:39 -04:00
Jarrod Flesch
7f9dd2b4e1 fix: readme example ContentType to Content-Type 2022-10-18 17:02:26 -04:00
Alex Pagnotta
8a9f8408cf feat: ensure "accept-ranges" header is passed-trough on static files for S3 and Azure adapters 2022-10-17 18:21:23 +02:00
James Mikrut
f333ff1c5b Merge pull request #20 from linde12/master
Lazily initialize storage clients
2022-10-14 11:52:06 -04:00
olinde
d9dd7ca2c9 fix: await incoming configs onInit
The incoming configs onInit functions may be async, so we should await them.
2022-10-14 17:40:39 +02:00
olinde
2790bab479 feat: make s3 adapter initialize lazily 2022-10-14 15:29:28 +02:00
olinde
29b4bcd1b0 feat: make gcs adapter initialize lazily 2022-10-14 15:29:28 +02:00
olinde
d9dd60ff70 feat: make azure adapter initialize lazyily 2022-10-14 15:29:28 +02:00
Jacob Fletcher
07b970027d fix: demo subscription sync 2022-10-12 16:14:41 -04:00
Elliot DeNolf
e7f5c2e767 1.0.12 2022-10-11 12:53:45 -04:00
alamit
4889fe29f5 fix: content length header (#16) 2022-10-11 12:44:51 -04:00
Jacob Fletcher
71f6542341 chore: adds ui link to demo subscriptions 2022-10-11 11:13:46 -04:00
Jacob Fletcher
c90830f961 chore: syncs subscription status 2022-10-11 11:10:34 -04:00
Jacob Fletcher
d46d2c0595 0.0.8 2022-10-11 09:58:12 -04:00
Jacob Fletcher
16d6c26387 feat: adds priceJSON sync to demo 2022-10-11 09:55:15 -04:00
Jacob Fletcher
32df3067e1 fix: migrates from afterChange to beforeChange hook 2022-10-10 17:27:49 -04:00
Jacob Fletcher
3a7440dcb9 fix: uses proper key-value pairs in to-stripe hooks and renames fieldName to fieldPath 2022-10-10 17:11:10 -04:00
Jacob Fletcher
417f4b7aa9 fix: allows dot notation in sync config 2022-10-10 16:24:36 -04:00
Jacob Fletcher
822aec0a5c chore: renames fieldName and stripeProperty 2022-10-10 15:24:05 -04:00
Jacob Fletcher
455622fa57 0.0.7 2022-10-07 14:20:00 -04:00
Jacob Fletcher
f93316e588 chore: renames resource to stripeResourceType 2022-10-07 14:05:29 -04:00
Jacob Fletcher
b7e65d1024 feat: adds direct link to stripe resources #4 2022-10-07 13:38:40 -04:00
Jacob Fletcher
b5728104dd 0.0.6 2022-09-30 13:09:52 -04:00
Jacob Fletcher
604197bb98 chore: mocks server modules in demo 2022-09-30 13:05:43 -04:00
Jacob Fletcher
6b30a9702b 0.0.5 2022-09-30 11:21:54 -04:00
Jacob Fletcher
ab974ee587 fix: build errors 2022-09-30 11:20:47 -04:00
Jacob Fletcher
3a9efb21e0 chore: custom webhooks 2022-09-30 11:12:45 -04:00
Jacob Fletcher
2dd395f718 chore: improves logs 2022-09-29 15:27:03 -04:00
Jacob Fletcher
2df28355cf chore: syncs demo products 2022-09-29 12:33:24 -04:00
Jacob Fletcher
7607c17041 chore: custom subscriptionCreatedOrUpdated webhook 2022-09-29 12:33:07 -04:00
Jacob Fletcher
64560dd36b Merge pull request #1 from colinramsay/patch-1
chore: correct import directive in readme code sample
2022-09-29 08:58:35 -04:00
Colin Ramsay
e72fff6768 chore: correct import directive in readme code sample 2022-09-29 13:54:00 +01:00
Jacob Fletcher
f81b4d3a1b feat: detects nested webhooks events 2022-09-28 12:24:53 -04:00
Jacob Fletcher
8305b65b98 chore: renames object to resource 2022-09-27 17:00:47 -04:00
Jacob Fletcher
275d15cfdc chore: renames isSyncedToStripe to skipSync 2022-09-27 16:28:26 -04:00
Jacob Fletcher
c09667edfc chore: general housekeeping 2022-09-27 16:26:49 -04:00
Jacob Fletcher
2cbb14f8dd feat: abstracts webhooks 2022-09-27 14:43:21 -04:00
Jacob Fletcher
936c125a42 fix: auto-sync hooks 2022-09-27 10:55:30 -04:00
Jacob Fletcher
5a8cdef103 wip: auto-sync 2022-09-26 18:18:58 -04:00
Jacob Fletcher
26bc1b46c1 chore: bumps to payload v1.1.4 2022-09-26 10:32:45 -04:00
Jacob Fletcher
639a832600 feat: supports collection config 2022-09-23 16:22:07 -04:00
Jacob Fletcher
ba4d751831 feat: configures working sync 2022-09-23 14:49:48 -04:00
James
c2c60851b0 1.0.11 2022-09-23 09:27:36 -07:00
James
84cd214a89 fix: only uses adapter to generate file urls if filename exists 2022-09-23 09:27:16 -07:00
James
6023191201 1.0.10 2022-09-21 09:45:26 -07:00
James
a7ccfaeb6f feat: adds generateFileURL to override file urls 2022-09-21 09:45:02 -07:00
Jacob Fletcher
32a0972855 feat: webhooks catch-all 2022-09-21 11:09:05 -04:00
Jacob Fletcher
d354610978 0.0.4 2022-09-20 13:20:04 -04:00
Jacob Fletcher
97bd414d3d chore: updates README.md 2022-09-20 13:19:16 -04:00
Jacob Fletcher
9f396598a0 chore: pluralizes stripeWebhooksEndpointSecret 2022-09-20 13:06:54 -04:00
Jacob Fletcher
c2e20277ec chore: aliases server modules 2022-09-20 13:04:09 -04:00
Jacob Fletcher
7e6f35f380 chore: removes proxy from demo hooks 2022-09-19 17:28:51 -04:00
Jacob Fletcher
750646b3b8 chore: updates README 2022-09-19 12:40:40 -04:00
James
e93599234d 1.0.9 2022-09-14 16:37:44 -07:00
James
c1cf66dc53 fix: sets proper headers for gcs 2022-09-14 16:36:15 -07:00
James
2cd83f2aa6 merge 2022-09-14 15:56:50 -07:00
James
0685717794 fix: ensures that proper Content-Type headers are set on pass-through static files 2022-09-14 15:53:14 -07:00
Dan Ribbens
d318e2276c 1.0.8 2022-08-25 11:58:23 -04:00
Dan Ribbens
8d3974776c chore: add prepublish build to package.json 2022-08-25 11:58:02 -04:00
Dan Ribbens
8f8b824432 Merge pull request #5 from afzaalahmad/feature/prefix-option
feat: add prefix option
2022-08-25 11:48:09 -04:00
Dan Ribbens
7d60a22ccf fix: typescript error 2022-08-25 11:39:34 -04:00
afzaalahmad
2075c0e817 fix: existing prefix field scenario 2022-08-25 02:53:46 +05:00
afzaalahmad
ad68a58859 fix: remove unnecessary param from deleteHandler 2022-08-25 02:53:46 +05:00
afzaalahmad
31622dd448 update: README.md 2022-08-25 02:53:42 +05:00
afzaalahmad
2b51699ec3 feat: add prefix option 2022-08-25 02:53:16 +05:00
Jacob Fletcher
eef80a8239 0.0.3 2022-08-24 16:24:38 -04:00
Jacob Fletcher
339fb96b7d fix: type error in demo 2022-08-24 16:24:04 -04:00
Jacob Fletcher
fe8254c73d fix: exports stripeProxy 2022-08-24 16:23:47 -04:00
Jacob Fletcher
aef868f471 0.0.2 2022-08-24 15:44:40 -04:00
Jacob Fletcher
8e02db10ae chore: updates README.md 2022-08-24 15:44:24 -04:00
Jacob Fletcher
44dd66cb72 feat: builds customers sync demo 2022-08-24 15:44:13 -04:00
Jacob Fletcher
713c6738aa feat: abstracts stripe proxy from route 2022-08-24 15:43:26 -04:00
James
5d18d2793a chore: readme 2022-08-24 11:46:40 -07:00
James
fe002cf9b2 1.0.7 2022-08-24 11:45:11 -07:00
James
434bdb72ab Merge branch 'master' of github.com:payloadcms/plugin-cloud-storage 2022-08-24 11:42:06 -07:00
James
5a802d0d94 feat: allows adapter to be set to null, which will fall back to local storage 2022-08-24 11:41:49 -07:00
Jacob Fletcher
f70a7b80fc chore: stripe rest api error handling 2022-08-24 11:34:22 -04:00
Jacob Fletcher
32665d11c5 0.0.1 2022-08-24 08:18:52 -04:00
Jacob Fletcher
1ed4c096a3 fix: type errors 2022-08-24 08:18:43 -04:00
James Mikrut
c4a492a62a Merge pull request #4 from echocrow/master
Fix Google Cloud Storage install instruction
2022-08-23 12:57:38 -07:00
Crow
e01473ec0c Fix Google Cloud Storage install instruction 2022-08-23 16:05:25 +02:00
James
97a3be87f3 1.0.6 2022-08-21 15:41:34 -07:00
James
aa2c48cb71 chore: yarn 2022-08-21 15:41:29 -07:00
James
ef31984e24 1.0.5 2022-08-21 15:39:05 -07:00
James
de37218c6b chore: updates gitignore 2022-08-21 15:38:45 -07:00
James
9d875332b0 Merge branch 'master' of github.com:payloadcms/plugin-cloud-storage 2022-08-21 15:37:36 -07:00
James Mikrut
c8d8f1fd73 Merge pull request #2 from afzaalahmad/feature/add-google-cloud-storage-adapter
feat: add google cloud storage adapter
2022-08-21 15:37:08 -07:00
afzaalahmad
ba29a5dd7a fix: dev build command 2022-08-20 13:35:27 +05:00
afzaalahmad
0c3b69795b update: README.md 2022-08-20 13:17:41 +05:00
afzaalahmad
3465f7c60d feat: add google cloud storage adapter 2022-08-20 13:10:29 +05:00
Jacob Fletcher
339ab3a838 fix: express type errors 2022-08-18 15:36:23 -04:00
Jacob Fletcher
cc9f9dd704 feat: opens stripe rest 2022-08-18 14:17:31 -04:00
Jacob Fletcher
c13acfe47a feat: initial working draft 2022-08-17 18:11:59 -04:00
Jacob Fletcher
715e13b78e chore: scaffolds plugin 2022-08-17 13:58:41 -04:00
Jacob Fletcher
790e401837 Merge pull request #3 from Kalmarv/patch-1
docs: readme syntax highlighting
2022-08-14 09:36:23 -04:00
Elliot DeNolf
d7b16dd88f feat: require latest payload as peer dep 2022-08-08 09:32:18 -04:00
Elliot DeNolf
6962fabb4e chore: update .gitignore, remove ignored 2022-08-08 09:28:10 -04:00
James
9705e351b3 chore: improves comments 2022-08-07 20:05:28 -04:00
James
45744b0eed 1.0.4 2022-08-07 19:47:05 -04:00
James
7c8f2b1855 chore: fixes adapter exports 2022-08-07 19:46:59 -04:00
James
a7c5d6476c 1.0.3 2022-08-07 19:36:54 -04:00
James
932fefcb7d chore: simplifies usage pattern for plugin 2022-08-07 19:36:48 -04:00
James
ae8342c3ed 1.0.2 2022-08-07 19:27:14 -04:00
James
ec24bb9e2a Merge branch 'master' of github.com:payloadcms/plugin-cloud-storage 2022-08-07 19:27:04 -04:00
James
e1a903d03e chore: fixes payload dependency requirement 2022-08-07 19:26:59 -04:00
James
2f822d517d feat: builds pattern to preserve payload access control 2022-08-07 19:26:30 -04:00
James Mikrut
02a5648ff9 Update README.md 2022-08-07 10:47:21 -04:00
James Mikrut
2ba244cb01 Update README.md 2022-08-07 10:46:59 -04:00
James Mikrut
fab1ea5338 Update README.md 2022-08-07 10:43:25 -04:00
James
ac9c6c5c6d 1.0.1 2022-08-07 10:39:47 -04:00
James
0a4745b869 feat: builds s3 adapter 2022-08-07 10:37:51 -04:00
James
bc0bb6c1b4 chore: credit 2022-08-06 16:15:42 -04:00
James
3aa0d3f3ee chore: simplifies the work an adapter has to do to delete files 2022-08-06 16:09:31 -04:00
James
1f570f97a4 chore: adds optional chaining in handleDelete 2022-08-06 16:02:19 -04:00
James
76067b4e50 chore: bumps payload 2022-08-06 15:51:51 -04:00
James
82293292a1 chore: ignores azure emulator mounted volume 2022-08-06 15:42:26 -04:00
James
ad9ccfd338 fix: ensures azure server-only dependencies are aliased 2022-08-06 15:36:29 -04:00
James
2b7547fbae feat: builds plugin with azure adapter 2022-08-06 14:49:46 -04:00
James
4e1da749c9 chore: init 2022-08-05 15:00:12 -04:00
Caleb
fa119550ae Add syntax highlighting to readme 2022-07-19 14:19:03 -06:00
Jacob Fletcher
80b0d79342 1.0.0 2022-07-05 15:10:07 -04:00
Jacob Fletcher
3fc4bc43ac chore: updates payload and package scope 2022-07-05 15:09:50 -04:00
Jacob Fletcher
a0116685bd chore: adds homepage and repository to package.json 2022-07-05 14:54:16 -04:00
Jacob Fletcher
b7c3899e38 Merge pull request #2 from payloadcms/feat/textarea-field
feat: adds textarea field
2022-07-05 14:15:27 -04:00
Jacob Fletcher
af4a41e219 1.0.7 2022-07-05 14:13:14 -04:00
Jacob Fletcher
5e59b5666c 1.0.6 2022-07-05 14:12:19 -04:00
Jacob Fletcher
7a32f39c2c chore: updates payload peerDep 2022-07-05 13:54:26 -04:00
Jacob Fletcher
c4a09967f3 chore: adds build to .gitignore 2022-07-05 13:38:35 -04:00
Jacob Fletcher
dd8c7906da chore: renames textArea to textarea 2022-07-05 13:36:46 -04:00
Jacob Fletcher
c7bdf5eb43 chore: adds textarea documentation 2022-07-05 13:35:04 -04:00
Jacob Fletcher
3e0ba91c5b chore: removes required label from fields 2022-07-05 13:33:10 -04:00
Jessica Boezwinkle
6940f2c0b7 fix: updates payload 2022-07-05 18:24:11 +01:00
Jessica Boezwinkle
474436e9ab feat: add textarea field 2022-07-05 15:48:49 +01:00
Patrik Kozak
3816431893 feat: adds email-from-name & reply-to-name fields to Emails 2022-05-13 12:49:41 -04:00
James
b8f62f6d52 1.0.5 2022-05-09 17:54:15 -04:00
James
3ca632bcbd fix: overwrites incoming config arrays within field overrides 2022-05-09 17:54:09 -04:00
James
a4032c49e9 1.0.4 2022-05-09 17:48:01 -04:00
James
7f89d404f8 1.0.3 2022-05-09 17:37:35 -04:00
James
c880a61f13 fix: allows form fields to be properly overridden 2022-05-09 17:37:21 -04:00
James
c3401be7c4 1.0.2 2022-05-04 11:39:24 -04:00
James
af8e283203 1.0.1 2022-05-04 11:38:26 -04:00
James
65d72b01f0 Merge branch 'main' of github.com:payloadcms/payload-plugin-form-builder 2022-05-04 11:38:15 -04:00
James
2bbe4286f6 fix: only populates redirect references if passed via config 2022-05-04 11:38:07 -04:00
Jacob Fletcher
b8eeea9ea1 chore: updates react peerDep 2022-05-04 11:17:45 -04:00
Jacob Fletcher
66fa70e275 0.0.6 2022-05-04 11:09:46 -04:00
Jacob Fletcher
6b31173ed0 chore: updates react peerDep 2022-05-04 11:09:29 -04:00
James
9119087f71 chore: updates README 2022-05-04 10:28:04 -04:00
James
321c666dba chore: moves plugin to @payloadcms npm scope 2022-05-04 10:27:17 -04:00
James
1ce678505b 1.0.7 2022-04-27 17:10:49 -04:00
James
4938602ee0 feat: utilizes unused replyTo 2022-04-27 17:10:38 -04:00
Jacob Fletcher
4dd3f131b0 1.0.6 2022-04-26 10:17:40 -04:00
Jacob Fletcher
e2b9e227a0 0.0.2 2022-04-10 12:52:01 -04:00
Jacob Fletcher
4f0bc2306f chore: logs mock email credentials and adds field placeholders 2022-04-10 12:51:46 -04:00
Jacob Fletcher
7ad4c26829 chore: bumps payload to v0.15.6 2022-04-10 12:28:35 -04:00
Jacob Fletcher
472bf4401e 0.0.5 2022-04-10 12:17:12 -04:00
Jacob Fletcher
77f7054832 chore: bumps payload to v0.15.6 2022-04-10 12:17:01 -04:00
Jacob Fletcher
1d3a9aee28 0.0.4 2022-03-07 12:40:38 -05:00
Jacob Fletcher
875d8dc27b feat: supports versions api 2022-03-07 12:40:12 -05:00
Jacob Fletcher
01d092b219 0.0.1 2022-03-04 15:26:25 -05:00
Jacob Fletcher
a8d432f7b3 fix: dynamic price selector 2022-03-04 15:26:20 -05:00
Jacob Fletcher
36a8dc49b3 fix: payment form submissions 2022-03-04 15:01:02 -05:00
Jacob Fletcher
1a2a576aa8 feat: uses config provider to format linkToDoc 2022-02-21 08:31:49 -05:00
Jacob Fletcher
274f19c269 0.0.2 2022-02-20 02:08:59 -05:00
Jacob Fletcher
41d80a959c fix: syncWithSearch args and return type 2022-02-20 02:08:41 -05:00
Jacob Fletcher
80da94c3e0 feat: enables defaultPriorities 2022-02-20 01:08:15 -05:00
Jacob Fletcher
27a3b8ca6d feat: attaches payload to beforeSync hook 2022-02-20 00:38:23 -05:00
Jacob Fletcher
7e44fa1010 feat: abstracts syncWithSearch 2022-02-19 23:44:02 -05:00
Jacob Fletcher
1b10111ba9 feat: builds plugin 2022-02-19 11:02:55 -05:00
Jacob Fletcher
2b01b9b41f 1.0.5 2022-02-18 18:18:11 -05:00
Jacob Fletcher
422b63a9f6 1.0.4 2022-02-18 18:17:42 -05:00
Jacob Fletcher
fbc216e667 chore: adds README 2022-02-18 18:17:37 -05:00
Jacob Fletcher
f0cc05ab91 fix: dynamic field selector option values 2022-02-18 13:22:12 -05:00
Jacob Fletcher
65a53c7d76 feat: builds getPaymentTotal utility 2022-02-18 13:21:41 -05:00
Jacob Fletcher
12c85d7707 feat: adds basePrice to payment field 2022-02-18 11:08:24 -05:00
Jacob Fletcher
4a31090388 feat: types payment field 2022-02-18 11:07:15 -05:00
Jacob Fletcher
3d8d043ab1 1.0.3 2022-02-17 21:09:05 -05:00
Jacob Fletcher
a7780b10d9 fix: fieldToUse options 2022-02-17 21:07:53 -05:00
Jacob Fletcher
b931072eed chore: bumps payload to v0.14.24-beta.0 2022-02-17 21:03:06 -05:00
Jacob Fletcher
dfabfc5227 1.0.2 2022-02-17 16:41:40 -05:00
Jacob Fletcher
8b69625b57 feat: configures tsc and fixes types 2022-02-17 16:41:31 -05:00
Jacob Fletcher
d4d05ae3f3 1.0.1 2022-02-17 15:30:18 -05:00
Jacob Fletcher
e15e00b5f1 fix: declares payload as a peer dependency 2022-02-17 15:30:06 -05:00
Jacob Fletcher
31efa57975 chore: ignores demo env 2022-02-17 13:58:05 -05:00
Jacob Fletcher
f05462efd3 feat: builds demo 2022-02-17 13:57:13 -05:00
Jacob Fletcher
92fa206fa4 chore: initializes standalone repository 2022-02-17 11:42:38 -05:00
Jacob Fletcher
b749f89c30 feat: dynamic pricing and payment handling #43 2022-02-17 11:09:26 -05:00
Jacob Fletcher
3b1b8ddc30 feat: restructures form builder #43 2022-02-09 18:05:00 -05:00
Jacob Fletcher
ec60147aff feat: integrates stripe api into form builder #43 2022-02-09 13:32:10 -05:00
Jacob Fletcher
2f00aef66c feat: adds payment fields to form builder #43 2022-02-09 12:09:40 -05:00
Jessica Boezwinkle
b4610a3fae fix: reduces richtext indent padding 2022-01-12 16:02:04 -05:00
Jessica Boezwinkle
ea22da4fc7 fix: updates richtext indentation within formbuilder 2022-01-12 16:00:31 -05:00
Jessica Boezwinkle
67df834f31 feat: adds indentation option to richText 2022-01-12 15:48:30 -05:00
James
f478fee9ea chore: bumps payload 2021-12-29 15:14:44 -05:00
Jacob Fletcher
2ccaa823e4 feat: omits irrelevant collections from rich text relationships 2021-12-16 14:04:18 -05:00
Jacob Fletcher
c2c2bb7f2d feat: adds image and video elements to sticky list and content grid rich text 2021-12-16 10:51:31 -05:00
Jacob Fletcher
8f0d85fe13 fix: form builder rich text serialization 2021-12-15 16:03:29 -05:00
Jacob Fletcher
db29b07b82 feat: form submission emails 2021-12-14 18:07:30 -05:00
Jacob Fletcher
3207202808 feat: supports form email variables and prepares for send 2021-12-14 13:21:07 -05:00
Jacob Fletcher
24a4bc6f19 feat: modifies form builder api 2021-12-13 12:03:28 -05:00
James
3fdf23a1a0 fix: misc bugs with data safety 2021-09-15 17:47:12 -04:00
James
32a69f8f36 fix: form builder types 2021-08-27 11:48:06 -04:00
James
b398a92db4 fix: who can say 2021-08-26 17:21:24 -04:00
James
3c58e51d17 feat: extends form builder plugin 2021-08-26 17:07:45 -04:00
James
6e2f43394d feat: adds title to forms 2021-08-03 14:29:34 -04:00
James
2a2a2e3a2f feat: builds breadcrumbs plugin 2021-08-02 21:08:01 -04:00
James
eeecbbedb6 feat: builds form builder plugin 2021-07-29 08:25:20 -04:00
535 changed files with 37461 additions and 6272 deletions

View File

@@ -7,7 +7,36 @@ on:
branches: ['main']
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
needs_build: ${{ steps.filter.outputs.needs_build }}
templates: ${{ steps.filter.outputs.templates }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 25
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
needs_build:
- 'packages/**'
- 'test/**'
- 'pnpm-lock.yaml'
- 'package.json'
templates:
- 'templates/**'
- name: Log all filter results
run: |
echo "needs_build: ${{ steps.filter.outputs.needs_build }}"
echo "templates: ${{ steps.filter.outputs.templates }}"
core-build:
needs: changes
if: ${{ needs.changes.outputs.needs_build == 'true' }}
runs-on: ubuntu-latest
steps:
@@ -220,7 +249,10 @@ jobs:
pkg:
- create-payload-app
- plugin-cloud
- plugin-cloud-storage
- plugin-form-builder
- plugin-nested-docs
- plugin-search
steps:
- name: Use Node.js 18
@@ -246,3 +278,34 @@ jobs:
- name: Test ${{ matrix.pkg }}
run: pnpm --filter ${{ matrix.pkg }} run test
if: matrix.pkg != 'create-payload-app' # degit doesn't work within GitHub Actions
templates:
needs: changes
if: ${{ needs.changes.outputs.templates == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
template: [blank, website, ecommerce]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 25
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: 6.0
- name: Build Website
run: |
cd templates/${{ matrix.template }}
cp .env.example .env
yarn install
yarn build

17
.vscode/launch.json vendored
View File

@@ -9,6 +9,16 @@
"request": "launch",
"type": "node-terminal"
},
{
"command": "pnpm run dev plugin-cloud-storage",
"cwd": "${workspaceFolder}",
"name": "Run Dev - plugin-cloud-storage",
"request": "launch",
"type": "node-terminal",
"env": {
"PAYLOAD_PUBLIC_CLOUD_STORAGE_ADAPTER": "s3"
}
},
{
"command": "pnpm run dev fields",
"cwd": "${workspaceFolder}",
@@ -30,6 +40,13 @@
"request": "launch",
"type": "node-terminal"
},
{
"command": "pnpm run dev localization",
"cwd": "${workspaceFolder}",
"name": "Run Dev Localization",
"request": "launch",
"type": "node-terminal"
},
{
"command": "PAYLOAD_BUNDLER=vite pnpm run dev fields",
"cwd": "${workspaceFolder}",

View File

@@ -1,3 +1,139 @@
## [2.0.14](https://github.com/payloadcms/payload/compare/v2.0.13...v2.0.14) (2023-10-30)
### Features
* add textarea field ([474436e](https://github.com/payloadcms/payload/commit/474436e9ab70374a2cfdc1bede06f21052fb78c9))
* adds basePrice to payment field ([12c85d7](https://github.com/payloadcms/payload/commit/12c85d7707ab85cc7a28b43bad1b5085b93fb3bf))
* adds cc field to email ([2c8ea53](https://github.com/payloadcms/payload/commit/2c8ea533afd98d27ee9787d8f0fc03d2cb4a7198))
* adds email-from-name & reply-to-name fields to Emails ([3816431](https://github.com/payloadcms/payload/commit/38164318932a10bc483f0860c5294c863f83bf7a))
* adds image and video elements to sticky list and content grid rich text ([c2c2bb7](https://github.com/payloadcms/payload/commit/c2c2bb7f2d1c54e923b79a91a7fcb72128a4034c))
* adds indentation option to richText ([67df834](https://github.com/payloadcms/payload/commit/67df834f314b4b243c2dea45a3c9a6c88975761d))
* adds payment fields to form builder [#43](https://github.com/payloadcms/payload/issues/43) ([2f00aef](https://github.com/payloadcms/payload/commit/2f00aef66c8c635c1ab579205c1967eec1a4bd12))
* adds title to forms ([6e2f433](https://github.com/payloadcms/payload/commit/6e2f43394d6b2dfb6134ddc4976913689ce9273d))
* builds breadcrumbs plugin ([2a2a2e3](https://github.com/payloadcms/payload/commit/2a2a2e3a2f90350bfd41a12d1d7fc05766128606))
* builds demo ([f05462e](https://github.com/payloadcms/payload/commit/f05462efd348b07aba55f7f2f4b78e1fe34bd4a9))
* builds form builder plugin ([eeecbbe](https://github.com/payloadcms/payload/commit/eeecbbedb616c44490f364d5d29cd29d1f3d8370))
* builds getPaymentTotal utility ([65a53c7](https://github.com/payloadcms/payload/commit/65a53c7d76927aea204234189f67c57a59785275))
* configures tsc and fixes types ([8b69625](https://github.com/payloadcms/payload/commit/8b69625b57895f14e73e26d3d564ea804877667c))
* dynamic pricing and payment handling [#43](https://github.com/payloadcms/payload/issues/43) ([b749f89](https://github.com/payloadcms/payload/commit/b749f89c307cf34497bd453bee70ca607684ebab))
* explicitly exports fields for reuse [#35](https://github.com/payloadcms/payload/issues/35) ([#39](https://github.com/payloadcms/payload/issues/39)) ([f8da32a](https://github.com/payloadcms/payload/commit/f8da32a9bd12694db5fb02c579c6d38d94883913))
* extends form builder plugin ([3c58e51](https://github.com/payloadcms/payload/commit/3c58e51d17c7a5b89ae28649c2b61920f5bf6f8d))
* field localization ([b4d1eaf](https://github.com/payloadcms/payload/commit/b4d1eaf1fb02053a3b7d65fe0ec4f36828c6c146))
* form submission emails ([db29b07](https://github.com/payloadcms/payload/commit/db29b07b82214d73423b17f5bcc0377731225238))
* integrates stripe api into form builder [#43](https://github.com/payloadcms/payload/issues/43) ([ec60147](https://github.com/payloadcms/payload/commit/ec60147aff2b165943e957cd59c0b68282e3b5f4))
* modifies form builder api ([24a4bc6](https://github.com/payloadcms/payload/commit/24a4bc6f190340f1d1268ba3931c40fcab1430dd))
* omits irrelevant collections from rich text relationships ([2ccaa82](https://github.com/payloadcms/payload/commit/2ccaa823e4aef4fc254fcec2254bf7e8a13b43ee))
* restructures form builder [#43](https://github.com/payloadcms/payload/issues/43) ([3b1b8dd](https://github.com/payloadcms/payload/commit/3b1b8ddc30f06c8abb8996fa95f2f291d4474e9f))
* spreads overrides into configs [#25](https://github.com/payloadcms/payload/issues/25) ([#29](https://github.com/payloadcms/payload/issues/29)) ([da4d901](https://github.com/payloadcms/payload/commit/da4d9018c1e73524993637ce4775517d9d311c68))
* supports form email variables and prepares for send ([3207202](https://github.com/payloadcms/payload/commit/3207202808b848b8b0bac74bf0175f3ba19e6ac8))
* types payment field ([4a31090](https://github.com/payloadcms/payload/commit/4a310903882fdf6347781985077aab280dd2c1bc))
* utilizes unused replyTo ([4938602](https://github.com/payloadcms/payload/commit/4938602ee0a3872e1cb3b7fc6ec9558570825767))
### Bug Fixes
* adds null to non-required field unions ([#3870](https://github.com/payloadcms/payload/issues/3870)) ([7e919aa](https://github.com/payloadcms/payload/commit/7e919aa87c0116c41bf41d75dcd91ff96576a46f))
* allows form fields to be properly overridden ([c880a61](https://github.com/payloadcms/payload/commit/c880a61f13e4c034e269466abffedbf7d644d272))
* build errors ([9f5ec17](https://github.com/payloadcms/payload/commit/9f5ec1784c674279ee5aa861cc7a6e0b6f5cbf47))
* checks for user before accessing properties in preferences update operation([#3844](https://github.com/payloadcms/payload/issues/3844)) ([24eab3a](https://github.com/payloadcms/payload/commit/24eab3af1da3b08debe0580cce8ece08a86039a4))
* correctly types width fields [#37](https://github.com/payloadcms/payload/issues/37) ([#41](https://github.com/payloadcms/payload/issues/41)) ([76c9704](https://github.com/payloadcms/payload/commit/76c97048502655516ece4f6680868a23a172ff2c))
* custom form fields ([ba0651c](https://github.com/payloadcms/payload/commit/ba0651cecf2aed50a9176218237181a4ce092bc0))
* **db-mongodb:** improve find query performance ([#3836](https://github.com/payloadcms/payload/issues/3836)) ([56e58e9](https://github.com/payloadcms/payload/commit/56e58e9ec732f8365f53f214a9e950fbc2a7d8b9)), closes [#3904](https://github.com/payloadcms/payload/issues/3904)
* **db-mongodb:** versions pagination ([#3875](https://github.com/payloadcms/payload/issues/3875)) ([4f2b080](https://github.com/payloadcms/payload/commit/4f2b080d1cb5f9d4ab80aa106650307c11e8811b))
* declares payload as a peer dependency ([e15e00b](https://github.com/payloadcms/payload/commit/e15e00b5f173041635221490006e4e8347518253))
* disable webpack hot reload on production ([#3891](https://github.com/payloadcms/payload/issues/3891)) ([422c803](https://github.com/payloadcms/payload/commit/422c803da67982a063a028508c44009b9577646e))
* duplicate document copying to incorrect locale ([#3874](https://github.com/payloadcms/payload/issues/3874)) ([89f273b](https://github.com/payloadcms/payload/commit/89f273bf894512b69e8647be4cf4496bff37c99b))
* dynamic field selector option values ([f0cc05a](https://github.com/payloadcms/payload/commit/f0cc05ab912fd07dcee8bd77c6c2bdc40607f80f))
* dynamic price selector ([a8d432f](https://github.com/payloadcms/payload/commit/a8d432f7b3da2ca36a3a1c0a378af44be82da357))
* enables nested AND/OR queries ([#3834](https://github.com/payloadcms/payload/issues/3834)) ([237eebd](https://github.com/payloadcms/payload/commit/237eebdf87b7d33baa9baaa54946f4ebb4276bfb))
* ensure serverURL has string value for getBaseUploadFields function ([#3900](https://github.com/payloadcms/payload/issues/3900)) ([c564a83](https://github.com/payloadcms/payload/commit/c564a83ab61b672d9a2bcc875ab890b0fede5462))
* ensures compare-version select field cannot be cleared ([#3901](https://github.com/payloadcms/payload/issues/3901)) ([42d8d11](https://github.com/payloadcms/payload/commit/42d8d11fd7e5792b119f69f17dc1100c85cfa491))
* error handling when duplicating documents fails ([#3873](https://github.com/payloadcms/payload/issues/3873)) ([435eb62](https://github.com/payloadcms/payload/commit/435eb6204e550e898a81033f794fcf568e3b017c))
* fieldToUse options ([a7780b1](https://github.com/payloadcms/payload/commit/a7780b10d974f91bea441c5c86c475181c6adc4a))
* form builder rich text serialization ([8f0d85f](https://github.com/payloadcms/payload/commit/8f0d85fe13591ce8186b623f6165626e79714430))
* form builder types ([32a69f8](https://github.com/payloadcms/payload/commit/32a69f8f368aa1917761b7585549dae2f8b2cb12))
* generate new block ids on create ([#3871](https://github.com/payloadcms/payload/issues/3871)) ([3404bab](https://github.com/payloadcms/payload/commit/3404bab83f1112713675eb504870a4a1786c3822))
* global permissions for live preview ([#3854](https://github.com/payloadcms/payload/issues/3854)) ([3032e0b](https://github.com/payloadcms/payload/commit/3032e0b5a239db0762abd120b2db95f30ed5ca65))
* handles null & undefined relationship field values in versions view ([#3609](https://github.com/payloadcms/payload/issues/3609)) ([115e592](https://github.com/payloadcms/payload/commit/115e592b54d9174f316daa3cff31bcc801eaf92f))
* incorrect duplication of data in admin ui ([#3907](https://github.com/payloadcms/payload/issues/3907)) ([46fc41c](https://github.com/payloadcms/payload/commit/46fc41cbd9615c58248b4d2c44d24905dd676171))
* misc bugs with data safety ([3fdf23a](https://github.com/payloadcms/payload/commit/3fdf23a1a0287673a190cfd3c7bc55d64cff37ba))
* only apply focal manipulation when necessary ([#3902](https://github.com/payloadcms/payload/issues/3902)) ([a4f36aa](https://github.com/payloadcms/payload/commit/a4f36aa8a009e9c0156924320bbcf1d04b697223))
* only populates redirect references if passed via config ([2bbe428](https://github.com/payloadcms/payload/commit/2bbe4286f6c89092a8133938d0fec2cc31c0cb16))
* overwrites incoming config arrays within field overrides ([3ca632b](https://github.com/payloadcms/payload/commit/3ca632bcbd49aeaafa86946a595307a95535a300))
* **payload:** graphql query errors transaction race condition ([#3795](https://github.com/payloadcms/payload/issues/3795)) ([dc13b10](https://github.com/payloadcms/payload/commit/dc13b101f7351f7bae60a4a4bbc25907ed82210f))
* payment form submissions ([36a8dc4](https://github.com/payloadcms/payload/commit/36a8dc49b34d75993fa981e3426db85536bf5f26))
* properly exports types ([856962c](https://github.com/payloadcms/payload/commit/856962c6c621ab366e7c0b9089f3204389f3d322))
* properly overrides form submission relationTo [#19](https://github.com/payloadcms/payload/issues/19) ([#27](https://github.com/payloadcms/payload/issues/27)) ([5b6705b](https://github.com/payloadcms/payload/commit/5b6705b4f62c8dfda87f1ceb5585e59277e22542))
* reduces richtext indent padding ([b4610a3](https://github.com/payloadcms/payload/commit/b4610a3faef02cc7f6d440bb908a4623ed94fee8))
* removes conditional return of formattedEmails in sendEmail hook [#26](https://github.com/payloadcms/payload/issues/26) ([#28](https://github.com/payloadcms/payload/issues/28)) ([e8458f8](https://github.com/payloadcms/payload/commit/e8458f84bcd5bad74b189479931fbb7faea74900))
* resize image if no aspect ratio change ([#3859](https://github.com/payloadcms/payload/issues/3859)) ([f53b713](https://github.com/payloadcms/payload/commit/f53b7131548dbe9071c65ba110f7f0d206bb33b5))
* **richtext-*:** type issues with typescript strict mode enabled ([dac9514](https://github.com/payloadcms/payload/commit/dac9514eb00b99a3caeb9f217695b2b89368f7c9))
* **richtext-lexical:** Blocks node incorrectly marked as client module ([35f00fa](https://github.com/payloadcms/payload/commit/35f00fa83d2a90967e0707ca0fd960c5608a3bf3))
* **richtext-lexical:** remove unnecessary dependencies (fixes [#3889](https://github.com/payloadcms/payload/issues/3889)) ([760565f](https://github.com/payloadcms/payload/commit/760565f1e96e4cb1f6bce8663ad3fa8a16a2601c))
* set date to 12UTC for default, dayOnly and monthOnly fields ([#3887](https://github.com/payloadcms/payload/issues/3887)) ([d393225](https://github.com/payloadcms/payload/commit/d3932252891bb8721a5abc97e204dbb6a7f3fda2))
* skip following code if form.emails list is empty ([#54](https://github.com/payloadcms/payload/issues/54)) ([e13d8da](https://github.com/payloadcms/payload/commit/e13d8da7c229d7aa1caa487f20c4158e8ec0aeb5))
* store resized image on req or tempFilePath ([#3883](https://github.com/payloadcms/payload/issues/3883)) ([6c5d525](https://github.com/payloadcms/payload/commit/6c5d525d8e1267eebdffeb9f31b2ef3a4df1132d))
* thread through collection admin config properties - [#5](https://github.com/payloadcms/payload/issues/5) ([175d44b](https://github.com/payloadcms/payload/commit/175d44b0aeaec872421e0269c4b7d643f9cb8456))
* threads locale through findByID ([#31](https://github.com/payloadcms/payload/issues/31)) ([a12240b](https://github.com/payloadcms/payload/commit/a12240b71e677c9b46f47117dec79e40a7de3564))
* unique field error handling ([#3888](https://github.com/payloadcms/payload/issues/3888)) ([4d8d4c2](https://github.com/payloadcms/payload/commit/4d8d4c214ab12571e9dc71e406117c4b19f63c6b))
* updates payload ([6940f2c](https://github.com/payloadcms/payload/commit/6940f2c0b7d36ad25fdc09ba93e23f5c6a095d6c))
* updates richtext indentation within formbuilder ([ea22da4](https://github.com/payloadcms/payload/commit/ea22da4fc7285e4eab975e916d7627394eb4bb26))
* uses form slug from config in form relationship field [#19](https://github.com/payloadcms/payload/issues/19) ([#23](https://github.com/payloadcms/payload/issues/23)) ([35e14cf](https://github.com/payloadcms/payload/commit/35e14cf044698acabe3a0902897ea276e4aef803))
* who can say ([b398a92](https://github.com/payloadcms/payload/commit/b398a92db4f2402089fd03e803fefb337964d432))
## [2.0.13](https://github.com/payloadcms/payload/compare/v2.0.12...v2.0.13) (2023-10-24)
### Bug Fixes
* adjusts props to accept components for before and after fields instead of functions ([#3820](https://github.com/payloadcms/payload/issues/3820)) ([c476d01](https://github.com/payloadcms/payload/commit/c476d01f4e5016f9c2bc338103ef2c778139a536))
* alignment of collapsible within row ([#3822](https://github.com/payloadcms/payload/issues/3822)) ([eaef0e7](https://github.com/payloadcms/payload/commit/eaef0e739546b4411d971da21170977ba73695f8))
* named tabs not appearing in the gql mutation input type ([#3835](https://github.com/payloadcms/payload/issues/3835)) ([a0019d0](https://github.com/payloadcms/payload/commit/a0019d0a78504b5c4d6aeec4823d7a0e224f1d6b))
* only parses live preview ready message when same origin ([#3791](https://github.com/payloadcms/payload/issues/3791)) ([e8f2377](https://github.com/payloadcms/payload/commit/e8f237783b9f48edf80b1d8c61142aeb2edb1c0b))
* prevent storing duplicate user preferences ([#3833](https://github.com/payloadcms/payload/issues/3833)) ([7eee0ec](https://github.com/payloadcms/payload/commit/7eee0ec3558c8b65afc38df7377073f042402ee3))
* prevents document sidebar from collapsing ([71a3e5b](https://github.com/payloadcms/payload/commit/71a3e5ba1037fe447dccad4a490fdfb1623ba0b0))
* renders live preview for globals ([#3801](https://github.com/payloadcms/payload/issues/3801)) ([a13ec2e](https://github.com/payloadcms/payload/commit/a13ec2ebc4858029c643f4530daa4ed49a7b024e))
* reverting localized versions ([#3831](https://github.com/payloadcms/payload/issues/3831)) ([5a0d0db](https://github.com/payloadcms/payload/commit/5a0d0dbc02850c0cd2035487361ba6e7a317bce7))
## [2.0.12](https://github.com/payloadcms/payload/compare/v2.0.11...v2.0.12) (2023-10-23)
### Features
* collection, global and field props for hooks, fix request context initialization, add context to global hooks ([#3780](https://github.com/payloadcms/payload/pull/3780))
* **richtext-lexical:** HTML Serializer ([#3685](https://github.com/payloadcms/payload/pull/3685))
### Bug Fixes
* remove duplicate removal of temp upload file ([#3818](https://github.com/payloadcms/payload/pull/3818))
* simplify how the search input and query params are connected ([#3797](https://github.com/payloadcms/payload/pull/3797))
* standardizes layout of document fields ([#3798](https://github.com/payloadcms/payload/pull/3798))
* issue where dragging unsortable item would crash the page ([#3789](https://github.com/payloadcms/payload/pull/3789))
* **richtext-lexical:** defaultValue property didn't fit into field schema ([b5c7bbed9](https://github.com/payloadcms/payload/commit/b5c7bbed93b532ec54a9c73537f4cb1290122a66))
* **richtext-*:** hasMany relationships not populated correctly ([e197e0316](https://github.com/payloadcms/payload/commit/e197e0316f9c01f945dc7f6d21ac28f9f0420f1d))
## [2.0.11](https://github.com/payloadcms/payload/compare/v2.0.10...v2.0.11) (2023-10-19)
### Features
* add ability to opt out of type gen declare statement ([#3765](https://github.com/payloadcms/payload/pull/3765))
### Bug Fixes
* corrects versions collection casing ([#3739](https://github.com/payloadcms/payload/pull/3739))
* updates req after file resize ([#3754](https://github.com/payloadcms/payload/pull/3754))
* correctly renders focal point when crop is set to false ([#3759](https://github.com/payloadcms/payload/pull/3759))
* account for many slug types in generate types ([#3698](https://github.com/payloadcms/payload/pull/3698))
* handle graphQL: false on globals when building policy type ([#3729](https://github.com/payloadcms/payload/pull/3729))
* renders id as fallback title in DeleteDocument ([#3745](https://github.com/payloadcms/payload/pull/3745))
* properly handles hideAPIURL ([#3721](https://github.com/payloadcms/payload/pull/3721))
* filesRequiredOnCreate typing, tests, linting ([#3737](https://github.com/payloadcms/payload/pull/3737))
* **webpack-bundler:** corrects payload alias ([#3769](https://github.com/payloadcms/payload/pull/3769))
* **bundler-webpack:** better node_modules resolution ([#3744](https://github.com/payloadcms/payload/pull/3744))
* **db-postgres:** block and array inserts error ([#3714](https://github.com/payloadcms/payload/pull/3714))
* **live-preview:** properly handles uploads and hasOne monomorphic relationships ([#3719](https://github.com/payloadcms/payload/pull/3719))
## [2.0.10](https://github.com/payloadcms/payload/compare/v2.0.9...v2.0.10) (2023-10-17)
### Features

39
changelog.config.js Normal file
View File

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

View File

@@ -163,8 +163,8 @@ import {
CustomPreviewButtonProps,
} from 'payload/types'
export const CustomSaveButton: CustomSaveButtonProps = ({ DefaultButton, label }) => {
return <DefaultButton label={label} />
export const CustomSaveButton: CustomSaveButtonProps = ({ DefaultButton, label, save }) => {
return <DefaultButton label={label} save={save} />
}
export const CustomSaveDraftButton: CustomSaveDraftButtonProps = ({
@@ -442,7 +442,9 @@ These are the props that will be passed to your custom Cell to use in your own c
```tsx
import React from 'react'
import type { Props } from 'payload/components/views/Cell'
import './index.scss'
const baseClass = 'custom-cell'
const CustomCell: React.FC<Props> = (props) => {

View File

@@ -48,7 +48,7 @@ In addition to the default [field admin config](/docs/fields/overview#admin-conf
| Option | Description |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`editorOptions`** | Options that can be passed to the monaco editor, [view the full list](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.IDiffEditorConstructionOptions.html). |
| **`editorOptions`** | Options that can be passed to the monaco editor, [view the full list](https://microsoft.github.io/monaco-editor/typedoc/variables/editor.EditorOptions.html). |
### Example

View File

@@ -91,7 +91,7 @@ Please do note that this does not run before the client-side validation. If you
3. `validate` runs on the server
```ts
import { CollectionBeforeOperationHook } from 'payload/types'
import { CollectionBeforeValidateHook } from 'payload/types'
const beforeValidateHook: CollectionBeforeValidateHook = async ({
data, // incoming data to update or create with

View File

@@ -62,7 +62,7 @@ All field-level hooks are formatted to accept the same arguments, although some
Field Hooks receive one `args` argument that contains the following properties:
| Option | Description |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **`data`** | The data passed to update the document within `create` and `update` operations, and the full document itself in the `afterRead` hook. |
| **`siblingData`** | The sibling data passed to a field that the hook is running against. |
| **`findMany`** | Boolean to denote if this hook is running against finding one, or finding many within the `afterRead` hook. |
@@ -73,6 +73,10 @@ Field Hooks receive one `args` argument that contains the following properties:
| **`req`** | The Express `request` object. It is mocked for Local API operations. |
| **`value`** | The value of the field. |
| **`previousValue`** | The previous value of the field, before changes were applied, only in `afterChange` hooks. |
| **`context`** | Context passed to this hook. More info can be found under [Context](/docs/hooks/context) |
| **`field`** | The field which the hook is running against. |
| **`collection`** | The collection which the field belongs to. If the field belongs to a global, this will be null. |
| **`global`** | The global which the field belongs to. If the field belongs to a collection, this will be null. |
#### Return value

View File

@@ -21,16 +21,6 @@ export default buildConfig({
components: {
beforeLogin: [BeforeLogin],
},
webpack: config => ({
...config,
resolve: {
...config.resolve,
alias: {
...config.resolve.alias,
dotenv: path.resolve(__dirname, './dotenv.js'),
},
},
}),
},
editor: slateEditor({}),
db: mongooseAdapter({

View File

@@ -29,7 +29,7 @@ const start = async (): Promise<void> => {
app.listen(PORT, async () => {
payload.logger.info(`Next.js is now building...`)
// @ts-expect-error
await nextBuild(path.join(__dirname, '../'))
await nextBuild(path.join(__dirname, '..'))
process.exit()
})

View File

@@ -10,7 +10,7 @@
},
"dependencies": {
"escape-html": "^1.0.3",
"next": "^13.4.8",
"next": "^13.5.0",
"payload-admin-bar": "^1.0.6",
"react": "18.2.0",
"react-dom": "18.2.0"

View File

@@ -65,10 +65,10 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
"@next/env@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.4.8.tgz#8048ef3c3d770a3f3d1dd51d159593acfbd4e517"
integrity sha512-twuSf1klb3k9wXI7IZhbZGtFCWvGD4wXTY2rmvzIgVhXhs7ISThrbNyutBx3jWIL8Y/Hk9+woytFz5QsgtcRKQ==
"@next/env@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.5.0.tgz#a61dee2f29b09985847eabcc4c8a815031267a36"
integrity sha512-mxhf/BskjPURT+qEjNP7wBvqre2q6OXEIbydF8BrH+duSSJQnB4/vzzuJDoahYwTXiUaXpouAnMWHZdG0HU62g==
"@next/eslint-plugin-next@13.4.3":
version "13.4.3"
@@ -84,50 +84,50 @@
dependencies:
glob "7.1.7"
"@next/swc-darwin-arm64@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.8.tgz#3838d7c96750b7f427ac47b97503fc013734f6e6"
integrity sha512-MSFplVM4dTWOuKAUv0XR9gY7AWtMSBu9os9f+kp+s5rWhM1I2CdR3obFttd6366nS/W/VZxbPM5oEIdlIa46zA==
"@next/swc-darwin-arm64@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.0.tgz#45ea191e13593088572d0048d4ddfc1fcdb3c8ed"
integrity sha512-DavPD8oRjSoCRJana5DCAWdRZ4nbS7/pPw13DlnukFfMPJUk5hCAC3+NbqEyekS/X1IBFdZWSV2lJIdzTn4s6w==
"@next/swc-darwin-x64@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.8.tgz#3de9c26a2ee7b189f22433bf8137256a2517f258"
integrity sha512-Reox+UXgonon9P0WNDE6w85DGtyBqGitl/ryznOvn6TvfxEaZIpTgeu3ZrJLU9dHSMhiK7YAM793mE/Zii2/Qw==
"@next/swc-darwin-x64@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.0.tgz#582e8df7d563c057581bc118fff1cea79391d6e7"
integrity sha512-s5QSKKB0CTKFWp3CNMC5GH1YOipH1Jjr5P3w+RQTC4Aybo6xPqeWp/UyDW0fxmLRq0e1zgnOMgDQRdxAkoThrw==
"@next/swc-linux-arm64-gnu@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.8.tgz#9536314c931b9e78f20e4a424eace9993015c6e1"
integrity sha512-kdyzYvAYtqQVgzIKNN7e1rLU8aZv86FDSRqPlOkKZlvqudvTO0iohuTPmnEEDlECeBM6qRPShNffotDcU/R2KA==
"@next/swc-linux-arm64-gnu@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.0.tgz#7ee0a43b6635eca1e80a887304b7bfe31254a4a6"
integrity sha512-E0fCKA8F2vfgZWwcv4iq642No75EiACSNUBNGvc5lx/ylqAUdNwE/9+x2SHv+LPUXFhZ6hZLR0Qox/oKgZqFlg==
"@next/swc-linux-arm64-musl@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.8.tgz#a894ec6a078edd28f5cfab60593a61e05b6b605b"
integrity sha512-oWxx4yRkUGcR81XwbI+T0zhZ3bDF6V1aVLpG+C7hSG50ULpV8gC39UxVO22/bv93ZlcfMY4zl8xkz9Klct6dpQ==
"@next/swc-linux-arm64-musl@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.0.tgz#99a1efd6b68a4d0dfdc24b81f14cd8b8251425a9"
integrity sha512-jG/blDDLndFRUcafCQO4TOI3VuoIZh3jQriZ7JaVCgAEZe0D1EUrxKdbBarZ74isutHZ6DpNGRDi/0OHFZpJAA==
"@next/swc-linux-x64-gnu@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.8.tgz#b8af198dc0b4a8c64deb0494ae285e3e1a465910"
integrity sha512-anhtvuO6eE9YRhYnaEGTfbpH3L5gT/9qPFcNoi6xS432r/4DAtpJY8kNktqkTVevVIC/pVumqO8tV59PR3zbNg==
"@next/swc-linux-x64-gnu@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.0.tgz#7c85acd45879a20d8fb102b3212e792924d02e93"
integrity sha512-6JWR7U41uNL6HGwNbGg3Oedt+FN4YuA126sHWKTq3ic5kkhEusIIdVo7+WcswVJl8nTMB1yT3gEPwygQbVYVUA==
"@next/swc-linux-x64-musl@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.8.tgz#d2ad24001020665a78405f595995c22750ec63c4"
integrity sha512-aR+J4wWfNgH1DwCCBNjan7Iumx0lLtn+2/rEYuhIrYLY4vnxqSVGz9u3fXcgUwo6Q9LT8NFkaqK1vPprdq+BXg==
"@next/swc-linux-x64-musl@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.0.tgz#23aad9ab7621f53bb947b727e659d85e74b0e31a"
integrity sha512-uY+wrYfD5QUossqznwidOpJYmmcBwojToZx55shihtbTl6afVYzOxsUbRXLdWmZAa36ckxXpqkvuFNS8icQuug==
"@next/swc-win32-arm64-msvc@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.8.tgz#e5c4bfaa105fbe2bdb21a6d01467edd39a29cf37"
integrity sha512-OWBKIrJwQBTqrat0xhxEB/jcsjJR3+diD9nc/Y8F1mRdQzsn4bPsomgJyuqPVZs6Lz3K18qdIkvywmfSq75SsQ==
"@next/swc-win32-arm64-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.0.tgz#5a45686335e5f54342faf9d9ed25f55a4107ce7f"
integrity sha512-lWZ5vJTULxTOdLcRmrllNgAdDRSDwk8oqJMyDxpqS691NG5uhle9ZwRj3g1F1/vHNkDa+B7PmWhQgG0nmlbKZg==
"@next/swc-win32-ia32-msvc@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.8.tgz#c49c4d9f91845855bf544d5d14e8e13311da9931"
integrity sha512-agiPWGjUndXGTOn4ChbKipQXRA6/UPkywAWIkx7BhgGv48TiJfHTK6MGfBoL9tS6B4mtW39++uy0wFPnfD0JWg==
"@next/swc-win32-ia32-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.0.tgz#b9990965762aaa109bdeb7b49cbdc7e4af7f9014"
integrity sha512-jirQXnVCU9hi3cHzgd33d4qSBXn1/0gUT/KtXqy9Ux9OTcIcjJT3TcAzoLJLTdhRg7op3MZoSnuFeWl8kmGGNw==
"@next/swc-win32-x64-msvc@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.8.tgz#22c5c8fa05680f2775a29c6c5a74cf04b8cc9d90"
integrity sha512-UIRKoByVKbuR6SnFG4JM8EMFlJrfEGuUQ1ihxzEleWcNwRMMiVaCj1KyqfTOW8VTQhJ0u8P1Ngg6q1RwnIBTtw==
"@next/swc-win32-x64-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.0.tgz#4385c5d9c0db39c2623aed566b3ec7fedaf6f190"
integrity sha512-Q8QYLyWcMMUp3DohI04VyJbLNCfFMNTxYNhujvJD2lowuqnqApUBP2DxI/jCZRMFWgKi76n5u8UboLVeYXn6jA==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
@@ -172,10 +172,10 @@
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.3.2.tgz#31b9c510d8cada9683549e1dbb4284cca5001faf"
integrity sha512-V+MvGwaHH03hYhY+k6Ef/xKd6RYlc4q8WBx+2ANmipHJcKuktNcI/NgEsJgdSUF6Lw32njT6OnrRsKYCdgHjYw==
"@swc/helpers@0.5.1":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.1.tgz#e9031491aa3f26bfcc974a67f48bd456c8a5357a"
integrity sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==
"@swc/helpers@0.5.2":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d"
integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==
dependencies:
tslib "^2.4.0"
@@ -1729,13 +1729,13 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
next@^13.4.8:
version "13.4.8"
resolved "https://registry.yarnpkg.com/next/-/next-13.4.8.tgz#72245bf4fdf328970147ee30de97142c39b1cb3f"
integrity sha512-lxUjndYKjZHGK3CWeN2RI+/6ni6EUvjiqGWXAYPxUfGIdFGQ5XoisrqAJ/dF74aP27buAfs8MKIbIMMdxjqSBg==
next@^13.5.0:
version "13.5.0"
resolved "https://registry.yarnpkg.com/next/-/next-13.5.0.tgz#3a3ce5b8c89c4fff9c6f0b2452bcb03f63d8c84c"
integrity sha512-mhguN5JPZXhhrD/nNcezXgKoxN8GT8xZvvGhUQV2ETiaNm+KHRWT1rCbrF5FlbG2XCcLRKOmOe3D5YQgXmJrDQ==
dependencies:
"@next/env" "13.4.8"
"@swc/helpers" "0.5.1"
"@next/env" "13.5.0"
"@swc/helpers" "0.5.2"
busboy "1.6.0"
caniuse-lite "^1.0.30001406"
postcss "8.4.14"
@@ -1743,15 +1743,15 @@ next@^13.4.8:
watchpack "2.4.0"
zod "3.21.4"
optionalDependencies:
"@next/swc-darwin-arm64" "13.4.8"
"@next/swc-darwin-x64" "13.4.8"
"@next/swc-linux-arm64-gnu" "13.4.8"
"@next/swc-linux-arm64-musl" "13.4.8"
"@next/swc-linux-x64-gnu" "13.4.8"
"@next/swc-linux-x64-musl" "13.4.8"
"@next/swc-win32-arm64-msvc" "13.4.8"
"@next/swc-win32-ia32-msvc" "13.4.8"
"@next/swc-win32-x64-msvc" "13.4.8"
"@next/swc-darwin-arm64" "13.5.0"
"@next/swc-darwin-x64" "13.5.0"
"@next/swc-linux-arm64-gnu" "13.5.0"
"@next/swc-linux-arm64-musl" "13.5.0"
"@next/swc-linux-x64-gnu" "13.5.0"
"@next/swc-linux-x64-musl" "13.5.0"
"@next/swc-win32-arm64-msvc" "13.5.0"
"@next/swc-win32-ia32-msvc" "13.5.0"
"@next/swc-win32-x64-msvc" "13.5.0"
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"

View File

@@ -10,7 +10,7 @@
},
"dependencies": {
"escape-html": "^1.0.3",
"next": "^13.4.8",
"next": "^13.5.0",
"payload-admin-bar": "^1.0.6",
"qs": "^6.11.0",
"react": "^18.2.0",

View File

@@ -53,10 +53,10 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
"@next/env@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.4.8.tgz#8048ef3c3d770a3f3d1dd51d159593acfbd4e517"
integrity sha512-twuSf1klb3k9wXI7IZhbZGtFCWvGD4wXTY2rmvzIgVhXhs7ISThrbNyutBx3jWIL8Y/Hk9+woytFz5QsgtcRKQ==
"@next/env@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.5.0.tgz#a61dee2f29b09985847eabcc4c8a815031267a36"
integrity sha512-mxhf/BskjPURT+qEjNP7wBvqre2q6OXEIbydF8BrH+duSSJQnB4/vzzuJDoahYwTXiUaXpouAnMWHZdG0HU62g==
"@next/eslint-plugin-next@^13.4.8":
version "13.4.8"
@@ -65,50 +65,50 @@
dependencies:
glob "7.1.7"
"@next/swc-darwin-arm64@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.8.tgz#3838d7c96750b7f427ac47b97503fc013734f6e6"
integrity sha512-MSFplVM4dTWOuKAUv0XR9gY7AWtMSBu9os9f+kp+s5rWhM1I2CdR3obFttd6366nS/W/VZxbPM5oEIdlIa46zA==
"@next/swc-darwin-arm64@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.0.tgz#45ea191e13593088572d0048d4ddfc1fcdb3c8ed"
integrity sha512-DavPD8oRjSoCRJana5DCAWdRZ4nbS7/pPw13DlnukFfMPJUk5hCAC3+NbqEyekS/X1IBFdZWSV2lJIdzTn4s6w==
"@next/swc-darwin-x64@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.8.tgz#3de9c26a2ee7b189f22433bf8137256a2517f258"
integrity sha512-Reox+UXgonon9P0WNDE6w85DGtyBqGitl/ryznOvn6TvfxEaZIpTgeu3ZrJLU9dHSMhiK7YAM793mE/Zii2/Qw==
"@next/swc-darwin-x64@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.0.tgz#582e8df7d563c057581bc118fff1cea79391d6e7"
integrity sha512-s5QSKKB0CTKFWp3CNMC5GH1YOipH1Jjr5P3w+RQTC4Aybo6xPqeWp/UyDW0fxmLRq0e1zgnOMgDQRdxAkoThrw==
"@next/swc-linux-arm64-gnu@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.8.tgz#9536314c931b9e78f20e4a424eace9993015c6e1"
integrity sha512-kdyzYvAYtqQVgzIKNN7e1rLU8aZv86FDSRqPlOkKZlvqudvTO0iohuTPmnEEDlECeBM6qRPShNffotDcU/R2KA==
"@next/swc-linux-arm64-gnu@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.0.tgz#7ee0a43b6635eca1e80a887304b7bfe31254a4a6"
integrity sha512-E0fCKA8F2vfgZWwcv4iq642No75EiACSNUBNGvc5lx/ylqAUdNwE/9+x2SHv+LPUXFhZ6hZLR0Qox/oKgZqFlg==
"@next/swc-linux-arm64-musl@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.8.tgz#a894ec6a078edd28f5cfab60593a61e05b6b605b"
integrity sha512-oWxx4yRkUGcR81XwbI+T0zhZ3bDF6V1aVLpG+C7hSG50ULpV8gC39UxVO22/bv93ZlcfMY4zl8xkz9Klct6dpQ==
"@next/swc-linux-arm64-musl@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.0.tgz#99a1efd6b68a4d0dfdc24b81f14cd8b8251425a9"
integrity sha512-jG/blDDLndFRUcafCQO4TOI3VuoIZh3jQriZ7JaVCgAEZe0D1EUrxKdbBarZ74isutHZ6DpNGRDi/0OHFZpJAA==
"@next/swc-linux-x64-gnu@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.8.tgz#b8af198dc0b4a8c64deb0494ae285e3e1a465910"
integrity sha512-anhtvuO6eE9YRhYnaEGTfbpH3L5gT/9qPFcNoi6xS432r/4DAtpJY8kNktqkTVevVIC/pVumqO8tV59PR3zbNg==
"@next/swc-linux-x64-gnu@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.0.tgz#7c85acd45879a20d8fb102b3212e792924d02e93"
integrity sha512-6JWR7U41uNL6HGwNbGg3Oedt+FN4YuA126sHWKTq3ic5kkhEusIIdVo7+WcswVJl8nTMB1yT3gEPwygQbVYVUA==
"@next/swc-linux-x64-musl@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.8.tgz#d2ad24001020665a78405f595995c22750ec63c4"
integrity sha512-aR+J4wWfNgH1DwCCBNjan7Iumx0lLtn+2/rEYuhIrYLY4vnxqSVGz9u3fXcgUwo6Q9LT8NFkaqK1vPprdq+BXg==
"@next/swc-linux-x64-musl@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.0.tgz#23aad9ab7621f53bb947b727e659d85e74b0e31a"
integrity sha512-uY+wrYfD5QUossqznwidOpJYmmcBwojToZx55shihtbTl6afVYzOxsUbRXLdWmZAa36ckxXpqkvuFNS8icQuug==
"@next/swc-win32-arm64-msvc@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.8.tgz#e5c4bfaa105fbe2bdb21a6d01467edd39a29cf37"
integrity sha512-OWBKIrJwQBTqrat0xhxEB/jcsjJR3+diD9nc/Y8F1mRdQzsn4bPsomgJyuqPVZs6Lz3K18qdIkvywmfSq75SsQ==
"@next/swc-win32-arm64-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.0.tgz#5a45686335e5f54342faf9d9ed25f55a4107ce7f"
integrity sha512-lWZ5vJTULxTOdLcRmrllNgAdDRSDwk8oqJMyDxpqS691NG5uhle9ZwRj3g1F1/vHNkDa+B7PmWhQgG0nmlbKZg==
"@next/swc-win32-ia32-msvc@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.8.tgz#c49c4d9f91845855bf544d5d14e8e13311da9931"
integrity sha512-agiPWGjUndXGTOn4ChbKipQXRA6/UPkywAWIkx7BhgGv48TiJfHTK6MGfBoL9tS6B4mtW39++uy0wFPnfD0JWg==
"@next/swc-win32-ia32-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.0.tgz#b9990965762aaa109bdeb7b49cbdc7e4af7f9014"
integrity sha512-jirQXnVCU9hi3cHzgd33d4qSBXn1/0gUT/KtXqy9Ux9OTcIcjJT3TcAzoLJLTdhRg7op3MZoSnuFeWl8kmGGNw==
"@next/swc-win32-x64-msvc@13.4.8":
version "13.4.8"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.8.tgz#22c5c8fa05680f2775a29c6c5a74cf04b8cc9d90"
integrity sha512-UIRKoByVKbuR6SnFG4JM8EMFlJrfEGuUQ1ihxzEleWcNwRMMiVaCj1KyqfTOW8VTQhJ0u8P1Ngg6q1RwnIBTtw==
"@next/swc-win32-x64-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.0.tgz#4385c5d9c0db39c2623aed566b3ec7fedaf6f190"
integrity sha512-Q8QYLyWcMMUp3DohI04VyJbLNCfFMNTxYNhujvJD2lowuqnqApUBP2DxI/jCZRMFWgKi76n5u8UboLVeYXn6jA==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
@@ -136,10 +136,10 @@
resolved "https://registry.yarnpkg.com/@payloadcms/eslint-config/-/eslint-config-0.0.2.tgz#cadb97ccd6476204a38e057b3cf57dc80efb209f"
integrity sha512-EcS7qyX4++eBP/MS4QgrFOzzplsVMaPDfEcxWYoH9OLJCUTlGz8UmfMZPWU7DeAuyehJdij+BywSrcprqun9rA==
"@swc/helpers@0.5.1":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.1.tgz#e9031491aa3f26bfcc974a67f48bd456c8a5357a"
integrity sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==
"@swc/helpers@0.5.2":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d"
integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==
dependencies:
tslib "^2.4.0"
@@ -1392,13 +1392,13 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
next@^13.4.8:
version "13.4.8"
resolved "https://registry.yarnpkg.com/next/-/next-13.4.8.tgz#72245bf4fdf328970147ee30de97142c39b1cb3f"
integrity sha512-lxUjndYKjZHGK3CWeN2RI+/6ni6EUvjiqGWXAYPxUfGIdFGQ5XoisrqAJ/dF74aP27buAfs8MKIbIMMdxjqSBg==
next@^13.5.0:
version "13.5.0"
resolved "https://registry.yarnpkg.com/next/-/next-13.5.0.tgz#3a3ce5b8c89c4fff9c6f0b2452bcb03f63d8c84c"
integrity sha512-mhguN5JPZXhhrD/nNcezXgKoxN8GT8xZvvGhUQV2ETiaNm+KHRWT1rCbrF5FlbG2XCcLRKOmOe3D5YQgXmJrDQ==
dependencies:
"@next/env" "13.4.8"
"@swc/helpers" "0.5.1"
"@next/env" "13.5.0"
"@swc/helpers" "0.5.2"
busboy "1.6.0"
caniuse-lite "^1.0.30001406"
postcss "8.4.14"
@@ -1406,15 +1406,15 @@ next@^13.4.8:
watchpack "2.4.0"
zod "3.21.4"
optionalDependencies:
"@next/swc-darwin-arm64" "13.4.8"
"@next/swc-darwin-x64" "13.4.8"
"@next/swc-linux-arm64-gnu" "13.4.8"
"@next/swc-linux-arm64-musl" "13.4.8"
"@next/swc-linux-x64-gnu" "13.4.8"
"@next/swc-linux-x64-musl" "13.4.8"
"@next/swc-win32-arm64-msvc" "13.4.8"
"@next/swc-win32-ia32-msvc" "13.4.8"
"@next/swc-win32-x64-msvc" "13.4.8"
"@next/swc-darwin-arm64" "13.5.0"
"@next/swc-darwin-x64" "13.5.0"
"@next/swc-linux-arm64-gnu" "13.5.0"
"@next/swc-linux-arm64-musl" "13.5.0"
"@next/swc-linux-x64-gnu" "13.5.0"
"@next/swc-linux-x64-musl" "13.5.0"
"@next/swc-win32-arm64-msvc" "13.5.0"
"@next/swc-win32-ia32-msvc" "13.5.0"
"@next/swc-win32-x64-msvc" "13.5.0"
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"

View File

@@ -14,7 +14,7 @@
"@faceless-ui/modal": "^2.0.1",
"escape-html": "^1.0.3",
"graphql": "^16.8.1",
"next": "12.3.1",
"next": "13.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.41.0",

View File

@@ -224,10 +224,10 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
"@next/env@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.3.1.tgz#18266bd92de3b4aa4037b1927aa59e6f11879260"
integrity sha512-9P9THmRFVKGKt9DYqeC2aKIxm8rlvkK38V1P1sRE7qyoPBIs8l9oo79QoSdPtOWfzkbDAVUqvbQGgTMsb8BtJg==
"@next/env@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.5.0.tgz#a61dee2f29b09985847eabcc4c8a815031267a36"
integrity sha512-mxhf/BskjPURT+qEjNP7wBvqre2q6OXEIbydF8BrH+duSSJQnB4/vzzuJDoahYwTXiUaXpouAnMWHZdG0HU62g==
"@next/eslint-plugin-next@12.3.1":
version "12.3.1"
@@ -236,70 +236,50 @@
dependencies:
glob "7.1.7"
"@next/swc-android-arm-eabi@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.3.1.tgz#b15ce8ad376102a3b8c0f3c017dde050a22bb1a3"
integrity sha512-i+BvKA8tB//srVPPQxIQN5lvfROcfv4OB23/L1nXznP+N/TyKL8lql3l7oo2LNhnH66zWhfoemg3Q4VJZSruzQ==
"@next/swc-darwin-arm64@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.0.tgz#45ea191e13593088572d0048d4ddfc1fcdb3c8ed"
integrity sha512-DavPD8oRjSoCRJana5DCAWdRZ4nbS7/pPw13DlnukFfMPJUk5hCAC3+NbqEyekS/X1IBFdZWSV2lJIdzTn4s6w==
"@next/swc-android-arm64@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.3.1.tgz#85d205f568a790a137cb3c3f720d961a2436ac9c"
integrity sha512-CmgU2ZNyBP0rkugOOqLnjl3+eRpXBzB/I2sjwcGZ7/Z6RcUJXK5Evz+N0ucOxqE4cZ3gkTeXtSzRrMK2mGYV8Q==
"@next/swc-darwin-x64@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.0.tgz#582e8df7d563c057581bc118fff1cea79391d6e7"
integrity sha512-s5QSKKB0CTKFWp3CNMC5GH1YOipH1Jjr5P3w+RQTC4Aybo6xPqeWp/UyDW0fxmLRq0e1zgnOMgDQRdxAkoThrw==
"@next/swc-darwin-arm64@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.3.1.tgz#b105457d6760a7916b27e46c97cb1a40547114ae"
integrity sha512-hT/EBGNcu0ITiuWDYU9ur57Oa4LybD5DOQp4f22T6zLfpoBMfBibPtR8XktXmOyFHrL/6FC2p9ojdLZhWhvBHg==
"@next/swc-linux-arm64-gnu@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.0.tgz#7ee0a43b6635eca1e80a887304b7bfe31254a4a6"
integrity sha512-E0fCKA8F2vfgZWwcv4iq642No75EiACSNUBNGvc5lx/ylqAUdNwE/9+x2SHv+LPUXFhZ6hZLR0Qox/oKgZqFlg==
"@next/swc-darwin-x64@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.3.1.tgz#6947b39082271378896b095b6696a7791c6e32b1"
integrity sha512-9S6EVueCVCyGf2vuiLiGEHZCJcPAxglyckTZcEwLdJwozLqN0gtS0Eq0bQlGS3dH49Py/rQYpZ3KVWZ9BUf/WA==
"@next/swc-linux-arm64-musl@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.0.tgz#99a1efd6b68a4d0dfdc24b81f14cd8b8251425a9"
integrity sha512-jG/blDDLndFRUcafCQO4TOI3VuoIZh3jQriZ7JaVCgAEZe0D1EUrxKdbBarZ74isutHZ6DpNGRDi/0OHFZpJAA==
"@next/swc-freebsd-x64@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.3.1.tgz#2b6c36a4d84aae8b0ea0e0da9bafc696ae27085a"
integrity sha512-qcuUQkaBZWqzM0F1N4AkAh88lLzzpfE6ImOcI1P6YeyJSsBmpBIV8o70zV+Wxpc26yV9vpzb+e5gCyxNjKJg5Q==
"@next/swc-linux-x64-gnu@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.0.tgz#7c85acd45879a20d8fb102b3212e792924d02e93"
integrity sha512-6JWR7U41uNL6HGwNbGg3Oedt+FN4YuA126sHWKTq3ic5kkhEusIIdVo7+WcswVJl8nTMB1yT3gEPwygQbVYVUA==
"@next/swc-linux-arm-gnueabihf@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.3.1.tgz#6e421c44285cfedac1f4631d5de330dd60b86298"
integrity sha512-diL9MSYrEI5nY2wc/h/DBewEDUzr/DqBjIgHJ3RUNtETAOB3spMNHvJk2XKUDjnQuluLmFMloet9tpEqU2TT9w==
"@next/swc-linux-x64-musl@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.0.tgz#23aad9ab7621f53bb947b727e659d85e74b0e31a"
integrity sha512-uY+wrYfD5QUossqznwidOpJYmmcBwojToZx55shihtbTl6afVYzOxsUbRXLdWmZAa36ckxXpqkvuFNS8icQuug==
"@next/swc-linux-arm64-gnu@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.3.1.tgz#8863f08a81f422f910af126159d2cbb9552ef717"
integrity sha512-o/xB2nztoaC7jnXU3Q36vGgOolJpsGG8ETNjxM1VAPxRwM7FyGCPHOMk1XavG88QZSQf+1r+POBW0tLxQOJ9DQ==
"@next/swc-win32-arm64-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.0.tgz#5a45686335e5f54342faf9d9ed25f55a4107ce7f"
integrity sha512-lWZ5vJTULxTOdLcRmrllNgAdDRSDwk8oqJMyDxpqS691NG5uhle9ZwRj3g1F1/vHNkDa+B7PmWhQgG0nmlbKZg==
"@next/swc-linux-arm64-musl@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.3.1.tgz#0038f07cf0b259d70ae0c80890d826dfc775d9f3"
integrity sha512-2WEasRxJzgAmP43glFNhADpe8zB7kJofhEAVNbDJZANp+H4+wq+/cW1CdDi8DqjkShPEA6/ejJw+xnEyDID2jg==
"@next/swc-win32-ia32-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.0.tgz#b9990965762aaa109bdeb7b49cbdc7e4af7f9014"
integrity sha512-jirQXnVCU9hi3cHzgd33d4qSBXn1/0gUT/KtXqy9Ux9OTcIcjJT3TcAzoLJLTdhRg7op3MZoSnuFeWl8kmGGNw==
"@next/swc-linux-x64-gnu@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.3.1.tgz#c66468f5e8181ffb096c537f0dbfb589baa6a9c1"
integrity sha512-JWEaMyvNrXuM3dyy9Pp5cFPuSSvG82+yABqsWugjWlvfmnlnx9HOQZY23bFq3cNghy5V/t0iPb6cffzRWylgsA==
"@next/swc-linux-x64-musl@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.3.1.tgz#c6269f3e96ac0395bc722ad97ce410ea5101d305"
integrity sha512-xoEWQQ71waWc4BZcOjmatuvPUXKTv6MbIFzpm4LFeCHsg2iwai0ILmNXf81rJR+L1Wb9ifEke2sQpZSPNz1Iyg==
"@next/swc-win32-arm64-msvc@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.3.1.tgz#83c639ee969cee36ce247c3abd1d9df97b5ecade"
integrity sha512-hswVFYQYIeGHE2JYaBVtvqmBQ1CppplQbZJS/JgrVI3x2CurNhEkmds/yqvDONfwfbttTtH4+q9Dzf/WVl3Opw==
"@next/swc-win32-ia32-msvc@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.3.1.tgz#52995748b92aa8ad053440301bc2c0d9fbcf27c2"
integrity sha512-Kny5JBehkTbKPmqulr5i+iKntO5YMP+bVM8Hf8UAmjSMVo3wehyLVc9IZkNmcbxi+vwETnQvJaT5ynYBkJ9dWA==
"@next/swc-win32-x64-msvc@12.3.1":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.3.1.tgz#27d71a95247a9eaee03d47adee7e3bd594514136"
integrity sha512-W1ijvzzg+kPEX6LAc+50EYYSEo0FVu7dmTE+t+DM4iOLqgGHoW9uYSz9wCVdkXOEEMP9xhXfGpcSxsfDucyPkA==
"@next/swc-win32-x64-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.0.tgz#4385c5d9c0db39c2623aed566b3ec7fedaf6f190"
integrity sha512-Q8QYLyWcMMUp3DohI04VyJbLNCfFMNTxYNhujvJD2lowuqnqApUBP2DxI/jCZRMFWgKi76n5u8UboLVeYXn6jA==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
@@ -327,10 +307,10 @@
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz#8be36a1f66f3265389e90b5f9c9962146758f728"
integrity sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==
"@swc/helpers@0.4.11":
version "0.4.11"
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.11.tgz#db23a376761b3d31c26502122f349a21b592c8de"
integrity sha512-rEUrBSGIoSFuYxwBYtlUFMlE2CwGhmW+w9355/5oduSw8e5h2+Tj4UrAGNNgP9915++wj5vkQo0UuOBqOAq4nw==
"@swc/helpers@0.5.2":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d"
integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==
dependencies:
tslib "^2.4.0"
@@ -616,6 +596,13 @@ braces@^3.0.2, braces@~3.0.2:
dependencies:
fill-range "^7.0.1"
busboy@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==
dependencies:
streamsearch "^1.1.0"
call-bind@^1.0.0, call-bind@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"
@@ -666,6 +653,11 @@ chalk@^4.0.0:
optionalDependencies:
fsevents "~2.3.2"
client-only@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1"
integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==
color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
@@ -1276,6 +1268,11 @@ glob-parent@^6.0.1:
dependencies:
is-glob "^4.0.3"
glob-to-regexp@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
glob@7.1.7:
version "7.1.7"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
@@ -1333,6 +1330,11 @@ gopd@^1.0.1:
dependencies:
get-intrinsic "^1.1.3"
graceful-fs@^4.1.2:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
grapheme-splitter@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
@@ -1778,31 +1780,29 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
next@12.3.1:
version "12.3.1"
resolved "https://registry.yarnpkg.com/next/-/next-12.3.1.tgz#127b825ad2207faf869b33393ec8c75fe61e50f1"
integrity sha512-l7bvmSeIwX5lp07WtIiP9u2ytZMv7jIeB8iacR28PuUEFG5j0HGAPnMqyG5kbZNBG2H7tRsrQ4HCjuMOPnANZw==
next@13.5.0:
version "13.5.0"
resolved "https://registry.yarnpkg.com/next/-/next-13.5.0.tgz#3a3ce5b8c89c4fff9c6f0b2452bcb03f63d8c84c"
integrity sha512-mhguN5JPZXhhrD/nNcezXgKoxN8GT8xZvvGhUQV2ETiaNm+KHRWT1rCbrF5FlbG2XCcLRKOmOe3D5YQgXmJrDQ==
dependencies:
"@next/env" "12.3.1"
"@swc/helpers" "0.4.11"
"@next/env" "13.5.0"
"@swc/helpers" "0.5.2"
busboy "1.6.0"
caniuse-lite "^1.0.30001406"
postcss "8.4.14"
styled-jsx "5.0.7"
use-sync-external-store "1.2.0"
styled-jsx "5.1.1"
watchpack "2.4.0"
zod "3.21.4"
optionalDependencies:
"@next/swc-android-arm-eabi" "12.3.1"
"@next/swc-android-arm64" "12.3.1"
"@next/swc-darwin-arm64" "12.3.1"
"@next/swc-darwin-x64" "12.3.1"
"@next/swc-freebsd-x64" "12.3.1"
"@next/swc-linux-arm-gnueabihf" "12.3.1"
"@next/swc-linux-arm64-gnu" "12.3.1"
"@next/swc-linux-arm64-musl" "12.3.1"
"@next/swc-linux-x64-gnu" "12.3.1"
"@next/swc-linux-x64-musl" "12.3.1"
"@next/swc-win32-arm64-msvc" "12.3.1"
"@next/swc-win32-ia32-msvc" "12.3.1"
"@next/swc-win32-x64-msvc" "12.3.1"
"@next/swc-darwin-arm64" "13.5.0"
"@next/swc-darwin-x64" "13.5.0"
"@next/swc-linux-arm64-gnu" "13.5.0"
"@next/swc-linux-arm64-musl" "13.5.0"
"@next/swc-linux-x64-gnu" "13.5.0"
"@next/swc-linux-x64-musl" "13.5.0"
"@next/swc-win32-arm64-msvc" "13.5.0"
"@next/swc-win32-ia32-msvc" "13.5.0"
"@next/swc-win32-x64-msvc" "13.5.0"
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
@@ -2229,6 +2229,11 @@ stop-iteration-iterator@^1.0.0:
dependencies:
internal-slot "^1.0.4"
streamsearch@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764"
integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==
string.prototype.matchall@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3"
@@ -2278,10 +2283,12 @@ strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==
styled-jsx@5.0.7:
version "5.0.7"
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.7.tgz#be44afc53771b983769ac654d355ca8d019dff48"
integrity sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==
styled-jsx@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f"
integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==
dependencies:
client-only "0.0.1"
stylis@4.1.3:
version "4.1.3"
@@ -2421,10 +2428,13 @@ use-isomorphic-layout-effect@^1.1.2:
resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb"
integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==
use-sync-external-store@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
watchpack@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"
integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==
dependencies:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"
which-boxed-primitive@^1.0.2:
version "1.0.2"
@@ -2502,3 +2512,8 @@ zen-observable@0.8.15:
version "0.8.15"
resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15"
integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==
zod@3.21.4:
version "3.21.4"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db"
integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==

View File

@@ -10,7 +10,7 @@
},
"dependencies": {
"escape-html": "^1.0.3",
"next": "^13.1.6",
"next": "^13.5.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"sass": "^1.55.0",

View File

@@ -36,10 +36,10 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==
"@next/env@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.2.1.tgz#082d42cfc0c794e9185d7b4133d71440ba2e795d"
integrity sha512-Hq+6QZ6kgmloCg8Kgrix+4F0HtvLqVK3FZAnlAoS0eonaDemHe1Km4kwjSWRE3JNpJNcKxFHF+jsZrYo0SxWoQ==
"@next/env@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/env/-/env-13.5.0.tgz#a61dee2f29b09985847eabcc4c8a815031267a36"
integrity sha512-mxhf/BskjPURT+qEjNP7wBvqre2q6OXEIbydF8BrH+duSSJQnB4/vzzuJDoahYwTXiUaXpouAnMWHZdG0HU62g==
"@next/eslint-plugin-next@^13.1.6":
version "13.2.1"
@@ -48,70 +48,50 @@
dependencies:
glob "7.1.7"
"@next/swc-android-arm-eabi@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.2.1.tgz#67f2580fbbe05ee006220688972c5e3a555fc741"
integrity sha512-Yua7mUpEd1wzIT6Jjl3dpRizIfGp9NR4F2xeRuQv+ae+SDI1Em2WyM9m46UL+oeW5GpMiEHoaBagr47RScZFmQ==
"@next/swc-darwin-arm64@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.0.tgz#45ea191e13593088572d0048d4ddfc1fcdb3c8ed"
integrity sha512-DavPD8oRjSoCRJana5DCAWdRZ4nbS7/pPw13DlnukFfMPJUk5hCAC3+NbqEyekS/X1IBFdZWSV2lJIdzTn4s6w==
"@next/swc-android-arm64@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-13.2.1.tgz#460a02b69eb23bb5f402266bcea9cadae59415c1"
integrity sha512-Bifcr2f6VwInOdq1uH/9lp8fH7Nf7XGkIx4XceVd32LPJqG2c6FZU8ZRBvTdhxzXVpt5TPtuXhOP4Ij9UPqsVw==
"@next/swc-darwin-x64@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.0.tgz#582e8df7d563c057581bc118fff1cea79391d6e7"
integrity sha512-s5QSKKB0CTKFWp3CNMC5GH1YOipH1Jjr5P3w+RQTC4Aybo6xPqeWp/UyDW0fxmLRq0e1zgnOMgDQRdxAkoThrw==
"@next/swc-darwin-arm64@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.2.1.tgz#8b8530ff417802027471aee2419f78a58a863ccb"
integrity sha512-gvqm+fGMYxAkwBapH0Vvng5yrb6HTkIvZfY4oEdwwYrwuLdkjqnJygCMgpNqIFmAHSXgtlWxfYv1VC8sjN81Kw==
"@next/swc-linux-arm64-gnu@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.0.tgz#7ee0a43b6635eca1e80a887304b7bfe31254a4a6"
integrity sha512-E0fCKA8F2vfgZWwcv4iq642No75EiACSNUBNGvc5lx/ylqAUdNwE/9+x2SHv+LPUXFhZ6hZLR0Qox/oKgZqFlg==
"@next/swc-darwin-x64@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.2.1.tgz#80aebb3329a1e4568a28de1ee177780b3d50330c"
integrity sha512-HGqVqmaZWj6zomqOZUVbO5NhlABL0iIaxTmd0O5B0MoMa5zpDGoaHSG+fxgcWMXcGcxmUNchv1NfNOYiTKoHOg==
"@next/swc-linux-arm64-musl@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.0.tgz#99a1efd6b68a4d0dfdc24b81f14cd8b8251425a9"
integrity sha512-jG/blDDLndFRUcafCQO4TOI3VuoIZh3jQriZ7JaVCgAEZe0D1EUrxKdbBarZ74isutHZ6DpNGRDi/0OHFZpJAA==
"@next/swc-freebsd-x64@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.2.1.tgz#250ea2ab7e1734f22d11c677c463fab9ac33a516"
integrity sha512-N/a4JarAq+E+g+9K2ywJUmDIgU2xs2nA+BBldH0oq4zYJMRiUhL0iaN9G4e72VmGOJ61L/3W6VN8RIUOwTLoqQ==
"@next/swc-linux-x64-gnu@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.0.tgz#7c85acd45879a20d8fb102b3212e792924d02e93"
integrity sha512-6JWR7U41uNL6HGwNbGg3Oedt+FN4YuA126sHWKTq3ic5kkhEusIIdVo7+WcswVJl8nTMB1yT3gEPwygQbVYVUA==
"@next/swc-linux-arm-gnueabihf@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.2.1.tgz#fe6bb29ed348a5f8ecae3740df22a8d8130c474a"
integrity sha512-WaFoerF/eRbhbE57TaIGJXbQAERADZ/RZ45u6qox9beb5xnWsyYgzX+WuN7Tkhyvga0/aMuVYFzS9CEay7D+bw==
"@next/swc-linux-x64-musl@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.0.tgz#23aad9ab7621f53bb947b727e659d85e74b0e31a"
integrity sha512-uY+wrYfD5QUossqznwidOpJYmmcBwojToZx55shihtbTl6afVYzOxsUbRXLdWmZAa36ckxXpqkvuFNS8icQuug==
"@next/swc-linux-arm64-gnu@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.2.1.tgz#4781b927fc5e421f3cea2b29e5d38e5e4837b198"
integrity sha512-R+Jhc1/RJTnncE9fkePboHDNOCm1WJ8daanWbjKhfPySMyeniKYRwGn5SLYW3S8YlRS0QVdZaaszDSZWgUcsmA==
"@next/swc-win32-arm64-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.0.tgz#5a45686335e5f54342faf9d9ed25f55a4107ce7f"
integrity sha512-lWZ5vJTULxTOdLcRmrllNgAdDRSDwk8oqJMyDxpqS691NG5uhle9ZwRj3g1F1/vHNkDa+B7PmWhQgG0nmlbKZg==
"@next/swc-linux-arm64-musl@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.2.1.tgz#c2ba0a121b0255ba62450916bc70e6d0e26cbc98"
integrity sha512-oI1UfZPidGAVddlL2eOTmfsuKV9EaT1aktIzVIxIAgxzQSdwsV371gU3G55ggkurzfdlgF3GThFePDWF0d8dmw==
"@next/swc-win32-ia32-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.0.tgz#b9990965762aaa109bdeb7b49cbdc7e4af7f9014"
integrity sha512-jirQXnVCU9hi3cHzgd33d4qSBXn1/0gUT/KtXqy9Ux9OTcIcjJT3TcAzoLJLTdhRg7op3MZoSnuFeWl8kmGGNw==
"@next/swc-linux-x64-gnu@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.2.1.tgz#573c220f8b087e5d131d1fba58d3e1a670b220ad"
integrity sha512-PCygPwrQmS+7WUuAWWioWMZCzZm4PG91lfRxToLDg7yIm/3YfAw5N2EK2TaM9pzlWdvHQAqRMX/oLvv027xUiA==
"@next/swc-linux-x64-musl@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.2.1.tgz#950b5bb920b322ca7b447efbd12a9c7a10c3a642"
integrity sha512-sUAKxo7CFZYGHNxheGh9nIBElLYBM6md/liEGfOTwh/xna4/GTTcmkGWkF7PdnvaYNgcPIQgHIMYiAa6yBKAVw==
"@next/swc-win32-arm64-msvc@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.2.1.tgz#dbff3c4f5a3812a7059dac05804148a0f98682db"
integrity sha512-qDmyEjDBpl/vBXxuOOKKWmPQOcARcZIMach1s7kjzaien0SySut/PHRlj56sosa81Wt4hTGhfhZ1R7g1n7+B8w==
"@next/swc-win32-ia32-msvc@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.2.1.tgz#7d2c17be7b8d9963984f5c15cc2588127101f620"
integrity sha512-2joqFQ81ZYPg6DcikIzQn3DgjKglNhPAozx6dL5sCNkr1CPMD0YIkJgT3CnYyMHQ04Qi3Npv0XX3MD6LJO8OCA==
"@next/swc-win32-x64-msvc@13.2.1":
version "13.2.1"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.2.1.tgz#09713c6a925461f414e89422851326d1625bd4d2"
integrity sha512-r3+0fSaIZT6N237iMzwUhfNwjhAFvXjqB+4iuW+wcpxW+LHm1g/IoxN8eSRcb8jPItC86JxjAxpke0QL97qd6g==
"@next/swc-win32-x64-msvc@13.5.0":
version "13.5.0"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.0.tgz#4385c5d9c0db39c2623aed566b3ec7fedaf6f190"
integrity sha512-Q8QYLyWcMMUp3DohI04VyJbLNCfFMNTxYNhujvJD2lowuqnqApUBP2DxI/jCZRMFWgKi76n5u8UboLVeYXn6jA==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
@@ -139,10 +119,10 @@
resolved "https://registry.yarnpkg.com/@payloadcms/eslint-config/-/eslint-config-0.0.1.tgz#4324702ddef6c773b3f3033795a13e6b50c95a92"
integrity sha512-Il59+0C4E/bI6uM2hont3I+oABWkJZbfbItubje5SGMrXkymUq8jT/UZRk0eCt918bB7gihxDXx8guFnR/aNIw==
"@swc/helpers@0.4.14":
version "0.4.14"
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.4.14.tgz#1352ac6d95e3617ccb7c1498ff019654f1e12a74"
integrity sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==
"@swc/helpers@0.5.2":
version "0.5.2"
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d"
integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==
dependencies:
tslib "^2.4.0"
@@ -370,6 +350,13 @@ braces@^3.0.2, braces@~3.0.2:
dependencies:
fill-range "^7.0.1"
busboy@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==
dependencies:
streamsearch "^1.1.0"
call-bind@^1.0.0, call-bind@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c"
@@ -899,6 +886,11 @@ glob-parent@^6.0.1:
dependencies:
is-glob "^4.0.3"
glob-to-regexp@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
glob@7.1.7:
version "7.1.7"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90"
@@ -956,6 +948,11 @@ gopd@^1.0.1:
dependencies:
get-intrinsic "^1.1.3"
graceful-fs@^4.1.2:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
grapheme-splitter@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
@@ -1331,30 +1328,29 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
next@^13.1.6:
version "13.2.1"
resolved "https://registry.yarnpkg.com/next/-/next-13.2.1.tgz#34d823f518632b36379863228ed9f861c335b9c0"
integrity sha512-qhgJlDtG0xidNViJUPeQHLGJJoT4zDj/El7fP3D3OzpxJDUfxsm16cK4WTMyvSX1ciIfAq05u+0HqFAa+VJ+Hg==
next@^13.5.0:
version "13.5.0"
resolved "https://registry.yarnpkg.com/next/-/next-13.5.0.tgz#3a3ce5b8c89c4fff9c6f0b2452bcb03f63d8c84c"
integrity sha512-mhguN5JPZXhhrD/nNcezXgKoxN8GT8xZvvGhUQV2ETiaNm+KHRWT1rCbrF5FlbG2XCcLRKOmOe3D5YQgXmJrDQ==
dependencies:
"@next/env" "13.2.1"
"@swc/helpers" "0.4.14"
"@next/env" "13.5.0"
"@swc/helpers" "0.5.2"
busboy "1.6.0"
caniuse-lite "^1.0.30001406"
postcss "8.4.14"
styled-jsx "5.1.1"
watchpack "2.4.0"
zod "3.21.4"
optionalDependencies:
"@next/swc-android-arm-eabi" "13.2.1"
"@next/swc-android-arm64" "13.2.1"
"@next/swc-darwin-arm64" "13.2.1"
"@next/swc-darwin-x64" "13.2.1"
"@next/swc-freebsd-x64" "13.2.1"
"@next/swc-linux-arm-gnueabihf" "13.2.1"
"@next/swc-linux-arm64-gnu" "13.2.1"
"@next/swc-linux-arm64-musl" "13.2.1"
"@next/swc-linux-x64-gnu" "13.2.1"
"@next/swc-linux-x64-musl" "13.2.1"
"@next/swc-win32-arm64-msvc" "13.2.1"
"@next/swc-win32-ia32-msvc" "13.2.1"
"@next/swc-win32-x64-msvc" "13.2.1"
"@next/swc-darwin-arm64" "13.5.0"
"@next/swc-darwin-x64" "13.5.0"
"@next/swc-linux-arm64-gnu" "13.5.0"
"@next/swc-linux-arm64-musl" "13.5.0"
"@next/swc-linux-x64-gnu" "13.5.0"
"@next/swc-linux-x64-musl" "13.5.0"
"@next/swc-win32-arm64-msvc" "13.5.0"
"@next/swc-win32-ia32-msvc" "13.5.0"
"@next/swc-win32-x64-msvc" "13.5.0"
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
@@ -1642,6 +1638,11 @@ slate@^0.84.0:
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
streamsearch@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764"
integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==
string.prototype.trimend@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533"
@@ -1783,6 +1784,14 @@ uri-js@^4.2.2:
dependencies:
punycode "^2.1.0"
watchpack@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"
integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==
dependencies:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"
which-boxed-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6"
@@ -1832,3 +1841,8 @@ yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
zod@3.21.4:
version "3.21.4"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db"
integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==

View File

@@ -40,6 +40,10 @@
"@swc/register": "0.1.10",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "13.4.0",
"@types/concat-stream": "^2.0.1",
"@types/conventional-changelog": "^3.1.4",
"@types/conventional-changelog-core": "^4.2.5",
"@types/conventional-changelog-preset-loader": "^2.3.4",
"@types/fs-extra": "^11.0.2",
"@types/jest": "29.5.4",
"@types/minimist": "1.2.2",
@@ -50,8 +54,13 @@
"@types/semver": "^7.5.3",
"@types/shelljs": "0.8.12",
"@types/testing-library__jest-dom": "5.14.8",
"add-stream": "^1.0.0",
"chalk": "^5.3.0",
"chalk-template": "1.1.0",
"concat-stream": "^2.0.0",
"conventional-changelog": "^5.1.0",
"conventional-changelog-core": "^7.0.0",
"conventional-changelog-preset-loader": "^4.1.0",
"copyfiles": "2.4.1",
"cross-env": "7.0.3",
"dotenv": "8.6.0",
@@ -59,6 +68,7 @@
"form-data": "3.0.1",
"fs-extra": "10.1.0",
"get-port": "5.1.1",
"get-stream": "6.0.1",
"glob": "8.1.0",
"graphql-request": "6.1.0",
"husky": "^8.0.3",
@@ -74,12 +84,14 @@
"prettier": "^3.0.3",
"prompts": "2.4.2",
"qs": "6.11.2",
"read-stream": "^2.1.1",
"rimraf": "3.0.2",
"semver": "^7.5.4",
"shelljs": "0.8.5",
"simple-git": "^3.20.0",
"slash": "3.0.0",
"slate": "0.91.4",
"tempfile": "^3.0.0",
"ts-node": "10.9.1",
"tsx": "^3.13.0",
"turbo": "^1.10.15",

View File

@@ -78,7 +78,6 @@ export const getBaseConfig = (payloadConfig: SanitizedConfig): Configuration =>
filename: path.normalize('./index.html'),
template: payloadConfig.admin.indexHTML,
}),
new webpack.HotModuleReplacementPlugin(),
],
resolve: {
alias: {

View File

@@ -8,7 +8,7 @@
"scripts": {
"build": "pnpm build:swc",
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
"clean": "rimraf dist",
"clean": "rimraf {dist,*.tsbuildinfo}",
"test": "jest",
"prepublishOnly": "pnpm test && pnpm clean && pnpm build"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/db-mongodb",
"version": "1.0.4",
"version": "1.0.5",
"description": "The officially supported MongoDB database adapter for Payload",
"repository": "https://github.com/payloadcms/payload",
"license": "MIT",

View File

@@ -1,10 +1,11 @@
import type { Create } from 'payload/database'
import type { PayloadRequest } from 'payload/types'
import type { Document } from 'payload/types'
import type { Document, PayloadRequest } from 'payload/types'
import type { MongooseAdapter } from '.'
import { withSession } from './withSession'
import { ValidationError } from 'payload/errors'
import { i18nInit } from 'payload/utilities'
export const create: Create = async function create(
this: MongooseAdapter,
@@ -12,8 +13,23 @@ export const create: Create = async function create(
) {
const Model = this.collections[collection]
const options = withSession(this, req.transactionID)
const [doc] = await Model.create([data], options)
let doc
try {
;[doc] = await Model.create([data], options)
} catch (error) {
// Handle uniqueness error from MongoDB
throw error.code === 11000 && error.keyValue
? new ValidationError(
[
{
field: Object.keys(error.keyValue)[0],
message: req.t('error:valueMustBeUnique'),
},
],
req?.t ?? i18nInit(this.payload.config.i18n).t,
)
: error
}
// doc.toJSON does not do stuff like converting ObjectIds to string, or date strings to date objects. That's why we use JSON.parse/stringify here
const result: Document = JSON.parse(JSON.stringify(doc))

View File

@@ -42,6 +42,8 @@ export const find: Find = async function find(
where,
})
// useEstimatedCount is faster, but not accurate, as it ignores any filters. It is thus set to true if there are no filters.
const useEstimatedCount = hasNearConstraint || !query || Object.keys(query).length === 0
const paginationOptions: PaginateOptions = {
forceCountFn: hasNearConstraint,
lean: true,
@@ -50,7 +52,18 @@ export const find: Find = async function find(
page,
pagination,
sort,
useEstimatedCount: hasNearConstraint,
useEstimatedCount,
}
if (!useEstimatedCount) {
// Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding a hint.
paginationOptions.useCustomCountFn = () => {
return Promise.resolve(
Model.countDocuments(query, {
hint: { _id: 1 },
}),
)
}
}
if (limit > 0) {

View File

@@ -60,6 +60,8 @@ export const findGlobalVersions: FindGlobalVersions = async function findGlobalV
where,
})
// useEstimatedCount is faster, but not accurate, as it ignores any filters. It is thus set to true if there are no filters.
const useEstimatedCount = hasNearConstraint || !query || Object.keys(query).length === 0
const paginationOptions: PaginateOptions = {
forceCountFn: hasNearConstraint,
lean: true,
@@ -69,7 +71,18 @@ export const findGlobalVersions: FindGlobalVersions = async function findGlobalV
page,
pagination,
sort,
useEstimatedCount: hasNearConstraint,
useEstimatedCount,
}
if (!useEstimatedCount) {
// Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding a hint.
paginationOptions.useCustomCountFn = () => {
return Promise.resolve(
Model.countDocuments(query, {
hint: { _id: 1 },
}),
)
}
}
if (limit > 0) {

View File

@@ -56,17 +56,30 @@ export const findVersions: FindVersions = async function findVersions(
where,
})
// useEstimatedCount is faster, but not accurate, as it ignores any filters. It is thus set to true if there are no filters.
const useEstimatedCount = hasNearConstraint || !query || Object.keys(query).length === 0
const paginationOptions: PaginateOptions = {
forceCountFn: hasNearConstraint,
lean: true,
leanWithId: true,
limit,
offset: skip,
offset: skip || 0,
options,
page,
pagination,
sort,
useEstimatedCount: hasNearConstraint,
useEstimatedCount,
}
if (!useEstimatedCount) {
// Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding a hint.
paginationOptions.useCustomCountFn = () => {
return Promise.resolve(
Model.countDocuments(query, {
hint: { _id: 1 },
}),
)
}
}
if (limit > 0) {

View File

@@ -44,6 +44,9 @@ export const queryDrafts: QueryDrafts = async function queryDrafts(
where: combinedWhere,
})
// useEstimatedCount is faster, but not accurate, as it ignores any filters. It is thus set to true if there are no filters.
const useEstimatedCount =
hasNearConstraint || !versionQuery || Object.keys(versionQuery).length === 0
const paginationOptions: PaginateOptions = {
forceCountFn: hasNearConstraint,
lean: true,
@@ -52,7 +55,18 @@ export const queryDrafts: QueryDrafts = async function queryDrafts(
page,
pagination,
sort,
useEstimatedCount: hasNearConstraint,
useEstimatedCount,
}
if (!useEstimatedCount) {
// Improve the performance of the countDocuments query which is used if useEstimatedCount is set to false by adding a hint.
paginationOptions.useCustomCountFn = () => {
return Promise.resolve(
VersionModel.countDocuments(versionQuery, {
hint: { _id: 1 },
}),
)
}
}
if (limit > 0) {

View File

@@ -20,6 +20,7 @@ export const create: Create = async function create(
fields: collection.fields,
operation: 'create',
tableName: toSnakeCase(collectionSlug),
req,
})
return result

View File

@@ -21,6 +21,7 @@ export async function createGlobal<T extends TypeWithID>(
fields: globalConfig.fields,
operation: 'create',
tableName: toSnakeCase(slug),
req,
})
return result

View File

@@ -1,8 +1,8 @@
import type { TypeWithVersion } from 'payload/database'
import { type CreateGlobalVersionArgs } from 'payload/database'
import type { PayloadRequest, TypeWithID } from 'payload/types'
import { sql } from 'drizzle-orm'
import { type CreateGlobalVersionArgs } from 'payload/database'
import { buildVersionGlobalFields } from 'payload/versions'
import toSnakeCase from 'to-snake-case'
@@ -30,6 +30,7 @@ export async function createGlobalVersion<T extends TypeWithID>(
fields: buildVersionGlobalFields(global),
operation: 'create',
tableName,
req,
})
const table = this.tables[tableName]

View File

@@ -36,6 +36,7 @@ export async function createVersion<T extends TypeWithID>(
fields: buildVersionCollectionFields(collection),
operation: 'create',
tableName,
req,
})
const table = this.tables[tableName]

View File

@@ -60,6 +60,7 @@ export function postgresAdapter(args: Args): PostgresAdapterResult {
schema: {},
sessions: {},
tables: {},
fieldConstraints: {},
// DatabaseAdapter
beginTransaction,

View File

@@ -1,24 +1,23 @@
/* eslint-disable no-param-reassign */
import type { Relation } from 'drizzle-orm'
import type { IndexBuilder, PgColumnBuilder, UniqueConstraintBuilder } from 'drizzle-orm/pg-core'
import type { Field, TabAsField } from 'payload/types'
import { relations } from 'drizzle-orm'
import type { IndexBuilder, PgColumnBuilder, UniqueConstraintBuilder } from 'drizzle-orm/pg-core'
import {
PgNumericBuilder,
PgVarcharBuilder,
boolean,
index,
integer,
jsonb,
numeric,
pgEnum,
PgNumericBuilder,
PgVarcharBuilder,
text,
timestamp,
varchar,
} from 'drizzle-orm/pg-core'
import { InvalidConfiguration } from 'payload/errors'
import type { Field, TabAsField } from 'payload/types'
import { fieldAffectsData, optionIsObject } from 'payload/types'
import { InvalidConfiguration } from 'payload/errors'
import toSnakeCase from 'to-snake-case'
import type { GenericColumns, PostgresAdapter } from '../types'
@@ -101,7 +100,7 @@ export const traverseFields = ({
columnName = `${columnPrefix || ''}${field.name[0] === '_' ? '_' : ''}${toSnakeCase(
field.name,
)}`
fieldName = `${fieldPrefix || ''}${field.name}`
fieldName = `${fieldPrefix?.replace('.', '_') || ''}${field.name}`
// If field is localized,
// add the column to the locale table instead of main table
@@ -116,10 +115,18 @@ export const traverseFields = ({
!['array', 'blocks', 'group', 'point', 'relationship', 'upload'].includes(field.type) &&
!(field.type === 'number' && field.hasMany === true)
) {
const unique = disableUnique !== true && field.unique
if (unique) {
const constraintValue = `${fieldPrefix || ''}${field.name}`
if (!adapter.fieldConstraints?.[rootTableName]) {
adapter.fieldConstraints[rootTableName] = {}
}
adapter.fieldConstraints[rootTableName][`${columnName}_idx`] = constraintValue
}
targetIndexes[`${field.name}Idx`] = createIndex({
name: fieldName,
columnName,
unique: disableUnique !== true && field.unique,
unique,
})
}
}
@@ -447,7 +454,7 @@ export const traverseFields = ({
columns,
disableNotNull: disableNotNullFromHere,
disableUnique,
fieldPrefix: `${fieldName}_`,
fieldPrefix: `${fieldName}.`,
fields: field.fields,
forceLocalized: field.localized,
indexes,

View File

@@ -61,6 +61,11 @@ export type PostgresAdapter = BaseDatabaseAdapter & {
}
}
tables: Record<string, GenericTable>
/**
* An object keyed on each table, with a key value pair where the constraint name is the key, followed by the dot-notation field name
* Used for returning properly formed errors from unique fields
*/
fieldConstraints: Record<string, Record<string, string>>
}
export type PostgresAdapterResult = (args: { payload: Payload }) => PostgresAdapter
@@ -86,5 +91,6 @@ declare module 'payload' {
}
}
tables: Record<string, GenericTable>
fieldConstraints: Record<string, Record<string, string>>
}
}

View File

@@ -3,9 +3,8 @@ import type { UpdateOne } from 'payload/database'
import toSnakeCase from 'to-snake-case'
import type { ChainedMethods } from './find/chainMethods'
import type { PostgresAdapter } from './types'
import { chainMethods } from './find/chainMethods'
import type { PostgresAdapter } from './types'
import buildQuery from './queries/buildQuery'
import { upsertRow } from './upsertRow'
@@ -72,6 +71,7 @@ export const updateOne: UpdateOne = async function updateOne(
fields: collection.fields,
operation: 'update',
tableName: toSnakeCase(collectionSlug),
req,
})
return result

View File

@@ -24,6 +24,7 @@ export async function updateGlobal<T extends TypeWithID>(
db,
fields: globalConfig.fields,
tableName,
req,
})
return result

View File

@@ -1,5 +1,4 @@
import type { TypeWithVersion } from 'payload/database'
import type { UpdateGlobalVersionArgs } from 'payload/database'
import type { TypeWithVersion, UpdateGlobalVersionArgs } from 'payload/database'
import type { PayloadRequest, SanitizedGlobalConfig, TypeWithID } from 'payload/types'
import { buildVersionGlobalFields } from 'payload/versions'
@@ -46,6 +45,7 @@ export async function updateGlobalVersion<T extends TypeWithID>(
operation: 'update',
tableName,
where,
req,
})
return result

View File

@@ -43,6 +43,7 @@ export async function updateVersion<T extends TypeWithID>(
operation: 'update',
tableName,
where,
req,
})
return result

View File

@@ -12,6 +12,8 @@ import { transformForWrite } from '../transform/write'
import { deleteExistingArrayRows } from './deleteExistingArrayRows'
import { deleteExistingRowsByPath } from './deleteExistingRowsByPath'
import { insertArrays } from './insertArrays'
import { ValidationError } from 'payload/errors'
import { i18nInit } from 'payload/utilities'
export const upsertRow = async <T extends TypeWithID>({
id,
@@ -21,6 +23,7 @@ export const upsertRow = async <T extends TypeWithID>({
fields,
operation,
path = '',
req,
tableName,
upsertTarget,
where,
@@ -38,6 +41,7 @@ export const upsertRow = async <T extends TypeWithID>({
// First, we insert the main row
let insertedRow: Record<string, unknown>
try {
if (operation === 'update') {
const target = upsertTarget || adapter.tables[tableName].id
@@ -56,7 +60,10 @@ export const upsertRow = async <T extends TypeWithID>({
.returning()
}
} else {
;[insertedRow] = await db.insert(adapter.tables[tableName]).values(rowToInsert.row).returning()
;[insertedRow] = await db
.insert(adapter.tables[tableName])
.values(rowToInsert.row)
.returning()
}
const localesToInsert: Record<string, unknown>[] = []
@@ -268,6 +275,23 @@ export const upsertRow = async <T extends TypeWithID>({
await db.insert(selectTable).values(tableRows).returning()
}
// //////////////////////////////////
// Error Handling
// //////////////////////////////////
} catch (error) {
throw error.code === '23505'
? new ValidationError(
[
{
field: adapter.fieldConstraints[tableName][error.constraint],
message: req.t('error:valueMustBeUnique'),
},
],
req?.t ?? i18nInit(req.payload.config.i18n).t,
)
: error
}
// //////////////////////////////////
// RETRIEVE NEWLY UPDATED ROW
// //////////////////////////////////

View File

@@ -1,5 +1,5 @@
import type { SQL } from 'drizzle-orm'
import type { Field } from 'payload/types'
import type { Field, PayloadRequest } from 'payload/types'
import type { DrizzleDB, GenericColumn, PostgresAdapter } from '../types'
@@ -10,6 +10,7 @@ type BaseArgs = {
fields: Field[]
path?: string
tableName: string
req: PayloadRequest
}
type CreateArgs = BaseArgs & {

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/live-preview-react",
"version": "0.1.4",
"version": "0.1.5",
"description": "The official live preview React SDK for Payload",
"repository": "https://github.com/payloadcms/payload",
"license": "MIT",

View File

@@ -1,6 +1,6 @@
{
"name": "@payloadcms/live-preview",
"version": "0.1.4",
"version": "0.1.5",
"description": "The official live preview JavaScript SDK for Payload",
"repository": "https://github.com/payloadcms/payload",
"license": "MIT",

View File

@@ -6,7 +6,7 @@ export type MergeLiveDataArgs<T> = {
apiRoute?: string
depth: number
fieldSchema: ReturnType<typeof fieldSchemaToJSON>
incomingData: T
incomingData: Partial<T>
initialData: T
serverURL: string
}

View File

@@ -53,34 +53,36 @@ export const traverseFields = <T>({
case 'blocks':
if (Array.isArray(incomingData[fieldName])) {
result[fieldName] = incomingData[fieldName].map((row, i) => {
const matchedBlock = fieldJSON.blocks[row.blockType]
result[fieldName] = incomingData[fieldName].map((incomingBlock, i) => {
const incomingBlockJSON = fieldJSON.blocks[incomingBlock.blockType]
const hasExistingRow =
// Compare the index and id to determine if this block already exists in the result
// If so, we want to use the existing block as the base, otherwise take the incoming block
// Either way, we will traverse the fields of the block to populate relationships
const isExistingBlock =
Array.isArray(result[fieldName]) &&
typeof result[fieldName][i] === 'object' &&
result[fieldName][i] !== null &&
result[fieldName][i].blockType === row.blockType
result[fieldName][i].id === incomingBlock.id
const newRow = hasExistingRow
? { ...result[fieldName][i] }
: {
blockType: matchedBlock.slug,
}
const block = isExistingBlock ? result[fieldName][i] : incomingBlock
traverseFields({
apiRoute,
depth,
fieldSchema: matchedBlock.fields,
incomingData: row,
fieldSchema: incomingBlockJSON.fields,
incomingData: incomingBlock,
populationPromises,
result: newRow,
result: block,
serverURL,
})
return newRow
return block
})
} else {
result[fieldName] = []
}
break
case 'tabs':

View File

@@ -1,6 +1,6 @@
{
"name": "payload",
"version": "2.0.11",
"version": "2.0.14",
"description": "Node, React and MongoDB Headless CMS and Application Framework",
"license": "MIT",
"main": "./dist/index.js",
@@ -130,7 +130,7 @@
"sass": "1.69.4",
"scheduler": "0.23.0",
"scmp": "2.1.0",
"sharp": "0.31.3",
"sharp": "0.32.6",
"swc-loader": "0.2.3",
"terser-webpack-plugin": "5.3.9",
"ts-essentials": "7.0.3",

View File

@@ -18,14 +18,12 @@
}
&__action {
@extend %btn-reset;
display: flex;
gap: calc(var(--base) / 2);
align-items: center;
svg {
position: relative;
top: -1px;
.stroke {
stroke-width: 1px;

View File

@@ -21,7 +21,7 @@ const DateTime: React.FC<Props> = (props) => {
minDate,
minTime,
monthsToShow = 1,
onChange,
onChange: onChangeFromProps,
pickerAppearance = 'default',
placeholder: placeholderText,
readOnly,
@@ -51,6 +51,15 @@ const DateTime: React.FC<Props> = (props) => {
else if (pickerAppearance === 'monthOnly') dateFormat = 'MMMM'
}
const onChange = (incomingDate: Date) => {
const newDate = incomingDate
if (newDate instanceof Date && ['dayOnly', 'default', 'monthOnly'].includes(pickerAppearance)) {
const tzOffset = incomingDate.getTimezoneOffset() / 60
newDate.setHours(12 - tzOffset, 0)
}
if (typeof onChangeFromProps === 'function') onChangeFromProps(newDate)
}
const dateTimePickerProps = {
customInputRef: 'ref',
dateFormat,
@@ -93,7 +102,6 @@ const DateTime: React.FC<Props> = (props) => {
{...dateTimePickerProps}
dropdownMode="select"
locale={locale}
onChange={(val) => onChange(val)}
popperModifiers={[
{
name: 'preventOverflow',

View File

@@ -12,6 +12,7 @@ import { baseClass } from '.'
import { getTranslation } from '../../../../utilities/getTranslation'
import usePayloadAPI from '../../../hooks/usePayloadAPI'
import buildStateFromSchema from '../../forms/Form/buildStateFromSchema'
import { fieldTypes } from '../../forms/field-types'
import { useRelatedCollections } from '../../forms/field-types/Relationship/AddNew/useRelatedCollections'
import X from '../../icons/X'
import { useAuth } from '../../utilities/Auth'
@@ -165,6 +166,7 @@ const Content: React.FC<DocumentDrawerProps> = ({
disableActions: true,
disableLeaveWithoutSaving: true,
disableRoutes: true,
fieldTypes,
hasSavePermission,
internalState,
isEditing,

View File

@@ -1,12 +1,16 @@
@import '../../../../scss/styles.scss';
@import '../../../scss/styles.scss';
.global-default-edit {
.document-fields {
width: 100%;
display: flex;
--doc-sidebar-width: 325px;
&--has-sidebar {
.global-default-edit {
.document-fields {
&__main {
width: 66.66%;
}
&__edit {
[dir='ltr'] & {
top: 0;
@@ -46,25 +50,19 @@
flex-grow: 1;
}
&__auth {
margin-bottom: var(--base);
}
&__sidebar-wrap {
position: sticky;
top: var(--doc-controls-height);
width: 33.33%;
height: calc(100vh - var(--doc-controls-height));
min-width: var(--doc-sidebar-width);
flex-shrink: 0;
}
&__sidebar {
width: 100%;
height: 100%;
overflow-y: auto;
}
&__sidebar-sticky-wrap {
display: flex;
flex-direction: column;
min-height: 100%;
@@ -84,11 +82,40 @@
color: var(--theme-elevation-400);
}
&--force-sidebar-wrap {
display: block;
.document-fields {
&__main {
width: 100%;
min-height: initial;
}
&__sidebar-wrap {
position: static;
width: 100%;
height: initial;
border-left: 0;
}
&__sidebar {
padding-bottom: base(3.5);
overflow: visible;
}
&__sidebar-fields {
padding-top: 0;
padding-left: var(--gutter-h);
padding-bottom: 0;
}
}
}
@include mid-break {
display: block;
&--has-sidebar {
.global-default-edit {
.document-fields {
&__main {
width: 100%;
}
@@ -124,8 +151,6 @@
width: 100%;
height: initial;
border-left: 0;
margin-top: calc(var(--base) / 2);
width: var(--doc-sidebar-width);
}
&__form {
@@ -136,6 +161,7 @@
padding-top: 0;
padding-left: var(--gutter-h);
padding-right: var(--gutter-h);
padding-bottom: 0;
gap: base(0.5);
[dir='ltr'] & {

View File

@@ -0,0 +1,99 @@
import React from 'react'
import type { CollectionPermission, GlobalPermission } from '../../../../auth'
import type { FieldWithPath } from '../../../../fields/config/types'
import type { Description } from '../../forms/FieldDescription/types'
import type { FieldTypes } from '../../forms/field-types'
import RenderFields from '../../forms/RenderFields'
import { filterFields } from '../../forms/RenderFields/filterFields'
import { Gutter } from '../Gutter'
import ViewDescription from '../ViewDescription'
import './index.scss'
const baseClass = 'document-fields'
export const DocumentFields: React.FC<{
AfterFields?: React.ReactNode
BeforeFields?: React.ReactNode
description?: Description
fieldTypes: FieldTypes
fields: FieldWithPath[]
forceSidebarWrap?: boolean
hasSavePermission: boolean
permissions: CollectionPermission | GlobalPermission
}> = (props) => {
const {
AfterFields,
BeforeFields,
description,
fieldTypes,
fields,
forceSidebarWrap,
hasSavePermission,
permissions,
} = props
const sidebarFields = filterFields({
fieldSchema: fields,
fieldTypes,
filter: (field) => field?.admin?.position === 'sidebar',
permissions: permissions.fields,
readOnly: !hasSavePermission,
})
const hasSidebarFields = sidebarFields && sidebarFields.length > 0
return (
<React.Fragment>
<div
className={[
baseClass,
hasSidebarFields ? `${baseClass}--has-sidebar` : `${baseClass}--no-sidebar`,
forceSidebarWrap && `${baseClass}--force-sidebar-wrap`,
]
.filter(Boolean)
.join(' ')}
>
<div className={`${baseClass}__main`}>
<Gutter className={`${baseClass}__edit`}>
<header className={`${baseClass}__header`}>
{description && (
<div className={`${baseClass}__sub-header`}>
<ViewDescription description={description} />
</div>
)}
</header>
{BeforeFields || null}
<RenderFields
className={`${baseClass}__fields`}
fieldSchema={fields}
fieldTypes={fieldTypes}
filter={(field) =>
!field.admin.position ||
(field.admin.position && field.admin.position !== 'sidebar')
}
permissions={permissions.fields}
readOnly={!hasSavePermission}
/>
{AfterFields || null}
</Gutter>
</div>
{hasSidebarFields && (
<div className={`${baseClass}__sidebar-wrap`}>
<div className={`${baseClass}__sidebar`}>
<div className={`${baseClass}__sidebar-fields`}>
<RenderFields
fieldTypes={fieldTypes}
fields={sidebarFields}
permissions={permissions.fields}
readOnly={!hasSavePermission}
/>
</div>
</div>
</div>
)}
</div>
</React.Fragment>
)
}

View File

@@ -44,7 +44,11 @@ const Duplicate: React.FC<Props> = ({ id, collection, slug }) => {
return
}
const create = async (locale = ''): Promise<null | string> => {
const saveDocument = async ({
id,
duplicateID = '',
locale = '',
}): Promise<null | string> => {
const response = await requests.get(`${serverURL}${api}/${slug}/${id}`, {
headers: {
'Accept-Language': i18n.language,
@@ -52,31 +56,38 @@ const Duplicate: React.FC<Props> = ({ id, collection, slug }) => {
params: {
depth: 0,
draft: true,
'fallback-locale': 'none',
locale,
},
})
let data = await response.json()
if ('createdAt' in data) delete data.createdAt
if ('updatedAt' in data) delete data.updatedAt
if (typeof collection.admin.hooks?.beforeDuplicate === 'function') {
data = await collection.admin.hooks.beforeDuplicate({
collection,
data,
locale,
})
}
const result = await requests.post(`${serverURL}${api}/${slug}`, {
if (!duplicateID) {
if ('createdAt' in data) delete data.createdAt
if ('updatedAt' in data) delete data.updatedAt
}
const result = await requests[duplicateID ? 'patch' : 'post'](
`${serverURL}${api}/${slug}/${duplicateID}?locale=${locale}&fallback-locale=none`,
{
body: JSON.stringify(data),
headers: {
'Accept-Language': i18n.language,
'Content-Type': 'application/json',
},
})
},
)
const json = await result.json()
if (result.status === 201) {
if (result.status === 201 || result.status === 200) {
return json.doc.id
}
json.errors.forEach((error) => toast.error(error.message))
@@ -84,63 +95,32 @@ const Duplicate: React.FC<Props> = ({ id, collection, slug }) => {
}
let duplicateID
if (localization) {
duplicateID = await create(localization.defaultLocale)
let abort = false
await localization.localeCodes
.filter((locale) => locale !== localization.defaultLocale)
.reduce(async (priorLocalePatch, locale) => {
if (localization) {
await localization.localeCodes.reduce(async (priorLocalePatch, locale) => {
await priorLocalePatch
if (!abort) {
const res = await requests.get(`${serverURL}${api}/${slug}/${id}`, {
headers: {
'Accept-Language': i18n.language,
},
params: {
depth: 0,
locale,
},
})
let localizedDoc = await res.json()
if (typeof collection.admin.hooks?.beforeDuplicate === 'function') {
localizedDoc = await collection.admin.hooks.beforeDuplicate({
data: localizedDoc,
locale,
})
}
const patchResult = await requests.patch(
`${serverURL}${api}/${slug}/${duplicateID}?locale=${locale}`,
{
body: JSON.stringify(localizedDoc),
headers: {
'Accept-Language': i18n.language,
'Content-Type': 'application/json',
},
},
)
if (patchResult.status > 400) {
if (abort) return
duplicateID = await saveDocument({ id, duplicateID, locale })
if (!duplicateID) {
abort = true
const json = await patchResult.json()
json.errors.forEach((error) => toast.error(error.message))
}
}
}, Promise.resolve())
if (abort) {
if (abort && duplicateID) {
// delete the duplicate doc to prevent incomplete
await requests.delete(`${serverURL}${api}/${slug}/${id}`, {
await requests.delete(`${serverURL}${api}/${slug}/${duplicateID}`, {
headers: {
'Accept-Language': i18n.language,
},
})
}
} else {
duplicateID = await create()
duplicateID = await saveDocument({ id })
}
if (!duplicateID) {
return
}
toast.success(

View File

@@ -1,13 +1,11 @@
import { useWindowInfo } from '@faceless-ui/window-info'
import React, { useEffect, useState } from 'react'
import React, { useState } from 'react'
import AnimateHeight from 'react-animate-height'
import { useTranslation } from 'react-i18next'
import type { SanitizedCollectionConfig } from '../../../../collections/config/types'
import type { Props } from './types'
import { fieldAffectsData } from '../../../../fields/config/types'
import flattenFields from '../../../../utilities/flattenTopLevelFields'
import { getTranslation } from '../../../../utilities/getTranslation'
import Chevron from '../../icons/Chevron'
import { useSearchParams } from '../../utilities/SearchParams'
@@ -27,22 +25,12 @@ import './index.scss'
const baseClass = 'list-controls'
const getUseAsTitle = (collection: SanitizedCollectionConfig) => {
const {
admin: { useAsTitle },
fields,
} = collection
const topLevelFields = flattenFields(fields)
return topLevelFields.find((field) => fieldAffectsData(field) && field.name === useAsTitle)
}
/**
* The ListControls component is used to render the controls (search, filter, where)
* for a collection's list view. You can find those directly above the table which lists
* the collection's documents.
*/
const ListControls: React.FC<Props> = (props) => {
export const ListControls: React.FC<Props> = (props) => {
const {
collection: {
admin: { listSearchableFields },
@@ -51,21 +39,20 @@ const ListControls: React.FC<Props> = (props) => {
collection,
enableColumns = true,
enableSort = false,
handleSearchChange,
handleSortChange,
handleWhereChange,
modifySearchQuery = true,
resetParams,
titleField,
} = props
const params = useSearchParams()
const shouldInitializeWhereOpened = validateWhereQuery(params?.where)
const [titleField, setTitleField] = useState(getUseAsTitle(collection))
useEffect(() => {
setTitleField(getUseAsTitle(collection))
}, [collection])
const [textFieldsToBeSearched] = useState(getTextFieldsToBeSearched(listSearchableFields, fields))
const [textFieldsToBeSearched, setFieldsToBeSearched] = useState(
getTextFieldsToBeSearched(listSearchableFields, fields),
)
const [visibleDrawer, setVisibleDrawer] = useState<'columns' | 'sort' | 'where'>(
shouldInitializeWhereOpened ? 'where' : undefined,
)
@@ -74,18 +61,19 @@ const ListControls: React.FC<Props> = (props) => {
breakpoints: { s: smallBreak },
} = useWindowInfo()
React.useEffect(() => {
setFieldsToBeSearched(getTextFieldsToBeSearched(listSearchableFields, fields))
}, [listSearchableFields, fields])
return (
<div className={baseClass}>
<div className={`${baseClass}__wrap`}>
<SearchFilter
fieldLabel={
(titleField &&
fieldAffectsData(titleField) &&
getTranslation(titleField.label || titleField.name, i18n)) ??
undefined
(titleField && getTranslation(titleField.label || titleField.name, i18n)) ?? undefined
}
fieldName={titleField && fieldAffectsData(titleField) ? titleField.name : undefined}
handleChange={handleWhereChange}
handleChange={handleSearchChange}
listSearchableFields={textFieldsToBeSearched}
modifySearchQuery={modifySearchQuery}
/>
@@ -179,5 +167,3 @@ const ListControls: React.FC<Props> = (props) => {
</div>
)
}
export default ListControls

View File

@@ -1,4 +1,5 @@
import type { SanitizedCollectionConfig } from '../../../../collections/config/types'
import type { FieldAffectingData } from '../../../../exports/types'
import type { Where } from '../../../../types'
import type { Props as ListProps } from '../../views/collections/List/types'
import type { Column } from '../Table/types'
@@ -7,10 +8,12 @@ export type Props = {
collection: SanitizedCollectionConfig
enableColumns?: boolean
enableSort?: boolean
handleSearchChange?: (search: string) => void
handleSortChange?: (sort: string) => void
handleWhereChange?: (where: Where) => void
modifySearchQuery?: boolean
resetParams?: ListProps['resetParams']
titleField: FieldAffectingData
}
export type ListControls = {

View File

@@ -3,12 +3,14 @@ import React, { useCallback, useEffect, useReducer, useState } from 'react'
import { useTranslation } from 'react-i18next'
import type { SanitizedCollectionConfig } from '../../../../collections/config/types'
import type { Where } from '../../../../exports/types'
import type { Field } from '../../../../fields/config/types'
import type { ListDrawerProps } from './types'
import { baseClass } from '.'
import { getTranslation } from '../../../../utilities/getTranslation'
import usePayloadAPI from '../../../hooks/usePayloadAPI'
import { useUseTitleField } from '../../../hooks/useUseAsTitle'
import Label from '../../forms/Label'
import X from '../../icons/X'
import { useAuth } from '../../utilities/Auth'
@@ -24,6 +26,22 @@ import ReactSelect from '../ReactSelect'
import { TableColumnsProvider } from '../TableColumns'
import ViewDescription from '../ViewDescription'
const hoistQueryParamsToAnd = (where: Where, queryParams: Where) => {
if ('and' in where) {
where.and.push(queryParams)
} else if ('or' in where) {
where = {
and: [where, queryParams],
}
} else {
where = {
and: [where, queryParams],
}
}
return where
}
export const ListDrawerContent: React.FC<ListDrawerProps> = ({
collectionSlugs,
customHeader,
@@ -40,6 +58,8 @@ export const ListDrawerContent: React.FC<ListDrawerProps> = ({
const [sort, setSort] = useState(null)
const [page, setPage] = useState(1)
const [where, setWhere] = useState(null)
const [search, setSearch] = useState('')
const {
collections,
routes: { api },
@@ -69,6 +89,8 @@ export const ListDrawerContent: React.FC<ListDrawerProps> = ({
const [fields, setFields] = useState<Field[]>(() => formatFields(selectedCollectionConfig))
const titleField = useUseTitleField(selectedCollectionConfig)
useEffect(() => {
setFields(formatFields(selectedCollectionConfig))
}, [selectedCollectionConfig])
@@ -111,31 +133,58 @@ export const ListDrawerContent: React.FC<ListDrawerProps> = ({
const moreThanOneAvailableCollection = enabledCollectionConfigs.length > 1
useEffect(() => {
const { admin: { listSearchableFields } = {}, slug } = selectedCollectionConfig
const params: {
cacheBust?: number
limit?: number
page?: number
search?: string
sort?: string
where?: unknown
} = {}
let copyOfWhere = { ...(where || {}) }
if (filterOptions) {
copyOfWhere = hoistQueryParamsToAnd(copyOfWhere, filterOptions[slug])
}
if (search) {
const searchAsConditions = (listSearchableFields || [titleField?.name]).map((fieldName) => {
return {
[fieldName]: {
like: search,
},
}
}, [])
if (searchAsConditions.length > 0) {
const searchFilter: Where = {
or: [...searchAsConditions],
}
copyOfWhere = hoistQueryParamsToAnd(copyOfWhere, searchFilter)
}
}
if (page) params.page = page
params.where = {
...(where ? { ...where } : {}),
...(filterOptions?.[selectedCollectionConfig.slug]
? {
...filterOptions[selectedCollectionConfig.slug],
}
: {}),
}
if (sort) params.sort = sort
if (limit) params.limit = limit
if (cacheBust) params.cacheBust = cacheBust
if (copyOfWhere) params.where = copyOfWhere
setParams(params)
}, [setParams, page, sort, where, limit, cacheBust, filterOptions, selectedCollectionConfig])
}, [
page,
sort,
where,
search,
cacheBust,
filterOptions,
selectedCollectionConfig,
t,
setParams,
titleField?.name,
])
useEffect(() => {
const newPreferences = {
@@ -143,7 +192,7 @@ export const ListDrawerContent: React.FC<ListDrawerProps> = ({
sort,
}
setPreference(preferenceKey, newPreferences)
setPreference(preferenceKey, newPreferences, true)
}, [sort, limit, setPreference, preferenceKey])
const onCreateNew = useCallback(
@@ -241,6 +290,7 @@ export const ListDrawerContent: React.FC<ListDrawerProps> = ({
data,
handlePageChange: setPage,
handlePerPageChange: setLimit,
handleSearchChange: setSearch,
handleSortChange: setSort,
handleWhereChange: setWhere,
hasCreatePermission,
@@ -249,6 +299,7 @@ export const ListDrawerContent: React.FC<ListDrawerProps> = ({
newDocumentURL: null,
setLimit,
setSort,
titleField,
}}
/>
</DocumentInfoProvider>

View File

@@ -31,25 +31,41 @@ const Localizer: React.FC<{
horizontalAlign="right"
render={({ close }) => (
<PopupList.ButtonGroup>
<React.Fragment>
{locale ? (
<PopupList.Button
active
key={locale.code}
onClick={close}
to={{
search: qs.stringify({
...searchParams,
locale: locale.code,
}),
}}
>
{locale.label}
{locale.label !== locale.code && ` (${locale.code})`}
</PopupList.Button>
) : null}
{locales.map((localeOption) => {
if (locale.code === localeOption.code) return null
const newParams = {
...searchParams,
locale: localeOption.code,
}
const search = qs.stringify(newParams)
if (localeOption.code !== locale.code) {
return (
<PopupList.Button key={localeOption.code} onClick={close} to={{ search }}>
{localeOption.label}
{localeOption.label !== localeOption.code && ` (${localeOption.code})`}
</PopupList.Button>
)
}
return null
})}
</React.Fragment>
</PopupList.ButtonGroup>
)}
showScrollbar

View File

@@ -1,10 +1,11 @@
@import '../../../../scss/styles.scss';
.popup-button-list {
--list-button-padding: calc(var(--base) * 0.5);
display: flex;
flex-direction: column;
text-align: left;
--list-button-padding: calc(var(--base) * 0.5);
gap: 3px;
&__text-align--left {
text-align: left;
@@ -44,4 +45,8 @@
background-color: var(--popup-button-highlight);
}
}
&__button--selected {
background-color: var(--theme-elevation-150);
}
}

View File

@@ -24,14 +24,24 @@ export const ButtonGroup: React.FC<{
}
type MenuButtonProps = {
active?: boolean
children: React.ReactNode
className?: string
id?: string
onClick?: () => void
to?: LinkProps['to']
}
export const Button: React.FC<MenuButtonProps> = ({ id, children, className, onClick, to }) => {
const classes = [`${baseClass}__button`, className].filter(Boolean).join(' ')
export const Button: React.FC<MenuButtonProps> = ({
id,
active,
children,
className,
onClick,
to,
}) => {
const classes = [`${baseClass}__button`, active && `${baseClass}__button--selected`, className]
.filter(Boolean)
.join(' ')
if (to) {
return (

View File

@@ -16,11 +16,12 @@ export const MultiValue: React.FC<MultiValueProps<Option>> = (props) => {
innerProps,
isDisabled,
// @ts-expect-error // TODO Fix this - moduleResolution 16 breaks our declare module
selectProps: { customProps: { disableMouseDown } = {} } = {},
selectProps: { customProps: { disableMouseDown } = {}, isSortable } = {},
} = props
const { attributes, isDragging, listeners, setNodeRef, transform } = useDraggableSortable({
id: value.toString(),
disabled: !isSortable,
})
const classes = [

View File

@@ -33,6 +33,7 @@ const SelectAdapter: React.FC<ReactSelectAdapterProps> = (props) => {
const {
className,
components,
customProps,
disabled = false,
filterOption = undefined,
isClearable = true,
@@ -45,7 +46,6 @@ const SelectAdapter: React.FC<ReactSelectAdapterProps> = (props) => {
onMenuOpen,
options,
placeholder = t('general:selectValue'),
selectProps,
showError,
value,
} = props
@@ -58,7 +58,7 @@ const SelectAdapter: React.FC<ReactSelectAdapterProps> = (props) => {
return (
<Select
captureMenuScroll
customProps={selectProps}
customProps={customProps}
isLoading={isLoading}
placeholder={getTranslation(placeholder, i18n)}
{...props}

View File

@@ -78,10 +78,6 @@ export type Props = {
onMenuScrollToBottom?: () => void
options: Option[] | OptionGroup[]
placeholder?: string
/**
* @deprecated Since version 1.0. Will be deleted in version 2.0. Use customProps instead.
*/
selectProps?: CustomSelectProps
showError?: boolean
value?: Option | Option[]
}

View File

@@ -44,6 +44,7 @@ const DefaultSaveDraftButton: React.FC<DefaultSaveDraftButtonProps> = ({
return (
<FormSubmit
buttonId="action-save-draft"
buttonStyle="secondary"
className={baseClass}
disabled={disabled}
@@ -73,7 +74,7 @@ export const SaveDraft: React.FC<Props> = ({ CustomComponent }) => {
const canSaveDraft = modified
const saveDraft = useCallback(() => {
const saveDraft = useCallback(async () => {
const search = `?locale=${locale}&depth=0&fallback-locale=null&draft=true`
let action
let method = 'POST'
@@ -87,7 +88,7 @@ export const SaveDraft: React.FC<Props> = ({ CustomComponent }) => {
action = `${serverURL}${api}/globals/${global.slug}${search}`
}
submit({
await submit({
action,
method,
overrides: {

View File

@@ -3,7 +3,6 @@ import React, { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useHistory } from 'react-router-dom'
import type { Where, WhereField } from '../../../../types'
import type { Props } from './types'
import { getTranslation } from '../../../../utilities/getTranslation'
@@ -27,7 +26,7 @@ const SearchFilter: React.FC<Props> = (props) => {
const history = useHistory()
const { i18n, t } = useTranslation('general')
const [search, setSearch] = useState('')
const [search, setSearch] = useState(typeof params?.search === 'string' ? params?.search : '')
const [previousSearch, setPreviousSearch] = useState('')
const placeholder = useRef(t('searchBy', { label: getTranslation(fieldLabel, i18n) }))
@@ -35,48 +34,15 @@ const SearchFilter: React.FC<Props> = (props) => {
const debouncedSearch = useDebounce(search, 300)
useEffect(() => {
const newWhere: Where = {
...(typeof params?.where === 'object' ? (params.where as Where) : {}),
}
const fieldNamesToSearch =
listSearchableFields?.length > 0
? [...listSearchableFields.map(({ name }) => name)]
: [fieldName]
fieldNamesToSearch.forEach((fieldNameToSearch) => {
const hasOrQuery = Array.isArray(newWhere.or)
const existingFieldSearchIndex = hasOrQuery
? newWhere.or.findIndex((condition) => {
return (condition?.[fieldNameToSearch] as WhereField)?.like
})
: -1
if (debouncedSearch) {
if (!hasOrQuery) newWhere.or = []
if (existingFieldSearchIndex > -1) {
;(newWhere.or[existingFieldSearchIndex][fieldNameToSearch] as WhereField).like =
debouncedSearch
} else {
newWhere.or.push({
[fieldNameToSearch]: {
like: debouncedSearch,
},
})
}
} else if (existingFieldSearchIndex > -1) {
newWhere.or.splice(existingFieldSearchIndex, 1)
}
})
if (debouncedSearch !== previousSearch) {
if (handleChange) handleChange(newWhere)
if (handleChange) handleChange(debouncedSearch)
if (modifySearchQuery) {
history.replace({
search: queryString.stringify({
...params,
page: 1,
where: newWhere,
search: debouncedSearch || undefined,
}),
})
}

View File

@@ -1,10 +1,9 @@
import type { FieldAffectingData } from '../../../../fields/config/types'
import type { Where } from '../../../../types'
export type Props = {
fieldLabel?: string
fieldName?: string
handleChange?: (where: Where) => void
handleChange?: (search: string) => void
listSearchableFields?: FieldAffectingData[]
modifySearchQuery?: boolean
}

View File

@@ -168,6 +168,7 @@ const Status: React.FC = () => {
<Button
buttonStyle="none"
className={`${baseClass}__action`}
id="action-revert-to-published"
onClick={() => toggleModal(revertModalSlug)}
>
{t('revertToPublished')}
@@ -183,7 +184,10 @@ const Status: React.FC = () => {
>
{t('general:cancel')}
</Button>
<Button onClick={processing ? undefined : () => performAction('revert')}>
<Button
id="action-revert-to-published-confirm"
onClick={processing ? undefined : () => performAction('revert')}
>
{t(processing ? 'reverting' : 'general:confirm')}
</Button>
</MinimalTemplate>

View File

@@ -122,22 +122,12 @@ export const TableColumnsProvider: React.FC<{
useEffect(() => {
if (!hasInitialized.current) return
const sync = async () => {
const currentPreferences = await getPreference<ListPreferences>(preferenceKey)
const newPreferences = {
...currentPreferences,
columns: tableColumns.map((c) => ({
const columns = tableColumns.map((c) => ({
accessor: c.accessor,
active: c.active,
})),
}
}))
setPreference(preferenceKey, newPreferences)
}
sync()
void setPreference(preferenceKey, { columns }, true)
}, [tableColumns, preferenceKey, setPreference, getPreference])
const setActiveColumns = useCallback(

View File

@@ -76,7 +76,7 @@ const Condition: React.FC<Props> = (props) => {
onChange={(field) =>
dispatch({
andIndex,
field: field.value,
field: field?.value || undefined,
orIndex,
type: 'update',
})

View File

@@ -1,4 +1,4 @@
import React, { useEffect, useRef, useState } from 'react'
import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import type { Props } from './types'

View File

@@ -0,0 +1,85 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import type { DateField } from '../../../../../exports/types'
import type { Description } from '../../FieldDescription/types'
import { getTranslation } from '../../../../../utilities/getTranslation'
import DatePicker from '../../../elements/DatePicker'
import Error from '../../Error'
import FieldDescription from '../../FieldDescription'
import Label from '../../Label'
import { fieldBaseClass } from '../shared'
import './index.scss'
const baseClass = 'date-time-field'
export type DateTimeInputProps = Omit<DateField, 'admin' | 'name' | 'type'> & {
className?: string
datePickerProps?: DateField['admin']['date']
description?: Description
errorMessage?: string
onChange?: (e: Date) => void
path: string
placeholder?: Record<string, string> | string
readOnly?: boolean
required?: boolean
showError?: boolean
style?: React.CSSProperties
value?: Date
width?: string
}
export const DateTimeInput: React.FC<DateTimeInputProps> = (props) => {
const {
className,
datePickerProps,
description,
errorMessage,
label,
onChange,
path,
placeholder,
readOnly,
required,
showError,
style,
value,
width,
} = props
const { i18n } = useTranslation()
return (
<div
className={[
fieldBaseClass,
baseClass,
className,
showError && `${baseClass}--has-error`,
readOnly && 'read-only',
]
.filter(Boolean)
.join(' ')}
style={{
...style,
width,
}}
>
<div className={`${baseClass}__error-wrap`}>
<Error message={errorMessage} showError={showError} />
</div>
<Label htmlFor={path} label={label} required={required} />
<div className={`${baseClass}__input-wrapper`} id={`field-${path.replace(/\./g, '__')}`}>
<DatePicker
{...datePickerProps}
onChange={onChange}
placeholder={getTranslation(placeholder, i18n)}
readOnly={readOnly}
value={value}
/>
</div>
<FieldDescription description={description} value={value} />
</div>
)
}

View File

@@ -1,20 +1,12 @@
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import type { Props } from './types'
import { date as dateValidation } from '../../../../../fields/validations'
import { getTranslation } from '../../../../../utilities/getTranslation'
import DatePicker from '../../../elements/DatePicker'
import Error from '../../Error'
import FieldDescription from '../../FieldDescription'
import Label from '../../Label'
import useField from '../../useField'
import withCondition from '../../withCondition'
import { DateTimeInput } from './Input'
import './index.scss'
import { fieldBaseClass } from '../shared'
const baseClass = 'date-time-field'
const DateTime: React.FC<Props> = (props) => {
const {
@@ -26,8 +18,6 @@ const DateTime: React.FC<Props> = (props) => {
validate = dateValidation,
} = props
const { i18n } = useTranslation()
const path = pathFromProps || name
const memoizedValidate = useCallback(
@@ -37,45 +27,31 @@ const DateTime: React.FC<Props> = (props) => {
[validate, required],
)
const { errorMessage, setValue, showError, value } = useField({
const { errorMessage, setValue, showError, value } = useField<Date>({
condition,
path,
validate: memoizedValidate,
})
return (
<div
className={[
fieldBaseClass,
baseClass,
className,
showError && `${baseClass}--has-error`,
readOnly && 'read-only',
]
.filter(Boolean)
.join(' ')}
style={{
...style,
width,
}}
>
<div className={`${baseClass}__error-wrap`}>
<Error message={errorMessage} showError={showError} />
</div>
<Label htmlFor={path} label={label} required={required} />
<div className={`${baseClass}__input-wrapper`} id={`field-${path.replace(/\./g, '__')}`}>
<DatePicker
{...date}
<DateTimeInput
className={className}
datePickerProps={date}
description={description}
errorMessage={errorMessage}
label={label}
onChange={(incomingDate) => {
if (!readOnly) setValue(incomingDate?.toISOString() || null)
}}
placeholder={getTranslation(placeholder, i18n)}
path={path}
placeholder={placeholder}
readOnly={readOnly}
value={value as Date}
required={required}
showError={showError}
style={style}
value={value}
width={width}
/>
</div>
<FieldDescription description={description} value={value} />
</div>
)
}

View File

@@ -2,24 +2,46 @@ import type { PayloadRequest } from '../../../../../express/types'
import type { RichTextField, Validate } from '../../../../../fields/config/types'
import type { CellComponentProps } from '../../../views/collections/List/Cell/types'
export type RichTextFieldProps<Value extends object, AdapterProps> = Omit<
RichTextField<Value, AdapterProps>,
'type'
> & {
export type RichTextFieldProps<
Value extends object,
AdapterProps,
ExtraFieldProperties = {},
> = Omit<RichTextField<Value, AdapterProps, ExtraFieldProperties>, 'type'> & {
path?: string
}
export type RichTextAdapter<Value extends object = object, AdapterProps = any> = {
CellComponent: React.FC<CellComponentProps<RichTextField<Value, AdapterProps>>>
FieldComponent: React.FC<RichTextFieldProps<Value, AdapterProps>>
afterReadPromise?: (data: {
export type RichTextAdapter<
Value extends object = object,
AdapterProps = any,
ExtraFieldProperties = {},
> = {
CellComponent: React.FC<
CellComponentProps<RichTextField<Value, AdapterProps, ExtraFieldProperties>>
>
FieldComponent: React.FC<RichTextFieldProps<Value, AdapterProps, ExtraFieldProperties>>
afterReadPromise?: ({
field,
incomingEditorState,
siblingDoc,
}: {
field: RichTextField<Value, AdapterProps, ExtraFieldProperties>
incomingEditorState: Value
siblingDoc: Record<string, unknown>
}) => Promise<void> | null
populationPromise?: (data: {
currentDepth?: number
depth: number
field: RichTextField<Value, AdapterProps>
field: RichTextField<Value, AdapterProps, ExtraFieldProperties>
overrideAccess?: boolean
req: PayloadRequest
showHiddenFields: boolean
siblingDoc: Record<string, unknown>
}) => Promise<void> | null
validate: Validate<Value, Value, unknown, RichTextField<Value, AdapterProps>>
validate: Validate<
Value,
Value,
unknown,
RichTextField<Value, AdapterProps, ExtraFieldProperties>
>
}

View File

@@ -1,6 +1,7 @@
@import '../../../../scss/styles.scss';
.field-type.row {
.row__fields {
display: flex;
flex-wrap: wrap;
width: calc(100% + var(--base));
@@ -12,8 +13,10 @@
padding-left: calc(var(--base) * 0.5);
padding-right: calc(var(--base) * 0.5);
}
}
@include mid-break {
.row__fields {
display: block;
margin-left: 0;
margin-right: 0;
@@ -28,3 +31,4 @@
}
}
}
}

View File

@@ -9,6 +9,8 @@ import { fieldBaseClass } from '../shared'
import './index.scss'
import { RowProvider } from './provider'
const baseClass = 'row'
const Row: React.FC<Props> = (props) => {
const {
admin: { className, readOnly },
@@ -22,8 +24,9 @@ const Row: React.FC<Props> = (props) => {
return (
<RowProvider>
<div className={[fieldBaseClass, baseClass, className].filter(Boolean).join(' ')}>
<RenderFields
className={[fieldBaseClass, 'row', className].filter(Boolean).join(' ')}
className={`${baseClass}__fields`}
fieldSchema={fields.map((field) => ({
...field,
path: createNestedFieldPath(path, field),
@@ -31,9 +34,11 @@ const Row: React.FC<Props> = (props) => {
fieldTypes={fieldTypes}
forceRender={forceRender}
indexPath={indexPath}
margins={false}
permissions={permissions}
readOnly={readOnly}
/>
</div>
</RowProvider>
)
}

View File

@@ -194,7 +194,7 @@ const TabsField: React.FC<Props> = (props) => {
key={String(activeTabConfig.label)}
margins="small"
permissions={
tabHasName(activeTabConfig)
tabHasName(activeTabConfig) && permissions?.[activeTabConfig.name]
? permissions[activeTabConfig.name].fields
: permissions
}

View File

@@ -12,6 +12,7 @@ import type { ContextType, DocumentPermissions, Props, Version } from './types'
import { useAuth } from '../Auth'
import { useConfig } from '../Config'
import { useLocale } from '../Locale'
import { usePreferences } from '../Preferences'
const Context = createContext({} as ContextType)
@@ -35,6 +36,7 @@ export const DocumentInfoProvider: React.FC<Props> = ({
const { getPreference, setPreference } = usePreferences()
const { i18n } = useTranslation()
const { permissions } = useAuth()
const { code } = useLocale()
const [publishedDoc, setPublishedDoc] = useState<TypeWithID & TypeWithTimestamps>(null)
const [versions, setVersions] = useState<PaginatedDocs<Version>>(null)
const [unpublishedVersions, setUnpublishedVersions] = useState<PaginatedDocs<Version>>(null)
@@ -76,8 +78,9 @@ export const DocumentInfoProvider: React.FC<Props> = ({
},
}
const publishedVersionParams: { depth: number; where: Where } = {
const publishedVersionParams: { depth: number; locale: string; where: Where } = {
depth: 0,
locale: code || undefined,
where: {
and: [
{
@@ -192,7 +195,7 @@ export const DocumentInfoProvider: React.FC<Props> = ({
setVersions(versionJSON)
setUnpublishedVersions(unpublishedVersionJSON)
}
}, [i18n, global, collection, id, baseURL])
}, [i18n, global, collection, id, baseURL, code])
const getDocPermissions = React.useCallback(async () => {
let docAccessURL: string
@@ -227,7 +230,8 @@ export const DocumentInfoProvider: React.FC<Props> = ({
const allPreferences = await getDocPreferences()
if (preferencesKey) {
setPreference(preferencesKey, {
try {
await setPreference(preferencesKey, {
...allPreferences,
fields: {
...(allPreferences?.fields || {}),
@@ -237,6 +241,9 @@ export const DocumentInfoProvider: React.FC<Props> = ({
},
},
})
} catch (e) {
console.error(e)
}
}
},
[setPreference, preferencesKey, getDocPreferences],

View File

@@ -1,3 +1,4 @@
import isDeepEqual from 'deep-equal'
import React, { createContext, useCallback, useContext, useEffect, useRef } from 'react'
import { useTranslation } from 'react-i18next'
@@ -7,7 +8,12 @@ import { useConfig } from '../Config'
type PreferencesContext = {
getPreference: <T = any>(key: string) => Promise<T> | T
setPreference: <T = any>(key: string, value: T) => Promise<void>
/**
* @param key - a string identifier for the property being set
* @param value - preference data to store
* @param merge - when true will combine the existing preference object batch the change into one request for objects, default = false
*/
setPreference: <T = any>(key: string, value: T, merge?: boolean) => Promise<void>
}
const Context = createContext({} as PreferencesContext)
@@ -23,6 +29,7 @@ const requestOptions = (value, language) => ({
export const PreferencesProvider: React.FC<{ children?: React.ReactNode }> = ({ children }) => {
const contextRef = useRef({} as PreferencesContext)
const preferencesRef = useRef({})
const pendingUpdate = useRef({})
const config = useConfig()
const { user } = useAuth()
const { i18n } = useTranslation()
@@ -43,7 +50,7 @@ export const PreferencesProvider: React.FC<{ children?: React.ReactNode }> = ({
const prefs = preferencesRef.current
if (typeof prefs[key] !== 'undefined') return prefs[key]
const promise = new Promise((resolve: (value: T) => void) => {
;(async () => {
void (async () => {
const request = await requests.get(`${serverURL}${api}/payload-preferences/${key}`, {
headers: {
'Accept-Language': i18n.language,
@@ -65,14 +72,63 @@ export const PreferencesProvider: React.FC<{ children?: React.ReactNode }> = ({
)
const setPreference = useCallback(
async (key: string, value: unknown): Promise<void> => {
async (key: string, value: unknown, merge = false): Promise<void> => {
if (merge === false) {
preferencesRef.current[key] = value
await requests.post(
`${serverURL}${api}/payload-preferences/${key}`,
requestOptions(value, i18n.language),
)
return
}
let newValue = value
const currentPreference = await getPreference(key)
// handle value objects where multiple values can be set under one key
if (
typeof value === 'object' &&
typeof currentPreference === 'object' &&
typeof newValue === 'object'
) {
// merge the value with any existing preference for the key
newValue = { ...(currentPreference || {}), ...value }
if (isDeepEqual(newValue, currentPreference)) {
return
}
// add the requested changes to a pendingUpdate batch for the key
pendingUpdate.current[key] = {
...pendingUpdate.current[key],
...(newValue as Record<string, unknown>),
}
} else {
if (newValue === currentPreference) {
return
}
pendingUpdate.current[key] = newValue
}
const updatePreference = async () => {
// compare the value stored in context before sending to eliminate duplicate requests
if (isDeepEqual(pendingUpdate.current[key], preferencesRef.current[key])) {
return
}
// preference set in context here to prevent other updatePreference at the same time
preferencesRef.current[key] = pendingUpdate.current[key]
await requests.post(
`${serverURL}${api}/payload-preferences/${key}`,
requestOptions(preferencesRef.current[key], i18n.language),
)
// reset any changes for this key after sending the request
delete pendingUpdate.current[key]
}
// use timeout to allow multiple changes of different values using the same key in one request
setTimeout(() => {
void updatePreference()
})
},
[api, i18n.language, serverURL],
[api, getPreference, i18n.language, pendingUpdate, serverURL],
)
contextRef.current.getPreference = getPreference

View File

@@ -1,34 +1,35 @@
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import type { Translation } from '../../../../translations/type'
import type { FieldTypes } from '../../forms/field-types'
import type { CollectionEditViewProps } from '../types'
import { DocumentControls } from '../../elements/DocumentControls'
import { DocumentFields } from '../../elements/DocumentFields'
import { DocumentHeader } from '../../elements/DocumentHeader'
import { Gutter } from '../../elements/Gutter'
import { LoadingOverlayToggle } from '../../elements/Loading'
import ReactSelect from '../../elements/ReactSelect'
import Form from '../../forms/Form'
import Label from '../../forms/Label'
import RenderFields from '../../forms/RenderFields'
import { fieldTypes } from '../../forms/field-types'
import { LeaveWithoutSaving } from '../../modals/LeaveWithoutSaving'
import { useAuth } from '../../utilities/Auth'
import Meta from '../../utilities/Meta'
import { OperationContext } from '../../utilities/OperationProvider'
import Auth from '../collections/Edit/Auth'
import { ToggleTheme } from './ToggleTheme'
import { Settings } from './Settings'
import './index.scss'
const baseClass = 'account'
const DefaultAccount: React.FC<CollectionEditViewProps> = (props) => {
export type DefaultAccountViewProps = CollectionEditViewProps & {
fieldTypes: FieldTypes
}
const DefaultAccount: React.FC<DefaultAccountViewProps> = (props) => {
const {
action,
apiURL,
collection,
data,
fieldTypes,
hasSavePermission,
initialState,
isLoading,
@@ -39,14 +40,7 @@ const DefaultAccount: React.FC<CollectionEditViewProps> = (props) => {
const { auth, fields } = collection
const { refreshCookieAsync } = useAuth()
const { i18n, t } = useTranslation('authentication')
const languageOptions = Object.entries(i18n.options.resources || {}).map(
([language, resource]) => ({
label: (resource as Translation).general.thisLanguage,
value: language,
}),
)
const { t } = useTranslation('authentication')
const onSave = useCallback(async () => {
await refreshCookieAsync()
@@ -55,22 +49,22 @@ const DefaultAccount: React.FC<CollectionEditViewProps> = (props) => {
}
}, [onSaveFromProps, refreshCookieAsync])
const classes = [baseClass].filter(Boolean).join(' ')
return (
<React.Fragment>
<Meta description={t('accountOfCurrentUser')} keywords={t('account')} title={t('account')} />
<LoadingOverlayToggle name="account" show={isLoading} type="withoutNav" />
{!isLoading && (
<div className={classes}>
<OperationContext.Provider value="update">
<Form
action={action}
className={`${baseClass}__form`}
disabled={!hasSavePermission}
initialState={initialState}
method="patch"
onSuccess={onSave}
>
{!(collection.versions?.drafts && collection.versions?.drafts?.autosave) && (
<LeaveWithoutSaving />
)}
<DocumentHeader apiURL={apiURL} collection={collection} data={data} />
<DocumentControls
apiURL={apiURL}
@@ -80,17 +74,9 @@ const DefaultAccount: React.FC<CollectionEditViewProps> = (props) => {
isAccountView
permissions={permissions}
/>
<div className={`${baseClass}__main`}>
<Meta
description={t('accountOfCurrentUser')}
keywords={t('account')}
title={t('account')}
/>
{!(collection.versions?.drafts && collection.versions?.drafts?.autosave) && (
<LeaveWithoutSaving />
)}
<div className={`${baseClass}__edit`}>
<Gutter className={`${baseClass}__header`}>
<DocumentFields
AfterFields={<Settings className={`${baseClass}__settings`} />}
BeforeFields={
<Auth
className={`${baseClass}__auth`}
collection={collection}
@@ -99,47 +85,14 @@ const DefaultAccount: React.FC<CollectionEditViewProps> = (props) => {
readOnly={!hasSavePermission}
useAPIKey={auth.useAPIKey}
/>
<RenderFields
fieldSchema={fields}
}
fieldTypes={fieldTypes}
filter={(field) => field?.admin?.position !== 'sidebar'}
permissions={permissions?.fields}
readOnly={!hasSavePermission}
fields={fields}
hasSavePermission={hasSavePermission}
permissions={permissions}
/>
</Gutter>
<Gutter className={`${baseClass}__payload-settings`}>
<h3>{t('general:payloadSettings')}</h3>
<div className={`${baseClass}__language`}>
<Label htmlFor="language-select" label={t('general:language')} />
<ReactSelect
inputId="language-select"
onChange={({ value }) => i18n.changeLanguage(value)}
options={languageOptions}
value={languageOptions.find((language) => language.value === i18n.language)}
/>
</div>
<ToggleTheme />
</Gutter>
</div>
</div>
<div className={`${baseClass}__sidebar-wrap`}>
<div className={`${baseClass}__sidebar`}>
<div className={`${baseClass}__sidebar-sticky-wrap`}>
<div className={`${baseClass}__sidebar-fields`}>
<RenderFields
fieldSchema={fields}
fieldTypes={fieldTypes}
filter={(field) => field?.admin?.position === 'sidebar'}
permissions={permissions?.fields}
readOnly={!hasSavePermission}
/>
</div>
</div>
</div>
</div>
</Form>
</OperationContext.Provider>
</div>
)}
</React.Fragment>
)

View File

@@ -0,0 +1,45 @@
@import '../../../../scss/styles.scss';
.payload-settings {
position: relative;
h3 {
margin: 0;
}
&::before,
&::after {
content: '';
display: block;
height: 1px;
background: var(--theme-elevation-100);
width: calc(100% + calc(var(--base) * 5));
left: calc(var(--gutter-h) * -1);
top: 0;
position: absolute;
}
&::after {
display: none;
bottom: 0;
top: unset;
}
margin-top: base(3);
padding-top: base(3);
padding-bottom: base(3);
display: flex;
flex-direction: column;
gap: var(--base);
@include mid-break {
margin-bottom: var(--base);
padding-top: base(2);
margin-top: base(2);
padding-bottom: base(2);
&::after {
display: block;
}
}
}

View File

@@ -0,0 +1,42 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import type { Translation } from '../../../../../translations/type'
import ReactSelect from '../../../elements/ReactSelect'
import Label from '../../../forms/Label'
import { ToggleTheme } from '../ToggleTheme'
import './index.scss'
const baseClass = 'payload-settings'
export const Settings: React.FC<{
className?: string
}> = (props) => {
const { className } = props
const { i18n, t } = useTranslation('authentication')
const languageOptions = Object.entries(i18n.options.resources || {}).map(
([language, resource]) => ({
label: (resource as Translation).general.thisLanguage,
value: language,
}),
)
return (
<div className={[baseClass, className].filter(Boolean).join(' ')}>
<h3>{t('general:payloadSettings')}</h3>
<div className={`${baseClass}__language`}>
<Label htmlFor="language-select" label={t('general:language')} />
<ReactSelect
inputId="language-select"
onChange={({ value }) => i18n.changeLanguage(value)}
options={languageOptions}
value={languageOptions.find((language) => language.value === i18n.language)}
/>
</div>
<ToggleTheme />
</div>
)
}

View File

@@ -1,47 +1,19 @@
@import '../../../scss/styles.scss';
.account {
width: 100%;
padding-bottom: var(--spacing-view-bottom);
&__form {
height: 100%;
}
&__edit {
margin-top: calc(var(--base) * 3);
}
&__auth {
margin-bottom: var(--base);
margin-bottom: calc(var(--base) * 2);
margin-top: calc(var(--base) * 0.5);
}
&__header {
display: flex;
flex-direction: column;
}
&__payload-settings {
margin-top: base(3);
padding-top: base(3);
border-top: 1px solid var(--theme-elevation-100);
}
&__language {
margin-bottom: $baseline;
&___settings {
margin-bottom: calc(var(--base) * 2);
}
@include small-break {
&__edit {
margin: var(--base) 0;
}
&__payload-settings {
margin-top: base(1);
padding-top: base(1);
padding-bottom: base(0.5);
border-top: 1px solid var(--theme-elevation-100);
border-bottom: 1px solid var(--theme-elevation-100);
&__auth {
margin-top: 0;
margin-bottom: var(--base);
}
}
}

View File

@@ -2,11 +2,14 @@ import React, { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useLocation } from 'react-router-dom'
import type { CollectionPermission } from '../../../../auth'
import type { Fields } from '../../forms/Form/types'
import type { DefaultAccountViewProps } from './Default'
import usePayloadAPI from '../../../hooks/usePayloadAPI'
import { useStepNav } from '../../elements/StepNav'
import buildStateFromSchema from '../../forms/Form/buildStateFromSchema'
import { fieldTypes } from '../../forms/field-types'
import { useAuth } from '../../utilities/Auth'
import { useConfig } from '../../utilities/Config'
import { useDocumentInfo } from '../../utilities/DocumentInfo'
@@ -125,23 +128,29 @@ const AccountView: React.FC = () => {
const isLoading = !internalState || !docPermissions || isLoadingData
const componentProps: DefaultAccountViewProps = {
id: id.toString(),
action,
apiURL,
collection,
data,
fieldTypes,
hasSavePermission,
initialState: internalState,
isLoading,
onSave,
permissions: docPermissions as CollectionPermission,
updatedAt: data?.updatedAt,
user,
}
return (
<RenderCustomComponent
CustomComponent={
typeof CustomAccountComponent === 'function' ? CustomAccountComponent : undefined
}
DefaultComponent={DefaultAccount}
componentProps={{
action,
apiURL,
collection,
data,
hasSavePermission,
initialState: internalState,
isLoading,
onSave,
permissions: docPermissions,
}}
componentProps={componentProps}
/>
)
}

View File

@@ -1,6 +1,7 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import type { FieldTypes } from '../../forms/field-types'
import type { GlobalEditViewProps } from '../types'
import { getTranslation } from '../../../../utilities/getTranslation'
@@ -15,11 +16,12 @@ import './index.scss'
const baseClass = 'global-edit'
const DefaultGlobalView: React.FC<
GlobalEditViewProps & {
export type DefaultGlobalViewProps = GlobalEditViewProps & {
disableRoutes?: boolean
fieldTypes: FieldTypes
}
> = (props) => {
const DefaultGlobalView: React.FC<DefaultGlobalViewProps> = (props) => {
const { i18n } = useTranslation('general')
const {
@@ -27,6 +29,7 @@ const DefaultGlobalView: React.FC<
apiURL,
data,
disableRoutes,
fieldTypes,
global,
initialState,
isLoading,
@@ -61,7 +64,7 @@ const DefaultGlobalView: React.FC<
{disableRoutes ? (
<CustomGlobalComponent view="Default" {...props} />
) : (
<GlobalRoutes {...props} />
<GlobalRoutes {...props} fieldTypes={fieldTypes} />
)}
</React.Fragment>
)}

View File

@@ -1,43 +1,36 @@
import React from 'react'
import { useTranslation } from 'react-i18next'
import type { FieldTypes } from '../../../forms/field-types'
import type { GlobalEditViewProps } from '../../types'
import { getTranslation } from '../../../../../utilities/getTranslation'
import { DocumentControls } from '../../../elements/DocumentControls'
import { Gutter } from '../../../elements/Gutter'
import ViewDescription from '../../../elements/ViewDescription'
import RenderFields from '../../../forms/RenderFields'
import { filterFields } from '../../../forms/RenderFields/filterFields'
import { fieldTypes } from '../../../forms/field-types'
import { DocumentFields } from '../../../elements/DocumentFields'
import { LeaveWithoutSaving } from '../../../modals/LeaveWithoutSaving'
import Meta from '../../../utilities/Meta'
import { SetStepNav } from '../../collections/Edit/SetStepNav'
import './index.scss'
const baseClass = 'global-default-edit'
export const DefaultGlobalEdit: React.FC<GlobalEditViewProps> = (props) => {
const { i18n } = useTranslation('general')
const { apiURL, data, global, permissions } = props
export const DefaultGlobalEdit: React.FC<
GlobalEditViewProps & {
fieldTypes: FieldTypes
}
> = (props) => {
const { apiURL, data, fieldTypes, global, permissions } = props
const { i18n } = useTranslation()
const { admin: { description } = {}, fields, label } = global
const hasSavePermission = permissions?.update?.permission
const sidebarFields = filterFields({
fieldSchema: fields,
fieldTypes,
filter: (field) => field?.admin?.position === 'sidebar',
permissions: permissions.fields,
readOnly: !hasSavePermission,
})
const hasSidebar = sidebarFields && sidebarFields.length > 0
return (
<React.Fragment>
<Meta
description={getTranslation(label, i18n)}
keywords={`${getTranslation(label, i18n)}, Payload, CMS`}
title={getTranslation(label, i18n)}
/>
{!(global.versions?.drafts && global.versions?.drafts?.autosave) && <LeaveWithoutSaving />}
<SetStepNav global={global} />
<DocumentControls
apiURL={apiURL}
@@ -47,60 +40,13 @@ export const DefaultGlobalEdit: React.FC<GlobalEditViewProps> = (props) => {
isEditing
permissions={permissions}
/>
<div
className={[
baseClass,
hasSidebar ? `${baseClass}--has-sidebar` : `${baseClass}--no-sidebar`,
]
.filter(Boolean)
.join(' ')}
>
<div className={`${baseClass}__main`}>
<Meta
description={getTranslation(label, i18n)}
keywords={`${getTranslation(label, i18n)}, Payload, CMS`}
title={getTranslation(label, i18n)}
/>
{!(global.versions?.drafts && global.versions?.drafts?.autosave) && (
<LeaveWithoutSaving />
)}
<Gutter className={`${baseClass}__edit`}>
<header className={`${baseClass}__header`}>
{description && (
<div className={`${baseClass}__sub-header`}>
<ViewDescription description={description} />
</div>
)}
</header>
<RenderFields
fieldSchema={fields}
<DocumentFields
description={description}
fieldTypes={fieldTypes}
filter={(field) =>
!field.admin.position ||
(field.admin.position && field.admin.position !== 'sidebar')
}
permissions={permissions.fields}
readOnly={!hasSavePermission}
fields={fields}
hasSavePermission={hasSavePermission}
permissions={permissions}
/>
</Gutter>
</div>
{hasSidebar && (
<div className={`${baseClass}__sidebar-wrap`}>
<div className={`${baseClass}__sidebar`}>
<div className={`${baseClass}__sidebar-sticky-wrap`}>
<div className={`${baseClass}__sidebar-fields`}>
<RenderFields
fieldTypes={fieldTypes}
fields={sidebarFields}
permissions={permissions.fields}
readOnly={!hasSavePermission}
/>
</div>
</div>
</div>
</div>
)}
</div>
</React.Fragment>
)
}

View File

@@ -3,6 +3,7 @@ import React from 'react'
import type { GlobalEditViewProps } from '../../types'
import { API } from '../../API'
import { LivePreviewView } from '../../LivePreview'
import VersionView from '../../Version/Version'
import VersionsView from '../../Versions'
import { DefaultGlobalEdit } from '../Default/index'
@@ -21,7 +22,7 @@ export const defaultGlobalViews: {
} = {
API,
Default: DefaultGlobalEdit,
LivePreview: null,
LivePreview: LivePreviewView,
References: null,
Relationships: null,
Version: VersionView,

View File

@@ -2,6 +2,7 @@ import { lazy } from 'react'
import React from 'react'
import { Route, Switch, useRouteMatch } from 'react-router-dom'
import type { FieldTypes } from '../../../forms/field-types'
import type { GlobalEditViewProps } from '../../types'
import { useAuth } from '../../../utilities/Auth'
@@ -13,7 +14,11 @@ import { globalCustomRoutes } from './custom'
// @ts-expect-error Just TypeScript being broken // TODO: Open TypeScript issue
const Unauthorized = lazy(() => import('../../Unauthorized'))
export const GlobalRoutes: React.FC<GlobalEditViewProps> = (props) => {
export const GlobalRoutes: React.FC<
GlobalEditViewProps & {
fieldTypes: FieldTypes
}
> = (props) => {
const { global, permissions } = props
const match = useRouteMatch()

View File

@@ -3,11 +3,12 @@ import { useTranslation } from 'react-i18next'
import { useLocation } from 'react-router-dom'
import type { Fields } from '../../forms/Form/types'
import type { GlobalEditViewProps } from '../types'
import type { DefaultGlobalViewProps } from './Default'
import type { IndexProps } from './types'
import usePayloadAPI from '../../../hooks/usePayloadAPI'
import buildStateFromSchema from '../../forms/Form/buildStateFromSchema'
import { fieldTypes } from '../../forms/field-types'
import { useAuth } from '../../utilities/Auth'
import { useConfig } from '../../utilities/Config'
import { useDocumentInfo } from '../../utilities/DocumentInfo'
@@ -104,13 +105,14 @@ const GlobalView: React.FC<IndexProps> = (props) => {
const isLoading = !initialState || !docPermissions || isLoadingData
const componentProps: GlobalEditViewProps = {
const componentProps: DefaultGlobalViewProps = {
action: `${serverURL}${api}/globals/${slug}?locale=${locale}&fallback-locale=null`,
apiURL: `${serverURL}${api}/globals/${slug}?locale=${locale}${
global.versions?.drafts ? '&draft=true' : ''
}`,
canAccessAdmin: permissions?.canAccessAdmin,
data: dataToRender,
fieldTypes,
global,
initialState,
isLoading,

View File

@@ -125,12 +125,14 @@ export const LivePreviewProvider: React.FC<LivePreviewProviderProps> = (props) =
// Unlike iframe elements which have an `onLoad` handler, there is no way to access `window.open` on popups
useEffect(() => {
const handleMessage = (event: MessageEvent) => {
if (url.startsWith(event.origin)) {
const data = JSON.parse(event.data)
if (url.startsWith(event.origin) && data.type === 'payload-live-preview' && data.ready) {
if (data.type === 'payload-live-preview' && data.ready) {
setAppIsReady(true)
}
}
}
window.addEventListener('message', handleMessage)

View File

@@ -41,18 +41,6 @@
}
}
&__edit {
padding-top: calc(var(--base) * 1.5);
padding-bottom: base(4);
flex-grow: 1;
padding-right: calc(var(--base) * 2);
[dir='rtl'] & {
padding-right: 0;
padding-left: calc(var(--base) * 2);
}
}
@include mid-break {
flex-direction: column;
@@ -68,18 +56,6 @@
&__form {
display: block;
}
&__edit {
padding-top: var(--base);
padding-bottom: 0;
padding-right: var(--gutter-h);
}
}
@include small-break {
&__edit {
padding-top: calc(var(--base) / 2);
}
}
}

View File

@@ -1,16 +1,17 @@
import React, { Fragment } from 'react'
import { useTranslation } from 'react-i18next'
import type { SanitizedCollectionConfig } from '../../../../collections/config/types'
import type { LivePreviewConfig } from '../../../../exports/config'
import type { SanitizedCollectionConfig, SanitizedGlobalConfig } from '../../../../exports/types'
import type { Field } from '../../../../fields/config/types'
import type { SanitizedGlobalConfig } from '../../../../globals/config/types'
import type { FieldTypes } from '../../forms/field-types'
import type { EditViewProps } from '../types'
import { getTranslation } from '../../../../utilities/getTranslation'
import { DocumentControls } from '../../elements/DocumentControls'
import { DocumentFields } from '../../elements/DocumentFields'
import { Gutter } from '../../elements/Gutter'
import RenderFields from '../../forms/RenderFields'
import { filterFields } from '../../forms/RenderFields/filterFields'
import { fieldTypes } from '../../forms/field-types'
import { LeaveWithoutSaving } from '../../modals/LeaveWithoutSaving'
import { useConfig } from '../../utilities/Config'
import { useDocumentInfo } from '../../utilities/DocumentInfo'
@@ -25,11 +26,15 @@ import { usePopupWindow } from './usePopupWindow'
const baseClass = 'live-preview'
const PreviewView: React.FC<EditViewProps> = (props) => {
const PreviewView: React.FC<
EditViewProps & {
fieldTypes: FieldTypes
}
> = (props) => {
const { i18n, t } = useTranslation('general')
const { previewWindowType } = useLivePreviewContext()
const { apiURL, data, permissions } = props
const { apiURL, data, fieldTypes, permissions } = props
let collection: SanitizedCollectionConfig
let global: SanitizedGlobalConfig
@@ -38,6 +43,9 @@ const PreviewView: React.FC<EditViewProps> = (props) => {
let hasSavePermission: boolean
let isEditing: boolean
let id: string
let fields: Field[] = []
let label: SanitizedGlobalConfig['label']
let description: SanitizedGlobalConfig['admin']['description']
if ('collection' in props) {
collection = props?.collection
@@ -46,24 +54,39 @@ const PreviewView: React.FC<EditViewProps> = (props) => {
hasSavePermission = props?.hasSavePermission
isEditing = props?.isEditing
id = props?.id
fields = props?.collection?.fields
}
if ('global' in props) {
global = props?.global
fields = props?.global?.fields
label = props?.global?.label
description = props?.global?.admin?.description
hasSavePermission = permissions?.update?.permission
}
const { fields } = collection
const sidebarFields = filterFields({
fieldSchema: fields,
fieldTypes,
filter: (field) => field?.admin?.position === 'sidebar',
permissions: permissions.fields,
readOnly: !hasSavePermission,
})
return (
<Fragment>
{collection && (
<Meta
description={t('editing')}
keywords={`${getTranslation(collection.labels.singular, i18n)}, Payload, CMS`}
title={`${isEditing ? t('editing') : t('creating')} - ${getTranslation(
collection.labels.singular,
i18n,
)}`}
/>
)}
{global && (
<Meta
description={getTranslation(label, i18n)}
keywords={`${getTranslation(label, i18n)}, Payload, CMS`}
title={getTranslation(label, i18n)}
/>
)}
{((collection && !(collection.versions?.drafts && collection.versions?.drafts?.autosave)) ||
(global && !(global.versions?.drafts && global.versions?.drafts?.autosave))) &&
!disableLeaveWithoutSaving && <LeaveWithoutSaving />}
<SetStepNav
collection={collection}
global={global}
@@ -95,28 +118,14 @@ const PreviewView: React.FC<EditViewProps> = (props) => {
.filter(Boolean)
.join(' ')}
>
<Meta
description={t('editing')}
keywords={`${getTranslation(collection.labels.singular, i18n)}, Payload, CMS`}
title={`${isEditing ? t('editing') : t('creating')} - ${getTranslation(
collection.labels.singular,
i18n,
)}`}
/>
{!(collection.versions?.drafts && collection.versions?.drafts?.autosave) &&
!disableLeaveWithoutSaving && <LeaveWithoutSaving />}
<Gutter className={`${baseClass}__edit`}>
<RenderFields
fieldSchema={fields}
<DocumentFields
description={description}
fieldTypes={fieldTypes}
filter={(field) => !field?.admin?.position || field?.admin?.position !== 'sidebar'}
permissions={permissions.fields}
readOnly={!hasSavePermission}
fields={fields}
forceSidebarWrap
hasSavePermission={hasSavePermission}
permissions={permissions}
/>
{sidebarFields && sidebarFields.length > 0 && (
<RenderFields fieldTypes={fieldTypes} fields={sidebarFields} />
)}
</Gutter>
</div>
<LivePreview {...props} />
</div>
@@ -124,7 +133,11 @@ const PreviewView: React.FC<EditViewProps> = (props) => {
)
}
export const LivePreviewView: React.FC<EditViewProps> = (props) => {
export const LivePreviewView: React.FC<
EditViewProps & {
fieldTypes: FieldTypes
}
> = (props) => {
const config = useConfig()
const documentInfo = useDocumentInfo()
const locale = useLocale()

View File

@@ -8,10 +8,10 @@ import type { Props } from './types'
import { formatDate } from '../../../../utilities/formatDate'
import ReactSelect from '../../../elements/ReactSelect'
import { fieldBaseClass } from '../../../forms/field-types/shared'
import { useConfig } from '../../../utilities/Config'
import { mostRecentVersionOption, publishedVersionOption } from '../shared'
import './index.scss'
import { fieldBaseClass } from '../../../forms/field-types/shared'
const baseClass = 'compare-version'
@@ -104,6 +104,7 @@ const CompareVersion: React.FC<Props> = (props) => {
<div className={`${baseClass}__label`}>{t('compareVersion')}</div>
{!errorLoading && (
<ReactSelect
isClearable={false}
isSearchable={false}
onChange={onChange}
onMenuScrollToBottom={() => {

View File

@@ -31,6 +31,10 @@ const generateLabelFromValue = (
let relatedDoc: RelationshipValue
let valueToReturn = '' as any
if (value === null || typeof value === 'undefined') {
return String(value)
}
if (Array.isArray(field.relationTo)) {
if (typeof value === 'object') {
relation = value.relationTo
@@ -115,8 +119,6 @@ const Relationship: React.FC<Props & { field: RelationshipField }> = ({
/>
</div>
)
return null
}
export default Relationship

View File

@@ -17,9 +17,9 @@ const SelectLocales: React.FC<Props> = ({ onChange, options, value }) => {
<ReactSelect
isMulti
onChange={onChange}
options={options.map(({ code }) => ({ label: code, value: code }))}
options={options}
placeholder={t('selectLocales')}
value={value.map(({ code }) => ({ label: code, value: code }))}
value={value}
/>
</div>
)

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