[ACS-5483] group details view general info and list of assigned users (#9329)

* ACS-5483 Added possibility to load and update group

* ACS-5483 Implemented unsaved changes dialog

* ACS-5483 Removed console log

* ACS-5483 Made dynamic chip list reusable

* ACS-5483 Fix for more than one row chips

* ACS-5483 Fix for pagination

* ACS-5483 Added some fixes

* ACS-5483 Fixed displaying tags for node

* ACS-5483 Renamed css classes

* ACS-5483 Fixed resizing when chips have pagination

* ACS-5483 Clearing code

* ACS-5483 Documentation for dynamic chip list component

* ACS-5483 Documentation for unsaved changes dialog and guard

* ACS-5483 Documentation for group service

* ACS-5483 Unit tests for GroupService

* ACS-5483 Unit tests for dynamic chip list component

* ACS-5483 Changed fdescribe to describe

* ACS-5483 Unit tests for tag node list component

* ACS-5483 Unit tests for unsaved changes dialog component

* ACS-5483 Unit tests for unsaved changes guard

* ACS-5483 Added description field to group models

* ACS-5483 Correction for updating with description

* ACS-5483 Fixed lint issues

* ACS-5483 Addressed PR comments

* ACS-5483 Reduced complexity

* ACS-5483 Reduced complexity

* ACS-5483 Addressed PR comments
This commit is contained in:
AleksanderSklorz
2024-02-15 13:02:24 +01:00
committed by GitHub
parent 8363d09e79
commit 213a73fc36
40 changed files with 1587 additions and 426 deletions

View File

@@ -93,6 +93,7 @@ for more information about installing and using the source code.
| [Comments Component](core/components/comments.component.md) | Displays comments from users involved in a specified environment and allows an involved user to add a comment to a environment. | [Source](../lib/core/src/lib/comments/comments.component.ts) |
| [Data Column Component](core/components/data-column.component.md) | Defines column properties for DataTable, Tasklist, Document List and other components. | [Source](../lib/core/src/lib/datatable/data-column/data-column.component.ts) |
| [DataTable component](core/components/datatable.component.md) | Displays data as a table with customizable columns and presentation. | [Source](../lib/core/src/lib/datatable/components/datatable/datatable.component.ts) |
| [Dynamic Chip List component](core/components/dynamic-chip-list.component.md) | This component shows dynamic list of chips which render depending on free space. | [Source](../lib/core/src/lib/dynamic-chip-list/dynamic-chip-list.component.ts) |
| [Empty Content Component](core/components/empty-content.component.md) | Provides a generic "Empty Content" placeholder for components. | [Source](../lib/core/src/lib/templates/empty-content/empty-content.component.ts) |
| [Empty list component](core/components/empty-list.component.md) | Displays a message indicating that a list is empty. | [Source](../lib/core/src/lib/datatable/components/empty-list/empty-list.component.ts) |
| [Error Content Component](core/components/error-content.component.md) | Displays info about a specific error. | [Source](../lib/core/src/lib/templates/error-content/error-content.component.ts) |
@@ -144,6 +145,7 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Edit JSON Dialog](core/dialogs/edit-json.dialog.md) | Allows a user to preview or edit a JSON content in a dialog. | [Source](../lib/testing/src/lib/core/dialog/edit-json-dialog.ts) |
| [Unsaved Changes Dialog](core/dialogs/unsaved-changes-dialog.component.md) | Dialog which informs about unsaved changes. Allows discard them and proceed or close dialog and stop proceeding. | [Source](../lib/core/src/lib/dialogs/unsaved-changes-dialog/unsaved-changes-dialog.component.ts) |
### Interfaces
@@ -238,6 +240,7 @@ The model to update the DataTable require the ID of the row you want change and
| [Storage service](core/services/storage.service.md) | Stores items in the form of key-value pairs. | [Source](../lib/core/src/lib/common/services/storage.service.ts) |
| [Thumbnail service](core/services/thumbnail.service.md) | Retrieves an SVG thumbnail image to represent a document type. | [Source](../lib/core/src/lib/common/services/thumbnail.service.ts) |
| [Translation service](core/services/translation.service.md) | Supports localisation. | [Source](../lib/core/src/lib/translation/translation.service.ts) |
| [Unsaved Changes guard](core/services/unsaved-changes.guard.md) | This guard prevents deactivating route if page has any unsaved changes. User needs intentionally discard changes through displayed modal to leave actual route. | [Source](../lib/core/src/lib/dialogs/unsaved-changes-dialog/unsaved-changes.guard.ts) |
| [Upload Service](core/services/upload.service.md) | Provides access to various APIs related to file upload features. | [Source](../lib/content-services/src/lib/common/services/upload.service.ts) |
| [User access service](core/services/user-access.service.md) | Checks the global and application access of a user | [Source](../lib/core/src/lib/auth/services/user-access.service.ts) |
| [User Preferences Service](core/services/user-preferences.service.md) | Stores preferences for the app and for individual components. | [Source](../lib/core/src/lib/common/services/user-preferences.service.ts) |
@@ -387,6 +390,7 @@ for more information about installing and using the source code.
| [Document Actions service](content-services/services/document-actions.service.md) | Implements the document menu actions for the Document List component. | [Source](../lib/content-services/src/lib/document-list/services/document-actions.service.ts) |
| [Document List service](content-services/services/document-list.service.md) | Implements node operations used by the Document List component. | [Source](../lib/content-services/src/lib/document-list/services/document-list.service.ts) |
| [Folder Actions service](content-services/services/folder-actions.service.md) | Implements the folder menu actions for the Document List component. | [Source](../lib/content-services/src/lib/document-list/services/folder-actions.service.ts) |
| [Group Service](content-services/services/group.service.md) | Manages groups. | [Source](../lib/content-services/src/lib/group/services/group.service.ts) |
| [New Version Uploader service](content-services/services/new-version-uploader.dialog.service.md) | Display a dialog that allows to upload new file version or to manage the current node versions. | [Source](../lib/content-services/src/lib/new-version-uploader/new-version-uploader.service.ts) |
| [Node Comments Service](content-services/services/node-comments.service.md) | Adds and retrieves comments for nodes in Content Services. | [Source](../lib/content-services/src/lib/node-comments/services/node-comments.service.ts) |
| [Node permission dialog service](content-services/services/node-permission-dialog.service.md) | Displays dialogs to let the user set node permissions. | [Source](../lib/content-services/src/lib/permission-manager/services/node-permission-dialog.service.ts) |

View File

@@ -33,7 +33,7 @@ Shows tags for a node.
| Name | Type | Description |
| ---- | ---- | ----------- |
| results | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when a tag is selected. |
| results | [`EventEmitter`](https://angular.io/api/core/EventEmitter)[`<TagEntry>`](../../../lib/js-api/src/api/content-rest-api/model/tagEntry.ts)`[]` | Emitted when a tag is selected. |
## Details
@@ -49,3 +49,7 @@ To limit number of tags initially displayed set `limitTagsDisplayed` to `true`.
```
Now when tag chips will exceed the size of the container number of displayed chips will be limited to as much as fits together with view more button. At least one tag will always be displayed, when one tag and view more button won't fit into one line the button will be displayed under the tag.
## See Also
- [Dynamic Chip List component](../../core/components/dynamic-chip-list.component.md)

View File

@@ -0,0 +1,25 @@
---
Title: Group Service
Added: v6.6.0
Status: Active
Last reviewed: 2024-02-07
---
# [Group Service](../../../lib/content-services/src/lib/group/services/group.service.ts "Defined in group.service.ts")
Manages groups.
## Class members
### Methods
- **getGroup**(id: `string`, opts?: [`ContentIncludeQuery`](../../../lib/js-api/src/api/content-rest-api/api/types.ts)): [`Observable`](https://rxjs.dev/guide/observable)`<`[`GroupEntry`](../../../lib/js-api/src/api/content-rest-api/model/groupEntry.ts)`>`<br/>
Returns group for specified id.
- _id:_ `string` - id of group to return.
- _opts:_ [`ContentIncludeQuery`](../../../lib/js-api/src/api/content-rest-api/api/types.ts) - additional query parameters.
- **Returns** [`Observable`](https://rxjs.dev/guide/observable)`<`[`GroupEntry`](../../../lib/js-api/src/api/content-rest-api/model/groupEntry.ts)`>` - group for specified id.
- **updateGroup**(group: [`Group`](../../../lib/js-api/src/api/content-rest-api/docs/Group.md), opts?: [`ContentIncludeQuery`](../../../lib/js-api/src/api/content-rest-api/api/types.ts)): [`Observable`](https://rxjs.dev/guide/observable)`<`[`GroupEntry`](../../../lib/js-api/src/api/content-rest-api/model/groupEntry.ts)`>`<br/>
Updates specified group.
- _group:_ [`Group`](../../../lib/js-api/src/api/content-rest-api/docs/Group.md) - group to update.
- _opts:_ [`ContentIncludeQuery`](../../../lib/js-api/src/api/content-rest-api/api/types.ts) - additional query parameters.
- **Returns** [`Observable`](https://rxjs.dev/guide/observable)`<`[`GroupEntry`](../../../lib/js-api/src/api/content-rest-api/model/groupEntry.ts)`>` - updated group.

View File

@@ -0,0 +1,57 @@
---
Title: Dynamic Chip List component
Added: v6.6.0
Status: Active
Last reviewed: 2024-02-06
---
# [Dynamic Chip List component](../../../lib/core/src/lib/dynamic-chip-list/dynamic-chip-list.component.ts "Defined in dynamic-chip-list.component.ts")
This component shows dynamic list of chips which render depending on free space.
![List of chips](../../docassets/images/dynamic-chip-list.png)
## Basic Usage
```html
<adf-dynamic-chip-list
[chips]="chips"
[limitChipsDisplayed]="true"
[showDelete]="true"
(displayNext)="onDisplayNext()"
(removedChip)="onRemovedChip($event)">
</adf-dynamic-chip-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
|---------------------|---------------------------------------------------------------------------------|---------------|---------------------------------------------|
| limitChipsDisplayed | `boolean` | false | Should limit number of chips displayed. |
| showDelete | `boolean` | true | Show delete button. |
| pagination | [`Pagination`](../../../lib/js-api/src/api/content-rest-api/docs/Pagination.md) | | Provide if you want to use paginated chips. |
| chips | [`Chip`](../../../lib/core/src/lib/dynamic-chip-list/chip.ts)`[]` | | List of chips to display. |
### Events
| Name | Type | Description |
|-------------|----------------------------------------------------------------------|-----------------------------------------------|
| displayNext | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<void>` | Emitted when button for view more is clicked. |
| removedChip | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when any chip is removed. |
## Details
### Limit number of chips displayed initially
To limit number of chips initially displayed set `limitChipsDisplayed` to `true`.
```html
<adf-dynamic-chip-list
[chips]="chips"
[limitChipsDisplayed]="true">
</adf-dynamic-chip-list>
```
Now when chips will exceed the size of the container number of displayed chips will be limited to as much as fits together with view more button. At least one chip will always be displayed, when one chip and view more button won't fit into one line the button will be displayed under the chip.

View File

@@ -0,0 +1,27 @@
---
Title: Unsaved Changes Dialog component
Added: v6.6.0
Status: Active
Last reviewed: 2024-02-06
---
# [Unsaved Changes Dialog component](../../../lib/core/src/lib/dialogs/unsaved-changes-dialog/unsaved-changes-dialog.component.ts "Defined in unsaved-changes-dialog.component.ts")
Dialog which informs about unsaved changes. Allows discard them and proceed or close dialog and stop proceeding.
![Unsaved Changes Dialog](../../docassets/images/unsaved-changes-dialog.png)
## Basic Usage
```ts
this.dialog.open(UnsavedChangesDialogComponent);
```
## Details
### Detecting if changes should be discarded.
To detect if changes should be discarded you need to check value passed on dialog's close. If value is true then changes should be discard, false otherwise.
## See also
- [Unsaved Changes guard](../services/unsaved-changes.guard.md)

View File

@@ -0,0 +1,22 @@
---
Title: Unsaved Changes guard
Added: v6.6.0
Status: Active
Last reviewed: 2024-02-06
---
# [Unsaved Changes guard](../../../lib/core/src/lib/dialogs/unsaved-changes-dialog/unsaved-changes.guard.ts "Defined in unsaved-changes.guard.ts")
This guard prevents deactivating route if page has any unsaved changes. User needs intentionally discard changes through displayed modal to leave actual route.
## Class members
### Methods
- **canDeactivate**(): `boolean` | [`Observable`](https://rxjs.dev/guide/observable)`<boolean>`<br/>
Allows to deactivate route when there is no unsaved changes, otherwise displays dialog to confirm discarding changes.
- **Returns** `boolean` | [`Observable`](https://rxjs.dev/guide/observable)`<boolean>` - true when there is no unsaved changes or changes can be discarded, false otherwise.
## See also
- [Unsaved Changes Dialog component](../dialogs/unsaved-changes-dialog.component.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@@ -12,6 +12,7 @@ backend services have been tested with each released version of ADF.
## Versions
- [v6.7.0](#v670)
- [v6.4.0](#v640)
- [v6.2.0](#v620)
- [v6.1.0](#v610)
@@ -44,6 +45,17 @@ backend services have been tested with each released version of ADF.
- [v2.1.0](#v210)
- [v2.0.0](#v200)
## v6.7.0
<!--670 start-->
- [Dynamic Chip List component](core/components/dynamic-chip-list.component.md)
- [Unsaved Changes Dialog component](core/dialogs/unsaved-changes-dialog.component.md)
- [Unsaved Changes guard](core/services/unsaved-changes.guard.md)
- [Group Service](content-services/services/group.service.md)
<!--670 end-->
## v6.4.0
<!--v640 start-->