[ACS-5645] updated the documentation

This commit is contained in:
Yasa-Nataliya
2023-10-09 20:23:58 +05:30
parent 67c3b88b02
commit f0de971e8e
3 changed files with 56 additions and 1 deletions
@@ -42,3 +42,32 @@ Component allows to both assign/unassign categories to content and create multip
| ---- | ---- | ----------- |
| categoriesChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Category`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/Category.md)`>` | Emitted when categories list changes. |
| categoryNameControlVisibleChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | Emitted when category name control visibility changes. |
## Method: `get isNameCategoryVisible(): boolean`
### Description
This method calculates and returns a boolean value indicating whether the category name control should be visible in the Categories Management Component. The visibility is determined by a specific condition based on the component's internal state.
### Return Value
- Type: `boolean`
- `true` if the category name control should be visible.
- `false` if the category name control should not be visible.
### Usage
You can access this method to determine the visibility of the category name control within the Categories Management Component. The method is used to control the display of the category name input field based on the following condition:
```typescript
return (!this.categoryNameControlVisible && this.categories?.length > 0) || this.categoryNameControlVisible;
```
## Method: `isCategoryEmpty(): boolean`
### Description
The `isCategoryEmpty` method is used within the Categories Management Component to determine whether the list of categories is empty. It returns a boolean value indicating the presence or absence of categories.
### Return Value
- Type: `boolean`
- `true` if the list of categories is not empty.
- `false` if the list of categories is empty.
### Usage
You can use this method to check whether there are categories present in the Categories Management Component. It's particularly useful when you need to conditionally display or hide elements based on the presence of categories.
@@ -37,3 +37,29 @@ Allows to create multiple tags. That component contains input and two lists. Top
| existingTagsPanelVisibilityChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | Emitted when bottom list is showing or hiding. |
| tagNameControlVisibleChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | Emitted when input is showing or hiding. |
| tagsChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string[]>` | Emitted when tags in top list are changed. |
## Method: `get isNameTagsVisible(): boolean`
### Description
The `isNameTagsVisible` method is used within the Tags Creator Component to determine whether the tag name control should be visible. It calculates a boolean value based on specific conditions that take into account the visibility of the tag name control and the presence of tags in the component.
### Return Value
- Type: `boolean`
- `true` if the tag name control should be visible.
- `false` if the tag name control should not be visible.
### Usage
You can use this method to control the visibility of the tag name input field within the Tags creator Component. It provides a way to dynamically show or hide the input field based on certain criteria.
## Method: `get isTagsEmpty(): boolean`
### Description
The `isTagsEmpty` method is a utility method used within the Tags creator Component to check whether the list of tags is empty or not. It returns a boolean value, indicating whether there are tags present in the component.
### Return Value
- Type: `boolean`
- `true` if the list of tags is not empty.
- `false` if the list of tags is empty.
### Usage
You can use this method to programmatically determine whether there are tags available in the Tags creator Component. It is particularly useful when you need to conditionally display messages, elements, or take specific actions based on the presence or absence of tags.