Commit Graph

833 Commits

Author SHA1 Message Date
Rijk van Zanten
1c3e94d830 Add new export experience (#12201)
* Use script setup

* Start on export dialog

* Use new system field interface, replace limit with numeric input

* Set placeholder

* Add sort config

* Use folder picker, correct layoutQuery use

* Add local download button

* Allow writing exports to file

* Add notification after export

* Fix sort config, use new export endpoint

* Setup notification hints

* Add information notice

* Fix local limit, cancel button

* Add (basic) docs for export functionality

* Fix json export file format

* Implement xml batch stitching

* Resolve review points
2022-03-17 15:43:45 -04:00
Azri Kahar
76f463c608 Form error validation improvements (#12001)
* expand groups on save when they contain error(s)

* bubble to top & scroll top

* fix groups validation errors watcher

* fix group acordion's first error field selection

* update global error notice

* WIP - field validation

* tweak validation errors list styling

* more validation-errors-list tweaks

* click and scroll to field

* move validation error notice to a component

* tweak use-item validate

* validate drawer item

* extract validateItem function

* Revert "WIP - field validation"

This reverts commit f6ffd836c4.
2022-03-09 16:48:10 -05:00
Azri Kahar
13bae1f0c2 Add Edit Role context menu in User Directory (#12048)
* add Edit Role context menu in User DIrectory

* reuse Role type

* ensure hiding delete button for last admin works
2022-03-09 12:53:43 -05:00
rijkvanzanten
6af5a6534f Update special cases 2022-03-07 14:19:09 -05:00
rijkvanzanten
eba2576227 v9.6.0 2022-03-04 20:25:43 -05:00
Rijk van Zanten
6a3eb823c3 Update base theme of the App (#11952)
* Add migration to remove default value from project_color

* Upgrade the default theme

* Do a pass over the header buttons

* Do another pass over --warning uses

* Little things

* Tweak smoke

* Use updated map

* Use dark system elements in dark mode

* Remove outdated files, update toasts

* Use correct delete button style for role

* Use primary for created point

* Tweak spacing in revisions section

* Use primary for sidebar sections

* Various color tweaks and changes

* Update base color palette

* Update "css reset" code

* Remove splashscreens, add default favicon

* Add primary highlight to datamodel page

* dark mode color update

* fix sign out hover color

* Does this help?!

* This fixes some loading issues

Fixes https://github.com/directus/directus/issues/10707

* Calculate default pretty background?

* Fix public view with logo

* Fix responsiveness of login page

* adjust notification group width to be equal

* Do an absolute pointless task that doesn't do anything

It was suggested that it could fix the stylelint error in tests, but alas

* Remove stylelint

Doesn't seem to play nice with script setup and other changes

Co-authored-by: Ben Haynes <ben@rngr.org>
2022-03-04 18:53:39 -05:00
Rijk van Zanten
962af79dbc Replace union query approach with updated table scan (#11246)
* Start by stripping out the previous Union attempt

* Then set limit to -1, causing massive memory issues on big data sets

* Now fix the memory problem by batching the responses

* Use env var for max relational batch size

* Rename env var, add to docs
2022-03-01 18:20:00 -05:00
rijkvanzanten
47a5da78fb v9.5.2 2022-02-18 11:45:07 -05:00
Abdón Rodríguez Davila
3de9bc1ada Update rollup-plugin-styles to v4 (#11689)
* Update rollup-plugin-styles to v4

* Update Rollup packages
2022-02-18 11:25:50 -05:00
José Varela
de5b34d87b SDK: split readMany into itself and readByQuery (#11204)
* split readMany into self and readByQuery

* add tests

* run tests only on `test` folder

* fix docs

* fix in `cli`
2022-02-16 09:52:42 -05:00
rijkvanzanten
c0c412d30b v9.5.1 2022-02-03 20:41:49 -05:00
Rijk van Zanten
79ce3c8765 Add parsePreset helper function (#11423) 2022-02-04 00:29:28 +00:00
Jay Cammarano
f40a3e94a0 Add strings to accepted fields for Insights Panel "Metrics" (#10828)
* extension takes context object

* v-model with options object

* removed comments

* added typing

* fixed typing

* state is saved on field-configuration

* extension-options uses object for objectOptions

* removed unnecessary context

* more props instead of context object

* remove unused import

* move Panel type to shared

* passing edits.options => whole edit object

* alterOptions check => edits watch

* props on extension types have defaults

* returning the whole panel not just .options

* panels without functions load

* only displaying first, last, and count

* first last count working

* string values displayed!

* removed unused vars

* choices disabled not removed

* options.function resets to count

* fills in values when editing a panel

* field resets when collection changes

* doesn't wipe collection on edit

* panel cleared when panel type changes

* removed resolved comment

* package.json

* Advanced Field Detail working

* divider on type of function

* divider option removed unneeded values

* removed unneeded v-if

* Don't check against function type in panel options

* Tweaks to resolve my own commentary

* 🧹 Cleanup tweaks

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-02-03 16:55:15 -05:00
Nicola Krumschmidt
b8a627d0a2 Mark shared as side effects free (#11329)
Since #11099 the extensions-sdk isn't externalized anymore when bundling API extensions.
This causes rollup to pull in a lot of unnecessary dependencies that aren't automatically tree-shaken.

Fixes #11275
2022-02-02 03:48:20 +01:00
Nicola Krumschmidt
35ee3f4151 Add a few missing DefinitelyTyped dependencies (#11381) 2022-02-02 03:47:28 +01:00
Azri Kahar
9ac1bb146c Fix update file endpoint (#11347)
* fix files patch request

* add multipart/data to file Patch request specs
2022-01-31 10:31:21 -05:00
Azri Kahar
047b45cec1 Update OpenAPI schema for file/files (#11290) 2022-01-26 07:57:08 -05:00
Rijk van Zanten
c01f507696 Use correct import for crdb dialect from schema-inspector (#11269)
Fixes #11266
2022-01-25 15:08:20 -05:00
Rijk van Zanten
bac787aeed Fix PG10 support in knex-schema-inspector (#11268) 2022-01-25 19:51:26 +00:00
rijkvanzanten
78a25fe953 v9.5.0 2022-01-24 15:53:29 -05:00
Rijk van Zanten
47f71bd60b Update knex-schema-inspector (#11238) 2022-01-24 12:05:54 -05:00
Nicola Krumschmidt
4eed883329 Add DefinitelyTyped deps to shared (#11231)
This also moves type-only deps to "peerDependencies".

Fixes #10658
2022-01-24 10:18:36 -05:00
Rijk van Zanten
973e2dc6bb Update knex-schema-inspector (#11203) 2022-01-21 09:38:27 -05:00
Rijk van Zanten
88c87f3920 Set CRDB options to avoid inconsistencies between vendors (#11193)
* Set correct CRDB options

* Add missing SETs to pool config for e2e

* How about now

* Better solution for the same problem
2022-01-20 20:18:22 -05:00
Nicola Krumschmidt
889668f972 Remove API extension types from the API (#11191)
There is little value in keeping these types inside the API package.
We should instead focus on improving the types in shared.
2022-01-20 22:19:52 +00:00
Michael Schramm
75b5f33727 Implement CockroachDB support (#10113)
* base changes for cockroachdb

* allow creating of tables

* allow deleting of fields

* allow deleting of tables

* rebase

* fix migrations

* bump knex-schema-inspector to 1.7.0

* Update package-lock

* Add cockroach to debugging docker-compose file

* Remove unused import

* Tweak name in example.env

* Force nullable primary keys in cockroach

* Tweak shares migration to run on cockroach

* Rename var for clarification

* suggestion for migration helper

* change to schema and update remaining migrations

* Remove custom cockroach schema in favor of sharing with pg

* Fix migrations for CockroachDB

* Hopefully fix Oracle migrations 🤞🏻

* Make ~~aiden~~ oracle happy

* Resolve branching paths in migrations

* Enable tests for cockroach

* Fix test config

* One more config change for good measure

* Adjust test to match cockroach's bigint auto-int structure

* Increase request timeout for mssql

* Update api/src/database/helpers/schema/types.ts

Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Oreille <33065839+Oreilles@users.noreply.github.com>
Co-authored-by: Aiden Foxx <aiden.foxx.mail@gmail.com>
2022-01-20 14:14:38 -05:00
John Huffsmith
e7ada1f173 Moving schema and relation types into shared package (#11179)
* moving schema and relation types into shared package

* updating SchemaOverview imports

* removing duplicate import
2022-01-20 13:36:19 -05:00
Will Foxall
5cf57b4e2d Added the 4 "_starts/ends_with" filter defs (#11162) 2022-01-19 13:05:14 -05:00
Aiden Foxx
4af091d67a Added LDAP to formatTitle special cases (#11119) 2022-01-17 17:37:31 -05:00
Rijk van Zanten
b3f43ff1a2 Upgrade dependencies (#11118)
* Update marked in app

* Upgrade marked in cli

* Update nested deps
2022-01-17 21:42:04 +00:00
Nicola Krumschmidt
a128836145 Rename sourceMaps flag to sourcemap to align with other tools and add no-minify flag to the extensions-sdk CLI (#11106)
* Rename sourceMaps CLI flag to sourcemap to align with other tools

* Add no-minify flag to the extensions-sdk CLI
2022-01-17 13:50:14 -05:00
Nicola Krumschmidt
9237a6452a Remove extensions-sdk and axios from the list of shared deps (#11099)
This ensures that extensions work with an out-of-root extensions folder.
Instead of leaving the list of API shared deps empty, this adds `directus` as the only shared dep
because it is never a good idea to bundle the Directus API into an extension.
2022-01-17 10:22:52 -05:00
Nicola Krumschmidt
e009f52f1f Always inline dynamic imports when bundling extensions (#11100)
This ensures that the Extensions SDK always generates a single `index.js`.
2022-01-17 09:52:31 -05:00
rijkvanzanten
65bfe68b0c v9.4.3 2022-01-07 16:11:24 -05:00
Nicola Krumschmidt
9ee6e97cd9 Move useLayout composable to shared and expose it through extensions-sdk (#10850)
* Move useLayout composable to shared

* Expose useLayout through extensions-sdk
2022-01-05 15:38:48 -05:00
Nicola Krumschmidt
af0a197a99 Make registered extensions accessible from extensions (#10849)
* Add extensions system provide and useExtensions composable

* Expose useExtensions through extensions-sdk
2022-01-05 10:33:52 -05:00
Isaac Kim
a3e9e6551c Add LinkedIn to special case list (#10811)
* Update LinkedIn capitalization in accordance with [LinkedIn's Brand Guidelines](https://brand.linkedin.com/policies).
2022-01-03 03:50:04 +00:00
rijkvanzanten
1a5a9180ee v9.4.2 2021-12-30 21:11:32 -05:00
rijkvanzanten
4991ba858b v9.4.1 2021-12-28 20:17:21 -05:00
rijkvanzanten
a47b9cec0f v9.4.0 2021-12-23 22:46:18 -05:00
Rijk van Zanten
dbf35a1736 Add ability to share items with people outside the platform (#10663)
* Add directus_shares

* Don't check for usage limit on refresh

* Add all endpoints to the shares controller

* Move route `/auth/shared` to `/shared/auth`

* Add password protection

* Add `share` action in permissions

* Add `shares/:pk/info`

* Start on shared-view

* Add basic styling for full shared view

* Fixed migrations

* Add inline style for shared view

* Allow title override

* Finish /info endpoint for shares

* Add basic UUID validation to share/info endpont

* Add UUID validation to other routes

* Add not found state

* Cleanup /extract/finish share login endpoint

* Cleanup auth

* Added `share_start` and `share_end`

* Add share sidebar details.

* Allow share permissions configuration

* Hide the `new_share` button for unauthorized users

* Fix uses_left displayed value

* Show expired / upcoming shares

* Improved expired/upcoming styling

* Fixed share login query

* Fix check-ip and get-permissions middlewares behaviour when role is null

* Simplify cache key

* Fix typescript linting issues

* Handle app auth flow for shared page

* Fixed /users/me response

* Show when user is authenticated

* Try showing item drawer in shared page

* Improved shared card styling

* Add shares permissions and change share card styling

* Pull in schema/permissions on share

* Create getPermissionForShare file

* Change getPermissionsForShare signature

* Render form + item on share after auth

* Finalize public front end

* Handle fake o2m field in applyQuery

* [WIP]

* New translations en-US.yaml (Bulgarian) (#10585)

* smaller label height (#10587)

* Update to the latest Material Icons (#10573)

The icons are based on https://fonts.google.com/icons

* New translations en-US.yaml (Arabic) (#10593)

* New translations en-US.yaml (Arabic) (#10594)

* New translations en-US.yaml (Portuguese, Brazilian) (#10604)

* New translations en-US.yaml (French) (#10605)

* New translations en-US.yaml (Italian) (#10613)

* fix M2A list not updating (#10617)

* Fix filters

* Add admin filter on m2o role selection

* Add admin filter on m2o role selection

* Add o2m permissions traversing

* Finish relational tree permissions generation

* Handle implicit a2o relation

* Update implicit relation regex

* Fix regex

* Fix implicitRelation unnesting for new regex

* Fix implicitRelation length check

* Rename m2a to a2o internally

* Add auto-gen permissions for a2o

* [WIP] Improve share UX

* Add ctx menu options

* Add share dialog

* Add email notifications

* Tweak endpoint

* Tweak file interface disabled state

* Add nicer invalid state to password input

* Dont return info for expired/upcoming shares

* Tweak disabled state for relational interfaces

* Fix share button for non admin roles

* Show/hide edit/delete based on permissions to shares

* Fix imports of mutationtype

* Resolve (my own) suggestions

* Fix migration for ms sql

* Resolve last suggestion

Co-authored-by: Oreilles <oreilles.github@nitoref.io>
Co-authored-by: Oreilles <33065839+oreilles@users.noreply.github.com>
Co-authored-by: Ben Haynes <ben@rngr.org>
Co-authored-by: Thien Nguyen <72242664+tatthien@users.noreply.github.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2021-12-23 18:51:59 -05:00
José Varela
3c82d5f7ea Gatsby: Fix auth email and password (#10615)
* Fix auth email and password

* remove unnecessary condition
2021-12-22 12:27:54 -05:00
Azri Kahar
9105c1e42c fix directusctl packages (#10623) 2021-12-21 12:51:12 -05:00
rijkvanzanten
4b444baf5b v9.3.0 2021-12-16 18:48:10 -05:00
Sam Milledge
5a30fa4f40 Fix missing operators in field filter type (#9582) 2021-12-16 18:40:15 -05:00
Nicola Krumschmidt
ee3e9b59f9 Pass a custom emitter to API extensions (#10531) 2021-12-15 18:49:55 -05:00
Nicola Krumschmidt
23951e5a02 Align display options type with interface options type (#10524)
* Align display options type with interface options type

* Fix linter warnings

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-15 20:25:46 +00:00
José Varela
116e683e1f Gatsby plugin: handle file extensions (#10482)
* remove unused package

* handle file extensions
2021-12-13 13:34:10 -05:00
rijkvanzanten
546d525175 v9.2.2 2021-12-10 15:53:08 -05:00
José Varela
71a5fb6c2c Gatsby: fix plugin for version 4 (#10422)
* gatsby: fix plugin for version 4

* add note about using with gatsby-transformer-sharp

* add ability to query system collections
2021-12-09 17:41:25 -05:00