* Prevent changing to or from alias type
* Prevent infinite delete loop
* Display error when saving
* More validation for M2M and M2A
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* Add collections batch update endpoint
* Use collections batch update when sorting in data model
* Add autoPurgeSystemCache option
* Change type to false for consistency
* Refactor to InvalidPayloadException
* Add collection batch update test
* Bump default max payload size to 1mb
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* use `localType` to disable related collection in m2m
this is because `localType` dictates the relationship type (eg. m2m, files), but `type` was only field type (eg. alias, string)
* reset files junction when re-enabling auto fill
* prevent m2m clearing related collection
When re-enabled auto-fill, the updates only contain the autofill, not the m2o related collection value, so it was unintentionally resetting the value even when we are only toggling autofill
* fix autofill for translations
* fix m2a junction autofill toggles
* use getCurrent instead of state
* basic test for fieldDetailStore
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* treat empty array as null on relational field
* Run prettier
* add unit test
* Fix linter warnings
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* move components without dependencies to packages
* make every components use vue script setup
* move components and utils from shared to @directus/components
* fix imports
* move over some more components
* get rid of unnecessary isEmpty and notEmpty
* move pagination
* fix missing !
* move groupable components
* move text-overflow and useElementSize
* fix icons not being shown
* add first unit tests
* remove capitalizeFirst
* simple cleanup
* add css-var unit test
* move over most other components
* make every component use script setup
* add some more unit tests
* add more tests and burn v-switch to the ground. 🔥
* add checkbox tests
* start with next test
* add storybook
* add more pages to storybook
* add final stories
* fix stories actions
* improve action fix
* cleaning props and adding tests
* unit tests -.-
* add some documentation to components
* Add docs to each prop
* clean storybook paths
* add more unit tests
* apply v-select fix
* update lock file
* small tweaks
* move back to shared
* fix imports
* fix imports
* cleaning
* stories to typescript
* Fix version number
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* Prevent duplicate rootPath for image in file-preview
* Add rootPath to file and file-image for downloading
* Revert change to v-image
* Patch rootPaths accordingly
* Fix missing file name on download
* first draft for translations rtl implementation
* make direction field dybamic
* Fixed default direction field
* added directionality to: tags, input-multiline, repeater (list)
* added directionality for wysiwyg, input-autocomplete, groups
* reverted directionality in wysiwyg-editor
* removed hardcoded rtl, ltr buttons from wysiwyg toolbar
* working directionality in wysiwyg editor
* also add v-if to await language for second language (split-view) in translations.vue
* added watcher for changing wysiwyg directionality on language change
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
Co-authored-by: Martijn de Voogd <devoogd@kissthefrog.nl>
Co-authored-by: Martijn <73393707+martijn-dev@users.noreply.github.com>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
* removing getrootpath
* removed redundant getRootPath from components
* We use leading / everywhere else in api usage
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* Install / bootstrap vitest
* Install c8
* Add tests for add-query-to-path
* Don't set global maplibre token on individual style
This feels wrong to me. We have a single global access token that should be used for these things. Overriding that with a token that's found for individual styles on top of the same global object in order of configured maps feels weird, as the latter tokens will override the earlier ones. Needs more research though
* Install testing libraries
* Use happy-dom as env in vitest
* Enable ts checking in tests
* Remove unused jest config
* Organize store imports
* Remove types from TSDoc in add-query-to-path
* Improve check in add-related-primary-key-to-fields
* Add reusable stub for anything touching nanoid
* Add tests for add-related-primary-key-to-fields
* Move adjust date to shared
* Remove arraysAreEqual util in favor of relying on lodash
* Fix add-related-primary-key-to-fields test
* Add test coverage for capitlize-first
* Add TSDoc/tests for extract-field-from-function
* Add test coverage for formatFieldFunction
* Add test coverage for format-filesize
* Add test coverage for get-groups
* Add tests for get-root-path
* cleanup imports
* Move tests to live next to source files
* Add tests for user-name
* Update type to match function behavior
* Add test coverage for point-on-line
* Add tests for is-empty
* Add test coverage for is-hex
* Remove getSetting util
Bit pointless to have a util function to just read a value from a store
* Add test coverage for get-related-collection
* Add test coverage for get-theme
* Add test coverage for get-with-arrays
* Add test coverage for hide-drag-image
* Add test coverage for is-permission-empty
* Remove unused import
* Add test for jwt-payload
* Add snapshot rendering test for v-sheet
* Add whitespace
* Rename __test_utils__ -> __utils__
* Add composable test
* Update app/tsconfig.json
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
Co-authored-by: Pascal Jufer <pascal-jufer@bluewin.ch>
* Clean up extensions build logging
* Expose defineOperation* helpers through extensions-sdk
* Add support for scaffolding operation extensions
* Refactor extension type constants
* Improve extension-related tests in shared
* Improve wording when scaffolding extension fails due to wrong type
* Make spinner text bold when scaffolding extensions
* Add support for building operation extensions
* Fix operations tile name
* Make extension config type spacing consistent
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* v-image and "lazy load" working
* fixed vars
* all the other img uses
* No longer require access token in url for files
* Add lazy loading and size limits
* Rename map-component source prop
* Fix lint warning
* Update app/src/views/public/public-view.vue
Co-authored-by: ian <licitdev@gmail.com>
* Fix lint
* Fix missing file type icon
* Fix null imageInfo error
* Use video.js for media playback
* Fix .js file display
* Update package-lock.json
* Update package-lock.json
* update package.json
* Update pnpm-lock.yaml
* Remove unrelated addition on VDatePicker
* Remove folder abstraction
* Use image data based aspect ratio on preview
* Base app rate throttle on API rate limit config
* Configure app rate limit throttle based on api config
* Convert v-image to script[setup]
* Convert v-media to script[setup]
* Cleanup v-media
* Remove unneeded addTokenToUrl usages
* Remove video.js
It doesn't do authorization headers for mp4/mp3, so it's pointless
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: ian <licitdev@gmail.com>
* add raw editor for flows operation options
* add comment to explain reasoning for watcher
* add simple raw editor with syntax highlighting
* Add multiline to text fields & hide in json fields
* update input icon for toggle
* do not unset value for text fields
* fix mustache tag value checking
* enable raw editor for Insights
* remove lint warning
* Reduce size + inline icons
* add background-highlight when active toggle
* change multiline prop to type prop
* show toggle for all field types (including json)
* remove watcher to toggle rawEditor on load
* fix raw editor emit
* fix request operation headers field type json
* fix raw editor value passed to codemirror
* prevent tags from crashing
* do not unset values anymore when toggling raw
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>