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

ICard.active


activeFlag

activeFlag: boolean

Indicates whether card is currently active or not

Inherited from

ICard.activeFlag


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

ICard.applicationWindow


autoRestore

readonlyautoRestore: boolean

Indicates whether card is set to auto restore or not

Inherited from

ICard.autoRestore


bottomToolbar?

readonlyoptionalbottomToolbar: IToolbar

The card's bottom toolbar, if it has one.

Inherited from

ICard.bottomToolbar


cardError

readonlycardError: ICardError

The card error of any error that occurred while handling the card

Inherited from

ICard.cardError


config

readonlyconfig: IViewerCardConfig

The viewer card configuration

Overrides

ICard.config


defaultHeight?

readonlyoptionaldefaultHeight: number

The default height for the card (as rem units)

Inherited from

ICard.defaultHeight


defaultWidth?

readonlyoptionaldefaultWidth: number

The default width for the card (as rem units)

Inherited from

ICard.defaultWidth


dockSkeletonClassName

readonlydockSkeletonClassName: string

Class name to be used to apply to the skeleton to the cards in this dock.

Inherited from

ICard.dockSkeletonClassName


element?

readonlyoptionalelement: HTMLElement

The root HTML element of the card

Inherited from

ICard.element


enabled

readonlyenabled: boolean

Indicates whether the card is enabled.

Inherited from

ICard.enabled


errorString?

readonlyoptionalerrorString: string

A description of any error that occurred while handling the card

Inherited from

ICard.errorString


frame?

readonlyoptionalframe: HTMLIFrameElement

The HTML element containing the IFrame of the card

Inherited from

ICard.frame


hasError

readonlyhasError: boolean

true if an error has occurred while handling the card

Inherited from

ICard.hasError


height?

readonlyoptionalheight: number

The current height for the card (as pixels)

Inherited from

ICard.height


icon

readonlyicon: IReadonlyCardIcon

Inherited from

ICard.icon


id

readonlyid: string

The unique identifier from ICardConfig.id (must not be shared by any default or custom card)

Inherited from

ICard.id


instance

readonlyinstance: IViewerCardInstance

The instance data associated with the viewer card

Overrides

ICard.instance


instanceId

readonlyinstanceId: string

A unique id for this card instance (combination of ICard.id and ICard.instance)

Inherited from

ICard.instanceId


instanceIndex

readonlyinstanceIndex: number

The instance number of the card (generally 0 unless there are multiple instances of the same card)

Inherited from

ICard.instanceIndex


leftToolbar?

readonlyoptionalleftToolbar: IToolbar

The card's left toolbar, if it has one.

Inherited from

ICard.leftToolbar


loadDeferred

readonlyloadDeferred: Promise<void>

returned deferred to determine if the card has loaded

Inherited from

ICard.loadDeferred


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

ICard.location


maximized

readonlymaximized: boolean

Indicates whether the card is currently maximized.

Inherited from

ICard.maximized


minHeight

readonlyminHeight: number

The minimum height of the card (as rem units)

Inherited from

ICard.minHeight


minWidth

readonlyminWidth: number

The minimum width of the card (as rem units)

Inherited from

ICard.minWidth


order

readonlyorder: number

The index to use when sorting the tabs for the cards in a dock.

Inherited from

ICard.order


overlay?

readonlyoptionaloverlay: ICard

The overlay card if showOverlay() was called, or undefined if no overlay is set.

Inherited from

ICard.overlay


parameters?

readonlyoptionalparameters: any[]

Additional parameters attached to the card during creation. The interpretation of these parameters is dependent on the card type.

Inherited from

ICard.parameters


popoutInProgress

popoutInProgress: boolean

Inherited from

ICard.popoutInProgress


poppedIn

readonlypoppedIn: boolean

Experimental

Indicates whether the card is currently popped in.

This flag is used by the experimental popout feature.

Inherited from

ICard.poppedIn


poppedOut

readonlypoppedOut: boolean

Experimental

Indicates whether the card is currently popped out.

This flag is used by the experimental popout feature.

Inherited from

ICard.poppedOut


rightToolbar?

readonlyoptionalrightToolbar: IToolbar

The card's right toolbar, if it has one.

Inherited from

ICard.rightToolbar


skeletonVisible

readonlyskeletonVisible: boolean

True if the skeleton for this is currently visible

Inherited from

ICard.skeletonVisible


status

readonlystatus: CardStatus

The state (CardStatus) the card is in

Inherited from

ICard.status


title

readonlytitle: string

The human-readable card title

Inherited from

ICard.title


toolbars?

readonlyoptionaltoolbars: IToolbar[]

The card toolbar controls

Inherited from

ICard.toolbars


topToolbar?

readonlyoptionaltopToolbar: IToolbar

The card's top toolbar, if it has one.

Inherited from

ICard.topToolbar


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

ICard.visible


width?

readonlyoptionalwidth: number

The current width for the card (as pixels)

Inherited from

ICard.width


window

readonlywindow: Window

Reference to the browser window the card is currently in

This property is the same as ICard.applicationWindow.window.

Inherited from

ICard.window

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

ICard.activate


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

ICard.bindInstance


canDeactivate()

canDeactivate(): boolean

Check if card is currently able to be deactivated

Returns

boolean

Inherited from

ICard.canDeactivate


completeFrameLoad()

completeFrameLoad(): void

Manually resolves the loading of the card for an IFrame or view model card loader.

Returns

void

Inherited from

ICard.completeFrameLoad


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

IMessageCardBanner

Inherited from

ICard.createBanner


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

IHtmlCardBanner

Inherited from

ICard.createHtmlBanner


createToolbar()

createToolbar(config): IToolbar

Creates a toolbar in the card. Toolbars may also be created via the ICardConfig.toolbarsConfig property.

Parameters

config: ICardToolbarConfig

Returns

IToolbar

Inherited from

ICard.createToolbar


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

ICard.deactivate


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

ICard.disable


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

ICard.dismissBanner


dismissBannerByClass()

dismissBannerByClass(bannerClass): void

Method to dismiss the banner by class

Parameters

bannerClass: string

Returns

void

Inherited from

ICard.dismissBannerByClass


enable()

enable(): void

Enables the card if it has been disabled by a call to ICard.disable().

Returns

void

Inherited from

ICard.enable


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

ICard.failFrameLoad


hideOverlay()

hideOverlay(): Promise<void>

Hides any overlay that was shown via a call to showOverlay()

Returns

Promise<void>

Inherited from

ICard.hideOverlay


hideSkeleton()

hideSkeleton(immediately?): void

Hides card skeleton without delay.

Parameters

immediately?: boolean

Returns

void

Inherited from

ICard.hideSkeleton


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

ICard.load


maximize()

maximize(): Promise<void>

Moves the card to cover the whole viewport.

Returns

Promise<void>

Inherited from

ICard.maximize


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

ICard.move


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

ICard.popin


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

ICard.popout


remove()

remove(): void

Removes the card from its current dock.

Returns

void

Inherited from

ICard.remove


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

ICard.reportError


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

ICard.restore


resumeMinHeight()

resumeMinHeight(): void

Resumes the min height of the card

Returns

void

Inherited from

ICard.resumeMinHeight


setActiveFlag()

setActiveFlag(flag): Promise<void>

Sets activeFlag to given value, if possible

Parameters

flag: boolean

Returns

Promise<void>

Inherited from

ICard.setActiveFlag


setStatus()

setStatus(status): void

Set the card's status to one of the CardStatus values.

Parameters

status: CardStatus

Returns

void

Inherited from

ICard.setStatus


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

ICard.showOverlay


showSkeleton()

showSkeleton(immediately?): void

Shows card skeleton without delay.

Parameters

immediately?: boolean

Returns

void

Inherited from

ICard.showSkeleton


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

ICard.stateChanged


suspendMinHeight()

suspendMinHeight(): void

Temporarily suspends the min height of the card

Returns

void

Inherited from

ICard.suspendMinHeight


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

ICard.unload


updateLayout()

updateLayout(): void

Called to notifiy the card system to update the layout.

Returns

void

Inherited from

ICard.updateLayout


waitForDetachment()

waitForDetachment(): Promise<void>

Wait for the card to be detached

Returns

Promise<void>

Inherited from

ICard.waitForDetachment