Commit Graph

1031 Commits

Author SHA1 Message Date
Rijk van Zanten
5d80038a8a Fix permissions merging on null check (#10336)
Fixes #10305
2021-12-06 15:12:20 +00:00
Nicola Krumschmidt
ad4a13f93b Share pinia with extensions (#10335)
Pinia is stable and also the recommended state management lib for Vue 3 🔥
2021-12-06 09:58:48 -05:00
rijkvanzanten
776c105aac v9.2.0 2021-12-03 16:16:38 -05:00
Nicola Krumschmidt
a3cbbfd237 Apply the cleaned up build config to the sdk (#10230) 2021-12-02 17:01:10 -05:00
Nicola Krumschmidt
b500c32072 Fix extension config importing on Windows (#10242)
Fixes #10239
2021-12-02 16:39:57 -05:00
José Varela
eb68f85e54 Support 'selectionMode' on tabular and cards (#8010)
* showSelect as 'none', 'one' or 'multiple' on table

* showSelect on cards

* showSelect and fix on calendar

* showSelect and fix on map

* fix layout selection prop type

* fix tabular row click on select mode

* remove unused import

* minor strict equality changes

* hide checkbox for activity table

* Update app/src/modules/notifications/routes/collection.vue

Co-authored-by: ian <licitdev@gmail.com>

* Make preset item reactive

* Add comment clarifying ref wrapper

* Fix type signature of layout props

Co-authored-by: Azri Kahar <azrikahar@outlook.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-02 16:02:13 -05:00
Oreille
b4557056a0 Don't go back to page 1 when navigating back from an item (#10235) 2021-12-02 19:33:18 +00:00
José Varela
c3cd65ac32 Fix export on mjs file (#10229)
It was not exporting nothing before, because mjs cannot resolve cjs exports.
2021-12-02 12:16:48 -05:00
Nicola Krumschmidt
7e270713f0 Clean up format-title build process (#10204) 2021-12-02 11:07:09 -05:00
Oreille
525e2548b4 Fix compatibility with Postgres <= 10 (#10139)
* Use indnatts instead of indnkeyatts in postgres dialect

* Update knex-schema-inspector

* Add PG10 for debugging

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-01 20:36:46 +00:00
NilsBaumgartner1994
fd93b850e0 Update BaseStorage (#9985)
* Update BaseStorage

remove dublicate strings into variables

* Apply suggestions from code review

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

* Use enum types in keys

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-12-01 20:20:27 +00:00
José Varela
de978798a4 SDK: Fix bundles (#10053)
* Fix bundles
The problem was coming from rollup building only for browsers.
The solution is to specify build for browsers and Node.js.
This configuration is inherited from format-title package,
but with the slight difference that exports .mjs files

* fix types folder
2021-12-01 14:23:25 -05:00
Alejandro Castaño González
022b867a23 Add status field in the directus_notifications collection (#10064)
* Add status field

* Update notification type
2021-12-01 14:19:48 -05:00
José Varela
2fa2a75b60 SDK: Fix type arrays on filter (#10133)
* support arrays as types for _in, _nin, etc.

* improve type definition on filters
2021-12-01 14:04:55 -05:00
Oreille
94985d547a Fix MySQL tinyint(1) not being treated as boolean (#10083) 2021-12-01 14:01:48 -05:00
Aiden Foxx
c2f3442697 Cleaned up Oracle duplicate index handling (#10151)
* Update oracledb.ts

* Update packages/schema/src/dialects/oracledb.ts

* Update packages/schema/src/dialects/oracledb.ts
2021-12-01 13:58:37 -05:00
Oreille
0425809db1 Fix string filter unexpectedly being casted to number (#10138)
* Fix string unexpectedly being casted to numbers

* Parse filter with multiple keys into `_and` block.

* Fixed filter structure in tests
2021-12-01 13:55:54 -05:00
Azri Kahar
8dec148ca2 refresh edited insights panel on change (#10180)
* refresh edited insights panel on change

* move api simpleHash to shared utils getSimpleHash

* Simply reactivity fix for time-series

* Remove unused import

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-01 17:26:55 +00:00
Azri Kahar
648b2d0e36 fix filter breaking instead of defaulting to _eq (#10194) 2021-12-01 14:42:09 +00:00
rijkvanzanten
9bf033c18d v9.1.2 2021-11-25 12:36:24 -05:00
Nitwel
b3c8941645 fix mysql duplicates (#10057) 2021-11-25 16:50:19 +00:00
rijkvanzanten
5d3a630fe6 v9.1.1 2021-11-24 21:09:22 -05:00
rijkvanzanten
7a1c534b36 v9.1.0 2021-11-24 17:56:26 -05:00
Jay Cammarano
25375cc481 Add notifications system and support user mentions in comments (#9861)
* v-menu de/activated onKeyDown. No List yet.

* v-list

* add user suggestion

* uuids replaced

* user-popover working

* avatars flex row with usernames in suggestions

* added space to end of uuid insert

* autofocus + move caret to end of last insert

* removed unnecessary setTimeout()

* fixed filter 500 with ids

* better fix

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

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

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

* New translations en-US.yaml (Russian) (#9918)

* New translations en-US.yaml (Swedish) (#9920)

* Email updates (#9921)

* add from name for emails

* updatd email template style

* reset password email copy

* updated logo to newest version

* update invite email copy

* decouple field template logic

* push up styling

* Start on new v-template-input

* Add notifications API endpoints

Squashed commit of the following:

commit 9d86721ef795d03bc55693c0f99bde8e269d60e9
Merge: b4458c19f 34131d06e
Author: rijkvanzanten <rijkvanzanten@me.com>
Date:   Mon Nov 22 09:27:43 2021 -0500

    Merge branch 'mentions' into mentions-api

commit b4458c19f7c54f18fa415fc04c63642c2f5a17b0
Author: rijkvanzanten <rijkvanzanten@me.com>
Date:   Thu Nov 18 18:34:04 2021 -0500

    Remove unused import

commit e6a9d36bbfdf95cb18d29336da61ecb14b677934
Author: rijkvanzanten <rijkvanzanten@me.com>
Date:   Thu Nov 18 18:28:31 2021 -0500

    Extract user mentions from comments

commit b3e571a2daa287e1740a050096913662a57e9861
Merge: c93b833d2 af2a6dd7f
Author: rijkvanzanten <rijkvanzanten@me.com>
Date:   Thu Nov 18 17:39:52 2021 -0500

    Merge branch 'mentions' into mentions-api

commit c93b833d2b848e306c434b370d4e4e11967e85d0
Author: rijkvanzanten <rijkvanzanten@me.com>
Date:   Thu Nov 18 17:35:45 2021 -0500

    Send emails w/ parsed MD

commit 64bbd6596f20a07028d2387d60e33dfe4f91c032
Author: rijkvanzanten <rijkvanzanten@me.com>
Date:   Thu Nov 18 16:18:16 2021 -0500

    Add notifications endpoint + permissions

commit fba55c02dc9c303a38b1b958350684cccd3dd82c
Author: rijkvanzanten <rijkvanzanten@me.com>
Date:   Thu Nov 18 15:33:28 2021 -0500

    Add system data for notifications

* push

* Make v-template-input work

* Add the two-way binding

* submit button posting, not clearing text area

* comment text area clearing on submit

* Replace insertion correctly

* Added scope support to LDAP group and user search (#9529)

* Added scope support LDAP group and user search

* Fixed linter screwing up my markdown

* Update docs/configuration/config-options.md

* Always return correct DN for user with sub scope

* Fix indeterminate meta and schema property in advanded field creation (#9924)

* Fix impossibility to save M2M (alterations not triggered) (#9992)

* Fix alterations refactor

* fix roles aggregate query (#9994)

* Update iis.md (#9998)

added the IIS URL Rewrite module as a requirement

* New translations en-US.yaml (English, United Kingdom) (#10001)

* Fix LDAP race condition (#9993)

* Fix input ui

* Revert changes to v-field-template

* Update mentions permissions

* Fix linter warnings

* Optimize sending flow

* Revert "Rename activity->notifications module (#9446)"

This reverts commit 428e5d4ea9.

* Add notifications drawer

* Update migrations

* Improve constraints

* Add email notifications toggle on users

* Add docs, fix graphql support

* Move caret-pos to devdeps

* Remove unused new triggerKeyPressed system

* Remove unused use-caret composable

Co-authored-by: Nitwel <nitwel@arcor.de>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Ben Haynes <ben@rngr.org>
Co-authored-by: Aiden Foxx <aiden.foxx@sbab.se>
Co-authored-by: Oreille <33065839+Oreilles@users.noreply.github.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Paul Boudewijn <paul@helderinternet.nl>
2021-11-24 16:11:26 -05:00
Aiden Foxx
f19a549a1b Handle composite primary keys (#9822)
* Handle composite keys in Oracle

* Handle composite primary keys in PostgreSQL

* Handle composite primary keys in SQL Server

* Handle composite primary keys in SQLite

* Added Oracle performance notice

* Handle composite primary keys in MySQL

* Make the linter happy

Co-authored-by: Oreilles <oreilles.github@nitoref.io>
2021-11-24 16:10:34 -05:00
Oreille
2f0e305796 Refactor parseFilter to only flatten filter entries that need it (#9804)
* Refactor parseFilter to only flatten filter entries that need it

* Fixed typescript check

* Use custom get function instead of lodash's.

* Improved get function readability

* Allow null result from shared parseFilter

* Add missing defaultValue in get function

* Change parseFilter argument type from Record<string, any> to Filter | null

Co-authored-by: ian <licitdev@gmail.com>
2021-11-23 12:35:12 -05:00
Oreille
f920196c18 Add logical operators to the SDK's Filter type (#9965)
* Add logical filter operator to the Filter type

* Removed unnecessary ?

* Reverted import from `@directus/shared`

* Handle many-to-many field filters
2021-11-22 13:05:22 -05:00
John Huffsmith
37dc1d44b1 Adding sourceMap flag to extension cli to enable debugging (#9932) 2021-11-22 16:48:03 +00:00
Joe Innes
ff002443f0 SDK: Start auth refresh job when constructor is initialised (#9777)
* Refresh auth when SDK is initialised 

If autorefresh is enabled, then this will cause the SDK to refresh tokens whenever it's loaded. This fixes bug #9639 (discussion #9720)

* start autoRefreshJob on constructor and on refresh

* preserve refresh_token before clear it on refresh

Co-authored-by: Jose Varela <joselcvarela@gmail.com>
2021-11-22 11:11:09 -05:00
renovate[bot]
241dc13c65 Update NPM dependencies (non-major) (#9968)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-22 10:05:40 -05:00
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