Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RemoteDataPlugin

Hierarchy

  • RemoteDataPlugin

Implements

Index

Constructors

constructor

Properties

editron

editron: default

id

id: string = "remote-data-plugin"

remotes

remotes: {} = ...

Type declaration

  • [pointer: string]: { options: EditronSchemaOptions["remoteData"]; removeObserver: () => void }
    • options: EditronSchemaOptions["remoteData"]
    • removeObserver: () => void
        • (): void
        • Returns void

Methods

createLink

  • createLink(pointer: string, options: { addToHistory?: boolean; overwrite?: boolean; proxyMethod?: string; requestParam: string; requestParamValues: string; responseMapping: {} }): void
  • Parameters

    • pointer: string
    • options: { addToHistory?: boolean; overwrite?: boolean; proxyMethod?: string; requestParam: string; requestParamValues: string; responseMapping: {} }
      • Optional addToHistory?: boolean

        if true, will add updates to undo history. Defaults to false

      • Optional overwrite?: boolean

        set to true, to overwrite values

      • Optional proxyMethod?: string

        proxy function to call for remote data. Default to "json"

      • requestParam: string

        url to call. You can use {{property}}-syntax to render values of target source

      • requestParamValues: string

        relative json-pointer (from data-location) to data, which should be used to create remote-url. currently aborts if no data is retrieved from this pointer

      • responseMapping: {}

        map of json-pointer from source to target

    Returns void

destroyLink

  • destroyLink(pointer: string): void

initialize

  • initialize(editron: default): void

onModifiedData

setRemoteData

  • setRemoteData(pointer: string, remote: { addToHistory?: boolean; overwrite?: boolean; proxyMethod?: string; requestParam: string; requestParamValues: string; responseMapping: {} }): Promise<void>
  • Parameters

    • pointer: string
    • remote: { addToHistory?: boolean; overwrite?: boolean; proxyMethod?: string; requestParam: string; requestParamValues: string; responseMapping: {} }
      • Optional addToHistory?: boolean

        if true, will add updates to undo history. Defaults to false

      • Optional overwrite?: boolean

        set to true, to overwrite values

      • Optional proxyMethod?: string

        proxy function to call for remote data. Default to "json"

      • requestParam: string

        url to call. You can use {{property}}-syntax to render values of target source

      • requestParamValues: string

        relative json-pointer (from data-location) to data, which should be used to create remote-url. currently aborts if no data is retrieved from this pointer

      • responseMapping: {}

        map of json-pointer from source to target

    Returns Promise<void>

Generated using TypeDoc