751 Commits

Author SHA1 Message Date
rijkvanzanten
ba72d2cfd0 v9.0.1 2021-11-11 16:45:31 -05:00
ian
23534c8662 Flatten arrays after parsing filters (#9697)
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-11 14:35:34 -05:00
José Varela
da0676fefc Fix pass options to transport (#9725) 2021-11-11 15:34:14 +00:00
Aiden Foxx
cbe87299c7 Exclude hidden oracle columns (#9677) 2021-11-10 10:31:43 -05:00
renovate[bot]
ad3a503f25 Update NPM dependencies (non-major) (#9585)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-09 11:18:41 -05:00
Nicola Krumschmidt
eeb78b96cc Include the ESM entrypoint when publishing to npm (#9535) 2021-11-05 12:06:33 -04:00
rijkvanzanten
c95add08ef v9.0.0 2021-11-04 22:03:10 -04:00
Oreille
5f43b20ebf Update geometric types and patch new field flow. (#9397)
* Update geometric types and patch new field flow.

* Add migration

* Fixed migrations

* Also fixed migrations

* Update migration ID

* Cleanup type selector a bit

* Add missing fallback interface/display for new types

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-04 21:47:54 -04:00
Nicola Krumschmidt
13b479ad49 Fix importing the SDK from a Node ESM environment (#9502) 2021-11-04 21:01:12 -04:00
Nicola Krumschmidt
ae15f39091 Clean up interface options type (#9447) 2021-11-04 18:31:31 -04:00
Rijk van Zanten
2e0ad10ad1 Remove collection listing option from role settings (#9490)
* Fixes #8920

* Revert changes in seeds / migrations

* Add new migration to drop column

Co-authored-by: Yannick Mol <yannick@molmediasolutions.nl>
2021-11-04 21:55:34 +00:00
José Varela
23f6baa4db SDK: refactor constructors (#9080)
* refactor: more intuitive interfaces

* refactor: simpler refresh
before: on every request we were debouncing a refresh request
after: call refresh only once before now() + 'expires'

* refactor: prefix on base storage

* fixup! refactor: simpler refresh before: on every request we were debouncing a refresh request after: call refresh only once before now() + 'expires'

* refactor: simpler axios transport
before: handle auth headers
after: auth headers are handled on directus instance

* refactor: simpler usage of Directus constructor

* fixup! refactor: simpler refresh before: on every request we were debouncing a refresh request after: call refresh only once before now() + 'expires'

* refactor: fix tests based on previous changes

* refactor: better auth constructor
before: depends on SDK instance
after: depends on Transport and Storage instance

* accept staticToken from auth

* make transport and storage as optional on options

* fix type auth refresh

* simplify transport

* fix test for previous changes

* improve auth class

* revert some IAuth props because tests

* allow to force memory of localstorage on storage

* add tests for previous change

* document everything and simplify some things

* fix override headers on request

* better name typing

* fix private axios

* removed boolean from CLI auth.refresh()

* fix missing url in some examples

* soem grammar updates

Co-authored-by: Jay Cammarano <jay.cammarano@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-04 13:30:30 -04:00
rijkvanzanten
37cf80e0fe v9.0.0-rc.101 2021-11-03 19:29:41 -04:00
Nicola Krumschmidt
69d893123e Add exports fields to all packages (#9443) 2021-11-03 18:59:45 -04:00
Nicola Krumschmidt
3d0e086c55 Rework hook registration (#8027)
* Rework hook registration

* Remove event and action fields from hook payloads

* Move "error" action to "request.error" filter

* Emit meta and context objects in filters and actions

* Run filters sequentially

* Update hook templates

* Fix CLI hook test

* Also emit `<collection>.items.crud` when emitting `items.crud`.

* Update hook docs

Co-authored-by: Oreilles <oreilles.github@nitoref.io>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-03 17:18:56 -04:00
Rijk van Zanten
65291b95c4 Allow dynamic user variables to be used with filter rules (cont.) (#9376)
* Move permissions extraction to accountability

* Fix permissions retrieval for public user

* Fetch user / role context in permissions middleware

* Remove unnecessary parseFilter

* Rename schemaCache to systemCache

* Add permissions caching

* Add system cache invalidation on permission changes

* Improve caching perf by reducing scope

* Add note to docs

* Clarify compatibility with conditional fields/filters

* Fix lint warning

* Allow nested vars in system-filter-input

* Add custom getter function that resolves arrays

* Add is-dynamic-variable util

* Export new util

* Cleanup parse filter

* Fix build

* Move debounce up to use-items

* Remove unused prop

* 🧹

* Fix input pattern usage w/ vars

* Remove debounce from search-input, increase throttle
2021-11-03 16:56:16 -04:00
renovate[bot]
86acc602e7 Update gatsby monorepo to v4.1.0 (#9367)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-02 14:09:29 -04:00
renovate[bot]
a85460c0f2 Update dependency rollup to v2.59.0 (#9293)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-01 14:21:26 -04:00
Aiden Foxx
b834bf88a7 Update Oracle to support is_generated (#9310) 2021-11-01 16:04:41 +00:00
Oreille
e316948e5f Removed invalid column in mssql schema inspector (#9260) 2021-10-30 15:24:43 -04:00
rijkvanzanten
7e1034d9d4 v9.0.0-rc.100 2021-10-29 14:40:05 -04:00
Oreille
8df071a3a2 Fix generated columns being required. (#9200)
* Fix generated columns being required. Also prevent schema changes on generated columns.

* Fix type errors

* Disable `unique` and `nullable` instead of not showing them.

* Fix other type error

* Nullable check small refactor

* Fixed MSSQL query

* Fixed oracle query
2021-10-29 12:24:21 -04:00
renovate[bot]
f62675213d Update dependency knex-schema-inspector to v1.6.4 (#9159)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 21:20:22 +00:00
renovate[bot]
eba8213044 Update gatsby monorepo to v4 (#9028)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jay Cammarano <jay.cammarano@gmail.com>
2021-10-26 10:29:05 -04:00
renovate[bot]
1d2f139bb6 Update dependency ts-node to v10.4.0 (#9083)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 03:25:06 +00:00
renovate[bot]
cc4ca9ade8 Update dependency @types/js-yaml to v4.0.4 (#9090)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 21:05:55 -04:00
renovate[bot]
24bbe3114c Update dependency axios to v0.24.0 (#9132)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 20:52:06 -04:00
Paul Boudewijn
58964bd1bc Fix localstorage file deletion (#9126)
* excluded VS specific files

* new files after updating directus sources

* case insensitive string matching fix

* Remove accidental commit files

* Cleanup gitignore

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-25 20:43:57 -04:00
renovate[bot]
3402869a45 Update Node.js to v16.12.0 (#9137)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 20:29:45 -04:00
Rijk van Zanten
2720e0c18e Add new field flow (#9109)
* Add new grouping setup to interfaces

* [WIP] Start on new field flow

* Add preview svgs

* Update preview svg

* Add basic saving mechanism. Start on magic

* Add interface options to simple inputs

* Fix missing t

* Fix custom options not rendering

* Fix interface options overrides

* Sync m2o name key

* Setup m2o related collection input

* Add collections generation

* Add circular prevention & type syncing

* Small fixes in m2o context generation

* Move o2m options to fn structure

* Conclude o2m (i think)

* Start on toggle to advanced

* Style advanced toggle button

* Add localType File support, start documenting

* Add presentation/group localtypes

* Use function style interface options in m2m

* Don't require collection prop in field template component

* Implement most of m2m magic

* Restructure store updater

* Finish useFieldDetailStore restructure

* Only register root index in module folders

* Do the thing

* Finish m2m magic, tweak fallback styles

* Fix o2m display template setup

* Remove options comp for translations interface

* Show languages collection picker in translations

* Finish translations alterations

* Add magic for files type

* Officially wave goodbye to the old store setup

It served it's purpose, but what a nightmare to maintain. Welcome to the new version

* Update schema tab

* Add field pane

* Finish interface section

* Add display section

* Add conditions

* Update tabs to use localType from store

* Start on relationship tab

* Update m2m relational setup

* Start on m2o

* Finish m2o setup

* Finish o2m setup

* Add m2a magic

* Various tweaks

* Add m2a setup

* Add save button to advanced flow

* Load existing values on start

* Add upsert to stores, allow updating existing items

* Please the linter gods

* Remove seemingly redundant interface option

@Oreilles Seeing the geometry type is already configured in the schema configuration, this particular option on the interface feels redundant (?)

* Remove unnecessary option component overrides

* Track relationships in required fields for save state

* Fix relations previews on editing existing fields

* Use standard vs advanced for input options

* Remove note from simple field setup

* Add divider to field config

* Use background subdued

* Default required to false

* Add required icons to key/relationship

* Tweak colors

* Fix infinite loop in group creation

* Make setup responsive

* Allow switching interface at will

* Add m2a related collections picker

* Fix relations persisting on field deletion

* Add "Create in Advanced" shortcut

Just for you @joselcvarela

* Fix PK field staging on collection create

* Revert "Remove seemingly redundant interface option"

This reverts commit e5e09a051e.

* Fix map interface options
2021-10-25 20:29:04 -04:00
renovate[bot]
a257f324c0 Update dependency rollup to v2.58.3 (#9114)
* Update dependency rollup to v2.58.3

* node version

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jay Cammarano <jay.cammarano@gmail.com>
2021-10-25 18:45:12 -04:00
Oreille
c94d0c4bfe Use default filter operator for type in filter input. (#9103)
* Use default filter operator for type in filter input. Also fix error on geometry operator update.

* Fixed tests.

* Only reset geometry filter value when necessary

* Support `null` for boolean operators.
2021-10-25 11:28:44 -04:00
rijkvanzanten
7c88f03884 v9.0.0-rc.99 2021-10-21 19:52:37 -04:00
Rijk van Zanten
3a85287237 Revert "Update dependency knex-schema-inspector to v1.6.3 (#9015)" (#9036)
This reverts commit a234198110.
2021-10-21 19:48:54 -04:00
renovate[bot]
f8587497d8 Update dependency ts-node to v10.3.1 (#9025)
* Update dependency ts-node to v10.3.1

* Update package-lock

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-21 15:10:39 -04:00
Oreille
1b0f75eec2 Fix o2m-resolver memory issue (#8944)
* Add limit to m2o fetching.

* Remove unused parameter

* Remove unused nested flag, move limit to apply

* Add limit to offset check

* Add usage note on union query

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-21 15:02:26 -04:00
renovate[bot]
a234198110 Update dependency knex-schema-inspector to v1.6.3 (#9015)
* Update dependency knex-schema-inspector to v1.6.3

* Update package-lock

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-21 12:47:36 -04:00
renovate[bot]
71093f5d2e Update dependency @rollup/plugin-commonjs to v21.0.1 (#8958)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 09:53:04 -04:00
renovate[bot]
a9432b6db3 Update dependency @rollup/plugin-node-resolve to v13.0.6 (#8959)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 09:52:51 -04:00
renovate[bot]
8c6a7b1b3e Update jest monorepo to v27.3.1 (#8967)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 09:23:55 -04:00
renovate[bot]
9d137af1a0 Update dependency nock to v13.1.4 (#8961)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 18:03:20 +08:00
renovate[bot]
6e3a63df2b Update jest monorepo to v27.3.0 (#8918)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-18 15:33:32 +00:00
renovate[bot]
f3400bb54d Update dependency ts-jest to v27.0.7 (#8915)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-18 11:02:42 -04:00
Daniil Yastremskiy
752689d32a Add geo operators to FilterOperators type (#8863) 2021-10-16 21:38:58 +00:00
rijkvanzanten
0dd0e1b1c1 v9.0.0-rc.98 2021-10-15 20:13:07 -04:00
Rijk van Zanten
8f00e37daf Add improved collection organization setup (#8623)
* Add migrations, start on service

* Dont track TODO files

* Update collection types, add collection type

* Allow drag and drop sorting of collections

* Add tooltip

* Add grouping + collapsed state

* Fix nested closed state

* Tweak active drag styling

* Remove collapsed state

* Add folder creation/editing

* Render collections as nested tree in nav

* Fix open active state

* Add dense when collection count > 5

* Add visible toggle

* Add show-hidden toggle

* Fix css specificity

* Add support for query in v-list-group

* Add missing cascade

* Remove collapsed state

* Finish three-way toggle

* Add custom lock icon

* Fix icon size in non-dense

* Redirect to first & open tree on load

* Dont make prop required

* Fix search

* Only apply archive filter when enabled in settings

* Add archive view

* Add translations

* Hide organization fields

* Show system collections
2021-10-15 21:19:00 +00:00
rijkvanzanten
392d8bd1df v9.0.0-rc.97 2021-10-14 21:47:50 -04:00
renovate[bot]
4fb2dcc9a9 Update dependency ts-jest to v27.0.6 (#8803)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-14 16:53:18 -04:00
Oreille
0a089af30a Fix layouts stuck at page 1 (#8766) 2021-10-13 15:56:12 -04:00
renovate[bot]
2429d30917 Update dependency typescript to v4.4.4 (#8749)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-12 16:51:36 -04:00