---
title: "widget/AuBaseWidget | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/widget.AuBaseWidget/"
---

# widget/AuBaseWidget

> Declares methods used to retrieve the selected value in a widget and clear the selection.

## Classes

### `abstract` AuBaseSelectorWidget

#### Extends

- [`AuBaseWidget`](#abstract-aubasewidget)

#### Extended by

- [`AuWidgetCheckbox`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-checkbox.au-widget-checkbox.md#auwidgetcheckbox)
- [`AuWidgetColorPicker`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-color-picker.au-widget-color-picker.md#auwidgetcolorpicker)
- [`AuWidgetColorSelector`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-color-selector.au-widget-color-selector.md#auwidgetcolorselector)
- [`AuWidgetDataSheet`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-datasheet.au-widget-datasheet.md#auwidgetdatasheet)
- [`AuWidgetFinishGroup`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-finish-group.au-widget-finish-group.md#auwidgetfinishgroup)
- [`AuWidgetGallery`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-gallery.au-widget-gallery.md#auwidgetgallery)
- [`AuWidgetGroup`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-group.au-widget-group.md#auwidgetgroup)
- [`AuWidgetInputText`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-input-text.au-widget-input-text.md#auwidgetinputtext)
- [`AuAbstractOption`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-option.AuAbsrtactOption.md#auabstractoption)
- [`AuPIMDesignSelector`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-pim-design-selector.au-widget-pim-design-selector.md#aupimdesignselector)
- [`AuWidgetPimOption`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-pim-option.au-widget-pim-option.md#auwidgetpimoption)
- [`AuWidgetPimOptions`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-pim-options.au-widget-pim-options.md#auwidgetpimoptions)

#### Constructors

##### Constructor

```ts
new AuBaseSelectorWidget(): AuBaseSelectorWidget;
```

###### Returns

[`AuBaseSelectorWidget`](#abstract-aubaseselectorwidget)

###### Inherited from

[`AuBaseWidget`](#abstract-aubasewidget).[`constructor`](#constructor-1)

#### Properties

##### params

```ts
params: any;
```

Compiled widget configuration.

###### Inherited from

[`AuBaseWidget`](#abstract-aubasewidget).[`params`](#params-1)

#### Accessors

##### \_

###### Get Signature

```ts
get abstract _(): any;
```

Returns the selected value.

###### Returns

`any`

#### Methods

##### checkInitDependenciesWidgets()

```ts
checkInitDependenciesWidgets(): string[];
```

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

###### Returns

`string`[]

###### Inherited from

[`AuBaseWidget`](#abstract-aubasewidget).[`checkInitDependenciesWidgets`](#checkinitdependencieswidgets-1)

##### clearSelection()

```ts
abstract clearSelection(): any;
```

Clears the selection.

###### Returns

`any`

##### resetPreloaderState()

```ts
resetPreloaderState(): void;
```

###### Returns

`void`

###### Inherited from

[`AuBaseWidget`](#abstract-aubasewidget).[`resetPreloaderState`](#resetpreloaderstate-1)

##### showPreloader()

```ts
showPreloader(
   isPreload, 
   message?, 
   timeout?): void;
```

Shows a preloader.

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

###### Parameters

| Parameter | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `isPreload` | `boolean` | `undefined` | If `true`, enables the preloader. |
| `message` | `string` \| `string`[] | `...` | A text message that appears next to the preloader. |
| `timeout` | `number` | `5` | - |

###### Returns

`void`

###### Inherited from

[`AuBaseWidget`](#abstract-aubasewidget).[`showPreloader`](#showpreloader-1)

##### showToast()

```ts
showToast(data?, duration?): void;
```

Shows a toast.

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

###### Parameters

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

###### Returns

`void`

###### Inherited from

[`AuBaseWidget`](#abstract-aubasewidget).[`showToast`](#showtoast-1)

***

### `abstract` AuBaseWidget

The base class for widgets.

#### Extends

- `any`

#### Extended by

- [`Au3dViewerBase`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-3d-viewer.Au3dViewerBase.md#abstract-au3dviewerbase)
- [`AuWidgetButton`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-button.au-widget-button.md#auwidgetbutton)
- [`AuWidgetDataDrivenEditor`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-data-driven-editor.au-widget-data-driven-editor.md#auwidgetdatadriveneditor)
- [`AuDesignEditor`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-design-editor.AuDesignEditor.md#abstract-audesigneditor)
- [`AuWidgetDndController`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-dnd-controller.au-widget-dnd-controller.md#auwidgetdndcontroller)
- [`AuWidgetHtml`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-html.au-widget-html.md#auwidgethtml)
- [`AuWidgetImageCarousel`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-image-carousel.au-widget-image-carousel.md#auwidgetimagecarousel)
- [`AuWidgetPantoneColorPicker`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-pantone-color-picker.au-widget-pantone-color-picker.md#auwidgetpantonecolorpicker)
- [`AuWidgetPreflight`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-preflight.au-widget-preflight.md#auwidgetpreflight)
- [`AuWidgetPreviewMockupSlider`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-preview-mockup-slider.au-widget-preview-mockup-slider.md#auwidgetpreviewmockupslider)
- [`AuWidgetSlider`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-slider.au-widget-slider.md#auwidgetslider)
- [`AuWidgetStaticText`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-static-text.au-widget-static-text.md#auwidgetstatictext)
- [`AuWidgetVariantSelector`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-variant-selector.au-widget-variant-selector.md#auwidgetvariantselector)
- [`AuBaseSelectorWidget`](#abstract-aubaseselectorwidget)

#### Implements

- [`IWidget`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/widget.interface.IWidget.md#iwidget)

#### Constructors

##### Constructor

```ts
new AuBaseWidget(): AuBaseWidget;
```

###### Returns

[`AuBaseWidget`](#abstract-aubasewidget)

###### Overrides

```ts
(AuTranslationMixin(AuElement)).constructor
```

#### Properties

##### params

```ts
params: any;
```

Compiled widget configuration.

###### Implementation of

[`IWidget`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/widget.interface.IWidget.md#iwidget).[`params`](https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/widget.interface.IWidget.md#params)

#### Methods

##### checkInitDependenciesWidgets()

```ts
checkInitDependenciesWidgets(): string[];
```

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

###### Returns

`string`[]

##### resetPreloaderState()

```ts
resetPreloaderState(): void;
```

###### Returns

`void`

##### showPreloader()

```ts
showPreloader(
   isPreload, 
   message?, 
   timeout?): void;
```

Shows a preloader.

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

###### Parameters

| Parameter | Type | Default value | Description |
| ------ | ------ | ------ | ------ |
| `isPreload` | `boolean` | `undefined` | If `true`, enables the preloader. |
| `message` | `string` \| `string`[] | `...` | A text message that appears next to the preloader. |
| `timeout` | `number` | `5` | - |

###### Returns

`void`

##### showToast()

```ts
showToast(data?, duration?): void;
```

Shows a toast.

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

###### Parameters

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

###### Returns

`void`
