4975 Commits

Author SHA1 Message Date
rijkvanzanten
602f5db4f7 v9.22.1 2022-12-21 17:12:11 -05:00
rijkvanzanten
8f0fb8b40f v9.22.0 2022-12-21 14:33:04 -05:00
Rijk van Zanten
0402629131 New Crowdin updates (#16660)
* New translations en-US.yaml (German)

* New translations en-US.yaml (Dutch)

* New translations en-US.yaml (Italian)

* New translations en-US.yaml (Chinese Simplified)

* New translations en-US.yaml (French, Canada)

* Update source file en-US.yaml

* New translations en-US.yaml (Persian)

* New translations en-US.yaml (French)

* New translations en-US.yaml (Hungarian)

* New translations en-US.yaml (Persian)

* New translations en-US.yaml (Persian)

* New translations en-US.yaml (German)

* New translations en-US.yaml (Italian)

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (Arabic)

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (Serbian (Latin))

* New translations en-US.yaml (Serbian (Latin))

* New translations en-US.yaml (Russian)

* New translations en-US.yaml (German)
2022-12-21 14:23:00 -05:00
rijkvanzanten
ad8dccd6da Update docs 2022-12-21 14:19:50 -05:00
Rijk van Zanten
519ad3562c Fetch item/total counts separate (#16870)
* Fetch item/total counts separate

* try to add test

* use relative path when importing types

* Async reload counts on batch operations

* Refresh total/item count nicer

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2022-12-21 12:41:14 -05:00
ian
f1a8e0446f Fix duplicated results and functions in nested filters (#14798)
* Speed query up by reusing existing aliases which reduces table joins

* Use subquery in top level m2o to remove duplicates

* Fix linting

* Apply distinct on primary key field in subqueries

* Use distinct instead as there are only primary keys

* Apply subquery on top level

* Try remove sub sub query

* Test if working for all vendors

* Add support for _none and _some

* Use subquery only when field depth > 1

* Add tests

* Use original table names for columns with functions (#14690)

* Use original table names for columns with functions

* Extract filter function path parsing as shared util

* Fix filter function path when adding node

* Pass the originalCollectionName into filter functions

* Update unit test

* Replace functions within deep GraphQL

* Fix invalid operator error for _none and _some

* Add filter function tests

* Revert triggering for all vendors

* Simplify aliasMap

* Replace functions in filter within GraphQL aggregate query

* Add API support for filtering of alias field

* Mark schema as optional

* Shift logical operators upwards

* Separate recursive parseFilter

* Rework shifting of logical operators

* Error on invalid usage of _none and _some

* Use inner join to preserve sort order

* Run tests for all vendors

* Reuse aliasMap for sort and filter

* Sort on top level query

* Remove unnecessary limit on wrapper query

* Refactor applyQuery options

* Remove duplicates from nested multi relational sort

* Fix offset in MSSQL requiring OrderBy

* Disable schema cache

* Use inner query only for nested sort or multi relational filter

* Fix MSSQL duplicate order column

* Use inner query only for multi relational

* Additional integration tests

* Order within partition for multi relational sorts

* Rename to directus_row_number

* Fix unit test

* Add base sort and filter tests

* Fix Oracle uppercased rowNumber column

* Fix unit test

* Fix top level query sort with function

* Parse functions in inner query

* Increase clarity with knex.ref()

* Remove sort filter for top level primary key

* Fix unit test

* Bypass queries with groupBy

* Add collection to aliasMap to fix functions in nested sort

* Fix multi relational sort with functions

* Add tests for filter and sort with functions

* Fix accidental deletion of brackets

* Fix top level alias filter node interface

* Update M2M sort tests

* Add M2A tests

* Cast m2a primary key as varchar2 for oracle

* Enable filtering tests for M2A

* Fix prototype polluting assignment in aliasMap

* Remove unnecessary currentKey

* Simplify code to increase readability

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>

* Fix linting and missing 'this' error

* Revert optional chaining

* Add mysql5 to tests

* Fix mysql5 missing rowNumber()

* Overcome indexing delays in MySQL5

* Verify MySQL5 sorting is in order as the result count varies between runs

* Skip joining when sorting field already exists

* Simplify variable assignment

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>

* Fix linting

* Reduce duplicate logic with vars

* Transform _func fields in GraphQL only for valid functions

* Fix unit test

* Fix unsupported date_part() in CrDB

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Roger Stringer <roger@directus.io>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-12-21 11:56:18 -05:00
Pascal Jufer
8f5a072352 Enhance loading logic in image component (#16538)
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
2022-12-19 11:06:07 +01:00
Brainslug
7ae8441214 fixed comma separated input for filters (#16618) 2022-12-19 10:21:20 +01:00
Brainslug
ca93f5cb1d Add support for custom JS embeds in the App (#16650)
* add embed hook definitions

* inject embeds in the App html

* fixed typo

* removed unnecessary env parameter

* Added comment marking the custom embeds

* attempt to add test for createApp

* mock db in app test

* temporarily set log style to raw in test

* one more round

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2022-12-17 20:14:30 -05:00
Brainslug
511c8d368b Fix json serialization (#16558)
* fix copying json fields

* fixed preset filter type

* handling fallback in copyToClipboard function

* add test

* try parsing json content on paste

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2022-12-15 10:40:43 +01:00
Brainslug
807bda3dcb Follow up user Roles not loading (#16278)
* applied the same role fix too users invite

* added same fix when saving permissions

* Prevent loading users unecessarily on the permission page

* Added proper `deep` query typing

* fixed typing for tests

* apply similar fix for navigation folder
2022-12-13 15:05:14 +01:00
Brainslug
939c5ab197 Use absolute url instead of relative path for exports (#16724) 2022-12-05 17:11:31 -05:00
Azri Kahar
b905741601 tweak datetime picker styles (#16714) 2022-12-05 10:01:49 -05:00
José Varela
5d1847807c Translations: Fix missing tfa_setup (#16710)
* Fix missing `tfa_setup` to translations

* Add missing `admin_disable_tfa_text`
2022-12-05 09:40:33 -05:00
Nitwel
b3110a3627 fix wrong default ip (#16585)
* fix wrong default ip

* update fallback ip
2022-12-02 12:57:52 +01:00
Azri Kahar
0147a7e5b6 fix permission presets with dynamic variables (#16614)
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
2022-11-30 16:05:26 +01:00
Azri Kahar
1c93cc661e Reduce translate function calls in the App (#16038)
* translate fields during hydration

* patch untranslated raw values on field edit

* simplify/remove existing translate usages

* minor codestyle

* translate field note and validation_message

* stub api call in fleld-detail store test

* skip fields translation before user locale sets in

* optimize hydration calls

* use translateLiteral for note & validation_message

* cherry pick field meta properties to patch

* reduce setLanguage calls & settings requests

* settings store test & type update

* tweak variable casing

* test server store & fix existing type/ref issues

* update fields store test for skipTranslation

* fix render-display merge

* await field update before opening drawer

* fetch meta at the end to load relationships first

* add loading state to prevent editing some fields

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
2022-11-30 13:33:31 +01:00
Azri Kahar
ce8f571c72 Fix key combinations being prevented in dbSafe v-input when it's a leading number (#16668)
* Fix key combinations being prevented in v-input

* should normalize accented characters first

* add tests for processValue and emitValue

* export keyMap from use-shortcut to keep things DRY

* try to add test for use-shortcut composable

* move systemKeys to use-shortcut

* add "capslock" & "enter" to systemKeys
2022-11-30 19:56:44 +08:00
rijkvanzanten
d6b8e5963d v9.21.2 2022-11-28 15:44:12 -05:00
rijkvanzanten
03505fdba9 Update docs 2022-11-28 15:41:57 -05:00
rijkvanzanten
51b1daec58 v9.21.1 2022-11-28 15:09:00 -05:00
Rijk van Zanten
a58dc4dc13 New Crowdin updates (#16500)
* New translations en-US.yaml (Chinese Simplified)

* New translations en-US.yaml (Greek)

* New translations en-US.yaml (Greek)

* New translations en-US.yaml (Polish)

* New translations en-US.yaml (Dutch)

* New translations en-US.yaml (Hungarian)

* New translations en-US.yaml (Vietnamese)

* New translations en-US.yaml (Vietnamese)

* New translations en-US.yaml (Vietnamese)

* New translations en-US.yaml (Vietnamese)

* New translations en-US.yaml (Vietnamese)

* New translations en-US.yaml (Vietnamese)

* New translations en-US.yaml (Vietnamese)

* New translations en-US.yaml (Spanish, Mexico)

* New translations en-US.yaml (Bengali, India)

* New translations en-US.yaml (Arabic)

* New translations en-US.yaml (Spanish, Mexico)

* New translations en-US.yaml (Indonesian)

* New translations en-US.yaml (Dutch)
2022-11-28 15:07:02 -05:00
rijkvanzanten
76284ed9e0 Update docs 2022-11-28 15:05:00 -05:00
Azri Kahar
d1483b15b4 improve v-icon performance (#16511) 2022-11-28 14:39:38 -05:00
Azri Kahar
0a839b53b4 v-menu pointer event tweaks (#16512)
* v-menu pointer event tweaks

* apply tweak to .v-menu click & closeOnContentClick
2022-11-28 14:39:23 -05:00
Azri Kahar
2f5640d383 fix missing collection after sorting M2A (#16570) 2022-11-28 14:38:58 -05:00
Azri Kahar
ecb0998a8f optimize stores hydration calls (#16591) 2022-11-23 17:24:20 -05:00
Andrii Trubai
12786728ed Fix .module-nav-resize-handle layout (#16518)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-11-18 15:18:09 -05:00
Pascal Jufer
47db8e5d2f Clean-up dependencies (#16481)
* Clean-up api

- Remove unnecessary deps
- rimraf -> del-cli

* Clean-up app

- bytes -> pretty-bytes
- Remove ms as we already have pretty-ms
- Remove other unnecessary deps
- Add storybook build to gitignore

* Clean-up drive packages

- Simplify cleanup scripts
- rimraf -> del-cli
- Remove unnecessary deps

* Clean-up schema

- Remove unnecessary dep (lodash)
- Replace 'npm-watch' with native watch mode

* Clean-up shared

- Remove unnecessary dep (c8, adding @vitest/coverage-c8 will be addressed in
  other PR)
- rimraf -> del-cli
- npm-run-all -> concurrently

* Clean-up root

- Add missing eslint-plugin-jest dep
- listr -> listr2

* Make build output a bit friendlier

* Remove cleanup scripts

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-11-18 17:02:41 +00:00
rijkvanzanten
ba00c28bf3 v9.21.0 2022-11-17 16:31:59 -05:00
Rijk van Zanten
cab48e57d9 New Crowdin updates (#16300)
* New translations en-US.yaml (German)

* New translations en-US.yaml (French)

* New translations en-US.yaml (French)

* New translations en-US.yaml (Romanian)

* New translations en-US.yaml (Ukrainian)

* New translations en-US.yaml (French)

* New translations en-US.yaml (Chinese Simplified)

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

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

* New translations en-US.yaml (Portuguese, Brazilian)
2022-11-17 16:30:00 -05:00
rijkvanzanten
54e2453e00 Update docs 2022-11-17 16:28:39 -05:00
Azri Kahar
d38d8255c0 fix shares drawer closing event (#16487) 2022-11-17 11:22:25 -05:00
Rijk van Zanten
0bb34f0f0d Patch Tuesday 🐸 (#16475)
* Update monorepo root

* Update API dependencies

* Use unranged version

* Update app deps

* Upgrade packages dependencies

* Fix shared build

* Fix type warning in api

* Fix test runner

* Get rekt by ya boy comma-,

* Fix missing unit deprecation for sass color.mix()

Co-authored-by: ian <licitdev@gmail.com>
2022-11-17 08:51:42 -05:00
Nicola Krumschmidt
7bf90efa62 Add support for a package extension bundle type (#15672)
* Add bundle type to constants and types

* Add support for API bundle extensions

* Rename generateExtensionsEntry to generateExtensionsEntrypoint

* Add support for App bundle extensions

* Refactor App extension registration

* Replace extensions inject with useExtensions()

* Replace getInterfaces() with useExtensions()

* Replace getDisplays() with useExtensions()

* Replace getLayouts() with useExtensions()

* Replace getModules() with useExtensions()

* Replace getPanels() with useExtensions()

* Replace getOperations() with useExtensions()

* Add useExtension() composable

* Replace useExtensions() with useExtension() where applicable

* Remove interface getters

* Remove display getters

* Remove layout getters

* Remove module getter

* Remove panel getters

* Remove operation getters

* Rename extension register.ts files to index.ts

* Perform module pre register check in parallel

* Remove Refs from AppExtensionConfigs type

* Remove old extension shims

* Ensure registration of modules is awaited when hydrating

* Add support for scaffolding package extensions

* Add support for building bundle extensions

* Add JsonValue type

* Use json for complex command line flags

* Load internal extensions if custom ones are not available

* Fix extension manifest validation for pack extensions

* Fix tests in shared

* Add SplitEntrypoint type

* Move command specific utils to helpers

* Add SDK version getter

* Move extension dev deps generation to helpers

* Move template path to getter util

* Move template copying to a helper

* Only rename copied template files

* Add directus-extension add command

* Convert provided extension source path to url

* Replace deprecated import.meta.globEager

* Mock URL.createObjectURL to make App unit tests pass

* Update rollup-plugin-typescript2

* indentation

* sort vite glob imported modules

* fix unintentional wrong commit

* Simplify app extension import logic

* reinstall @rollup/plugin-virtual

* add test for getInterfaces() expected sort order

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2022-11-16 11:28:52 -05:00
Azri Kahar
0859102a61 sanitize comment-input (#16471) 2022-11-16 10:31:57 -05:00
Nitwel
7248d36940 Only pass needed values when sorting (#16283)
* only pass needed values when sorting

* fix sort for files

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-11-16 10:23:40 -05:00
Nitwel
568479712f fix preset resetting itself (#16473) 2022-11-16 09:34:14 -05:00
Pascal Jufer
adeabdfe7b Clean-up and unify all package.json files (#16447)
* Clean-up & unify all package.json files

* Sort all package.json files the same way

Using 'sort-package-json'

* Add funding link to packages
2022-11-15 11:35:28 -05:00
Pascal Jufer
df495edae0 Exclude unnecessary files from packages (#16374)
* Exclude unnecessary files from packages

* Add back 'copyfiles' in api to copy yaml and liquid files to dist

* Exclude declaration maps and all declaration files for drive packages

Excluding all declaration map files from published packages

Since the "drive" packages are only expected to be used internally, it's
enough to have the declaration files present when developing locally - no
need to include the types in the published packages

* Remove unnecessary entries in "files" field of app/package.json

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-11-15 09:51:04 -05:00
Michal Szycko
96de8994a3 Keep SidebarOpen state in local storage (#15861)
* save sidebarOpen state in local storage

* handle errors while setting value to local storage

* use useLocalStorage to keep sidebarOpen state, add default value to useLocalStorage, cleanup

* move logic to useLocalStorage, remove LocalStorageObject

* use parseJSON utility

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
2022-11-15 14:30:11 +01:00
Azri Kahar
0fc4c501c3 Allow admin to update Directus User provider and external_identifier (#16436)
* allow admin to update `provider` & `external_id`

* remove unused external_id field

* test for provider and external_identifier

* remove unused test code
2022-11-14 09:46:22 -05:00
Nitwel
32a363b803 Reset page when changing pageSize (#16412) 2022-11-11 17:45:23 -08:00
Nitwel
10ebe7c523 use correct collection for translation (#16280) 2022-11-09 19:44:19 -08:00
Nitwel
25c6248b0a add editsGuard to drawerItem (#16375)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2022-11-09 07:31:55 -08:00
Azri Kahar
b5b073b0cb Allow disabling same width for attached dropdown menu (#16365)
* allow configuring width for attached menu

* add prop to v-select

* simpler prop naming

* update test snapshot
2022-11-09 07:31:14 -08:00
Nitwel
4e70be6da7 fix sortField selection (#16379) 2022-11-09 07:29:00 -08:00
Pascal Jufer
20a06a6c0e Clean-up lint / format set-up (#16380)
* Format json & all yaml files and update ignore files

* Fix resulting formatting issues
2022-11-09 07:26:54 -08:00
Azri Kahar
3e96584bad Test locale translations (#16267)
* fix es-CL locale import

* add test for locale files

* re-enable html warn and minor tweaks

* test whether import is successful
2022-11-03 09:14:55 -04:00
ian
13d8dde534 v9.20.4 2022-11-03 11:01:46 +00:00