
# Class: AuWidgetHelp

A widget that is used to display webpages and modal windows.

In the following example, we define a modal window to be displayed in the `help` widget.
```
{
  "modals": [
    {
      "name": "faq",
      "header": "F.A.Q.",
      "showOnStartup": true,
      "externalContent": {
        "url": "https://example.com/pages/faq",
      }
    }
  ],
  "widgets": [
    {
      "name": "help",
      "type": "help",
      "title": "help",
      "params": {
        "steps": {
          "0": {
            "type": "modal",
            "content": "faq"
          },
          "1": {
            "type": "page",
            "content": "http://customerscanvas.com"
          }
        }
      }
    }
  ]
}
```

## Hierarchy

* AuBaseInvisibleWidget

  ↳ **AuWidgetHelp**

## Implements

* [IWidget](../interfaces/iwidget.md)

## Index

### Properties

* [params](auwidgethelp.md#params)

### Accessors

* [template](auwidgethelp.md#static-template)

### Methods

* [checkInitDependenciesWidgets](auwidgethelp.md#checkinitdependencieswidgets)
* [resetPreloaderState](auwidgethelp.md#resetpreloaderstate)
* [showPreloader](auwidgethelp.md#showpreloader)
* [showToast](auwidgethelp.md#showtoast)

## Properties

###  params

• **params**: *[IAuWidgetHelpParams](../interfaces/iauwidgethelpparams.md)*

*Implementation of [IWidget](../interfaces/iwidget.md).[params](../interfaces/iwidget.md#optional-params)*

*Overrides [AuBaseWidget](aubasewidget.md).[params](aubasewidget.md#params)*

Properties of the widget.

## Accessors

### `Static` template

• **get template**(): *HTMLTemplateElement*

*Inherited from void*

**Returns:** *HTMLTemplateElement*

## Methods

###  checkInitDependenciesWidgets

▸ **checkInitDependenciesWidgets**(): *string[]*

*Inherited from [AuBaseWidget](aubasewidget.md).[checkInitDependenciesWidgets](aubasewidget.md#checkinitdependencieswidgets)*

Returns an array of widget names, due to which the current widget cannot receive parameters.

**Returns:** *string[]*

___

###  resetPreloaderState

▸ **resetPreloaderState**(): *void*

*Inherited from [AuBaseWidget](aubasewidget.md).[resetPreloaderState](aubasewidget.md#resetpreloaderstate)*

**Returns:** *void*

___

###  showPreloader

▸ **showPreloader**(`isPreload`: boolean, `message`: string | string[], `timeout`: number): *void*

*Inherited from [AuBaseWidget](aubasewidget.md).[showPreloader](aubasewidget.md#showpreloader)*

Shows a preloader.

```
"onClick": [
  "{{#function main.showPreloader(true, 'Creating print files...')}}",
  "{{#function $['editor'].getHiResImages(800,800)}}",
  "{{#function main.showPreloader(false)}}"
]
```

**Parameters:**

Name | Type | Default | Description |
------ | ------ | ------ | ------ |
`isPreload` | boolean | - | If `true`, enables the preloader. |
`message` | string &#124; string[] |  [""] | A text message that appears next to the preloader.  |
`timeout` | number | 5 | - |

**Returns:** *void*

___

###  showToast

▸ **showToast**(`data?`: string, `duration?`: number): *void*

*Inherited from [AuBaseWidget](aubasewidget.md).[showToast](aubasewidget.md#showtoast)*

Shows a toast.

```
return editor.loadUserInfo(data)
    .catch(err => {
        this.widget.showToast("Error: Invalid data");
        console.log(err);
    });
```

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`data?` | string | A string message to display in the toast. |
`duration?` | number | Defines how long to show the toast for.  |

**Returns:** *void*
