Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types"

module

Types

Index

Type aliases

PieceActions

PieceActions<DataType>: { onEditorActive: (id: string, active: boolean) => void; onManualActivation: (id: string) => void; onManualDeactivation: (id: string) => void; onNodeResized: (id: string) => void; resetPiece: (id: string) => void; savePiece: (id: string) => void; setCurrentSourcePieceId: (id: string) => void; setPieceMessage: (id: string, message: string, messageLevel: string) => void; updatePiece: (id: string, piece: Partial<IPieceItem<DataType>>) => void }

Available actions for a piece

Type parameters

  • DataType = any

Type declaration

  • onEditorActive: (id: string, active: boolean) => void
      • (id: string, active: boolean): void
      • Parameters

        • id: string
        • active: boolean

        Returns void

  • onManualActivation: (id: string) => void
    deprecated
      • (id: string): void
      • Parameters

        • id: string

        Returns void

  • onManualDeactivation: (id: string) => void
    deprecated
      • (id: string): void
      • Parameters

        • id: string

        Returns void

  • onNodeResized: (id: string) => void

    Signal node was resized so controller resizes hover rectangle

      • (id: string): void
      • Parameters

        • id: string

        Returns void

  • resetPiece: (id: string) => void

    Rollback piece state to previously saved state

      • (id: string): void
      • Parameters

        • id: string

        Returns void

  • savePiece: (id: string) => void

    Save piece state on server

      • (id: string): void
      • Parameters

        • id: string

        Returns void

  • setCurrentSourcePieceId: (id: string) => void

    Forcefully opens source editor for specified id

    deprecated
      • (id: string): void
      • Parameters

        • id: string

        Returns void

  • setPieceMessage: (id: string, message: string, messageLevel: string) => void

    Sets message to display for specific piece in controller bar

      • (id: string, message: string, messageLevel: string): void
      • Parameters

        • id: string
        • message: string
        • messageLevel: string

        Returns void

  • updatePiece: (id: string, piece: Partial<IPieceItem<DataType>>) => void

    Update piece in state by id

      • (id: string, piece: Partial<IPieceItem<DataType>>): void
      • Parameters

        Returns void

PieceConflictResolver

PieceConflictResolver: (current: IPieceItem, external: IPieceItem) => IPieceItem

Resolve conflicts between current in-state piece data and data coming from external source Should resolve as data that needs to be applied

param

current state of piece

param

external state of piece

Type declaration

PieceDataResolver

PieceDataResolver<DataType>: (piece: IPieceItem<DataType>, resolvers?: Partial<Record<PieceType, PieceDataResolver>>) => Promise<IPieceItem<DataType>>

Type parameters

  • DataType = any

Type declaration

PieceSubscription

PieceSubscription: (fn: (piece: Partial<IPieceItem>) => boolean) => () => void

Subscribe to piece updates coming from external source, i.e. websockets

param

subscription function Should return an unsubscribe function

Type declaration

    • (fn: (piece: Partial<IPieceItem>) => boolean): () => void
    • Parameters

      Returns () => void

        • (): void
        • Returns void

PieceType

PieceType: "source" | "background" | "html" | "image" | "seo"

Generated using TypeDoc