[MNT-22606] Add properties viewer as form widget (#7278)

* [MNT-22606] Add properties viewer as form widget

* [MNT-22606] Add documentation and fix the params accessor

* [MNT-22606] Fix unit tests

* [MNT-22606] Fix lint

* [MNT-22606] Fix lint

* [MNT-22606] Fix lint
This commit is contained in:
Pablo Martinez Garcia
2021-10-06 18:12:14 +02:00
committed by GitHub
parent dc133643c9
commit 5a2d27393d
12 changed files with 445 additions and 10 deletions

View File

@@ -454,10 +454,7 @@ for more information about installing and using the source code.
| [Form cloud component](process-services-cloud/components/form-cloud.component.md) | Shows a form from Process Services. | [Source](../lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts) |
| [Form Definition Selector Cloud](process-services-cloud/components/form-definition-selector-cloud.component.md) | Allows one form to be selected from a dropdown list. For forms to be displayed in this component they will need to be compatible with standAlone tasks. | [Source](../lib/process-services-cloud/src/lib/form/components/form-definition-selector-cloud.component.ts) |
| [Group Cloud component](process-services-cloud/components/group-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Searches Groups. | [Source](../lib/process-services-cloud/src/lib/group/components/group-cloud.component.ts) |
| [](process-services-cloud/components/people-cloud.component.md) | Title: People Cloud Component | |
Added: v3.0.0
Status: Experimental | [Source](<>) |
| [People Cloud Component](process-services-cloud/components/people-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Added: v3.0.0 | [Source](<>) |
| [Process Filters Cloud Component](process-services-cloud/components/process-filters-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Lists all available process filters and allows to select a filter. | [Source](../lib/process-services-cloud/src/lib/process/process-filters/components/process-filters-cloud.component.ts) |
| [Process Header Cloud Component](process-services-cloud/components/process-header-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows all the information related to a process instance. | [Source](../lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.ts) |
| [Process Instance List Cloud component](process-services-cloud/components/process-list-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Renders a list containing all the process instances matched by the parameters specified. | [Source](../lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.ts) |
@@ -504,6 +501,13 @@ Status: Experimental | [Source](<>) |
<!--process-services-cloud end-->
### Widgets
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [APA Properties Viewer Widget](process-services-cloud/widgets/properties-viewer.widget.md) | Display the metadata of the file selected in the linked attach widget. | [Source](../lib/process-services-cloud/src/lib/form/components/widgets/properties-viewer/properties-viewer.widget.ts) |
[(Back to Contents)](#contents)
## Extensions API

View File

@@ -0,0 +1,33 @@
---
Title: APA Properties Viewer Widget
Added: v4.7.0
Status: Active
---
# [APA Properties Viewer Widget](../../../lib/process-services-cloud/src/lib/form/components/widgets/properties-viewer/properties-viewer.widget.ts "Defined in properties-viewer.widget.ts")
It makes use of the [content metadata card](../../content-services/components/content-metadata-card.component.md "content-metadata-card") to display the properties of the selected file in an attach widget in a form.
## Basic Usage
This a form widget so it receives the [`FormFieldModel`](../../core/models/form-field.model.md) form the form renderer with the following meanings:
| Accessor | Type | Description |
| -------- | ---- | ----------- |
|`field.value`| `string` | The nodeId of the node which properties are going to be displayed |
|`field.params.propertiesViewerOptions` | `object` | An object containing all the [properties of the content metadata card](../../content-services/components/content-metadata-card.component.md#properties "content-metadata-card properties") |
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| field | `FormFieldModel` | | The field information |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| nodeContentLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when the properties to be displayed are retrieved from the content service. |
| fieldChanged | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the field changes |