mirror of
https://github.com/directus/directus.git
synced 2026-01-27 21:58:02 -05:00
Add new export experience (#12201)
* Use script setup * Start on export dialog * Use new system field interface, replace limit with numeric input * Set placeholder * Add sort config * Use folder picker, correct layoutQuery use * Add local download button * Allow writing exports to file * Add notification after export * Fix sort config, use new export endpoint * Setup notification hints * Add information notice * Fix local limit, cancel button * Add (basic) docs for export functionality * Fix json export file format * Implement xml batch stitching * Resolve review points
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { useStores } from './use-system';
|
||||
import { Collection, Field } from '../types';
|
||||
import { AppCollection, Field } from '../types';
|
||||
import { computed, ref, Ref, ComputedRef } from 'vue';
|
||||
|
||||
type UsableCollection = {
|
||||
info: ComputedRef<Collection | null>;
|
||||
info: ComputedRef<AppCollection | null>;
|
||||
fields: ComputedRef<Field[]>;
|
||||
defaults: Record<string, any>;
|
||||
primaryKeyField: ComputedRef<Field | null>;
|
||||
@@ -22,7 +22,7 @@ export function useCollection(collectionKey: string | Ref<string | null>): Usabl
|
||||
|
||||
const info = computed(() => {
|
||||
return (
|
||||
(collectionsStore.collections as Collection[]).find(({ collection: key }) => key === collection.value) || null
|
||||
(collectionsStore.collections as AppCollection[]).find(({ collection: key }) => key === collection.value) || null
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -34,4 +34,11 @@ export interface Collection {
|
||||
schema: Table | null;
|
||||
}
|
||||
|
||||
export interface AppCollection extends Collection {
|
||||
name: string;
|
||||
icon: string;
|
||||
type: CollectionType;
|
||||
color?: string | null;
|
||||
}
|
||||
|
||||
export type CollectionType = 'alias' | 'table' | 'unknown';
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { PrimaryKey } from './items';
|
||||
|
||||
export type Notification = {
|
||||
id: string;
|
||||
status: string;
|
||||
@@ -7,5 +9,5 @@ export type Notification = {
|
||||
subject: string;
|
||||
message: string | null;
|
||||
collection: string | null;
|
||||
item: string | null;
|
||||
item: PrimaryKey | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user