Commit Graph

521 Commits

Author SHA1 Message Date
rijkvanzanten
bb22a8cb13 Bump docs 2022-08-04 18:08:23 -04:00
rijkvanzanten
3acb9e3858 Bump docs 2022-08-04 17:56:36 -04:00
Rijk van Zanten
88c5edf7a3 Add app unit tests using vitest (#14583)
* 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>
2022-07-25 16:23:45 -04:00
rijkvanzanten
6e4738e4c0 v9.14.5 2022-07-22 14:45:15 -04:00
rijkvanzanten
aec37f6198 v9.14.4 2022-07-22 10:38:33 -04:00
rijkvanzanten
cf41b07100 v9.14.3 2022-07-21 16:16:14 -04:00
rijkvanzanten
0890bfc9a5 Update docs 2022-07-21 15:23:25 -04:00
rijkvanzanten
6d1e5b3432 v9.14.2 2022-07-21 15:17:56 -04:00
Rijk van Zanten
27cc3e1bec Move repo to pnpm based workflow (#14350)
* Use pnpm instead of npm

* Setup workspace

* Replace scripts / lerna root stuff

* Add todo file

* Update lock, start updating packages

* Update todo

* [WIP] Keep going on module resolution in pnpm

* Fix final missing deps/types for complete build

* [WIP] Replace npm commands with pnpm alternatives

* Update jest config for v28

* Fix missing package under schema

* Update workflow

* Run CI on fork

* Use local reference

* Remove version from local workflow

* Add build to prepare

* Add Node's max old space size flag to linter

* Idemdito for codeql

* Hyphens? Underscores?

* Bang

* Only build one thing at a time

* Underscores after all?

* Match 7gb of GH

* Set env on prepare

* Jest is driving me nuts

* Downgrade jest

* Add root jest

* We'll get there, eventually.

* 🥳

* Het houdt niet op, niet vanzelf

* attempt to fix e2e

* fix unit test & shared import

* add `debug: true` to CodeQL action

* Fix dev call in shared

* Add missing cross-env

* Add missing geo-json dependency for app

* add flag to prepare action to skip build

* remove debug flag from codeql action

* fix invalid env syntax

* add tslib to app dependencies for tests

* another attempt

* Added missing rimraf dependency for the api prebuild/cleanup scripts

* Added missing ts-node dependency for the api cli script

* update E2E tests readme to use pnpm

* Undo move of extensions sdk

* Fixes nested groups in accordions not rendering fields (#14369)

* initial fix for nested groups in accordions

* removed debug code

* Fix strict relative dates showing "incorrect" (#14390)

* Set rounding method of relative formatted date to floor when strict option is selected

* Add round fn as an option

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

* Don't use locales in generated camelCased values from env (#14401)

Ref https://github.com/directus/directus/discussions/14122

* Fix list panel descending sort (#14396)

* fix list panel descending sort

* Handle missing or explicit desc value

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

* Fix query primary field for system tables (#14402)

* New Crowdin updates (#14403)

* Update source file en-US.yaml

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

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

* New translations en-US.yaml (Greek)

* New translations en-US.yaml (Italian)

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

* Fix/wysiwyg context menu (#14404)

* New translations en-US.yaml (Polish) (#14407)

* Encoded the url using encodeURIComponent, so that the url gets sanitzed and so, we did not get 404 error. (#14418)

* Encoded the url using encodeURIComponent, so that the url gets sanitized and we did not get 404 error.

* Added required changes as stated by the reviewer

* Used encodeURI instead of encodeURIComponent to encode the params only

* Solved linting error

* Solved linting errors

* checked with npm run lint, no linting errors found

* fix generateJoi error due to empty permissions when creating new role (#14416)

* fix empty permissions when creating new role

* basic test

* move logic up

* additional test

* Update api/tests/utils/filter-items.test.ts

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

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

* Recreate lockfile

* Fix build of extensions-sdk

* Add missing dependency

* Add some more missing deps

* Update blackbox to use pnpm

* Update workflow to use main

* Update pack to work with pnpm

* Simplify commands

* Remove todo file (completed)

* ADd missing types dep

* Use local test version

* Remove version from local reference

* Call super with context

* Add missing dep

* Simplify workflows

Ref https://github.com/directus/organization/issues/135

* Simplify some more

* Linter is on root

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: brainslug <tim@brainslug.nl>
Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Gerard Lamusse <gerardlamo@gmail.com>
Co-authored-by: José Varela <joselcvarela@gmail.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Zeel Pathak <60271095+zeel-pathak@users.noreply.github.com>
2022-07-15 17:41:49 -04:00
rijkvanzanten
01af7e2ab9 Unbreak builds
And unbreak them on M1 too
2022-07-11 18:57:00 +02:00
brainslug
398839be6e v9.14.1 2022-07-08 11:13:22 +02:00
Rijk van Zanten
288e7d62b9 Move docs folder to dedicated repo (#14192)
* Move docs to https://github.com/directus/docs

* Update included docs
2022-06-29 13:47:45 -04:00
rijkvanzanten
fd55233b11 v9.13.0 2022-06-28 15:52:31 -04:00
Rijk van Zanten
32dd709778 Insights 2.0 (#14096)
* query function added to list

* dashboard reading query, adding to object

* typecasting of filter vals needed still

* numbers accepting strings too

* json-to-graphql-query => devD

* fixed unneeded return in list index.ts

* stitching and calling but not actually calling

* calls on panel change

* query object += new panel before dashboard save

* uuid generated in app not api

* fixed panel ids in query

* fixed the tests I just wrote

* passing the query data down!

* list showing data

* objDiff test moved to test

* metric bug fixes + data

* dashboard logic

* time series conversion started

* timeseries GQL query almost there

* query querying

* chart loading

* aggregate handling improved

* error handling for aggregate+filter errors

* removed query on empty queryObj

* maybe more error handling

* more error handling working

* improvements to erorr handling

* stitchGQL() error return type corrected

* added string fields to COUNT

* pushing up but needs work

* not an endless recursion

* its not pretty but it works.

* throws an error

* system collections supported

* refactor to solve some errors

* loading correct

* metric function fixed

* data loading but not blocking rendering

* removed redundant code.

* relational fields

* deep nesting relations

* options.precision has a default

* relational fields fix. (thanks azri)

* the limit

* limit and time series

* range has a default

* datat to workspace

* v-if

* panels loading

* workspaces dont get data anymore

* package.json

* requested changes

* loading

* get groups util

* timeseries => script setup

* list => script setup

* metric => script setup

* label => script setup

* declare optional props

* loadingPanels: only loading spinner on loading panels

* remove unneeded parseDate!!

* applyDataToPanels tests

* -.only

* remove unneeded steps

* processQuery tests

* tests

* removed unused var

* jest.config and some queryCaller tests

* one more test

* query tests

* typo

* clean up

* fix some but not all bugs

* bugs from merge fixed

* Start cleaning up 🧹

* Refactor custom input type

* Small tweaks in list index

* Cleanup imports

* Require Query object to be returned from query prop

* Tweak return statement

* Fix imports

* Cleanup metric watch effect

* Tweaks tweaks tweaks

* Don't rely on options, simplify fetch logic

* Add paths to validation errors

* [WIP] Start handling things in the store

* Rework query fetching logic into store

* Clean up data passing

* Use composition setup for insights store

* Remove outdated

* Fix missing return

* Allow batch updating in REST API

Allows sending an array of partial items to the endpoints, updating all to their own values

* Add batch update to graphql

* Start integrating edits

* Readd clear

* Add deletion

* Add duplication

* Finish create flow

* Resolve cache refresh on panel config

* Prevent warnings about component name

* Improve loading state

* Finalize dashboard overhaul

* Add auto-refresh sidebar detail

* Add efficient panel reloading

* Set/remove errors on succeeded requests

* Move options rendering to shared

* Fix wrong imports, render options in app

* Selectively reload panels with changed variables

* Ensure newly added panels don't lose data

* Only refresh panel if data query changed

* Never use empty filter object in metric query

* Add default value support to variable panel

* Centralize no-data state

* Only reload data on var change when query is altered

* Fix build

* Fix time series order

* Remove unused utils

* Remove no-longer-used logic

* Mark batch update result as non-nullable in GraphQL schema

* Interim flows fix

* Skip parsing undefined keys

* Refresh insights dashboard when discarding changes

* Don't submit primary key when updating batch

* Handle null prop field better

* Tweak panel padding

Co-authored-by: jaycammarano <jay.cammarano@gmail.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
2022-06-27 15:26:42 -04:00
Azri Kahar
4e85233060 App Docs Module Improvements (#14083)
* switch to vite-plugin-vue-markdown

* add icon support in in-app docs
2022-06-24 09:24:32 -04:00
Azri Kahar
e48d9ae5b5 Fix in-app docs (#13953)
* use kebab-case in wrapperComponent

* downgrade vite-plugin-md
2022-06-17 09:10:23 -04:00
Rijk van Zanten
e54af6b1dd Fix insights panel configuration not persisting to tiles (#13874)
* Make sure panel configuration props are passed camelCased

* Make sure edit still uses underscore prefixed panels
2022-06-13 14:38:12 -04:00
rijkvanzanten
bce19abf6f v9.12.2 2022-06-09 17:12:27 -04:00
rijkvanzanten
cd58611aa7 v9.12.1 2022-06-03 17:52:57 -04:00
Rijk van Zanten
3a614d0058 Only render first 10000 items on calendar layout view (#13724)
* Update fullcalendar

* Update eslint
2022-06-03 17:49:54 -04:00
Rijk van Zanten
96f2da5dd5 Fix flows editing existing operations (#13713)
* Use immediate watcher instead of prop based ref default val

Fixes #13702

* Make it happy

* I'll be damned, it wasn't my stupidity after all
2022-06-03 16:36:45 -04:00
rijkvanzanten
85af808f70 v9.12.0 2022-06-02 18:26:52 -04:00
rijkvanzanten
7e9812d04a v9.11.1 2022-05-24 17:50:37 -04:00
rijkvanzanten
f52da51925 v9.11.0 2022-05-19 13:09:50 -04:00
rijkvanzanten
e3a7a7d887 v9.10.0 2022-05-03 13:05:54 -04:00
Rijk van Zanten
f03e2e4256 Add local export capability (#13099)
* Add local export capability

* Add local download capability to every layout

* Use queried fields in export logic

* Update tooltip text
2022-05-03 12:58:44 -04:00
rijkvanzanten
ed780aceba v9.9.1 2022-04-22 12:21:24 -04:00
Nitwel
7639023a4f Emoji Picker & Comment improvements (#11946)
* add simple emoji picker and improve comments

* add v-md option to open in new tab

* fix styling when editing comment

* clean up code

* use script setup

* use different emoji lib

* fix inserting emojis into text

* fix search styling

* always show cancel button

* comment style tweaks

* clean up emoji picker

* add placeholder to v-template-input

* cleanup comments some more

* clean up comments sooooome more

* fix notify message on update

* update comment markdown styling

* button and icon hover colors

* move styling to global file

* clean up code

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Ben Haynes <ben@rngr.org>
2022-04-22 12:18:45 -04:00
rijkvanzanten
fb252ca4ce v9.9.0 2022-04-15 14:26:54 -04:00
rijkvanzanten
2a6db01c42 v9.8.0 2022-04-01 14:41:08 -04:00
Rijk van Zanten
90f5b0a471 Add functions support to the app + add count function (#12488)
* Rename date functions to fn, add json_array_length for pg

* Add json count to mssql

* Add json array count support to other vendors

* Add UI for selecting API functions

* Make it not break

* Render functions in filter preview better

* Include functions in field altering

* Add schema access to database helper

* Allow filtering against o2m/m2m/m2a count

* Add data function execution helpers in utils

* Fix type issue

* Inject function results in validate step

* Render field keys with function names translated

* Allow selecting nested/functions in field validation step

* Make sure number comparisons are treated as numbers

* Add check if instanceof date when casting to a Number

* Prevent selecting foreign keys for junction sort (#12463)

* [SDK] Add further request options to `items` functions (#12503)

* add possibility to set further options to the request

* fix options type

* add typings to interface

* add test if headers are passed thourght

* create reusable options param

* set higher priority to options param

* Small stylistic cleanup

Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
Co-authored-by: ian <licitdev@gmail.com>
Co-authored-by: Jürg Hunziker <juerg.hunziker@gmail.com>
2022-03-31 16:56:26 -04:00
rijkvanzanten
7b15947276 v9.7.1 2022-03-23 14:50:51 -04:00
rijkvanzanten
c1da41d671 v9.7.0 2022-03-18 16:34:35 -04:00
rijkvanzanten
eba2576227 v9.6.0 2022-03-04 20:25:43 -05:00
rijkvanzanten
47a5da78fb v9.5.2 2022-02-18 11:45:07 -05:00
rijkvanzanten
c0c412d30b v9.5.1 2022-02-03 20:41:49 -05:00
rijkvanzanten
78a25fe953 v9.5.0 2022-01-24 15:53:29 -05:00
Jay Cammarano
b96d7775d3 Add soft character limit to various inputs (#11009)
* added soft_length to lang

* added softLength option to input interface

* softLength => textarea, md, wysiwyg

* really broken but counting characters

* return 0 not null oops

* characters remaining displaying

* percentageRemaining => shared

* placeholders => string

* markdown inputs need to change preview css

* account for multiple md inputs

* works for multiple inputs on a page

* let it breathe

* text area but no warning color (yet)

* newline is 1 char

* null => undefined

* shows with 0 hard limit left

* softlength tied to maxlength

* preview displaying md

* using share util

* Replace shared "interface" with util

* Add test setup

* Lock package versions

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2022-01-20 20:58:57 +00:00
Rijk van Zanten
b3f43ff1a2 Upgrade dependencies (#11118)
* Update marked in app

* Upgrade marked in cli

* Update nested deps
2022-01-17 21:42:04 +00:00
rijkvanzanten
65bfe68b0c v9.4.3 2022-01-07 16:11:24 -05:00
rijkvanzanten
1a5a9180ee v9.4.2 2021-12-30 21:11:32 -05:00
rijkvanzanten
4991ba858b v9.4.1 2021-12-28 20:17:21 -05:00
rijkvanzanten
a47b9cec0f v9.4.0 2021-12-23 22:46:18 -05:00
Azri Kahar
9603fbcd3a Add v-date-picker base component & use it in datetime interface (#10438)
* WIP

* clean up emitted values & add locale support

* fix styling and add dynamic width

* fix logic for getting the last key

* lock flatpickr version

* add "set to now" button

* add locale & fix input flash

* fix locale issue

* fix initial value not setting

* use v-menu & reuse date-fns locales

* add max-height-none prop to v-menu

* remove unused styles

* touch up style

* use flatpickr locale constructed from date-fns

* minor style tweak

* Various style tweaks

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-12-23 21:43:25 -05:00
rijkvanzanten
4b444baf5b v9.3.0 2021-12-16 18:48:10 -05:00
rijkvanzanten
546d525175 v9.2.2 2021-12-10 15:53:08 -05:00
rijkvanzanten
1d4e9c425c v9.2.1 2021-12-06 14:31:01 -05:00
renovate[bot]
23e0b8bf9b Pin dependencies (#10318)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-06 15:24:32 +00:00
rijkvanzanten
776c105aac v9.2.0 2021-12-03 16:16:38 -05:00
rijkvanzanten
9bf033c18d v9.1.2 2021-11-25 12:36:24 -05:00