Skip to main content

au-widget-gallery/IGalleryConfig

Interfaces

IGalleryConfig

Provides gallery properties.

You can use these properties in params of the AuWidgetGallery class.

{
"widgets": [
{
"name": "bg-request",
"type": "ajax",
"params": {
"url": "http://example.com/api/backgrounds/christmas",
"method": "GET"
}
},
{
"name": "bg-gallery",
"type": "gallery",
"params": {
"prompt": "Choose a background",
"items": "{{$['bg-request'].response}}"
}
}
]
}

Properties

applyEmptyValues
applyEmptyValues: boolean;

Indicates if gallery should allow empty items array

description?
optional description?: string;

The tooltip.

emptyValuesText
emptyValuesText: string;

Warning message that should be displaying if widget get empty items array

endpoint?
optional endpoint?: string;

Deprecated, use AuWidgetAjax instead.

forceSelection?
optional forceSelection?: boolean;

if true, the first element will be automatically selected when the gallery opens.

headers?
optional headers?: any;

Deprecated, use AuWidgetAjax instead.

items?
optional items?: IGalleryItem[];

An array of images to display in the gallery.

itemsExpression?
optional itemsExpression?: string;
itemWidth?
optional itemWidth?: string;

This item width allows you to override the default width.

method?
optional method?: string;

Deprecated, use AuWidgetAjax instead.

onChange
onChange: Function | Function[];

A single function or an array of functions that will be executed when an item is clicked.

preselected?
optional preselected?: string;

The name of preselected item.

prompt?
optional prompt?: string;

The prompt encouraging users to select an image.

showTitle?
optional showTitle?: boolean;

If true, displays the title.


IGalleryItem

Provides properties for a gallery item.

Properties

data
data: any;

A JSON object containing arbitrary data associated with this image.

name
name: string;

A unique machine-readable name.

previewUrl
previewUrl: string;

A URL to the image to display.

title
title: string;

A display name of an item.

Was this page helpful?