Options
All
  • Public
  • Public/Protected
  • All
Menu

ExportSystem creates other files from the board or the part of it. Note: This system is not just for exporting but also saves to native format.

collboard-system

Hierarchy

  • AbstractSystem
    • ExportSystem

Index

Constructors

  • new ExportSystem(systems: ISystemsExtended, proxyUrl: URL): ExportSystem
  • Parameters

    • systems: ISystemsExtended
    • proxyUrl: URL

    Returns ExportSystem

Properties

fileSupporters: any
forEssentialFileSupporters: any
getExportRelevantArts: any

Get all arts that can be exported OR are frames

proxyUrl: any
ready: Promise<void>

Promise which is resolved when the system is initialized and ready to use.

systems: ISystemsExtended

Accessors

  • get isDestroyed(): boolean
  • Is this object destroyed?

    Returns boolean

  • get isReady(): boolean
  • Checks if the system is initialized and ready to use.

    Returns boolean

  • get supportedMimeTypes(): Set<string>
  • deprecated

    use exportFiles OR prepareExportFiles instaed

    Returns Set<string>

Methods

  • addSubdestroyable(...subdestroyable: ITeardownLogic[]): ExportSystem
  • Binds new registration with itself. This registration/destroyable will be destroyed with this.

    Parameters

    • Rest ...subdestroyable: ITeardownLogic[]

    Returns ExportSystem

  • checkIsReady(): void
  • Checks if the system is initialized and ready to use. If not, throws an error. If it is, do nothing.

    Returns void

  • checkWhetherNotDestroyed(errorMessage?: string, runBeforeError?: () => void): void
  • Checks, whether the object is not destroyed

    Parameters

    • Optional errorMessage: string

      Message that will replace default one before error

    • Optional runBeforeError: () => void

      Callback runed before error is thrown; typically this can be some logging

        • (): void
        • Returns void

    Returns void

  • destroy(): Promise<void>
  • Returns Promise<void>

  • exportFile(options: IExportFileOptions): Promise<File>
  • Makes export of one file from the Collboard When there is no file to export it throws error

    Note: exportFile(s) (=do all heavy stuff) vs exportFilesPrepare (=only tells which exports are possible)

    Parameters

    • options: IExportFileOptions

    Returns Promise<File>

  • exportFiles(options: IExportFileOptions): Promise<File[]>
  • Makes export from the Collboard

    Note: exportFile(s) (=do all heavy stuff) vs exportFilesPrepare (=only tells which exports are possible)

    Parameters

    • options: IExportFileOptions

    Returns Promise<File[]>

  • exportFilesPrepare(options: IExportFileOptions): Promise<IPreparedFileExport[]>
  • Prepares export from the Collboard

    Note: exportFiles (=do all heavy stuff) vs exportFilesPrepare (=only tells which exports are possible)

    Parameters

    • options: IExportFileOptions

    Returns Promise<IPreparedFileExport[]>

  • getArts(): Promise<{ art: Abstract2dArt; isMaterial: boolean }[]>
  • Get all arts (but non frames)

    Returns Promise<{ art: Abstract2dArt; isMaterial: boolean }[]>

  • getFrames(): Promise<{ art: IFramable; isMaterial: boolean }[]>
  • Get all possible exports frames

    Returns Promise<{ art: IFramable; isMaterial: boolean }[]>

  • init(): Promise<void>
  • Returns Promise<void>

  • registerFileSupport(fileSupporter: IFileExportSupporter): Registration
  • Parameters

    • fileSupporter: IFileExportSupporter

    Returns Registration

  • isDestroyable(obj: any): obj is IDestroyable
  • Chcek whether the given object is destroyable

    Parameters

    • obj: any

    Returns obj is IDestroyable