Commit Graph

56 Commits

Author SHA1 Message Date
Dan Ribbens
eb58d9e877 chore: removes indexes from collection config (#3476) 2023-10-08 14:48:14 -04:00
Dan Ribbens
a6880207cd chore(db-postgres): schema building implements collection indexes (#3429) 2023-10-04 14:14:47 -04:00
James
09883ee78c chore: passing field tests 2023-09-27 16:25:23 -04:00
James
8e8ba82c6d chore: revises a few tests 2023-09-26 17:11:46 -04:00
James
e437b41950 chore: misc bugs, types pattern 2023-09-24 10:51:21 -07: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
Elliot DeNolf
744de9c706 chore: merge from 2.0 2023-09-14 12:10:36 -04:00
Alessio Gravili
1fbda85cd0 chore: lint and format everything again 2023-09-07 15:53:48 +02:00
Alessio Gravili
bd7bd8faec chore: fix MongooseAdapter import 2023-09-01 21:52:40 +02:00
James
0f3b364e46 chore: hoists tests out of payload package 2023-09-01 14:45:41 -04:00
Dan Ribbens
5d7aa0d009 chore: wip traversePaths of sort and buildSearchParams 2023-09-01 11:26:36 -04:00
Alessio Gravili
a67278b29f chore: move to monorepo structure 2023-08-23 12:20:30 +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
Dan Ribbens
e73cd26f10 merge master 2023-08-14 15:54:04 -04:00
Mark Barton
a0b13a5b01 feat: text alignment for richtext editor (#2803)
* Update isActive.tsx

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

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

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

* Update toggle.tsx

Added to toggleElement public function

* Update isActive.tsx

* Update toggle.tsx

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

* added margin to void elements

* fix: list alignment

* removed textAlign from elements and added docs

* chore: fix typo

---------

Co-authored-by: Alessio Gravili <alessio@gravili.de>
2023-08-14 17:08:50 +02:00
James
3a5851d28a chore: passing tests 2023-07-31 18:12:09 -04:00
James
9050493c61 chore: abstracts dev / test suites to accept incoming database specification 2023-07-30 12:27:15 -04:00
Alessio Gravili
c8c22dad06 feat: work on database adapter (#3000) 2023-07-17 13:22:51 -04:00
James
f84b4323e2 fix: #2937, depth not being respected in graphql rich text fields 2023-06-29 20:08:39 -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 5a5162a80302e974eef15c88a1bc32cbecd457e8.

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

This reverts commit dfc3ac523efc8cae70c9f0ccd48cd517b098a5e2, reversing
changes made to a3b1b7dd678809c239f8042362eaeada17035af0.

* 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
Dan Ribbens
9c5107e86d fix: timestamp queries (#2583) 2023-05-01 13:45:51 -04:00
Perry
85b3d579d3 feat: supports collection compound indexes (#2529)
Co-authored-by: Perry Li <yuanping.li@moblab.com>
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>
2023-04-26 11:11:01 -04:00
James
3a6acf322b fix: ensures select hasMany does not get mutated on patch operations 2023-04-04 08:16:10 -04:00
Jarrod Flesch
ace032ef89 fix: minimize not set to false on all field type schemas 2023-03-06 16:08:03 -05:00
Jarrod Flesch
c5f9fa0d97 chore: adds test to empty json objects REST api 2023-03-06 12:27:26 -05:00
Jarrod Flesch
45b36ce56d chore: improves empty object json field tests (#2207) 2023-02-28 10:51:38 -05:00
Jarrod Flesch
0247e2d106 fix: allows empty objects to be retained in db 2023-02-28 10:40:21 -05:00
Jacob Fletcher
9f30553813 feat: async plugins (#2030)
* feat: async plugins

* wip: async config

* fix: async config
2023-02-13 10:46:55 -05:00
Jarrod Flesch
ee682270a4 Merge remote-tracking branch 'origin' into feat/1695-nullable-localized-array-and-blocks 2023-01-09 16:19:11 -05:00
Jarrod Flesch
001a68f45c chore: adjusts block and array schemas to store undefined instead of empty arrays by default 2023-01-06 16:56:26 -05:00
James
681d75e43e chore: adapts tests to new jest version 2023-01-04 10:22:57 -05:00
Dan Ribbens
abaa22950c test: json field e2e and int 2022-12-23 17:45:22 -05:00
Dan Ribbens
756edb858a fix: Select with hasMany and localized (#1636) 2022-12-09 09:36:39 -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
James
21eb19edd1 chore: further refinements 2022-09-11 20:57:30 -07:00
James
ad4f7a5fff chore: fixes and cleanup 2022-09-11 20:07:02 -07:00
James
cd209379b2 chore: merge master 2022-09-11 18:07:05 -07:00
Elliot DeNolf
87346a97ab test: rich text internal link 2022-09-08 15:40:49 -07:00
James
078e8dcc51 feat: ensures you can query on blocks via specifying locale or not specifying locale 2022-08-15 17:59:08 -07:00
Dan Ribbens
2ca526bd22 chore: simplifies index creation 2022-08-15 16:54:23 -04:00
James
f2bec90663 Merge branch 'fix/#922-nested-index-creation' of github.com:payloadcms/payload into fix/#922-nested-index-creation 2022-08-15 12:37:10 -07:00
James
fba0847f0f fix: ensures you can query on mixed schema type within blocks 2022-08-12 16:08:36 -07:00
Dan Ribbens
f615abc9b1 fix: create indexes in nested fields 2022-08-12 11:59:51 -04:00
Dan Ribbens
2ae33b603a feat: WIP tab compatible with traverseFields 2022-08-11 12:05:35 -04:00
Dan Ribbens
6a6a69190f feat: tabs support localization at the tab level 2022-08-11 12:05:33 -04:00
Dan Ribbens
a83921a2fe feat: support localized tab fields 2022-08-11 12:05:02 -04:00
Dan Ribbens
874c001d3b fix: number validation works with 0 min and max (#906) 2022-08-10 08:18:39 -04:00
James
3343adb952 feat: allows querying on rich text content 2022-08-04 10:59:56 -04:00
James
d91b69c465 test: improves nested block test coverage 2022-08-03 13:49:49 -04:00
Dan Ribbens
c175476e74 fix: unique index creation (#867)
* fix: unique indexes created for mongo 5 and later

* test: add index test coverage for unique, nested and localized fields
2022-08-02 11:56:18 -04:00