Commit Graph

646 Commits

Author SHA1 Message Date
José Varela
528abe4593 Import 'Fira Mono' & 'Merriweather' into WYSIWYG (#9618)
* import 'Fira Mono' into wysiwyg

* use import statements for monospace & serif fonts

Co-authored-by: Azri Kahar <azrikahar@outlook.com>
2021-11-09 10:16:22 -05:00
Azri Kahar
7050a9f489 fix elements z-index higher than app header bar (#9530) 2021-11-06 16:18:25 -04:00
José Varela
bbd6e13e1e Fix lose data on M2M (#9548)
* save initial items of m2m relation

* merge initial, draft and selected on new selection
2021-11-06 16:13:38 -04:00
Adrian Dimitrov
b8fabe46f2 Fix missing and wrong translations (#9537) 2021-11-05 12:30:59 -04:00
Pascal Jufer
111a3ef231 Update package-lock.json & fix warning from eslint (#9509)
* Update package-lock.json

To reflect latest release

* Fix warning from eslint
2021-11-05 09:56:34 -04:00
Azri Kahar
deae8cd929 fix repeater field names title format (#9504) 2021-11-05 09:40:56 -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
Oreille
ef3da32ab3 Properly handle M2A fields in fieldStore and useFieldTree (#9432)
* Properly handle M2A fields in fieldStore and useFieldTree

* Fix addNode

* Rewrote use-field-tree

* Remember visited paths

* Fix error whith undefined relation.meta
2021-11-04 20:35:05 -04:00
Nicola Krumschmidt
ae15f39091 Clean up interface options type (#9447) 2021-11-04 18:31:31 -04:00
Rijk van Zanten
d3639983df Fix presentation-links interfaces (#9485)
Fixes #9457
2021-11-04 18:57:26 +00:00
Rijk van Zanten
71ec7115c0 Fix nested system-interface-options usage (#9483)
* Improve null check in list

* Fix options syncing in system-interface-options
2021-11-04 18:12:37 +00:00
Rémi Alvergnat
3cd32d533b Fix invalid collection for Interface Display Template for M2M relationships (#9420)
* Fix invalid collection for Interface Display Template (#9419)

* use o2m ollection on m2m interface

* apply same fix on files

Co-authored-by: Jose Varela <joselcvarela@gmail.com>
2021-11-04 13:20:55 -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
Azri Kahar
22d4de7c5b Add placeholder to Language Indicator Field for first Translations setup (#9337)
* Hide Language Indicator Field initially

* fix lint error

* revert hiding languageFIeld & add placeholder
2021-11-03 15:30:59 -04:00
Rémi Alvergnat
1bd43bd25f Fix hover effect on o2m and m2a lists (#9412) (#9414) 2021-11-03 15:12:08 +00:00
d1rOn
ca964b7ac2 Translations interface fix (#9333)
* Translations interface fix

Fixes issue

* Translations interface fix (2)
2021-11-02 09:48:15 -04:00
Azri Kahar
d1a1d73b11 Prevent file input preloading drawer (#9282) 2021-11-01 18:12:28 -04:00
Azri Kahar
fcd3b1e345 fix lint warnings (#9287)
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-01 17:34:20 -04:00
Oreille
6331ad0347 Map layout and interface improvements (#9288)
* Map layout and interface improvements
* Fix marker not showing up on geocoder search
* Replaced geocoder search placeholder
* Fix geocoder hit area
* Fix item popup positioning
* Removed unselect button
* Removed "No results" popup
* Removed option to filter map on demand vs automatically
* Renamed Geometry field option
* Added placeholder to template option
* Hide "Delete" button when no feature are selected

* Lint fix

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-01 16:33:09 -04:00
Azri Kahar
40917d3cf5 Update translation icon in interface selector (#9292)
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-01 19:34:02 +00:00
Azri Kahar
c53a539fdd Input code json (#9291)
* remove language selection for input code type JSON

* lint as json when type is json

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-01 18:35:59 +00:00
Oreille
088abac83b Fix dynamic variables not working anymore in UUID filter (#9180)
* Fix $CURRENT_USER not working anymore in UUID filter

* $Handle CURRENT_ROLE too
2021-10-29 12:26:46 -04:00
Oreille
1a52c23761 Map interface improvements (#9239)
* Add tooltips on feature hover on the interface
* Add marker on geocoder search result
* Improve map interface style
2021-10-29 12:24:45 -04:00
Theraloss
a682e89c95 Append access_token to images in WYSIWYG only once (#9062)
* append access_token to image in wysiwyg only once

* do not append token in previewUrl when clicking an image from wysiwyg

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-29 16:08:25 +00:00
Oreille
485641c7ec Add folder, template, enableCreate, enableSelect options to the files interface (#9184) 2021-10-27 20:35:11 +02:00
Azri Kahar
280e3f4c22 Use textarea input for textarea placeholder (#9041) 2021-10-25 23:05:39 -04:00
rijkvanzanten
775440ccde Don't enforce rgb modern syntax 2021-10-25 23:00:49 -04:00
renovate[bot]
54ba54d3d6 Update dependency stylelint to v14 (#9016)
* Update dependency stylelint to v14

* Update dependency stylelint-scss to v4

* Update dependency stylelint-order to v5

* Undo command change

* Update stylelint command

* Use modern color syntax

Who knew this was already supported everywhere? Awesome!!

* Update stylelint-config-standard

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-25 22:26:57 -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
José Varela
bf2b7e8d01 fix no options in repeater (#9113)
before: page does render if repeater has no options
after: page renders and repeater showe no options
2021-10-25 11:44:49 -04:00
Oreille
7eb2cb1137 Fix filter added twice and remove unnecessary _and node. (#9116) 2021-10-25 11:37:47 -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
Oreille
ed0a8aeb15 Ignore codemirror import mode types (#9112) 2021-10-25 11:27:07 -04:00
Oreille
1b64b4472a Bug fixes and improvements (#8995)
* Updated layout and interface mapbox style
* Fixed margin issues around the layout
* Use render-template component to display item popup on hover
* Fixed french translations
2021-10-21 15:30:13 -04:00
Pascal Jufer
5a53d7007e Fix warnings from ESLint (#8969) 2021-10-20 09:23:42 -04:00
Ben Haynes
ac3e11ebb9 Tweak styling of the map layout (#8929)
* style updates

* update attribution styling
2021-10-18 20:19:40 -04:00
Oreille
e68acf5f5c Map layout and interface improvements (#8908)
- Improved marker resolution
- Make the default maker green
- Reduce popup padding in layout
- Capitalize geometry related translations
- Hide geometry_format and geometry_type when disabled
- Set geocoder search bar background color to `--background-page`
- Rename Activate clustering to Cluster Nearby Data
- Default Cluster Nearby Data to `true`
- Update cluster colors to match Directus colors
2021-10-18 11:16:46 -04:00
Rijk van Zanten
9f163ce320 Fix choices not showing up in filter (#8839) 2021-10-15 21:20:37 +00: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
Pascal Jufer
e3bfe69de3 Translation fixes (#8695)
* Implement translation for activity items

Fixes #8415

Also fixes issue with "Open item" link for system collection

* Fix 'Create New' btn translation in list interface

Fixes #8427
Default values needs to return a function to be dynamic
Same for "Empty item" translation

Also use field.name instead of field.field value for field title

* Fix translation of default values in boolean & dropdown interfaces

* Translate note field of system collections in edit mode

* Translate remaining "hard-coded" values

* Add dedicated translation for open folder

* Update app/src/interfaces/list/list.vue

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

* Use translate-object-values and check if collection starts with
'directus_'

* Use already existing translation keys for activity items

As discussed

* Translate whole data object if system collection

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-10-14 11:29:48 -04:00
Rijk van Zanten
f14e4f1154 Don't use type=search for filter input (#8795) 2021-10-14 11:18:06 -04:00
Nitwel
1231e03ca2 fix translations interface when no langPk field is selected (#8790) 2021-10-14 10:34:51 -04:00
Nitwel
55e3b342ec Add translations display (#8264)
* add translations display

* add progress and lang preview

* format changes

* remove unused

* remove unused

* fix errors and clean up style

* make lang title bold

* Fix imports

* 🧹 Little cleanup

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-13 23:31:15 +00:00
Oreille
0a089af30a Fix layouts stuck at page 1 (#8766) 2021-10-13 15:56:12 -04:00
Sam Milledge
0ff35036f6 Fix disabled state of code input (#8761) 2021-10-13 11:01:34 -04:00
Azri Kahar
ffdc0c65bc remove obsolete selectionFilters in O2M tree view (#8756) 2021-10-13 15:52:24 +08:00
tstedjb04
6269065f3a Add datetime placeholder (#8712)
Co-authored-by: dhanaithorn <>
2021-10-12 16:47:17 +00:00
rijkvanzanten
b0c7fa20bd Handle empty toolbar in wysiwyg 2021-10-12 10:45:48 -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