Commit Graph

1104 Commits

Author SHA1 Message Date
Nitwel
48196db0d2 revert changes made in #18249 (#18266) 2023-04-20 08:09:27 -04:00
Hannes Küttner
7bf87f3df3 Fix a few dev mode warnings (#18249)
* `list-m2m` make layout optional

* Silence a few more warnings

* Properly type v-button `to`

* Make search prop in field-detail-simple not required

* Set undefined as default value for text in v-text-overflow

* Change initial search value to undefined in field-detail

* Rework field-detail and field-detail-simple to use script setup

* One less ctrl+z

* Remove unnecessary new line

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-19 17:13:20 +00:00
Nicola Krumschmidt
3b52b0a771 Fall back to "other" group if interface has none (#18256) 2023-04-19 13:42:20 +00:00
Azri Kahar
678c5f57af Use filled star for required asterisks & rating display (#18242) 2023-04-19 08:56:35 +02:00
Pascal Jufer
73d54991d7 Get Directus version directly via filesystem from directus package (#18164) 2023-04-17 10:09:47 +02:00
Hannes Küttner
d4d175d615 Add loader to logs-siderbar-detail (#18200) 2023-04-15 09:24:02 -04:00
Rijk van Zanten
c48309ab68 Last eslint tweak (#18198)
* Should be there now

* Format
2023-04-14 17:40:50 -04:00
rijkvanzanten
37658802b7 One more 2023-04-14 17:30:56 -04:00
Rijk van Zanten
bdb1a919e2 White space rules (#18197)
* White space rules

* Auto-fix whitespace linter warnings
2023-04-14 17:21:56 -04:00
Hannes Küttner
5d85a743ff Add autoKey to interface config (#18027)
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-04-14 16:17:10 -04:00
Nitwel
d954172c9b Add info about dependencies when deleting collection (#17961)
* add info about dependencies when deleting collection

* Delete dependent fields

* Update app/src/lang/translations/en-US.yaml

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>

* add m2a edgecase

* run linter

* run linter

* Update app/src/lang/translations/en-US.yaml

* only delete m2o relations

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-04-12 13:56:54 -04:00
Hannes Küttner
ebba7a68e7 Migrate to Material Symbols (#18004)
* Migrate to Material Symbols

* Fix lint issues

* Use canonical `bookmark` icon

* Update `copy` icon name

* Replace `highlight_alt` with `select` icon

* Add directus_presets default icon migration

* Fix lint (again)

* Add spaces around icon group names

* Replace missing _outline icons

* Replace `arrow_backward` with `arrow_back`

* Update migrations

* Sign CLA

* merge migrations

* Revert group name display tweak

* Fix hover color + grid centering

* Update app/src/interfaces/file-image/file-image.vue

---------

Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-12 13:12:37 -04:00
denkhaus
1a843061ee Translation dialogs: make fields full width / multiline again (#18135)
* Make inputs in Translation-String Dialog fullwidth and change translation input field from input -> input-multiline.

* Update contributors.yml

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-11 16:00:48 -04:00
Pascal Jufer
d8455c14e2 Clean-up after "Enhance bug reporting from within the app" (#18136)
* Remove duplicate v-menu._test.ts

* Making UsableProjectInfo private again
2023-04-11 15:49:51 -04:00
Pascal Jufer
dcc246e165 Introduce new directus wrapper package (#18134)
* Maybe?

* Maybe maybe

* ESM & version update

* Adjust Dockerfile to new wrapper package

* Clean-up api package.json file

* Update directus/package.json

* Update directus/package.json

* Update directus/package.json

* Regen pnpm lock

* Declare engines in new wrapper package

* Use wrapper version in app-settings

---------

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-04-11 15:25:58 -04:00
rijkvanzanten
ff65665038 Remove unused import 2023-04-11 15:16:17 -04:00
Pascal Jufer
f09f440146 Enhance bug reporting from within the app (#16566)
* Fix paths of imports

* Process not-found.vue as ts

To prevent the following error from 'vue-tsc':
  error TS6504: File '/Users/pascal/Development/directus/app/src/modules/insights/routes/not-found.vue.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?

Note: We could also enable 'allowJS' but since this is the only js file
this seems to be a more fitting fix

* Drop hljs language definition for GraphQL (now in core)

* Enhance bug reporting from within the app

* Simplify simplify simplify

---------

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-04-11 15:04:26 -04:00
Nitwel
3028c645d0 Disallow selecting singletons (#17790)
* Disallow selecting singletons

* disallow for relations to singletons

* run linter

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-11 10:57:24 -04:00
Azri Kahar
166ba2f8c1 refresh current user for Save and Stay action (#17925) 2023-04-11 09:09:10 -04:00
ian
b9087c1aca Move activity Action enum from types to constants package (#18126)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
2023-04-11 08:30:48 +00:00
Rijk van Zanten
05af3a7774 Add items.sort to flow trigger events (#18118) 2023-04-10 14:53:51 -04:00
Nitwel
88a401ca20 Make headers sticky again (#17850)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-04-07 12:29:41 +02:00
Nitwel
9ee67830e3 Fix rehydrating cache after flow save (#17819)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-04-05 12:30:19 +02:00
Rijk van Zanten
2983e61870 The Great TypeScript Modernization Program Season 3 Episode 6: The Big One (#18014)
* Step 1

* Step 2

* False sense of confidence

* Couple more before dinner

* Update schema package

* Update format-title

* Upgrade specs file

* Close

* Replace ts-node-dev with tsx, and various others

* Replace lodash with lodash-es

* Add lodash-es types

* Update knex import

* More fun is had

* FSE

* Consolidate repos

* Various tweaks and fixes

* Fix specs

* Remove dependency on knex-schema-inspector

* Fix wrong imports of inspector

* Move shared exceptions to new package

* Move constants to separate module

* Move types to new types package

* Use directus/types

* I believe this is no longer needed

* [WIP] Start moving utils to esm

* ESMify Shared

* Move shared utils to  @directus/utils

* Use @directus/utils instead of @directus/shared/utils

* It runs!

* Use correct schemaoverview type

* Fix imports

* Fix the thing

* Start on new update-checker lib

* Use new update-check package

* Swap out directus/shared in app

* Pushing through the last bits now

* Dangerously make extensions SDK ESM

* Use @directus/types in tests

* Copy util function to test

* Fix linter config

* Add missing import

* Hot takes

* Fix build

* Curse these default exports

* No tests in constants

* Add tests

* Remove tests from types

* Add tests for exceptions

* Fix test

* Fix app tests

* Fix import in test

* Fix various tests

* Fix specs export

* Some more tests

* Remove broken integration tests

These were broken beyond repair.. They were also written before we really knew what we we're doing with tests, so I think it's better to say goodbye and start over with these

* Regenerate lockfile

* Fix imports from merge

* I create my own problems

* Make sharp play nice

* Add vitest config

* Install missing blackbox dep

* Consts shouldn't be in types

tsk tsk tsk tsk

* Fix type/const usage in extensions-sdk

* cursed.default

* Reduce circular deps

* Fix circular dep in items service

* vvv

* Trigger testing for all vendors

* Add workaround for rollup

* Prepend the file protocol for the ESM loader to be compatible with Windows
"WARN: Only URLs with a scheme in: file and data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'"

* Fix postgres

* Schema package updates

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

* Resolve cjs/mjs extensions

* Clean-up eslint config

* fixed extension concatination

* using string interpolation for consistency

* Revert MySQL optimisation

* Revert testing for all vendors

* Replace tsx with esbuild-kit/esm-loader

Is a bit faster and we can rely on the built-in `watch` and `inspect`
functionalities of Node.js

Note: The possibility to watch other files (.env in our case) might be
added in the future, see https://github.com/nodejs/node/issues/45467

* Use exact version for esbuild-kit/esm-loader

* Fix import

---------

Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Brainslug <tim@brainslug.nl>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-04-04 17:41:56 -04:00
Rijk van Zanten
bb952f9386 Add optional confirmation dialog with input fields to Manual Trigger in Flows (#17603)
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-03-31 19:37:50 +00:00
Nitwel
2c3dc1c77c don't move files when folder can't be deleted (#17957) 2023-03-27 15:44:10 +02:00
Azri Kahar
895ef06541 Fix Save and Stay to refresh revisions detail for roles and webhooks (#17891)
* refresh revisions detail in roles page

* refresh revisions detail in webhooks page
2023-03-27 09:25:16 -04:00
Nitwel
02ed12d592 fix collection name on deselect in m2a relation (#17958) 2023-03-27 09:24:10 -04:00
Azri Kahar
46c1666607 fix archive field reactivity for new collection (#17862) 2023-03-22 06:57:10 +08:00
Azri Kahar
8849050657 use dbSafe input for system fields (#17861) 2023-03-21 12:30:15 +01:00
Nitwel
91c2d8b969 Fix typeAllowList (#17830) 2023-03-17 18:48:05 +01:00
Azri Kahar
eb65d60236 Improve error handling for app extensions (#17191)
* add util function to get vue component name

* add global error handler

* add v-error-boundary component

* use error boundary to wrap insights panels

* use error boundary to wrap form interfaces

* use error boundary in render display and template

* use error boundary in extension options

* use error boundary for flows operation overview

* extract default options-overview into a component

* add tests
2023-03-16 13:04:17 +01:00
Nitwel
0b6e4c0200 Load flow directly from api (#17785)
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
2023-03-16 00:51:12 +00:00
Azri Kahar
5f4b4ec3d4 Use light primary border color for fields when they are inside groups (#17777)
* use light primary border for fields in groups

* remove !important & use higher CSS specificity
2023-03-14 13:14:20 +01:00
Brainslug
77cffa6849 Require value for dropdown choices (#17732)
* updated value to be required

* applied to other interfaces

* Made dropdown labels required too

* added required fields for other interfaces

* added required fields for field/collection translations
2023-03-10 00:14:39 +08:00
Nitwel
00faa39f87 Fix delete and quit opening save changes drawer (#17739)
* fix delete and quit opening save changes drawer

* fix bug on more places

* and another spot

* run linter

* Same change for presets

---------

Co-authored-by: ian <licitdev@gmail.com>
2023-03-09 00:41:05 +08:00
Nitwel
c29bf4d958 Only show context menu for collections (#17725)
* Only show context menu for collections

* don't attach event listener on null
2023-03-07 14:53:55 +00:00
Pascal Jufer
37faf3bd5d Patch Tuesday 🐸 (#17530)
* Update root deps

* Reformat files with new prettier version

* Update `directus` deps

* Update `@directus/app` deps

* Update `@directus/shared` deps

* Update components snapshots after updates

prop order has changed

* Update `extensions-sdk` deps

* pin version of zod in shared

* Update `@directus/storage` deps

* Update `@directus/storage-driver-azure` deps

* Update `storage-driver-cloudinary` deps

* Update `@directus/storage-driver-cloudinary` deps

* Update `@directus/storage-driver-local` deps

* Update `@directus/storage-driver-s3` deps

* Update `@directus/utils` deps

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-02-16 17:47:39 +08:00
Nitwel
acd4078239 Fix using strings for flow trigger collections (#17441) 2023-02-08 12:59:23 -05:00
Rijk van Zanten
2fa46e18f5 Drop inline rendering of docs (#17434) 2023-02-07 13:52:53 -05:00
Nitwel
3600d726e0 make sort fields hidden by default (#17416) 2023-02-06 12:16:15 -05:00
Nitwel
cc7d3db099 fix applying corresponding changes (#17392) 2023-02-03 16:01:42 +01:00
Jay Bharadia
b13efb61ef Fix field configuration view not updating when navigating between different fields in New Field drawer (#17254)
* Fix field configuration view not updating when navigating between different fields in New Field drawer

* Used Vue toRef instead of computed as per the feedback

* Make type reactive too

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-01-23 13:05:25 -05:00
Jay Bharadia
bb176c44fb Fix/issue 16692 and issue 16437 (#17186)
* Issue 16437 solved

* Cleanup optional check

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-01-19 11:34:27 -05:00
Brainslug
66f4e89978 added frontend sorting for flows (#17202) 2023-01-17 11:07:38 +01:00
Pascal Jufer
c16be6f644 Type fixes in app (part 1) (#16545)
* Fix paths of imports

* Process not-found.vue as ts

To prevent the following error from 'vue-tsc':
  error TS6504: File '/Users/pascal/Development/directus/app/src/modules/insights/routes/not-found.vue.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?

Note: We could also enable 'allowJS' but since this is the only js file
this seems to be a more fitting fix

* Drop hljs language definition for GraphQL (now in core)

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2023-01-09 18:29:03 +00: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
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
ecb0998a8f optimize stores hydration calls (#16591) 2022-11-23 17:24:20 -05:00