Interface: IViewerCardConfig
Configuration object for defining new viewer cards
Extends
Properties
appGuid?
optional
appGuid: string
The application GUID an extension card is associated with
Inherited from
ICardConfig
.appGuid
appVersion?
optional
appVersion: string
The version of the application an extension card is created with
Inherited from
ICardConfig
.appVersion
autoRestore?
optional
autoRestore: boolean
Controls auto restore behavior for the card. By default, or if this property is true, when
a card is added to the review interface, the dock it is added to is automatically restored.
If this property is false, the dock will not be restored. This can be useful when the card
loading process is lengthy or costly, to prevent the card from loading until the user
activates it.
Inherited from
ICardConfig
.autoRestore
category?
optional
category: string
Optional string representing the card group or category this card belongs to.
Inherited from
ICardConfig
.category
categoryOrder?
optional
categoryOrder: number
Optional number representing the rank or order of the card.
Defines where this card is to be placed in the same category of cards
Inherited from
ICardConfig
.categoryOrder
defaultHeight?
optional
defaultHeight: number
The default height for the card (as rem units)
Inherited from
ICardConfig
.defaultHeight
defaultWidth?
optional
defaultWidth: number
The default width for the card (as rem units)
Inherited from
ICardConfig
.defaultWidth
extends?
optional
extends: IExtendsConfig
Experimental
Optional property IExtendsConfig that sets up a custom outsidein viewer.
This overrides the ICardConfig.loader and ICardConfig.toolbarsConfig properties.
Inherited from
ICardConfig
.extends
icon?
optional
icon: ICardIcon
The icon to display in the card title bar
Inherited from
ICardConfig
.icon
id
id: string
Unique card type ID
This should be globally unique, like a GUID or company identifier.
Copy
"mycompany.myplugin.mycard"
Inherited from
ICardConfig
.id
loader
loader: ICardLoaderConfig
Information for loading the card content
Inherited from
ICardConfig
.loader
location?
optional
location: ICardLocation
The default location for the card
Inherited from
ICardConfig
.location
minHeight?
optional
minHeight: number
The minimum height of the card (as rem units)
Inherited from
ICardConfig
.minHeight
minWidth?
optional
minWidth: number
The minimum width of the card (as rem units)
Inherited from
ICardConfig
.minWidth
order?
optional
order: number
An optional index to use when sorting the tabs for the cards in a dock. Defaults to 0.
Inherited from
ICardConfig
.order
overrideViewerType?
optional
overrideViewerType: string
If provided, indicates which viewer the custom viewer will replace
singleton?
optional
singleton: boolean
If true, only one instance of the card will be allowed.
Inherited from
ICardConfig
.singleton
skeleton?
optional
skeleton: ICardSkeleton
Custom skeleton loader. If specified, this skeleton will replace the default skeleton loader.
Inherited from
ICardConfig
.skeleton
supportsPopout?
optional
supportsPopout: boolean
Experimental
Optional boolean indicating whether or not the card supports being popped out into a new window.
Defaults to false. This flag is used by the experimental ICard.popout and ICard.popin
APIs.
Inherited from
ICardConfig
.supportsPopout
title
title: string
The human-readable card title
Inherited from
ICardConfig
.title
optional
toolbarsConfig: ICardToolbarConfig
| ICardToolbarConfig
[]
Indicates the toolbars to create within the card. The resulting toolbars may be
accessed via the ICard.toolbars property. Toolbars may also be created via the
ICard.createToolbar() method.
Inherited from
ICardConfig
.toolbarsConfig
optional
toolTipConfig: IToolTipConfig
Experimental
Optional configuration for adding custom tool tip to the card icon.
Inherited from
ICardConfig
.toolTipConfig
optional
viewerToolbarConfig: ICardToolbarConfig
Indicates the configuration for the viewer toolbar to create within the card.
The resulting toolbar may be accessed via the IViewerCard.viewerToolbar property.
Viewer toolbars always appear at the top, so the edge property of this object will be ignored.
viewerType
viewerType: string
The viewer type identifier (i.e. "native" or "image")
This is used via the navigation API to specifiy which viewer type to load and must be unique for each viewer card
Methods
createInstance()
createInstance(card
, api
): IViewerCardInstance
If specified, this function will be called to create an ICardInstance object to be bound
to an ICard. Alternately, the ICard.bindInstance() method may be used.
Parameters
• card: IViewerCard
Viewer card that the instance belongs to
• api: IReviewInterfaceApi
Review Interface API
Returns
IViewerCardInstance
Overrides
ICardConfig.createInstance
supportsItem()
supportsItem(api
, queueItem
, fileTypeId
): boolean
| Promise
<boolean
>
This function will be called to check whether the viewer type supports loading the provided IQueueItem
This function should return true or a Promise that resolves to true if the viewer type supports loading the provided queue item. Otherwise,
this function should return false or a Promise that resolves to false. It is possible that this method will be called multiple times and it
is advised to memoize the function if it is an expensive check.
Parameters
• api: IReviewInterfaceApi
Review Interface API
• queueItem: IQueueItem
The queue item to check support for
• fileTypeId: number
The file type ID, if one is available
Returns
boolean
| Promise
<boolean
>
Whether or not the viewer type supports loading in the provided queue item