157 Commits

Author SHA1 Message Date
rijkvanzanten
9bf033c18d v9.1.2 2021-11-25 12:36:24 -05: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
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
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
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
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
rijkvanzanten
37cf80e0fe v9.0.0-rc.101 2021-11-03 19:29:41 -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
rijkvanzanten
7e1034d9d4 v9.0.0-rc.100 2021-10-29 14:40:05 -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
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
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
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
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
Oreille
9b66a77c39 Bug fixes in the new filter interface (#8696)
* Bug fixes in the new filter interface

* Removed `eq`, `neq` filter for geometry type.

* Fixed tests for getFilterOperatorForType on geometry type.

* Removed `eq`, `neq`, `in`, `nin` filter operator for json

* Added `bigInteger` and `float` support in getFilterOperatorForType and fixed tests

* Added input regex pattern for numbers and uuid in filter input component
2021-10-12 09:53:18 -04:00
Oreille
475f6349f0 Map layout and interface improvements (#8628)
* Map layout and interface improvements:
* Disable drag to rotate
* Add keyboard shortcut to delete items
* Hide unselect button when selection is empty
* Add display template setting
* Fixed fitData button behaviour

* Removed unused hoveredFeatureId

* Added translations

* Expose clearFilters to the layout.
2021-10-12 09:50:18 -04:00
rijkvanzanten
435cc0cc67 v9.0.0-rc.96 2021-10-07 18:39:54 -04:00
Rijk van Zanten
f64a5bef7e Add new advanced filters experience (#8570)
* Remove advanced filter sidebar detail

So long, and thanks for all the fish.

* Remove filter conversion logic

* Start replacing/removing old skool filters

* Add inline mode for usages in search bar

* Make filter work in header bar

* Emit empty string as null in filter

* Move shared filter types to shared

* Upgrade use-items

* Fix manual sort on tabular

* Cleanup styling in search bar usage

* Tweak styling

* Fix filtering issues

* Update cards

* Remove activeFilterCount from tabular

* Update maps to work with new filters

* Update calendar to new filter/sort structure

* Fix activity module nav/search

* Fix no-results message

* Update file library filtering

* Finalize user search

* Allow filtering in drawer-collection

* Handle cancelled responses semi-gracefully

* Add loading start state timeout

* Replace sort type in api

* Last commit before redoing a bunch

* Finish new visual style

* Remove unused rounded prop from v-menu

* Tweak sizing

* Enough size tweaking for now

* Count all filter operators instead of top

* Fix archive casting

* Fix api build

* Add merge filters util

* Split filter in user vs system

* Fix export sidebar detail

* Show field label on permissions configuration

* Add migration for filter/sort

* Use filters in insights
2021-10-07 18:06:03 -04:00
Nicola Krumschmidt
ec3832d337 Make directus:extension.hidden optional (#8593)
This field will be used in conjunction with pack extensions
to be able to hide extensions that are only usable as part of a pack.
There is no need to make the field required, though.
2021-10-06 17:52:57 +02:00
Nicola Krumschmidt
887c97b8c2 Fix loading pack extensions without path and source fields (#8563) 2021-10-05 15:28:29 +00:00
renovate[bot]
b8d4a24958 Update dependency axios to v0.22.0 (#8483)
* Update dependency axios to v0.22.0

* Fix shared type

* Use any type in axios

* Adjust for axios type breaking change

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-01 12:41:18 -04:00
Nicola Krumschmidt
46f00d6202 Drop support for display handler functions in favor of functional components and make the routes module config required (#8475)
* Make routes in ModuleConfig required

* Make Panel options nullable

* Clean up InterfaceConfig and LayoutConfig types

* Remove DisplayHandlerFunction and rename handler to component

* Use template interpolation when registering extensions
2021-10-01 11:52:57 -04:00
Jay Cammarano
2be2c36dc2 Unit tests for get-extensions.ts (#8470)
* root removed

* get extensions passing, 95% coverage

* removed root

* fixed root on listExtensionsChildren
2021-10-01 11:01:33 -04:00
Nitwel
4fd9f4c31c Add Filter interface (#7492)
* initial tests and preparation for filter interface

* get basic structure down

* improve visuals and interaction

* stop modifying props 🙃

* update logic blocks style

* clean up filter interface

* lint css

* support m2a and simplify visited relations

* allow for recursive loading of fields

* use filter interface on conditions

* Use dynamic useFilterTree instead of old one (#7569)

* use advanced field tree on field template

* update to advanced field tree

* remove old useFieldTree

* update to new design

* add border on nested nodes

* tweak styling

* Fix linter warnings

* Fix field-setup

* clean up interface

* clean up interface

* clean up and rename files

* clean up code

* use default filter structure

* fix changing fields

* Add monospace style option to tooltips

* Various small stylistic tweaks

* Add menu placement

* Cleanup "big interface" usage

* Remove seamless

* Add dropdown on add filter

* Cleanup import/export, add v-select-placeholder-co

* Fix staging issue

* Allow overriding preview slow, fix padding

* Show field path inline

* Cleanup empty state

* Use new filter-interface in permissions setup

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-09-30 17:17:29 -04:00
Nicola Krumschmidt
28a2f4594b Removed unused properties from ModuleConfig (#8468) 2021-09-30 14:14:14 -04:00
Jay Cammarano
1eb39b2e39 Tests for generate-joi.ts (#8437)
* exported Joi from generate-joi.ts

* all tests passing except contains, ncontains

* contains and ncontaints functions

* tests passing, covering all lines except 36+56 }

* fixed linting issue
2021-09-29 17:28:35 -04:00
Jay Cammarano
e9fb8f79a3 Tests for deep-map.ts (#8433)
* deepmap tests passing, 100% coverage

* using a valid filter for parse-filter
2021-09-29 17:06:37 +00:00
Jay Cammarano
e7b4153028 Tests for listFolders, resolvePackage (#8356)
* listFolders test passing 100% coverage

* added tmp package

* listFolders test updated to use random temp folder

* add package tmp to workspace

* tmp as dev dependency

* direct imports

* resolve-packages passing 100% coverage

* fixed tmpdir location in list-folders

* Pin tmp

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-09-28 19:10:08 -04:00
renovate[bot]
4e70169a72 Pin dependency tmp to v0.0.33 (#8405)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-28 19:05:38 -04:00
Jay Cammarano
732e631ccc Tests for validatePayload, generateExtensionsEntry, and ensureExtensionsDir (#8353)
* Passing tests

* filter operators working

* generateExtensionsEntry tests passing, 100% cov

* validatePayload tests passing, 100% coverage

* fixed typo

* changed folder to remove conflicts w/ other tests

* removed unfinished test

* remove => removeSync

* using tmp package for folder gen

* added tmp to workspace

* reset timers after use

* Update packages/shared/src/utils/node/generate-extensions-entry.test.ts

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>

* Update packages/shared/src/utils/node/generate-extensions-entry.test.ts

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>

* tmp => dev dependancy

* moved before/after into describe

* moved rootdir var into describe

* removed unused file

* explicit imports

Co-authored-by: Nicola Krumschmidt <nicola.krumschmidt@freenet.de>
2021-09-28 18:58:48 -04:00
rijkvanzanten
afe7b15990 v9.0.0-rc.95 2021-09-27 18:58:22 -04:00
Jay Cammarano
a7b0cbe69b GitHub workflow to run tests on pushes to main and PRs (#8247)
* testing workflow

* name changed

* generateHash working

* changed pendingMock() to 0 because ticks > 5000

* removed empty tests

* removed empty tests

* Update packages/sdk/tests/utils.ts

Co-authored-by: José Varela <joselcvarela@gmail.com>

* updated workflow to add build

* added npm run build

* fixed get-filter-operators

* added env to workflow

* potential fix to index.test.ts

* added env variables for index.test.ts

* added caching and node-version matrix

* added all supported node versions

* only supported node versions

* updated to only support 16

* removed duplicate workflow caching

Co-authored-by: José Varela <joselcvarela@gmail.com>
2021-09-27 15:10:29 -04:00
Rijk van Zanten
f5f68417cf Use field key instead of ID for group value (#8349)
* Add migration to replace group ID with group name

* Replace group IDs with field names

* Tweak group interfaces

* Ignore schema export
2021-09-27 15:06:19 -04:00
Nitwel
08097d9f79 add missing null,nnull and remove unused file (#8285) 2021-09-24 11:56:38 -04:00
Nitwel
8f8e36f99a Allow for + in $NOW (#8286)
* allow for + before number and simplify regex

* fix regex
2021-09-24 11:55:21 -04:00
Azri Kahar
0912bee30f Allow date strings gt(e)/lt(e)/between validation (#8283) 2021-09-24 11:05:43 -04:00
Jay Cammarano
bcb0ddc44b Tests for pluralize, toArray, validateExtensionManifest, and parseFilter (#8276)
* pluralize tests passing, 100% coverage

* toArray tests passing, 100% coverage

* validate-extension-manifest tests passing, 100% coverage

* parse-filter tests passing, coverage 100%

* covered line 16
2021-09-23 22:11:04 +00:00
Jay Cammarano
b132899e29 Tests for is-extensions.ts and move-in-array.ts (#8249)
* is-extension.test.ts passing, 100% coverage

* move-in-array tests passing, 100% coverage

* removed unfinished test
2021-09-22 21:21:15 +00:00