mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
* fix typeexport via rollup plugin by using the correct input The rollup plugin dts requires a d.ts tree as input not the txs sources. This change points the plugin into the right direction and removes the type export hacks. * corrected types path apparently this was not properly adjusted accross the board when moving the folder * fix rollup config properly export types * use export * where needed Since we now export types alongside with defintions we use the `export * from` syntax to simplify things * export types alongside with interfaces export types so we can properly use them in external projects alongside the exported function/module/... * fix type-problems uncovered by utopia-map When including types properly in the utopia-map several missing typings showed up. * fix typing fix an inhereted type * dummy restructure code to properly be able to compile things we are not allowed to have unsed parameters/props * assigne types to category types
74 lines
1.5 KiB
TypeScript
74 lines
1.5 KiB
TypeScript
import type { ItemsApi } from './ItemsApi'
|
|
import type { ItemType } from './ItemType'
|
|
import type { LayerProps } from './LayerProps'
|
|
import type { Relation } from './Relation'
|
|
import type { UserItem } from './UserItem'
|
|
import type { Point } from 'geojson'
|
|
|
|
type TagIds = { tags_id: string }[]
|
|
|
|
interface GalleryItem {
|
|
directus_files_id: {
|
|
id: number
|
|
width: number
|
|
height: number
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @category Types
|
|
*/
|
|
export interface Item {
|
|
id: string
|
|
name: string
|
|
text?: string
|
|
data?: string
|
|
position?: Point | null
|
|
date_created?: string
|
|
date_updated?: string | null
|
|
start?: string
|
|
end?: string
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
api?: ItemsApi<any>
|
|
tags?: string[]
|
|
layer?: LayerProps
|
|
relations?: Relation[]
|
|
parent?: string
|
|
subname?: string
|
|
public_edit?: boolean
|
|
slug?: string
|
|
user_created?: UserItem
|
|
image?: string
|
|
group_type?: string
|
|
offers?: TagIds
|
|
needs?: TagIds
|
|
status?: string
|
|
color?: string
|
|
markerIcon?: string
|
|
avatar?: string
|
|
new?: boolean
|
|
contact?: string
|
|
telephone?: string
|
|
next_appointment?: string
|
|
type?: ItemType
|
|
gallery?: GalleryItem[]
|
|
|
|
// {
|
|
// coordinates: [number, number]
|
|
/* constructor(
|
|
id: string,
|
|
name: string,
|
|
text: string,
|
|
position: Geometry,
|
|
layer?: LayerProps,
|
|
api?: ItemsApi<any>,
|
|
) {
|
|
this.id = id
|
|
this.name = name
|
|
this.text = text
|
|
this.position = position
|
|
this.layer = layer
|
|
this.api = api
|
|
} */
|
|
}
|