Last date modified: 2025-Oct-03
Interface: IViewerCard
Card that is used for displaying queue items
Extends
Properties
active
readonlyactive:boolean
Indicates whether the card is currently active. Cards in a dock will be active when the associated tab is active. Cards in a frame are always active.
Inherited from
activeFlag
activeFlag:
boolean
Indicates whether card is currently active or not
Inherited from
applicationWindow
readonlyapplicationWindow:IApplicationWindow
Reference to the application window the card is currently in
Cards can be moved to layouts in various different browser windows, but the code defined in the card callback methods will often be executing in the context of the IWindowService.main window. This property should be used to determine which window the card is currently in. This is especially important when performing actions such as querying the DOM. Note that when a card has not been placed in a layout, the card framework cannot know which window it will be added to. In these situations, this property will be undefined.
Inherited from
autoRestore
readonlyautoRestore:boolean
Indicates whether card is set to auto restore or not
Inherited from
bottomToolbar?
readonlyoptionalbottomToolbar:IToolbar
The card's bottom toolbar, if it has one.
Inherited from
cardError
readonlycardError:ICardError
The card error of any error that occurred while handling the card
Inherited from
config
readonlyconfig:IViewerCardConfig
The viewer card configuration
Overrides
defaultHeight?
readonlyoptionaldefaultHeight:number
The default height for the card (as rem units)
Inherited from
defaultWidth?
readonlyoptionaldefaultWidth:number
The default width for the card (as rem units)
Inherited from
dockSkeletonClassName
readonlydockSkeletonClassName:string
Class name to be used to apply to the skeleton to the cards in this dock.
Inherited from
element?
readonlyoptionalelement:HTMLElement
The root HTML element of the card
Inherited from
enabled
readonlyenabled:boolean
Indicates whether the card is enabled.
Inherited from
errorString?
readonlyoptionalerrorString:string
A description of any error that occurred while handling the card
Inherited from
frame?
readonlyoptionalframe:HTMLIFrameElement
The HTML element containing the IFrame of the card
Inherited from
hasError
readonlyhasError:boolean
true if an error has occurred while handling the card
Inherited from
hasNotification
hasNotification:
boolean
Indicates whether card has a notification dot or not
Inherited from
height?
readonlyoptionalheight:number
The current height for the card (as pixels)
Inherited from
icon
readonlyicon:IReadonlyCardIcon
Inherited from
id
readonlyid:string
The unique identifier from ICardConfig.id (must not be shared by any default or custom card)
Inherited from
instance
readonlyinstance:IViewerCardInstance
The instance data associated with the viewer card
Overrides
instanceId
readonlyinstanceId:string
A unique id for this card instance (combination of ICard.id and ICard.instance)
Inherited from
instanceIndex
readonlyinstanceIndex:number
The instance number of the card (generally 0 unless there are multiple instances of the same card)
Inherited from
leftToolbar?
readonlyoptionalleftToolbar:IToolbar
The card's left toolbar, if it has one.
Inherited from
loadDeferred
readonlyloadDeferred:Promise<void>
returned deferred to determine if the card has loaded
Inherited from
location?
readonlyoptionallocation:ICardLocation
Current location of the card. If the card has not been placed in a location yet, or has been removed from its location, this is undefined.
Inherited from
maximized
readonlymaximized:boolean
Indicates whether the card is currently maximized.
Inherited from
minHeight
readonlyminHeight:number
The minimum height of the card (as rem units)
Inherited from
minWidth
readonlyminWidth:number
The minimum width of the card (as rem units)
Inherited from
order
readonlyorder:number
The index to use when sorting the tabs for the cards in a dock.
Inherited from
overlay?
readonlyoptionaloverlay:ICard
The overlay card if showOverlay() was called, or undefined if no overlay is set.
Inherited from
parameters?
readonlyoptionalparameters:any[]
Additional parameters attached to the card during creation. The interpretation of these parameters is dependent on the card type.
Inherited from
popoutInProgress
popoutInProgress:
boolean
Inherited from
poppedIn
readonlypoppedIn:boolean
Experimental
Indicates whether the card is currently popped in.
This flag is used by the experimental popout feature.
Inherited from
poppedOut
readonlypoppedOut:boolean
Experimental
Indicates whether the card is currently popped out.
This flag is used by the experimental popout feature.
Inherited from
rightToolbar?
readonlyoptionalrightToolbar:IToolbar
The card's right toolbar, if it has one.
Inherited from
skeletonVisible
readonlyskeletonVisible:boolean
True if the skeleton for this is currently visible
Inherited from
status
readonlystatus:CardStatus
The state (CardStatus) the card is in
Inherited from
title
readonlytitle:string
The human-readable card title
Inherited from
toolbars?
readonlyoptionaltoolbars:IToolbar[]
The card toolbar controls
Inherited from
topToolbar?
readonlyoptionaltopToolbar:IToolbar
The card's top toolbar, if it has one.
Inherited from
viewerCollection
readonlyviewerCollection:IViewerCollection
The viewer collection the viewer belongs to
viewerTab
readonlyviewerTab:ITabControl
viewerToolbar?
readonlyoptionalviewerToolbar:IToolbar
The card's viewer toolbar, if it has one.
viewerType
readonlyviewerType:string
The viewer type identifier (i.e. "native" or "image")
This is used via the navigation API to specifiy which viewer type to load
visible
visible:
boolean
Controls whether the card is visible. Setting this property to false will hide the card, setting it to true will show the card. Hiding a card can result in other panes being hidden as well, e.g. hiding a card when it is the only card in the dock will result in the dock being hidden as well. Cards are visible by default.
Inherited from
width?
readonlyoptionalwidth:number
The current width for the card (as pixels)
Inherited from
window
readonlywindow:Window
Reference to the browser window the card is currently in
This property is the same as ICard.applicationWindow.window.
Inherited from
Methods
activate()
activate():
Promise<boolean>
Activate the card if it is in a dock. This results in the card content being displayed in the dock body. If the card is still in the process of loading, a skeleton will be displayed until the load completes. If the card is not in a dock, this method has no effect.
Returns
Promise<boolean>
Inherited from
bindInstance()
bindInstance(
instance,layout?):void
Binds an ICardInstance to the card. Alternately, the ICardConfig.createInstance() function may be specified to have an ICardInstance created automatically for each card instance.
Parameters
• instance: ICardInstance
The ICardInstance to bind to the card
• layout?: any
Reserved for internal use
Returns
void
Inherited from
canDeactivate()
canDeactivate():
boolean
Check if card is currently able to be deactivated
Returns
boolean
Inherited from
completeFrameLoad()
completeFrameLoad():
void
Manually resolves the loading of the card for an IFrame or view model card loader.
Returns
void
Inherited from
createBanner()
createBanner(
message,config?):IMessageCardBanner
Creates a message banner that will display within the card
Parameters
• message: string
Banner message
• config?: IMessageCardBannerConfig
Optional banner configuration
Returns
Inherited from
createHtmlBanner()
createHtmlBanner(
contentHTML,config?):IHtmlCardBanner
Creates a custom HTML banner that will display within the card
Parameters
• contentHTML: string
Custom HTML content of the banner
• config?: IHtmlCardBannerConfig
Optional banner configuration
Returns
Inherited from
createToolbar()
createToolbar(
config):IToolbar
Creates a toolbar in the card. Toolbars may also be created via the ICardConfig.toolbarsConfig property.
Parameters
• config: ICardToolbarConfig
Returns
Inherited from
deactivate()
deactivate():
Promise<boolean>
Deactivate the card if it is in a dock. This results in the card content being hidden. If the card is not in a dock, this method has no effect.
Returns
Promise<boolean>
Inherited from
disable()
disable():
void
Disables the card. When cards are disabled, they are automatically deactivated and the associated dock toolbar button (if any) is disabled, preventing activation.
Returns
void
Inherited from
dismissBanner()
dismissBanner(
banner):void
Dismisses a banner and removes it from the card. Equivalent to calling ICardBanner.dismiss().
Parameters
• banner: ICardBanner
Returns
void
Inherited from
dismissBannerByClass()
dismissBannerByClass(
bannerClass):void
Method to dismiss the banner by class
Parameters
• bannerClass: string
Returns
void
Inherited from
enable()
enable():
void
Enables the card if it has been disabled by a call to ICard.disable().
Returns
void
Inherited from
failFrameLoad()
failFrameLoad(
error):void
Manually fails the loading of the card for an IFrame or view model card loader.
Parameters
• error: Error
Error to pass to reject
Returns
void
Inherited from
hideOverlay()
hideOverlay():
Promise<void>
Hides any overlay that was shown via a call to showOverlay()
Returns
Promise<void>
Inherited from
hideSkeleton()
hideSkeleton(
immediately?):void
Hides card skeleton without delay.
Parameters
• immediately?: boolean
Returns
void
Inherited from
load()
load():
Promise<void>
Loads the card if it is not already loaded. Note that it is normally not necessary to call this method because cards are loaded automatically when they activated in the UI. Manual loads may be useful in certain circumstances, for instance if the loading process is lengthy.
Returns
Promise<void>
Inherited from
maximize()
maximize():
Promise<void>
Moves the card to cover the whole viewport.
Returns
Promise<void>
Inherited from
move()
move(
location,force?):Promise<boolean>
Experimental
Moves the card to the specified location.
This is an experimental API. The application may not function properly when invoking this API.
Parameters
• location: ICardLocation
Location to move the card to
• force?: boolean
Optional boolean indicating whether or not the card should be forecefully moved,
bypassing the standard cardCanDeactivate() checks. Defaults to false.
Returns
Promise<boolean>
Promise that resolves to a boolean indicating if the card was successfully moved
Inherited from
popin()
popin(
force?, ...rest?):Promise<boolean>
Experimental
Docks the card and returns it to its original location after being popped out.
This is an experimental API. The application may not function properly when invoking this API.
Parameters
• force?: boolean
Optional boolean indicating whether or not the card should be forcefully popped in,
bypassing the standard cardCanDeactivate() checks. Defaults to false.
• ...rest?: any[]
Returns
Promise<boolean>
Promise that resolves to a boolean indicating whether or not the card could be popped out.
Inherited from
popout()
popout(...
rest):Promise<boolean>
Experimental
Undocks the card and moves it to a new popout window.
This is an experimental API. The application may not function properly when invoking this API.
Parameters
• ...rest: any[]
Returns
Promise<boolean>
Promise that resolves to a boolean indicating whether or not the card could be popped out.
Inherited from
remove()
remove():
void
Removes the card from its current dock.
Returns
void
Inherited from
reportError()
reportError(
displayString,error,customProperties?):void
Report that the card is in error state. This will display the passed in error message on the card if ICardError.isFatal is true and log it.
Parameters
• displayString: string
Message to be displayed on the card.
• error: ICardError
The ICardError instance containing information about the error.
• customProperties?
Any other additional data related to the error.
Returns
void
Inherited from
restore()
restore():
Promise<void>
Un-maximizes the card so that it shows in its location instead over the whole viewport.
Returns
Promise<void>
Inherited from
resumeMinHeight()
resumeMinHeight():
void
Resumes the min height of the card
Returns
void
Inherited from
setActiveFlag()
setActiveFlag(
flag):Promise<void>
Sets activeFlag to given value, if possible
Parameters
• flag: boolean
Returns
Promise<void>
Inherited from
setStatus()
setStatus(
status):void
Set the card's status to one of the CardStatus values.
Parameters
• status: CardStatus
Returns
void
Inherited from
showNotificationDot()
showNotificationDot(
show):void
Shows or hides the notification dot for the card's tab.
Parameters
• show: boolean
Returns
void
Inherited from
showOverlay()
showOverlay(
overlay):Promise<void>
Temporarily replaces the card contents with another card, for instance to display an error message. Only the overlay contents are used - other properties from the overlay card, such as the title and minimum size are ignored.
Parameters
• overlay: ICard
Returns
Promise<void>
Inherited from
showSkeleton()
showSkeleton(
immediately?):void
Shows card skeleton without delay.
Parameters
• immediately?: boolean
Returns
void
Inherited from
stateChanged()
stateChanged():
void
Called to notify the card system that the card's internal state (the data returned by ICardInstance.cardSaveState) has changed.
Returns
void
Inherited from
suspendMinHeight()
suspendMinHeight():
void
Temporarily suspends the min height of the card
Returns
void
Inherited from
unload()
unload():
Promise<void>
Unloads the card. Normally it is not necessary to call this method but it may be useful if the card is no longer needed.
Returns
Promise<void>
Inherited from
updateLayout()
updateLayout():
void
Called to notifiy the card system to update the layout.
Returns
void
Inherited from
waitForDetachment()
waitForDetachment():
Promise<void>
Wait for the card to be detached
Returns
Promise<void>
Inherited from
On this page
- Interface: IViewerCard
- Extends
- Properties
- active
- activeFlag
- applicationWindow
- autoRestore
- bottomToolbar?
- cardError
- config
- defaultHeight?
- defaultWidth?
- dockSkeletonClassName
- element?
- enabled
- errorString?
- frame?
- hasError
- hasNotification
- height?
- icon
- id
- instance
- instanceId
- instanceIndex
- leftToolbar?
- loadDeferred
- location?
- maximized
- minHeight
- minWidth
- order
- overlay?
- parameters?
- popoutInProgress
- poppedIn
- poppedOut
- rightToolbar?
- skeletonVisible
- status
- title
- toolbars?
- topToolbar?
- viewerCollection
- viewerTab
- viewerToolbar?
- viewerType
- visible
- width?
- window
- Methods
- activate()
- bindInstance()
- canDeactivate()
- completeFrameLoad()
- createBanner()
- createHtmlBanner()
- createToolbar()
- deactivate()
- disable()
- dismissBanner()
- dismissBannerByClass()
- enable()
- failFrameLoad()
- hideOverlay()
- hideSkeleton()
- load()
- maximize()
- move()
- popin()
- popout()
- remove()
- reportError()
- restore()
- resumeMinHeight()
- setActiveFlag()
- setStatus()
- showNotificationDot()
- showOverlay()
- showSkeleton()
- stateChanged()
- suspendMinHeight()
- unload()
- updateLayout()
- waitForDetachment()