Commit Graph

1148 Commits

Author SHA1 Message Date
Rijk van Zanten
92e1ee77bd Add support for Conditional Fields (#6864)
* Add conditions field to directus_fields

* Add conditions configuration

* Apply conditional overrides

* Handle conditions in nested groups

* Fix reverse mutating conditions

* Start on filter setup interface

* Move field types/constants to shared

* [WIP] Updated client side filter validation

* Support logical operators in client validation step

* Use new validation util in conditions check

* Add nesting in filter seutp

* Add filter rule setup configurator

* Fixes that should've been done in the merge

* Strip out filter-settings interface

TBD in a new PR

* Move browser to index
2021-07-26 18:02:24 -04:00
Rijk van Zanten
87ab9b3dfa Improve error reporting on CLI bootstrap command (#6977)
* Show full DB error on bootstrap connection issue

* Show full DB error on bootstrap
2021-07-26 17:10:10 +00:00
Nicola Krumschmidt
7d8aa9fced Replace DIRECTUS_DEV env var with NODE_ENV and SERVE_APP (#6929) 2021-07-22 23:47:56 +02:00
Adrian Dimitrov
efe7b076a3 Add default-folder option (#3209)
* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Update after rebase

* Add storage_default_folder setting, use folder when deploy file

* Fix files options; Add default label option for folder interface.

* Fix set folder for file

* UX

* Add migration for column, undo seed change

* Update nomanclature

* Make sure file library always submits folder, cleanup setting retrieval

* Use indexName on down migrate

* Fix import default folder, rename customPresets->folderPreset

* Rename interface import

* Use undefined as default folder

* Remove deprecated lang file

* Fix display of folder interface, treat null as value

* Move shared composable

* Remove unused ref

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-21 17:29:21 -04:00
Tim
2c9ff3bca6 Allow custom transformations of assets (#6593)
* Allow custom transformations of assets

This exposes one query parameter `transforms`, which is a JSON array of
shard transformation operations.

It also updates the asset presets. The UX for this still needs some work

* Rename options to arguments for presets

More explicit

* options -> arguments in setting spec

* Better errors for invalid JSON in asset presets

* Add limit to transforms query parameter

* Use flattened option for extra transforms

* Fix placeholder color of code input

* Allow "simple mode" aliases

* Add documentation

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-21 15:57:47 -04:00
Nicola Krumschmidt
b61543c0e9 Move DeepPartial to shared (#6886)
Also cleans it up and adds support for readonly arrays.
2021-07-20 11:40:59 -04:00
j3n57h0m45
79c91ed50d enable custom name for refresh token (#6890) 2021-07-20 15:29:11 +02:00
Nicola Krumschmidt
d3a960a0a0 Make extension loading more robust (#6845)
* Make extension loading more robust

* Remove unnecessary path joining
2021-07-16 13:57:18 -04:00
Rijk van Zanten
11479313c9 Use / as default value for public_url (#6860) 2021-07-16 17:45:39 +02:00
Rijk van Zanten
c2e1aca63b Make sure every DB returns time as HH:mm:ss (#6847)
Fixes #6492
2021-07-16 00:21:19 +02:00
Rijk van Zanten
f360a2d445 Fixed issue that would cause the wrong field to be extracted when using "detailed" updates in o2m with non-"id" primary keys (#6841)
Fixes #6817
2021-07-15 23:40:04 +02:00
Rijk van Zanten
262e8cdbb8 Show warning when PUBLIC_URL isn't correctly configured (#6840)
Closes #6539
2021-07-15 23:20:35 +02:00
Rijk van Zanten
be60fa9f31 Use [String] for CSV type in GraphQL (#6808)
Fixes #6653
2021-07-15 02:34:40 +02:00
Rijk van Zanten
1713f0cbf2 Allow setting a custom mailgun host (#6804)
Fixes #6787
2021-07-15 01:28:50 +02:00
Rijk van Zanten
ea19390f11 Add encrypt option to MS SQL questions (#6746) 2021-07-14 00:02:00 +02:00
Rijk van Zanten
5abfd96a99 Account for primary keys in A2O processing (#6783)
Fixes #6782
2021-07-13 16:26:56 -04:00
rijkvanzanten
f512ba5c1d Fix typo in asset cache default value 2021-07-13 16:10:57 -04:00
Aiden Foxx
2f3db645ef Fixed migration changing filesize failing on Oracle (#6722) 2021-07-12 14:09:50 +02:00
Sean Goff
f4177be18b fix shared deps constant naming (#6758) 2021-07-11 22:11:15 +02:00
Danny Coulombe
d1b4109f0d No error message from password reset request #6658 (#6734)
Co-authored-by: dannycoulombe <B!ahrk65>
2021-07-11 08:05:58 +00:00
Pascal Jufer
fb0e02cd4b Fix "Duplicate environment variable" error message never showing up (#6740) 2021-07-11 09:52:57 +02:00
Nicola Krumschmidt
b7a50c5012 Optimize extension-sdk CLI types (#6718)
* Add extension type guards

* Rename validate-extension-package util

* Optimize extension-sdk CLI types
2021-07-09 12:32:07 +02:00
Thijs-Jan
18ef097402 Fix item.read hook not firing for readByQuery (#6645)
* Move read hook to readByQuery method

* Return query to items.read hook, update docs accordingly
2021-07-07 12:13:38 +02:00
rijkvanzanten
e753e37cef Fix type warning 2021-07-05 11:51:39 +02:00
Alexander Krantz
43c4a49186 Fix extra dots being added (#6584) 2021-06-30 16:54:47 +00:00
Tommaso Bartolucci
0cca732f2f Add skip admin init flag (#6576)
* adds skipAdminInit flag to bootstrap

* checks for skipAdminInit flag

* update docs for skipAdminInit
2021-06-30 09:31:59 -04:00
Zorin Sergey
003d85f946 Add limit options for deleteMany files (#6561)
* Changed filesize to bigint for large files

* Update api/src/database/migrations/20210626A-change-filesize-bigint.ts

* add `limit -1` for deleteMany files options from #6560

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-06-29 09:22:47 -04:00
Zorin Sergey
3ef8d25bef Changed filesize to bigint for large files (#6516)
* Changed filesize to bigint for large files

* Update api/src/database/migrations/20210626A-change-filesize-bigint.ts

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-06-28 14:11:37 -04:00
renovate[bot]
8a3796b8bb update dependency commander to v8 (#6498)
* update dependency commander to v8

* Update import to match new version

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-06-28 14:05:55 -04:00
Luan Mattner Müller
9da9874905 Fix MailService to throw sending errors (#6541) 2021-06-28 13:29:23 -04:00
Nicola Krumschmidt
ed1127f3b1 Fix extension loading when PUBLIC_URL is absolute without origin (#6534)
* Fix extension loading when PUBLIC_URL is absolute without origin

* Minify extension bundler output

* Make extension loading in dev more robust

* Rename ensureExtensionsDirs to ensureExtensionDirs
2021-06-28 11:20:30 -04:00
rijkvanzanten
79eed74d43 Tweak asset transform max allowed default
Allows for Directus to run ootb on smaller containers/servers, while allowing higher processing speeds for  environments that can handle it
2021-06-26 22:03:25 -04:00
rijkvanzanten
5756954dd7 Fix edge case in fk replacing 2021-06-26 21:27:46 -04:00
Rijk van Zanten
c79e682327 Add missing field for required app access (#6481)
Fixes #6475
2021-06-24 12:37:43 -04:00
Nicola Krumschmidt
d544214c79 Fix extension loading on initial startup (#6471) 2021-06-23 18:16:13 -04:00
Nicola Krumschmidt
051df415df Fix extensions (#6377)
* Add support for npm extensions

* Allow extensions to import vue from the main app

* Bundle app extensions on server startup

* Fix return type of useLayoutState

* Add shared package

* Add extension-sdk package

* Add type declaration files to allow deep import of shared package

* Add extension loading to shared

* Refactor extension loading to use shared package

* Remove app bundle newline replacement

* Fix extension loading in development

* Rename extension entrypoints

* Update extension build instructions

* Remove vite auto-replacement workaround

* Update package-lock.json

* Remove newline from generated extension entrypoint

* Update package-lock.json

* Build shared package as cjs and esm

* Move useLayoutState composable to shared

* Reverse vite base env check

* Share useLayoutState composable through extension-sdk

* Update layout docs

* Update package versions

* Small cleanup

* Fix layout docs

* Fix imports

* Add nickrum to codeowners

* Fix typo

* Add 'em to vite config too

* Fix email

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-06-23 12:43:06 -04:00
rijkvanzanten
b9a857ccd7 Fix missing type signature 2021-06-22 21:08:28 -04:00
Rijk van Zanten
44082c60e1 Add schema caching (#6456)
* Rework cache handler to be function export

* Add default schema caching

* Add schema cache

* Auto purge schema cache on schema change from api

* Only set last_access value on login

* Add note on schema cache setting
2021-06-22 20:50:20 -04:00
Rijk van Zanten
25aaebacd4 Don't return default val for PK field in singleton (#6444)
Fixes #6429
2021-06-22 18:19:02 -04:00
Rijk van Zanten
1cb9181052 Add support for starts/ends with filters (#6437) 2021-06-22 14:28:11 -04:00
rijkvanzanten
953db0a29d Fix type error 2021-06-20 19:32:45 -04:00
Rijk van Zanten
0d899f097d Add ability to specify what fields to clone on "Save as Copy" (#6379)
* Start on tree-select component

* Stop propagation on label click as well

* Setup temp debug route

* Add value-combining=all

* Add branch mode

* Add leaf mode

* Add indeterminate state

* Add search

* Keep group state alive during search

* Fetch existing item based on clone fields data

* Add interface for setup

* Tweak field structure of m2a items

* Use collection name in checkbox

* Remove temp test
2021-06-18 16:37:27 -04:00
Aiden Foxx
980be7cb53 Fixed invalid onDelete constraint for some schemas (#6308)
* Fixed invalid onDelete clause for some schemas

* Ran prettier

* Updated all onDelete statements to be Oracle friendly

Co-authored-by: Aiden Foxx <aiden.foxx@sbab.se>
2021-06-17 15:43:32 -04:00
Nacho García
0b8fb9fae8 Change cache-control heeaders (#6355) 2021-06-17 14:55:27 -04:00
rijkvanzanten
95187e14cb Trim val before check
h/t @aidenfoxx
2021-06-17 11:20:56 -04:00
Rijk van Zanten
e96c77a819 Don't send sensitive data in webhooks (#6350)
Fixes #6246
2021-06-17 11:13:31 -04:00
Rijk van Zanten
e033e17326 Use existing file extension as default (#6349) 2021-06-17 11:06:00 -04:00
Rijk van Zanten
6d698d1a7b Fixed issue that would cause uploads to the root folder of the file library to fail (#6348)
fixes #6310
2021-06-17 11:02:13 -04:00
Rijk van Zanten
a8356302de Redact tokens from logs (#6347) 2021-06-17 10:57:52 -04:00
Thijs-Jan
e4b9bf06a0 Add support for read hooks on items (#6341)
* Add emitter on item read

* Add performance warning to docs

* Make result instead of query the payload
2021-06-17 10:56:52 -04:00