Interface: IViewerCardInstance
Viewer card instance information
Extends
Extended by
Properties
cardActivated()?
optional
cardActivated: (api
, card
) => void
Called after the card is activated in a dock.
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
ICardInstance
.cardActivated
cardBuildTabOptions()?
optional
cardBuildTabOptions: (api
, card
, item
, productionArtifactId
?, longTextFieldArtifactId
?, productionType
?) => IViewerCardTabOption
[] | Promise
<IViewerCardTabOption
[]>
If provided, this function will be called to build custom viewer tab options for the viewer card.
If no function is provided, a default tab will be created based on the card title.
Parameters
• api: IReviewInterfaceApi
• card: IViewerCard
• item: IQueueItem
• productionArtifactId?: number
• longTextFieldArtifactId?: number
• productionType?: ProductionType
Returns
IViewerCardTabOption
[] | Promise
<IViewerCardTabOption
[]>
optional
cardBuildToolbarOptions: (api
, card
, viewerToolbar
) => void
| Promise
<void
>
If provided, this function will be called to build custom viewer toolbar options for the viewer card.
Parameters
• api: IReviewInterfaceApi
• card: IViewerCard
• viewerToolbar: IToolbar
Returns
void
| Promise
<void
>
cardCanDeactivate()?
optional
cardCanDeactivate: (api
, card
) => boolean
Called before the card deactivates to check if it is safe to do so
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
boolean
Inherited from
ICardInstance
.cardCanDeactivate
cardCreateUnsupportedOverlayCard()?
optional
cardCreateUnsupportedOverlayCard: (api
, card
, item
) => Promise
<ICard
>
Called when the viewer collection needs a card to show when the viewer does not support the item. A default placeholder is shown if this method is not provided.
Parameters
• api: IReviewInterfaceApi
• card: IViewerCard
• item: IQueueItem
Returns
Promise
<ICard
>
cardDeactivated()?
optional
cardDeactivated: (api
, card
) => void
Called after the card is deactivated in a dock.
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
ICardInstance
.cardDeactivated
cardError()?
optional
cardError: (api
, card
, err
) => void
Called whenever an error occurs while managing the card
Parameters
• api: IReviewInterfaceApi
• card: ICard
• err: Error
Returns
void
Inherited from
ICardInstance
.cardError
cardLoaded()?
optional
cardLoaded: (api
, card
, target
) => void
| Promise
<void
>
Called after the card content has loaded
Parameters
• api: IReviewInterfaceApi
• card: ICard
• target: HTMLElement
Returns
void
| Promise
<void
>
Inherited from
ICardInstance
.cardLoaded
cardLoadState()?
optional
cardLoadState: (api
, card
, saveData
) => void
Called to restore the state of the card
Parameters
• api: IReviewInterfaceApi
• card: ICard
• saveData: ICardCustomState
Returns
void
Inherited from
ICardInstance
.cardLoadState
cardMaximized()?
optional
cardMaximized: (api
, card
) => void
Called when the card is maximized
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
ICardInstance
.cardMaximized
cardResized()?
optional
cardResized: (api
, card
) => void
Called when the card is resized
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
ICardInstance
.cardResized
cardRestored()?
optional
cardRestored: (api
, card
) => void
Called when the card is no longer maximized
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
ICardInstance
.cardRestored
cardSaveState()?
optional
cardSaveState: (api
, card
) => ICardCustomState
Called to save the state of the card
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
ICardCustomState
Inherited from
ICardInstance
.cardSaveState
cardUnloaded()?
optional
cardUnloaded: (api
, card
) => void
| Promise
<void
>
Called before the card content is unloaded
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
| Promise
<void
>
Inherited from
ICardInstance
.cardUnloaded
id
readonly
id: string
Unique viewer instance ID
type
readonly
type: string
Viewer type - this should match the viewer type from the configuration object
unsupportedTabTitle?
readonly
optional
unsupportedTabTitle: string
If provided, this defines the viewer's tab title when the viewer does not support the current queue item.
If not provided, the title will default to "No " in this scenario.
Methods
cardLoadItem()
cardLoadItem(item
, options
, ...rest
): Promise
<boolean
>
Called when the viewer card should load a new queue item
Parameters
• item: IQueueItem
Queue item to be loaded
• options: ILoadOptions
Load options
• ...rest: any
[]
Returns
Promise
<boolean
>
Promise that resolves to a boolean indicating whether or not the load was successful