Commit Graph

399 Commits

Author SHA1 Message Date
Oreille
e19be67a16 Prevent generated columns edition (#7712) 2021-08-31 11:34:44 -04:00
Nicola Krumschmidt
353e4f06c7 Use self-closing slot tags everywhere (#7717) 2021-08-31 09:10:55 -04:00
Nitwel
607e32ea36 Resolve editor/type warnings (#7687)
* resolve editor/type warnings

* dont rename props
2021-08-30 16:54:17 -04:00
Azri Kahar
a701d22aa9 add upload event for file imports (#7697) 2021-08-30 11:48:47 -04:00
Nitwel
ec1eb9733b Fix firefox being buggy with numbers as value inputs (#7682)
* fix firefox being buggy with numbers as value inputs

* dont show null string in input
2021-08-30 10:23:47 -04:00
Nitwel
a06623f10b allow to select system collections in m2a (#7650) 2021-08-27 11:40:25 -04:00
Nicola Krumschmidt
d64ca14348 Explicitly set catch parameters to any type (#7654)
This fixes not being able to build the repo due to type issues
introduced by the Typescript 4.4 option "useUnknownInCatchVariables",
which is enabled by default in strict mode.
2021-08-27 10:33:30 -04:00
Nitwel
207eb0bfc3 Stop app crashing when rule is configured incorrectly (#7574)
* catch the error instead of crashing the app if validatePayload fails

* Don't attempt validatePayload with invalid rule

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-08-26 17:54:40 -04:00
rijkvanzanten
5970a7b473 Fix linter warnings 2021-08-26 16:57:55 -04:00
Nitwel
e42b9712c2 assign instead of merge (#7632)
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-08-26 16:04:14 -04:00
Nitwel
4de40803bb fix computed and watch getting updated to often (#7631) 2021-08-26 15:58:59 -04:00
Rijk van Zanten
123009bc74 Add search result highlighting to tree-view interface (#7605)
* Add v-highlight component

* Highlight search results on tree-view interface
2021-08-25 11:37:27 -04:00
Rijk van Zanten
36dd31ab60 Improve stability of tree-view select interface (#7552)
* Update example env

* Allow nested lists in value preview

* Show nested selection on group selected
2021-08-23 16:02:46 -04:00
Nitwel
9e33413b1e fix field template removing text (#7549) 2021-08-23 11:20:33 -04:00
Nitwel
e6559c6f9c Improve conditional fields (#7462)
* fix item not rendering on empty condition

* add placeholder to rule field
2021-08-17 12:47:12 -04:00
Nicola Krumschmidt
a63809c21f Render href attributes on router-link (#7456)
While props set to null aren't rendered to the DOM, they are passed to other components as attributes if not defined as props.
This prevents vue-router from setting the attribute itself.
2021-08-17 11:03:27 -04:00
rijkvanzanten
027fd1a761 Fix linter warning 2021-08-16 19:13:30 -04:00
Azri Kahar
1532fa811e remove list-style for v-list (#7439) 2021-08-16 17:36:20 -04:00
Oreille
83e8814b2d Add support for Geometry type, add Map Layout & Interface (#5684)
* Added map layout

* Cleanup and bug fixes

* Removed package-lock

* Cleanup and fixes

* Small fix

* Added back package-lock

* Saved camera, autofitting option, bug fixes

* Refactor and ui improvements

* Improvements

* Added seled mode

* Removed unused dependency

* Changed selection behaviour, cleanup.

* update import and dependencies

* make custom style into drawer

* remove unused imports

* use lodash functions

* add popups

* allow header to become small

* reorganize settings

* add styling to popup

* change default template

* add projection option

* add basic map interface

* finish simple map

* add mapbox style

* support more mapbox layouts

* add api key option

* add mapbox backgrounds to layout

* warn when no api key is set

* fix for latest version

* Improved map layout and interface, bug fixes, refactoring.

.

.

* Added postgis geometry format, added marker icon shadow

* Made map buttons bigger and their icons thinner. Added transition to header bar.

* Bug fixes and error handling in map interface.

* Moved box-select control out of the map component. Removed material icons sprite and use addImage for marker support.

* Handle MultiGeometry -> Geometry interface error.

* Removed hardcoded styles. Added migrations for basemap column. Lots of refactoring.

Removed hardcoded styles. Added migrations for basemap column. Lots of refactoring.

* Fixed style reloading error. Added translations.

* Moved worker code to lib.

* Removed worker code. Prevent Mapbox from removing access_token from the URL.

* Refactoring.

* Change basemap selection to in-map dropdown for layout and interface.

* Touchscreen selection support and small fixes.

* Small change.

* Fixed unused imports.

* Added support for PostgreSQL identity column

* Renamed migration. Added crs translation.

* Only show fields using the map interface in the map layout.

* Removed logging.

* Reverted Dockerfile change.

* Improved crs support.

* Fixed translations.

* Check for schema identity before updating it.

* Fixed popup not updating on feature hover.

* Added feature hover styling. Fixed layer customization input. Added out of bounds error handling.

* Added geometry type and support for database native geometries.

* Fixed linting.

* Fixed layout.

* Fixed layout.

* Actually fixed linting

* Full support for native geometries
Fixed basemap input
Improved feature popup on hover
Locked interfaced support

* Fixed geometryType option not updating

* Bug fixes in interface

* Fixed crash when empty basemap settings. Fixed fitBounds option not updating.

* Added back storage type option. Improved interface behaviour.

* Dropped wkb because of vendor inconsistency with binary data

* Updated layout to match new geometry type. Fixed geojson payload transform.

* Added missing geometry_format attributes to local types.

* Fixed typos & refactoring

* Removed dependency on proj4

* Fix error when empty map interface options

* Set geometry SRID to 4326 when inserting into the database

* Add support for selectMode

* Fix error on initial source load

* Added geocoder, use GeoJSON for api i/o, removed geometry_format option, refactoring

* Added geometry intersects filter. Created geometry helper class.

* Fix error when null geometryOptions, added mapbox_key setting.

* Moved all geometry parsing/serializing into processGeometries in `payload.ts`. Fixed type errors.

* Migrate to Vue 3

* Use wellknown instead of wkx

* Fixed basemap selection.

* Added available operator for geometry type

* Added nintersects filter, fixed map interface for filter input

* Added intersects_bbox filter & bug fixes.

* Fixed icons rendering

* Fixed cursor icon in select mode

* Added geometry aggregate function

* Fixed geometry processing bug when imported from relational field.

* Fixed error with geocoder instanciation

* Removed @types/maplibre-gl dependency

* Removed fitViewToData options

* Merge remote-tracking branch 'upstream/main' into map-layout

* Fixed style and geometryType in map interface options

* Fixed style change on map interface.

* Improved fitViewToData behaviour

* Fixed type imports and previous merge conflict

* Fixed linting

* Added available operators

* Fix and merge migrations

* Remove outdated p-queue dep

* Fix get-schema column extract

* Replace pg with postgis for local debugging

* Re-add missing import

* Add mapbox as a basemap when key exists

* Remove unused tz flag

* Process delta in payloadservice

* Set default map, add limit number styling

* Default display template to just PK

* Tweak styling of error dialog

* Fix method usage in helpers

* Move sdo_geo to oracle section

* Remove extensions from ts config exclude

* Move geo types to shared, remove _Geometry

* Remove unused type

* Tiny Tweaks

* Remove fit to bounds option in favor of on

* Validate incoming intersects query

* Deepmap filter values

* Add GraphQL support

* No defaultValue for geometryType

* Resolve c

* Fix translations

Co-authored-by: Nitwel <nitwel@arcor.de>
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-08-12 22:01:34 +02:00
Rijk van Zanten
c6aa8bdf16 Only trim input on blur for text based values (#7173)
Fixes #6672
2021-08-04 01:14:15 +02:00
Rijk van Zanten
ebecb5636d Make sure disabled prevents click on list-item (#7169)
Fixes #7146
2021-08-03 23:44:45 +02:00
Rijk van Zanten
ef3d618d6c Add support for app-required field state (#7166)
* Add "required" option to fields

* Move some exceptions to shared

* Do client side validation for required

* Add conditional required support
2021-08-03 23:04:24 +02:00
Rijk van Zanten
fb9ee7ab30 Add show all/selected toggle to tree-select (#7161) 2021-08-03 17:32:01 +02:00
Rijk van Zanten
61bd3103a5 Fix list-selection branch mode unselect bug (#7158)
* Fix list-selection branch mode unselect bug

* Remove debugger
2021-08-03 10:45:21 -04:00
Rijk van Zanten
38896075d4 Add accordion group (#7130)
* Start on accordion group

* Add some basic styling to accordion sections

* Update style, add multiple option, add shift-click

* Only toggle-all on multiple option

* Finish styling of accordion sections

* Tweak styling

* Add 'start' option to accordion

* Rename group-raw -> group-standard, add header option

* Replace group-divider with group-standard
2021-08-02 18:12:52 +02:00
rijkvanzanten
72ff97266c Fix linter warnings 2021-07-31 13:59:19 -04:00
Rijk van Zanten
3192fb2e2d Render list group arrows on the left of the group checkbox in the tree select interface (#7102)
* Mark scope as system field

* Render arrows on the left of tree checkbox groups

* Tweak spacing
2021-07-30 18:28:31 +02:00
Rijk van Zanten
673818b04e Surface dropdown choices in advanced sidebar filter (#7101)
* Mark scope as system field

* Surface choices in advanced sidebar detail
2021-07-30 18:16:34 +02:00
Rijk van Zanten
337557b316 Fix value unstaging in nested field groups (#7049)
Fixes #7047
2021-07-28 19:47:25 +02:00
Rijk van Zanten
d94548992e Remove illegal words from translations root (#7045)
Fixes #7033
2021-07-28 18:55:38 +02:00
Rijk van Zanten
92e1ee77bd Add support for Conditional Fields (#6864)
* Add conditions field to directus_fields

* Add conditions configuration

* Apply conditional overrides

* Handle conditions in nested groups

* Fix reverse mutating conditions

* Start on filter setup interface

* Move field types/constants to shared

* [WIP] Updated client side filter validation

* Support logical operators in client validation step

* Use new validation util in conditions check

* Add nesting in filter seutp

* Add filter rule setup configurator

* Fixes that should've been done in the merge

* Strip out filter-settings interface

TBD in a new PR

* Move browser to index
2021-07-26 18:02:24 -04:00
Nicola Krumschmidt
32972f4c01 Move define extension functions to shared and expose them through extension-sdk (#6880)
* Move defineInterface to shared

* Split up utils into node and browser utils

* Move defineDisplay to shared

* Move defineLayout to shared

* Move defineModule to shared

* Add defineEndpoint and defineHook to define-extensions

* Expose define extension functions through extension-sdk

* Make route type of defineEndpoint more specific

* Simplify define extension functions

* Deduplicate types and local types definition

* Do not allow functional components in display handler

* Make interface options nullable

* Deduplicate extension types definition

* Fix utils/node exports
2021-07-22 17:02:29 +02:00
Adrian Dimitrov
efe7b076a3 Add default-folder option (#3209)
* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Allow set folder for imported files

* Allow passing folder in file/files component; Allow pick folder for file/files/image interfaces.

* Added folder system component for picking folders; Move folder picker the field from data to interface (file, files, image).

* Add custom folder interface; use props for interfaces file/files/image in upload component

* Update after rebase

* Add storage_default_folder setting, use folder when deploy file

* Fix files options; Add default label option for folder interface.

* Fix set folder for file

* UX

* Add migration for column, undo seed change

* Update nomanclature

* Make sure file library always submits folder, cleanup setting retrieval

* Use indexName on down migrate

* Fix import default folder, rename customPresets->folderPreset

* Rename interface import

* Use undefined as default folder

* Remove deprecated lang file

* Fix display of folder interface, treat null as value

* Move shared composable

* Remove unused ref

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-07-21 17:29:21 -04:00
Nicola Krumschmidt
b61543c0e9 Move DeepPartial to shared (#6886)
Also cleans it up and adds support for readonly arrays.
2021-07-20 11:40:59 -04:00
rijkvanzanten
5514c35a3f Remove unused import 2021-07-15 18:21:41 -04:00
Rijk van Zanten
ac414877a6 Auto-open groups on search in tree-select (#6838) 2021-07-15 22:18:06 +02:00
Rijk van Zanten
d38681c2ee Add v-md directive (#6835)
* Use stricter Vue eslint setting

* Implement v-md directive

Replaces old uses of v-html + md util

* Fix typo
2021-07-15 18:01:30 +00:00
Rijk van Zanten
5f7dce54e2 Use stricter Vue eslint setting (#6833) 2021-07-15 13:49:59 -04:00
Rijk van Zanten
11be1e0b8a Fix order of form group filter (#6566)
Fixes #6557
2021-06-29 16:10:24 -04:00
Rijk van Zanten
0a20b90691 Add support for field grouping (#6553)
* Update icon font, add group type to field setup

* Add group type, start on group-raw interface

* Add style for group

* Finish nested groups

* Finish field group setup

* Add type check

* Work on group raw group

* Various

* Fix support for nested groups

* Add group-divider interface

* Remove unused file

* Fix linter warning
2021-06-28 19:17:55 -04:00
Nicola Krumschmidt
051df415df Fix extensions (#6377)
* Add support for npm extensions

* Allow extensions to import vue from the main app

* Bundle app extensions on server startup

* Fix return type of useLayoutState

* Add shared package

* Add extension-sdk package

* Add type declaration files to allow deep import of shared package

* Add extension loading to shared

* Refactor extension loading to use shared package

* Remove app bundle newline replacement

* Fix extension loading in development

* Rename extension entrypoints

* Update extension build instructions

* Remove vite auto-replacement workaround

* Update package-lock.json

* Remove newline from generated extension entrypoint

* Update package-lock.json

* Build shared package as cjs and esm

* Move useLayoutState composable to shared

* Reverse vite base env check

* Share useLayoutState composable through extension-sdk

* Update layout docs

* Update package versions

* Small cleanup

* Fix layout docs

* Fix imports

* Add nickrum to codeowners

* Fix typo

* Add 'em to vite config too

* Fix email

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-06-23 12:43:06 -04:00
Johann Rekowski
bd5ca64db3 Fix spacings and icons on presentation link buttons (#6361)
* Fixed spacings between presentation-link buttons

* Fixed cut off icons on persentation-link buttons

* Use flex gap instead of margin

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-06-22 19:45:06 -04:00
Rijk van Zanten
0766f6b608 Fix creating custom names for recommend collection fields on new collection setup drawer (#6451)
Fixes #6381
2021-06-22 19:22:05 -04:00
Rijk van Zanten
5e5d0a0e41 Fix display template on collection detail page (#6442)
* Tweak spacing of checkboxes tree

* Fix scoping of attrs on v-field-template

Fixes #6422
2021-06-22 17:26:11 -04:00
Rijk van Zanten
bdbd63bb5c Add checkboxes-tree interface (#6441)
* Add checkboxes-tree interface

* Fix nested disabled state
2021-06-22 17:21:19 -04:00
rijkvanzanten
4366cceb1e Fix linter warning 2021-06-22 11:29:59 -04:00
rijkvanzanten
f42d7b55b1 Tweak to check 2021-06-21 17:26:22 -04:00
Rijk van Zanten
6c98ef6516 Workaround bug introduced in vue-router (#6412) 2021-06-21 17:16:08 -04:00
Rijk van Zanten
0d899f097d Add ability to specify what fields to clone on "Save as Copy" (#6379)
* Start on tree-select component

* Stop propagation on label click as well

* Setup temp debug route

* Add value-combining=all

* Add branch mode

* Add leaf mode

* Add indeterminate state

* Add search

* Keep group state alive during search

* Fetch existing item based on clone fields data

* Add interface for setup

* Tweak field structure of m2a items

* Use collection name in checkbox

* Remove temp test
2021-06-18 16:37:27 -04:00
Rijk van Zanten
092a3266ed Fixed issue that would prevent the "Import from URL" functionality to work in a many to many interface (#6289)
Fixes #6287
2021-06-15 14:08:59 -04:00