## class: `WyCloudFiles`, `wy-cloud-files`

File picker for cloud services. Depends on Weavy filebrowser server to function.

**Used sub components**

*   [`<wy-overlay>`](./ui/wy-overlay)
*   [`<wy-progress-circular>`](./ui/wy-progress-circular)

### Methods

| Name             | Description                                          | Parameters                        | Return                       | Inherited From    |
| ---------------- | ---------------------------------------------------- | --------------------------------- | ---------------------------- | ----------------- |
| `open`           | Open the file picker overlay.                        |                                   |                              |                   |
| `close`          | Close the file picker overlay.                       |                                   |                              |                   |
| `whenReady`      | Resolves when the component has rendered first time. |                                   | `Promise<WeavySubComponent>` | WeavySubComponent |
| `dispatchAction` | Dispatch a \`wy-action\` event on the component.     | `detail: WyActionEventDetailType` | `boolean`                    | WeavySubComponent |

### Events

| Name             | Type                     | Description                      | Inherited From    |
| ---------------- | ------------------------ | -------------------------------- | ----------------- |
| `external-blobs` | `ExternalBlobsEventType` |                                  |                   |
| `ready`          | `CustomEvent`            | When the component has rendered. | WeavySubComponent |

### CSS Parts

| Name                      | Description                                |
| ------------------------- | ------------------------------------------ |
| `wy-cloud-files-overlay`  | The overlay modal.                         |
| `wy-cloud-files-progress` | Progress shown when the iframe is loading. |
| `wy-cloud-files-frame`    | The iframe for the Weavy filebrowser.      |

<details><summary>Private API</summary>

### Fields

| Name                | Privacy   | Type                                                  | Default                                                              | Description | Inherited From    |
| ------------------- | --------- | ----------------------------------------------------- | -------------------------------------------------------------------- | ----------- | ----------------- |
| `exportParts`       | protected |                                                       | `new ShadowPartsController(this)`                                    |             |                   |
| `#resolveContextId` | private   | `(contextId: ContextIdType) => void \| undefined`     |                                                                      |             | WeavySubComponent |
| `#whenContextId`    | private   |                                                       | `new Promise<ContextIdType>((r) => { this.#resolveContextId = r; })` |             | WeavySubComponent |
| `#resolveUser`      | private   | `(user: UserType) => void \| undefined`               |                                                                      |             | WeavySubComponent |
| `#whenUser`         | private   |                                                       | `new Promise<UserType>((r) => { this.#resolveUser = r; })`           |             | WeavySubComponent |
| `#resolveWeavy`     | private   | `(weavy: WeavyType) => void \| undefined`             |                                                                      |             | WeavySubComponent |
| `#whenWeavy`        | private   |                                                       | `new Promise<WeavyType>((r) => { this.#resolveWeavy = r; })`         |             | WeavySubComponent |
| `#resolveReady`     | private   | `(component: WeavySubComponent) => void \| undefined` |                                                                      |             | WeavySubComponent |
| `#whenReady`        | private   |                                                       | `new Promise<WeavySubComponent>((r) => { this.#resolveReady = r; })` |             | WeavySubComponent |

</details>

<hr/>

## Exports

| Kind                        | Name             | Declaration  | Module                           | Package |
| --------------------------- | ---------------- | ------------ | -------------------------------- | ------- |
| `js`                        | `WyCloudFiles`   | WyCloudFiles | lib/components/wy-cloud-files.ts |         |
| `custom-element-definition` | `wy-cloud-files` | WyCloudFiles | lib/components/wy-cloud-files.ts |         |
