mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
cleanup
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
f7877955e9
commit
3fb1baaa31
@ -56,33 +56,13 @@ export { default as IconSearch } from './components/icons/Search.svelte'
|
||||
export { default as IconToDo } from './components/icons/ToDo.svelte'
|
||||
export { default as IconComments } from './components/icons/Comments.svelte'
|
||||
|
||||
import type { AnySvelteComponent, AnyComponent } from './types'
|
||||
import { writable } from 'svelte/store'
|
||||
|
||||
export function createApp (target: HTMLElement): SvelteComponent {
|
||||
return new Root({ target })
|
||||
}
|
||||
|
||||
// let documentProvider: DocumentProvider | undefined
|
||||
|
||||
// async function open (doc: Document): Promise<void> {
|
||||
// if (documentProvider != null) {
|
||||
// return await documentProvider.open(doc)
|
||||
// }
|
||||
// return await Promise.reject(new Error('Document provider is not registred'))
|
||||
// }
|
||||
|
||||
// function selection (): Document | undefined {
|
||||
// if (documentProvider != null) {
|
||||
// return documentProvider.selection()
|
||||
// }
|
||||
// return undefined
|
||||
// }
|
||||
|
||||
// function registerDocumentProvider (provider: DocumentProvider): void {
|
||||
// documentProvider = provider
|
||||
// }
|
||||
|
||||
import type { AnySvelteComponent, AnyComponent } from './types'
|
||||
import { writable } from 'svelte/store'
|
||||
|
||||
interface CompAndProps {
|
||||
is: AnySvelteComponent | AnyComponent | undefined
|
||||
props: any
|
||||
|
@ -31,26 +31,6 @@ export type AnySvelteComponent = typeof SvelteComponent
|
||||
export type Component<C extends AnySvelteComponent> = Resource<C>
|
||||
export type AnyComponent = Resource<AnySvelteComponent>
|
||||
|
||||
export const CONTEXT_PLATFORM = 'platform'
|
||||
export const CONTEXT_PLATFORM_UI = 'platform-ui'
|
||||
|
||||
export interface Document {} // eslint-disable-line @typescript-eslint/no-empty-interface
|
||||
|
||||
/**
|
||||
* Allow to control currently selected document.
|
||||
*/
|
||||
export interface DocumentProvider {
|
||||
/**
|
||||
* Opening a document
|
||||
* */
|
||||
open: (doc: Document) => Promise<void>
|
||||
|
||||
/**
|
||||
* Return currently selected document, if one.
|
||||
*/
|
||||
selection: () => Document | undefined
|
||||
}
|
||||
|
||||
export interface Action {
|
||||
label: IntlString
|
||||
icon: Asset | AnySvelteComponent
|
||||
@ -65,34 +45,3 @@ export interface IPopupItem {
|
||||
selected?: boolean
|
||||
action?: Function
|
||||
}
|
||||
|
||||
// export default plugin(
|
||||
// 'ui' as Plugin<UIService>,
|
||||
// {},
|
||||
// {
|
||||
// metadata: {
|
||||
// LoginApplication: '' as Metadata<string>,
|
||||
// DefaultApplication: '' as Metadata<string>
|
||||
// },
|
||||
// icon: {
|
||||
// Default: '' as Asset,
|
||||
// Error: '' as Asset,
|
||||
// Network: '' as Asset,
|
||||
// Search: '' as Asset,
|
||||
// Add: '' as Asset,
|
||||
// ArrowDown: '' as Asset,
|
||||
// Message: '' as Asset,
|
||||
// Phone: '' as Asset,
|
||||
// Mail: '' as Asset,
|
||||
// More: '' as Asset
|
||||
// },
|
||||
// component: {
|
||||
// Icon: '' as AnyComponent,
|
||||
// Spinner: '' as AnyComponent,
|
||||
// BadComponent: '' as AnyComponent
|
||||
// },
|
||||
// method: {
|
||||
// AnAction: '' as Resource<(args: any) => void>
|
||||
// }
|
||||
// }
|
||||
// )
|
||||
|
Loading…
Reference in New Issue
Block a user