Last date modified: 2025-Jul-02
Interface: IViewerCardInstance
Viewer card instance information
Extends
Extended by
Properties
cardActivated()?
optionalcardActivated: (api,card) =>void
Called after the card is activated in a dock.
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
cardBuildTabOptions()?
optionalcardBuildTabOptions: (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[]>
cardBuildToolbarOptions()?
optionalcardBuildToolbarOptions: (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()?
optionalcardCanDeactivate: (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()?
optionalcardCreateUnsupportedOverlayCard: (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()?
optionalcardDeactivated: (api,card) =>void
Called after the card is deactivated in a dock.
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
cardError()?
optionalcardError: (api,card,err) =>void
Called whenever an error occurs while managing the card
Parameters
• api: IReviewInterfaceApi
• card: ICard
• err: Error
Returns
void
Inherited from
cardLoaded()?
optionalcardLoaded: (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
cardLoadState()?
optionalcardLoadState: (api,card,saveData) =>void
Called to restore the state of the card
Parameters
• api: IReviewInterfaceApi
• card: ICard
• saveData: ICardCustomState
Returns
void
Inherited from
cardMaximized()?
optionalcardMaximized: (api,card) =>void
Called when the card is maximized
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
cardResized()?
optionalcardResized: (api,card) =>void
Called when the card is resized
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
cardRestored()?
optionalcardRestored: (api,card) =>void
Called when the card is no longer maximized
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void
Inherited from
cardSaveState()?
optionalcardSaveState: (api,card) =>ICardCustomState
Called to save the state of the card
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
Inherited from
cardUnloaded()?
optionalcardUnloaded: (api,card) =>void|Promise<void>
Called before the card content is unloaded
Parameters
• api: IReviewInterfaceApi
• card: ICard
Returns
void | Promise<void>
Inherited from
id
readonlyid:string
Unique viewer instance ID
type
readonlytype:string
Viewer type - this should match the viewer type from the configuration object
unsupportedTabTitle?
readonlyoptionalunsupportedTabTitle: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
On this page