[MNT-24660] version list action cannot be disabled using app conf (#10308)

* MNT-24660 Added possibility to hide and show viewing of versions when calling openUploadNewVersionDialog function

* MNT-24660 Unit tests

* MNT-24660 Allow to set allowVersionDelete and showActions by new version uploader service

* MNT-24660 Unit tests and documentation

* MNT-24660 Reformated documentation table

* MNT-24660 Fixed sonar issues

* MNT-24660 Fix sonar and additional fixes
This commit is contained in:
AleksanderSklorz
2024-10-21 15:16:20 +02:00
committed by GitHub
parent 1d739ed15a
commit 8ebb8d1b43
21 changed files with 579 additions and 218 deletions

View File

@@ -314,9 +314,10 @@ for more information about installing and using the source code.
| [Upload Drag Area Component](content-services/components/upload-drag-area.component.md) | Adds a drag and drop area to upload files to ACS. | [Source](../lib/content-services/src/lib/upload/components/upload-drag-area.component.ts) |
| [Upload Version Button Component (Workaround)](content-services/components/upload-version-button.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Activates a file version upload. | [Source](../lib/content-services/src/lib/upload/components/upload-version-button.component.ts) |
| [Version Comparison Component](content-services/components/version-comparison.component.md) | Displays the side by side comparison between the current target node (type, name, icon) and the new file that should update it's version. | [Source](../lib/content-services/src/lib/version-manager/version-comparison.component.ts) |
| [Version List component](content-services/components/version-list.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Displays the version history of a node in a Version Manager component. | [Source](../lib/content-services/src/lib/version-manager/version-list.component.ts) |
| [Version Manager Component](content-services/components/version-manager.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Displays the version history of a node with the ability to upload a new version. | [Source](../lib/content-services/src/lib/version-manager/version-manager.component.ts) |
| [Version List component](content-services/components/version-list.component.md) | Displays the version history of a node in a Version Manager component. | [Source](../lib/content-services/src/lib/version-manager/version-list.component.ts) |
| [Version Manager Component](content-services/components/version-manager.component.md) | Displays the version history of a node with the ability to upload a new version. | [Source](../lib/content-services/src/lib/version-manager/version-manager.component.ts) |
| [Version Upload component](content-services/components/version-upload.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Displays the new version's minor/major changes and the optional comment of a node in a Version Manager component. | [Source](../lib/content-services/src/lib/version-manager/version-upload.component.ts) |
| [New Version Uploader dialog](content-services/components/new-version-uploader.dialog.md) | Displays list of versions history of a node in a dialog. | [Source](../lib/content-services/src/lib/new-version-uploader/new-version-uploader.dialog.ts) |
### Directives

View File

@@ -0,0 +1,52 @@
---
Title: Version List component
Added: v4.1.1
Status: Active
Last reviewed: 2024-10-21
---
# [New Version Uploader dialog](../../../lib/content-services/src/lib/new-version-uploader/new-version-uploader.dialog.ts "Defined in new-version-uploader.dialog.ts")
Displays list of versions history of a node in a dialog.
![Version Manager](../../docassets/images/new-version-uploader.png)
### Basic Usage
```ts
this.dialog.open<NewVersionUploaderDialogComponent, NewVersionUploaderDialogData>(
NewVersionUploaderDialogComponent,
{
data: {
file,
node,
currentVersion: version,
showComments: true,
allowDownload: true,
showVersionsOnly: true,
allowViewVersions: true,
allowVersionDelete: true,
showActions: true
},
width: '630px'
}
)
```
## Class members
### Events
| Name | Type | Description |
|--------------|--------------------------------------------------------------------------------------|-----------------------------------|
| dialogAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<NewVersionUploaderData>` | Emitted when any action occurs. |
| uploadError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when upload error occurs. |
## Details
This component can be used by calling openUploadNewVersionDialog function of [New Version Uploader service](../services/new-version-uploader.dialog.service.md).
## See also
- [Version manager component](version-manager.component.md)
- [New Version Uploader service](../services/new-version-uploader.dialog.service.md)
- [Version List component](version-list.component.md)

View File

@@ -1,7 +1,7 @@
---
Title: Version List component
Added: v2.0.0
Status: Experimental
Status: Active
Last reviewed: 2019-01-16
---
@@ -19,21 +19,22 @@ Displays the version history of a node in a [Version Manager component](version-
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| allowViewVersions | `boolean` | true | Enable/disable viewing a version of the current node. |
| node | `Node` | | The target node. |
| showActions | `boolean` | true | Toggles showing/hiding of version actions |
| showComments | `boolean` | true | Toggles showing/hiding of comments |
| Name | Type | Default value | Description |
|--------------------|-----------|---------------|-----------------------------------------------------------|
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| allowViewVersions | `boolean` | true | Enable/disable viewing a version of the current node. |
| node | `Node` | | The target node. |
| showActions | `boolean` | true | Toggles showing/hiding of version actions |
| showComments | `boolean` | true | Toggles showing/hiding of comments |
| allowVersionDelete | `boolean` | true | Enable/disable deletion of version |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| deleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when a version is deleted |
| restored | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when a version is restored |
| viewVersion | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when viewing a version |
| Name | Type | Description |
|-------------|----------------------------------------------------------------------|------------------------------------|
| deleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when a version is deleted |
| restored | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when a version is restored |
| viewVersion | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when viewing a version |
## Details
@@ -49,3 +50,5 @@ If you want show readonly version list you set this component with showActions f
## See also
- [Version manager component](version-manager.component.md)
- [New Version Uploader service](../services/new-version-uploader.dialog.service.md)
- [New Version Uploader component](new-version-uploader.dialog.md)

View File

@@ -1,7 +1,7 @@
---
Title: Version Manager Component
Added: v2.0.0
Status: Experimental
Status: Active
Last reviewed: 2019-01-16
---
@@ -11,8 +11,6 @@ Displays the version history of a node with the ability to upload a new version.
![Version Manager](../../docassets/images/version-manager.png)
`This component is still in experimental phase. It has several limitations which will be resolved soon.`
## Basic Usage
```html
@@ -27,13 +25,16 @@ Displays the version history of a node with the ability to upload a new version.
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| newFileVersion | `File` | | New file for updating current version. |
| node | `Node` | | Target node to manage version history. |
| showComments | `boolean` | true | Toggles showing/hiding of comments. |
| showVersionComparison | `boolean` | false | Toggles showing/hiding the [version comparison component](../../content-services/components/version-comparison.component.md). |
| Name | Type | Default value | Description |
|-----------------------|-----------|---------------|-------------------------------------------------------------------------------------------------------------------------------|
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| newFileVersion | `File` | | New file for updating current version. |
| node | `Node` | | Target node to manage version history. |
| showComments | `boolean` | true | Toggles showing/hiding of comments. |
| showVersionComparison | `boolean` | false | Toggles showing/hiding the [version comparison component](../../content-services/components/version-comparison.component.md). |
| showActions | `boolean` | true | Toggles showing/hiding of version actions. |
| allowViewVersions | `boolean` | true | Enable/disable viewing versions of the current node. |
| allowVersionDelete | `boolean` | true | Enable/disable deletion of version |
### Events
@@ -50,11 +51,16 @@ Displays the version history of a node with the ability to upload a new version.
Each version has a context menu on the right, with the following actions.
| Action | Versions | Description |
| ------ | -------- | ----------- |
| Restore | All | Revert the current version to the selected one with creating a new version of it. |
| Action | Versions | Description |
|----------|----------|-----------------------------------------------------------------------------------|
| View | All | View selected version. |
| Restore | All | Revert the current version to the selected one with creating a new version of it. |
| Download | All | Download selected version. |
| Delete | All | Delete selected version. |
## See also
- [Version list component](version-list.component.md)
- [Document list component](document-list.component.md)
- [New Version Uploader service](../services/new-version-uploader.dialog.service.md)
- [New Version Uploader component](new-version-uploader.dialog.md)

View File

@@ -88,6 +88,6 @@ yourFunctionToOpenDialog(){
## See Also
- [Version list component](../components/docs/content-services/components/version-list.component.md)
- [Version Comparison Component](../components/docs/content-services/components/version-comparison.component.md)
- [Version Upload Component](../components/docs/content-services/components/version-upload.component.md)
- [Version list component](../components/version-list.component.md)
- [Version Comparison Component](../components/version-comparison.component.md)
- [Version Upload Component](../components/version-upload.component.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 97 KiB

View File

@@ -26,6 +26,7 @@ backend services have been tested with each released version of ADF.
- [v4.4.0](#v440)
- [v4.3.0](#v430)
- [v4.2.0](#v420)
- [v4.1.1](#v411)
- [v4.1.0](#v410)
- [v4.0.0](#v400)
- [v3.9.0](#v390)
@@ -196,6 +197,14 @@ backend services have been tested with each released version of ADF.
<!--v420 end-->
## v4.1.1
<!--v411 start-->
- [New version uploader dialog](content-services/components/new-version-uploader.dialog.md)
<!--v411 end-->
## v4.1.0
<!--v410 start-->