
# Class: AuWidgetDesignAtoms

## Hierarchy

  ↳ [AuBaseWidget](aubasewidget.md)

  ↳ **AuWidgetDesignAtoms**

## Implements

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

## Index

### Properties

* [params](auwidgetdesignatoms.md#params)

### Accessors

* [currentSurface](auwidgetdesignatoms.md#currentsurface)
* [hiResUrls](auwidgetdesignatoms.md#hiresurls)
* [productModel](auwidgetdesignatoms.md#productmodel)
* [proofImageUrls](auwidgetdesignatoms.md#proofimageurls)
* [selectedItems](auwidgetdesignatoms.md#selecteditems)
* [viewer](auwidgetdesignatoms.md#viewer)

### Methods

* [checkInitDependenciesWidgets](auwidgetdesignatoms.md#checkinitdependencieswidgets)
* [getHiResImages](auwidgetdesignatoms.md#gethiresimages)
* [getProofImages](auwidgetdesignatoms.md#getproofimages)
* [getSerializedProduct](auwidgetdesignatoms.md#getserializedproduct)
* [resetPreloaderState](auwidgetdesignatoms.md#resetpreloaderstate)
* [resizeSelectedImages](auwidgetdesignatoms.md#resizeselectedimages)
* [rotateSelectedItems](auwidgetdesignatoms.md#rotateselecteditems)
* [showPreloader](auwidgetdesignatoms.md#showpreloader)
* [showToast](auwidgetdesignatoms.md#showtoast)

## Properties

###  params

• **params**: *[IDesignAtomsWidgetConfig](../interfaces/idesignatomswidgetconfig.md)*

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

## Accessors

###  currentSurface

• **get currentSurface**(): *Surface‹›*

**Returns:** *Surface‹›*

___

###  hiResUrls

• **get hiResUrls**(): *string[]*

**Returns:** *string[]*

___

###  productModel

• **get productModel**(): *Product‹›*

**Returns:** *Product‹›*

• **set productModel**(`product`: Product): *void*

**Parameters:**

Name | Type |
------ | ------ |
`product` | Product |

**Returns:** *void*

___

###  proofImageUrls

• **get proofImageUrls**(): *string[]*

**Returns:** *string[]*

___

###  selectedItems

• **get selectedItems**(): *Item‹›[]*

**Returns:** *Item‹›[]*

___

###  viewer

• **get viewer**(): *Viewer‹›*

**Returns:** *Viewer‹›*

• **set viewer**(`viewer`: Viewer): *void*

**Parameters:**

Name | Type |
------ | ------ |
`viewer` | Viewer |

**Returns:** *void*

## 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[]*

___

###  getHiResImages

▸ **getHiResImages**(): *Promise‹string[]›*

**Returns:** *Promise‹string[]›*

___

###  getProofImages

▸ **getProofImages**(): *Promise‹string[]›*

**Returns:** *Promise‹string[]›*

___

###  getSerializedProduct

▸ **getSerializedProduct**(): *string*

**Returns:** *string*

___

###  resetPreloaderState

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

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

**Returns:** *void*

___

###  resizeSelectedImages

▸ **resizeSelectedImages**(`resizeMode`: [ResizeMode](../enums/resizemode.md), `targetSize?`: SizeF): *void*

**Parameters:**

Name | Type |
------ | ------ |
`resizeMode` | [ResizeMode](../enums/resizemode.md) |
`targetSize?` | SizeF |

**Returns:** *void*

___

###  rotateSelectedItems

▸ **rotateSelectedItems**(`angle`: number): *void*

**Parameters:**

Name | Type | Default |
------ | ------ | ------ |
`angle` | number | 90 |

**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*
