Commit Graph

135 Commits

Author SHA1 Message Date
James
077bd7fad3 chore: rich text docs 2023-10-08 19:37:41 -04:00
Tylan Davis
b51987d4ac chore: adds point field database disclaimer 2023-10-08 16:10:10 -04:00
Jarrod Flesch
6a74173789 chore: merges existing docs with 2.0 docs (#3450) 2023-10-06 13:33:24 -04:00
Jessica Boezwinkle
01891bb8bc docs: updates config examples, oninit props, mongoDB references and adds warning to point field 2023-10-06 17:16:38 +01:00
Alessio Gravili
a81401cf77 feat: breaking: richtext adapter (#3311)
BREAKING: requires user to install @payloacms-richtext-slate and specify a `config.editor` property

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

* chore: fieldTypes stuff

* chore: fix richtext-slate tsconfig

* chore: add clean:unix command

* chore: fix up things

* chore: undo subpath imports being hoisted up

* chore: fix incorrect imports

* chore: improve AdapterArguments type

* chore: remove unused richTextToHTML and stringifyRichText files

* fix: core-dev scss imports

* chore: fix publishConfig exports for richtext-slate

* chore: adjust joi schema for richtext field

* chore: various fixes

* chore: handle afterRead population in richText adapter

* chore: handle more after-read promise stuff

* chore: fix joi validation

* chore: add richtext adapter to tests

* chore: merge adapter props with field props

* chore: index.tsx => index.ts

* chore: rename `adapter` to `editor`

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

This fails because createSlate imports React components.

* chore: remove unnecessary import

* chore: improve various typings

* chore: improve typings for List view Cell components

* feat: richText adapter cell component

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

* chore: add new adapter interface properties to joi schema

* chore: withMergedProps utility which replaces getSlateCellComponent and getSlateFieldComponent

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

* docs: mention editor and defaultEditor property in the docs

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

* chore: fix various errors

* chore: auto-generated pointer files
2023-09-19 11:03:31 +02:00
Alessio Gravili
ae7d6f97d2 chore: formatting and linting (#3261)
* chore: lint packages/payload

* chore: lint packages/db-postgres

* chore: lint packages/db-mongodb

* chore: update eslintrc exclusion rules

* chore: update eslintrc exclusion rules

* chore: lint misc files

* chore: run prettier through packages

* chore: run eslint on payload again

* chore: prettier misc files

* chore: prettier docs
2023-09-01 17:39:44 +02:00
Alessio Gravili
9467074fb9 chore: update 2.0 branch from master (#3207)
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
Co-authored-by: Alessio Gravili <alessio@gravili.de>
Co-authored-by: PatrikKozak <patrik@trbl.design>
Co-authored-by: Lucas Blancas <lablancas@gmail.com>
Co-authored-by: Stef Gootzen <37367280+stefgootzen@users.noreply.github.com>
Co-authored-by: Jarrod Flesch <30633324+JarrodMFlesch@users.noreply.github.com>
Co-authored-by: Jessica Chowdhury <67977755+JessChowdhury@users.noreply.github.com>
Co-authored-by: PatrikKozak <35232443+PatrikKozak@users.noreply.github.com>
Co-authored-by: Greg Willard <Wickett06@gmail.com>
Co-authored-by: James Mikrut <james@payloadcms.com>
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
Co-authored-by: Elliot DeNolf <denolfe@gmail.com>
fix: WhereBuilder component does not accept all valid Where queries (#3087)
fix: passes in height to resizeOptions upload option to allow height resize (#3171)
2023-08-22 16:04:50 -04:00
Alessio Gravili
f911257cd9 feat: RTL Support (#3003)
Co-authored-by: Alessio Gravili <alessio@gravili.de>
Co-authored-by: ibr-hin95 <ibr.hin95@gmail.com>
Co-authored-by: Seied Ali Mirkarimi <dasmergo@gmail.com>
Co-authored-by: muathkhatib <mkhatib.dev@gmail.com>
Co-authored-by: ibr-hin95 <40246707+ibr-hin95@users.noreply.github.com>
fix: recursiveNestedPaths not merging existing fields when hoisting row/collapsible fields (#2769)
fix: exclude monaco code editor from ltr due to microsoft/monaco-editor#2371

BREAKING CHANGE:
- The admin hook for `useLocale` now returns a Locale object of the currently active locale. Previously this would only return the code as a string. Any custom components built which had `locale = useLocale()` should be replaced with `{ code: locale } = useLocale()` to maintain the same functionality.
- The property `localization.locales` of `SanitizedConfig` type has changed. This was an array of strings and is now an array of Locale objects having: `label: string`, `code: string` and `rtl: boolean`. If you are using localization.locales from the config you will need to adjust your project or plugin accordingly.
2023-08-22 12:18:15 -04:00
Jordy Alcides
bad363882c feat: allow async relationship filter options (#2951)
* chore: improving relationship filter options;

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

* chore: add failing test case

* fix: translation followingFieldsInvalid_many not getting triggered

* docs: improve documentation

---------

Co-authored-by: Alessio Gravili <alessio@gravili.de>
2023-08-14 17:29:29 +02:00
Mark Barton
a0b13a5b01 feat: text alignment for richtext editor (#2803)
* Update isActive.tsx

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

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

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

* Update toggle.tsx

Added to toggleElement public function

* Update isActive.tsx

* Update toggle.tsx

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

* added margin to void elements

* fix: list alignment

* removed textAlign from elements and added docs

* chore: fix typo

---------

Co-authored-by: Alessio Gravili <alessio@gravili.de>
2023-08-14 17:08:50 +02:00
Jessica Chowdhury
8ae98503f5 docs: adds images to each field page (#3137) 2023-08-08 10:00:21 -04:00
Dan Ribbens
e8f05165eb feat: default tab labels from name (#3129) 2023-08-05 13:48:56 -04:00
Jarrod Flesch
d112159d93 docs: fix mdx formatting 2023-07-05 15:26:10 -04:00
Jacob Fletcher
9b22c4b654 docs: fixes misc links (#2971) 2023-07-05 12:02:56 -04:00
Alessio Gravili
8f086e315c feat: hasMany for number field (#2517)
* added custom config extension points

* Added custom field to documentation

* fix: not building due to incorrect typings

* Upload dist

* point to number array test

* feat: hasMany for number field

* fix: types

* Fix: incorrectly styles input for hasMany

* Revert "point to number array test"

This reverts commit 5a5162a803.

* Revert "Merge branch 'production-with-custom' into number-hasmany-v2"

This reverts commit dfc3ac523e, reversing
changes made to a3b1b7dd67.

* test: adds test for numbers with hasMany

* test: add number field e2e

* Fix updated index.tsx

* Fix updated index.tsx

* chore: add jsDocs for hasMany property

* chore: rename isMultiText to isCreatable, as it makes more sense

* fix: incorrect double space in comments

* chore: rename onMultiTextChange to handleHasManyChange

* chore: improve ordering

* docs: add documentation for hasMany

* docs: add more jsdocs for number field

* fix: new value not transformed to number

* improve types

* fix: only allow numbers as input using filterOption

* fix: Option / value type breaking sortable selects

* fix: typings and add id for sorting

* add animation to react select

* undo transitions due to glitches

* fix: keyboard handler for select for empty input values

* fix: validation for hasMany numbers

* feat: perform validation in the filter as well

* attempt to fix duplicate key issue

* add todo

* remove console logs

* fix: stupid key warning

* fix: validation tests

* feat: add filterOption to keydown listener

* feat: numberOnly for react-select

* chore: improve variable naming

* fix: allow numbers for relationship value by stringifying those for sortable react-selects

* feat: generated types for hasMany number field

* graphql typings part 1

* graphql defaults type

* better typing for number in buildObjectType

* fix: default graphql type disregarding hasMany for relationship field

* feat: minRows and maxRows for hasMany numbers

* simplify joi schema

* working minRows and maxRows validation!

* jesus christ: fix incorrect translations for number & relationship fields for greaterThanMax and lessThanMin

* fix weird type error

* move validation tests to validations.spec.ts and fix them

* fix: make sure filterOption only passes a number array to validate function

* fix: adds missing dark-mode styles for version differences view (#2812)

Co-authored-by: Tylan Davis <tylan@Tylans-MacBook-Pro.local>

* fix: #2821 i18n ui field label (#2823)

* chore: version diff styles (#2824)

Co-authored-by: Tylan Davis <tylan@Tylans-MacBook-Pro.local>

* chore: remove --legacy-peer-deps from gh actions workflow (#2814)

* chore: removes cms text from instances of payload name (#2793)

* chore(release): v1.9.2

* chore: update changelog release notes v1.9.2

* chore: cleans up graphql-schema-gen test folder

* fix: adds custom property to ui field in joi validation (#2835)

* adjust validation

* improve isnumber function

* Update number.mdx

---------

Co-authored-by: Teun Mooij <tmooij@infinitaslearning.com>
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
Co-authored-by: Tylan Davis <89618855+tylandavis@users.noreply.github.com>
Co-authored-by: Tylan Davis <tylan@Tylans-MacBook-Pro.local>
Co-authored-by: Dan Ribbens <DanRibbens@users.noreply.github.com>
Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
Co-authored-by: Jarrod Flesch <jarrodmflesch@gmail.com>
Co-authored-by: Jarrod Flesch <30633324+JarrodMFlesch@users.noreply.github.com>
2023-06-20 20:21:27 +02:00
Alessio Gravili
0d8d7f358d fix: deprecate min/max in exchange for minRows and maxRows for relationship field (#2826)
* fix: deprecate min/max in exchange for minRows and maxRows for relationship

* fix: update validations unit tests with minRows and maxRows

* fix: incorrect types

* move to sanitize
2023-06-18 02:09:30 +02:00
Jessica Boezwinkle
f7cacbe932 docs: fix blocks table 2023-06-12 17:27:18 +01:00
Jarrod Flesch
8458a98eff feat: custom type interfaces (#2709)
* feat: ability to hoist type interfaces and reuse them

* docs: organizes ts and gql docs, adds section for field interfaces on both
2023-06-07 12:48:41 -04:00
PatrikKozak
9be854a1a4 chore: updates ui field docs to show admin.components.Field is required 2023-05-30 12:01:33 -04:00
Jacob Fletcher
1ceea645b6 chore: replaces instances of the text Mongo with MongoDB 2023-05-17 16:35:55 -04:00
Michel v. Varendorff
967899229f feat: collection admin.enableRichTextLink property (#2560) 2023-05-04 16:31:40 -04:00
Jarrod Flesch
56a1dee3d6 docs: fix ui field example code block config 2023-05-04 09:33:28 -04:00
Harrison-Blair
13179a9498 chore: misc documentation updates (#2589)
* chore: ensures example configs are being exported when necessary
* chore: adds note regarding updating of hidden fields

---------

Co-authored-by: Jessica Boezwinkle <jessica@trbl.design>
2023-05-01 16:28:13 -04:00
Michel v. Varendorff
bf6522898d feat: allow customizing the link fields (#2559) 2023-04-26 11:08:47 -04:00
James
48941dce07 chore: merge conflicts 2023-04-24 17:11:23 -04:00
Jessica Boezwinkle
4fb8b0fa28 chore: updates richText docs 2023-04-24 17:58:49 +01:00
Dan Ribbens
f6db81e431 docs: add user to field conditional logic 2023-04-21 22:55:23 -04:00
mauricewegner
ed230a42e0 feat: add rich-text blockquote element, change quote node type to blockquote 2023-04-20 21:52:05 +02:00
Teun Mooij
023719d775 feat: configuration extension points
* added custom config extension points

* Added custom field to documentation

* fix deeprequired issue
2023-04-18 15:28:42 -04:00
Jessica Boezwinkle
fb89793703 docs: typo in date field and double link in textarea field 2023-04-06 11:35:15 +01:00
PatrikKozak
67098f7a3e chore: updates date field docs 2023-04-05 21:19:26 -04:00
Jessica Boezwinkle
c2ca499516 docs: update date field 2023-03-27 17:08:20 +01:00
Dan Ribbens
0fedbabe9e feat: bulk-operations (#2346)
Co-authored-by: PatrikKozak <patrik@trbl.design>
2023-03-23 12:33:13 -04:00
Dan Ribbens
87a60325cf docs: adds min and max options to relationship with hasMany 2023-03-04 16:23:28 -05:00
Jessica Chowdhury
40224ed1bc fix: checks locale is valid for monaco code editor (#2144) 2023-02-20 13:52:04 -05:00
James
5c5f1f9735 chore: inaccurate group field docs, fixes #2118 2023-02-18 09:33:31 -05:00
Lucas Levin
d4c1e0deb0 docs: date field pickerAppearance defaults (#2086) 2023-02-13 21:46:30 -05:00
Jacob Fletcher
6096044fe0 feat: allows control over relationship add new button 2023-02-13 00:23:31 -05:00
Charles Kornoelje
55aec55ef2 Update radio.mdx 2023-02-10 11:54:30 -05:00
Charles Kornoelje
e072dad30c Update radio.mdx
Matches the pattern in the documentation of `title = {label} Field`
2023-02-10 11:50:51 -05:00
Jarrod Flesch
d97c9fd2ee chore: moves editorProps into admin property for code and json field types 2023-01-04 08:41:59 -05:00
Jarrod Flesch
27ab978565 chore: updates json field docs 2023-01-03 15:01:43 -05:00
Jarrod Flesch
f7d664fdcf docs: updates code and json field types to reflect internal switch to monaco-react editor 2023-01-03 15:01:04 -05:00
Jacob Fletcher
8e6b2c4f9d docs: reserved field names 2023-01-02 00:47:54 -05:00
Dan Ribbens
283343c4a4 docs: update upload filterOptions 2022-12-01 15:50:41 -05:00
Dan Ribbens
924d903456 docs: remove GraphQL from label descriptions 2022-12-01 15:48:40 -05:00
Justin Nicewander
49efd028fa docs: add filter options section to upload field docs. (#1550) 2022-12-01 15:47:37 -05:00
Dan Ribbens
bab34d82f5 feat: add i18n to admin panel (#1326)
Co-authored-by: shikhantmaungs <shinkhantmaungs@gmail.com>
Co-authored-by: Thomas Ghysels <info@thomasg.be>
Co-authored-by: Kokutse Djoguenou <kokutse@Kokutses-MacBook-Pro.local>
Co-authored-by: Christian Gil <47041342+ChrisGV04@users.noreply.github.com>
Co-authored-by: Łukasz Rabiec <lukaszrabiec@gmail.com>
Co-authored-by: Jenny <jennifer.eberlei@gmail.com>
Co-authored-by: Hung Vu <hunghvu2017@gmail.com>
Co-authored-by: Shin Khant Maung <101539335+shinkhantmaungs@users.noreply.github.com>
Co-authored-by: Carlo Brualdi <carlo.brualdi@gmail.com>
Co-authored-by: Ariel Tonglet <ariel.tonglet@gmail.com>
Co-authored-by: Roman Ryzhikov <general+github@ya.ru>
Co-authored-by: maekoya <maekoya@stromatolite.jp>
Co-authored-by: Emilia Trollros <3m1l1a@emiliatrollros.se>
Co-authored-by: Kokutse J Djoguenou <90865585+Julesdj@users.noreply.github.com>
Co-authored-by: Mitch Dries <mitch.dries@gmail.com>

BREAKING CHANGE: If you assigned labels to collections, globals or block names, you need to update your config! Your GraphQL schema and generated Typescript interfaces may have changed. Payload no longer uses labels for code based naming. To prevent breaking changes to your GraphQL API and typescript types in your project, you can assign the below properties to match what Payload previously generated for you from labels.

On Collections
Use `graphQL.singularName`, `graphQL.pluralName` for GraphQL schema names.
Use `typescript.interface` for typescript generation name.

On Globals
Use `graphQL.name` for GraphQL Schema name.
Use `typescript.interface` for typescript generation name.

On Blocks (within Block fields)
Use `graphQL.singularName` for graphQL schema names.
2022-11-18 07:36:30 -05:00
Jarrod Flesch
8d827933f3 docs: updates docs to reflect new API 2022-11-16 13:35:00 -05:00
Jarrod Flesch
fe221aea67 Merge remote-tracking branch 'origin/master' into pr/bigmistqke/1223 2022-11-16 09:00:53 -05:00