Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AssetsPluginContext

Hierarchy

  • AssetsPluginContext

Index

Accessors

context

Methods

cancelCheckout

  • cancelCheckout(assetIds: string[]): void
  • Parameters

    • assetIds: string[]

    Returns void

checkin

  • checkin(assetIds: string[]): void
  • Parameters

    • assetIds: string[]

    Returns void

checkout

  • checkout(assetIds: string[]): void
  • Parameters

    • assetIds: string[]

    Returns void

close

  • close(): void
  • Closes all dialogs.

    Returns void

fetch

  • Proxies requests to the Assets server through the client window to make sure existing user authentication is used.

    remark

    Timeouts are not available yet since the AbortController (used to implement timeouts in combination with the fetch API) is still experimental at the time of writing.

    throws

    Throws error from Assets server.

    Type parameters

    • T

    Parameters

    Returns Promise<T>

    Returns response from Assets server.

hasFilteredSelection

  • hasFilteredSelection(): boolean
  • Returns boolean

hasSelection

  • hasSelection(): boolean
  • Returns boolean

isSingleItem

  • isSingleItem(): boolean
  • Returns boolean

login

  • login(): Promise<void>
  • Opens the login prompt and resolves once the user has succesfully logged in.

    Returns Promise<void>

openAssets

  • openAssets(assetIds: string[]): void
  • Parameters

    • assetIds: string[]

    Returns void

openBrowse

  • openBrowse(folderPath: string, includeSubFolders?: boolean, q?: string, sort?: string): void
  • Parameters

    • folderPath: string
    • Default value includeSubFolders: boolean = true
    • Default value q: string = null
    • Default value sort: string = null

    Returns void

openCollections

  • openCollections(collectionIds: string[]): void
  • Parameters

    • collectionIds: string[]

    Returns void

openSearch

  • openSearch(query?: string, sort?: string): void
  • Parameters

    • Optional query: string
    • Optional sort: string

    Returns void

pinCollections

  • pinCollections(collectionIds: string[]): void
  • Parameters

    • collectionIds: string[]

    Returns void

subscribe

  • Register a callback that will be called when the context data updates.

    Parameters

    Returns Function

    Returns unsubscriber to make sure reference to stale subscriber is removed.

Static get

  • Retrieves the singleton instance of the AssetsPluginContext class. This promise resolves once the window has received the initialization message from the parent frame. If it never resolves, make sure your plugin is configured correctly.

    Parameters

    • Default value clientUrlWhitelist: string[] = []

    Returns Promise<AssetsPluginContext>

    Returns initialized singleton instance of AssetsPluginContext.