module

  Types

## Index

### Interfaces

- GalleryItem
- IComponent
- IGlobalState
- IOptions
- IPiece
- IPieceControllerState
- IPieceItem
- IPieceProps
- IPiecesAPI
- IPiecesOptions
- IWriteAwayState

### Type aliases

- PieceActions
- PieceDataResolver
- PieceType

## 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

      - ##### id: string

      - ##### piece: Partial<IPieceItem<DataType>>

      #### Returns void

### PieceDataResolver

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

#### Type parameters

- #### DataType = any

#### Type declaration

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

  - #### Parameters

    - ##### piece: IPieceItem<DataType>

    - ##### Optional resolvers: Partial<Record<PieceType, PieceDataResolver>>

    #### Returns Promise<IPieceItem<DataType>>

### PieceType

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

Generated using TypeDoc