ACS-7403: migrate site dropdown to standalone (#9847)

This commit is contained in:
Denys Vuika
2024-07-01 14:25:49 -04:00
committed by GitHub
parent 5fa3afe3a5
commit 0c4259cddf
28 changed files with 244 additions and 335 deletions

View File

@@ -1,11 +1,4 @@
---
Title: Sites Dropdown component
Added: v2.0.0
Status: Active
Last reviewed: 2018-11-19
---
# [Sites Dropdown component](../../../lib/content-services/src/lib/site-dropdown/sites-dropdown.component.ts "Defined in sites-dropdown.component.ts")
# Sites Dropdown component
Displays a dropdown menu to show and interact with the sites of the current user.
@@ -19,20 +12,24 @@ Displays a dropdown menu to show and interact with the sites of the current user
</adf-sites-dropdown>
```
## Class members
## API
```ts
import { SitesDropdownComponent } from '@alfresco/adf-content-services';
```
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| hideMyFiles | `boolean` | false | Hide the "My Files" option. |
| placeholder | `string` | | Text or a translation key to act as a placeholder. Default value is the key "DROPDOWN.PLACEHOLDER_LABEL". |
| relations | `string` | | Filter for the results of the sites query. Possible values are "members" and "containers". When "members" is used, the site list will be restricted to the sites that the user is a member of. |
| siteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | A custom list of sites to be displayed by the dropdown. If no value is given, the sites of the current user are displayed by default. A list of objects only with properties 'title' and 'guid' is enough to be able to display the dropdown. |
| value | `string` | null | Id of the selected site |
| Name | Type | Default value | Description |
|-------------|--------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| hideMyFiles | `boolean` | false | Hide the "My Files" option. |
| placeholder | `string` | | Text or a translation key to act as a placeholder. Default value is the key "DROPDOWN.PLACEHOLDER_LABEL". |
| relations | `string` | | Filter for the results of the sites query. Possible values are "members" and "containers". When "members" is used, the site list will be restricted to the sites that the user is a member of. |
| siteList | `SitePaging` | null | A custom list of sites to be displayed by the dropdown. If no value is given, the sites of the current user are displayed by default. A list of objects only with properties 'title' and 'guid' is enough to be able to display the dropdown. |
| value | `string` | null | Id of the selected site |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| change | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` | Emitted when the user selects a site. When the default option is selected, an empty model is emitted. |
| Name | Type | Description |
|--------|---------------------------|-------------------------------------------------------------------------------------------------------|
| change | `EventEmitter<SiteEntry>` | Emitted when the user selects a site. When the default option is selected, an empty model is emitted. |