mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4160] Fixed default props description for cont metadata card docs (#4445)
This commit is contained in:
committed by
Eugenio Romano
parent
e7197b9bd2
commit
48b685fe25
@@ -240,7 +240,6 @@ for more information about installing and using the source code.
|
||||
| [Breadcrumb Component](content-services/components/breadcrumb.component.md) | Indicates the current position within a navigation hierarchy. | [Source](../lib/content-services/breadcrumb/breadcrumb.component.ts) |
|
||||
| [Content Action component](content-services/components/content-action.component.md) | Adds options to a Document List actions menu for a particular content type. | [Source](../lib/content-services/document-list/components/content-action/content-action.component.ts) |
|
||||
| [Content Metadata Card component](content-services/components/content-metadata-card.component.md) | Displays and edits metadata related to a node. | [Source](../lib/content-services/content-metadata/components/content-metadata-card/content-metadata-card.component.ts) |
|
||||
| [Content Metadata Card component](content-services/components/content-metadata.component.md) | Displays and edits metadata related to a node. | [Source](../lib/content-services/content-metadata/components/content-metadata/content-metadata.component.ts) |
|
||||
| [Content Node Selector Panel component](content-services/components/content-node-selector-panel.component.md) | Opens a Content Node Selector in its own dialog window. | [Source](../lib/content-services/content-node-selector/content-node-selector-panel.component.ts) |
|
||||
| [Content Node Selector component](content-services/components/content-node-selector.component.md) | Allows a user to select items from a Content Services repository. | [Source](../lib/content-services/content-node-selector/content-node-selector.component.ts) |
|
||||
| [Document List component](content-services/components/document-list.component.md) | Displays the documents from a repository. | [Source](../lib/content-services/document-list/components/document-list.component.ts) |
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Title: Content Metadata Card component
|
||||
Added: v2.1.0
|
||||
Status: Active
|
||||
Last reviewed: 2019-01-16
|
||||
Last reviewed: 2019-03-15
|
||||
---
|
||||
|
||||
# [Content Metadata Card component](../../../lib/content-services/content-metadata/components/content-metadata-card/content-metadata-card.component.ts "Defined in content-metadata-card.component.ts")
|
||||
@@ -47,8 +47,8 @@ properties.
|
||||
### Application config presets
|
||||
|
||||
You can define different presets for the metadata component or override the default presets in
|
||||
the `app.config.json` file. The **default** preset is "\*" if not set, meaning the component
|
||||
will display every aspect and property of a node without filtering.
|
||||
the `app.config.json` file. If nothing else is set, the **default** preset is "\*",
|
||||
which will use the "indifferent" config described below.
|
||||
|
||||
You can define as many extra presets as you need for your components.
|
||||
|
||||
@@ -68,6 +68,10 @@ The default configuration behaves like the following:
|
||||
...
|
||||
```
|
||||
|
||||
This will display a default set of basic node properties: **name**, **title**,
|
||||
**creator**, **created date**, **size**, **modifier**, **modified date**,
|
||||
**mime type**, **author**, **description**.
|
||||
|
||||
#### Aspect oriented config
|
||||
|
||||
With this type of configuration you can "whitelist" aspects and properties for a preset, but everything will be grouped by aspects and there is no further way to group properties. Use a
|
||||
|
@@ -1,220 +0,0 @@
|
||||
---
|
||||
Title: Content Metadata Card component
|
||||
Added: v2.1.0
|
||||
Status: Active
|
||||
Last reviewed: 2019-01-16
|
||||
---
|
||||
|
||||
# [Content Metadata Card component](../../../lib/content-services/content-metadata/components/content-metadata/content-metadata.component.ts "Defined in content-metadata.component.ts")
|
||||
|
||||
Displays and edits metadata related to a node.
|
||||
|
||||

|
||||
|
||||
## Basic Usage
|
||||
|
||||
```html
|
||||
<adf-content-metadata-card
|
||||
[displayEmpty]="false"
|
||||
[toggleDisplayProperties]="displayDefaultProperties"
|
||||
[preset]="'*'"
|
||||
[node]="node">
|
||||
</adf-content-metadata-card>
|
||||
```
|
||||
|
||||
## Class members
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| displayDefaultProperties | `boolean` | true | Toggles whether the metadata properties should be shown |
|
||||
| displayEmpty | `boolean` | false | Toggles whether to display empty values in the card view |
|
||||
| editable | `boolean` | false | Toggles whether the edit button should be shown |
|
||||
| expanded | `boolean` | false | Toggles between expanded (ie, full information) and collapsed (ie, reduced information) in the display |
|
||||
| multi | `boolean` | false | The multi parameter of the underlying material expansion panel, set to true to allow multi accordion to be expanded at the same time |
|
||||
| node | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | (required) The node entity to fetch metadata about |
|
||||
| preset | `string` | | Name of the metadata preset, which defines aspects and their properties |
|
||||
|
||||
## Details
|
||||
|
||||
The component shows metadata related to a given node. It uses the
|
||||
[Card View component](../../core/components/card-view.component.md) to render the properties of metadata aspects.
|
||||
The different aspects and their properties to be shown can be configured as application config
|
||||
presets (see below). By default the component only shows the basic properties of the node.
|
||||
The user can click on the pencil icon at the bottom of the component to edit the metadata
|
||||
properties.
|
||||
|
||||
### Application config presets
|
||||
|
||||
You can define different presets for the metadata component or override the default presets in
|
||||
the `app.config.json` file. The **default** preset is "\*" if not set, meaning the component
|
||||
will display every aspect and property of a node without filtering.
|
||||
|
||||
You can define as many extra presets as you need for your components.
|
||||
|
||||
The example configurations below show the options in detail.
|
||||
|
||||
#### Indifferent config
|
||||
|
||||
The default configuration behaves like the following:
|
||||
|
||||
```json
|
||||
...
|
||||
"content-metadata": {
|
||||
"presets": {
|
||||
"default": "*"
|
||||
}
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
#### Aspect oriented config
|
||||
|
||||
With this type of configuration you can "whitelist" aspects and properties for a preset, but everything will be grouped by aspects and there is no further way to group properties. Use a
|
||||
[layout oriented configuration](#layout-oriented-config) if you want to define your own
|
||||
custom groups.
|
||||
|
||||
The default configuration shows every aspect but you can restrict it to just a small selection
|
||||
of aspects by "whitelisting" the ones you want in the `default` section. In the example below,
|
||||
just the `exif:exif` and `custom:aspect` aspects are whitelisted:
|
||||
|
||||
```json
|
||||
...
|
||||
"content-metadata": {
|
||||
"presets": {
|
||||
"default": {
|
||||
"custom:aspect": "*",
|
||||
"exif:exif": "*"
|
||||
}
|
||||
}
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
You can further restrict the whitelist to specific properties of one or more aspects by using
|
||||
an array of property names in place of the "\*" filter:
|
||||
|
||||
```json
|
||||
...
|
||||
"content-metadata": {
|
||||
"presets": {
|
||||
"default": {
|
||||
"custom:aspect": "*",
|
||||
"exif:exif": [ "exif:pixelXDimension", "exif:pixelYDimension"]
|
||||
}
|
||||
}
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
A final example shows the same process applied to a custom preset called "kitten-images":
|
||||
|
||||
```json
|
||||
...
|
||||
"content-metadata": {
|
||||
"presets": {
|
||||
"default": "*",
|
||||
"kitten-images": {
|
||||
"custom:aspect": "*",
|
||||
"exif:exif": [ "exif:pixelXDimension", "exif:pixelYDimension"]
|
||||
}
|
||||
}
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
### Layout oriented config
|
||||
|
||||
You can also go beyond the aspect oriented configuration if you need to configure the groups and properties in a more detailed way. With this type of configuration any property of any aspect/type
|
||||
can be "cherry picked" and grouped into an accordion drawer, along with a translatable title
|
||||
defined in the preset configuration.
|
||||
|
||||
#### Basic elements
|
||||
|
||||
The following config will produce one accordion group named "TRANSLATABLE_TITLE_FOR_GROUP_1",
|
||||
with all the properties from `custom:aspect` followed by the two properties (`exif:pixelXDimension`
|
||||
and `exif:pixelYDimension`) from the `exif:exif` aspect and then one property (`custom:myPropertyName`) from `custom:type`:
|
||||
|
||||
```json
|
||||
...
|
||||
"content-metadata": {
|
||||
"presets": {
|
||||
"kitten-images": [{
|
||||
"title": "TRANSLATABLE_TITLE_FOR_GROUP_1",
|
||||
"items": [
|
||||
{ "aspect": "custom:aspect", "properties": "*" },
|
||||
{ "aspect": "exif:exif", "properties": [ "exif:pixelXDimension", "exif:pixelYDimension"] },
|
||||
{ "type": "custom:type", "properties": [ "custom:myPropertyName" ] },
|
||||
]
|
||||
}]
|
||||
}
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
#### More complex example
|
||||
|
||||
A more complex config is shown in the example below:
|
||||
|
||||
```json
|
||||
"content-metadata": {
|
||||
"presets": {
|
||||
"kittens": [
|
||||
{
|
||||
"title": "GROUP-TITLE1-TRANSLATION-KEY",
|
||||
"items": [
|
||||
{
|
||||
"aspect": "exif:exif",
|
||||
"properties": "*"
|
||||
},
|
||||
{
|
||||
"aspect": "kitten:vet-records",
|
||||
"properties": [ "kitten:custom1", "kitten:custom3" ]
|
||||
},
|
||||
{
|
||||
"aspect": "owner:parameters",
|
||||
"properties": [ "owner:name" ]
|
||||
},
|
||||
{
|
||||
"type": "kitten:kitten",
|
||||
"properties": [ "kitten:name", "kitten:color" ]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "GROUP-TITLE2-TRANSLATION-KEY",
|
||||
"items": [
|
||||
{
|
||||
"aspect": "kitten:food",
|
||||
"properties": [ "kitten:favourite-food", "kitten:recommended-food" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The result of this config would be two accordion groups with the following properties:
|
||||
|
||||
| GROUP-TITLE1-TRANSLATION-KEY |
|
||||
| ---------------------------- |
|
||||
| exif:param1 |
|
||||
| exif:param2 |
|
||||
| ... |
|
||||
| exif:paramN |
|
||||
| kitten:custom1 |
|
||||
| kitten:custom3 |
|
||||
| owner:name |
|
||||
| kitten:name |
|
||||
| kitten:color |
|
||||
|
||||
| GROUP-TITLE2-TRANSLATION-KEY |
|
||||
| ---------------------------- |
|
||||
| kitten:favourite-food |
|
||||
| kitten:recommended-food |
|
||||
|
||||
## What happens when there is a whitelisted aspect in the config but the given node doesn't relate to that aspect
|
||||
|
||||
Nothing - since this aspect is not related to the node, it will simply be ignored and not
|
||||
displayed. The aspects to be displayed are calculated as an intersection of the preset's aspects and the aspects related to the node.
|
@@ -29,36 +29,38 @@ backend services have been tested with each released version of ADF.
|
||||
|
||||
<!--v300 start-->
|
||||
|
||||
- [App list cloud component](process-services-cloud/app-list-cloud.component.md)
|
||||
- [Apps process cloud service](process-services-cloud/apps-process-cloud.service.md)
|
||||
- [Dynamic component](extensions/dynamic.component.md)
|
||||
- [Edit process filter cloud component](process-services-cloud/edit-process-filter-cloud.component.md)
|
||||
- [Edit task filter cloud component](process-services-cloud/edit-task-filter-cloud.component.md)
|
||||
- [Extension service](extensions/extension.service.md)
|
||||
- [App list cloud component](process-services-cloud/components/app-list-cloud.component.md)
|
||||
- [Apps process cloud service](process-services-cloud/services/apps-process-cloud.service.md)
|
||||
- [Dynamic component](extensions/components/dynamic.component.md)
|
||||
- [Edit process filter cloud component](process-services-cloud/components/edit-process-filter-cloud.component.md)
|
||||
- [Edit task filter cloud component](process-services-cloud/components/edit-task-filter-cloud.component.md)
|
||||
- [Extension service](extensions/services/extension.service.md)
|
||||
- [File upload error pipe](content-services/pipes/file-upload-error.pipe.md)
|
||||
- [Format space pipe](core/pipes/format-space.pipe.md)
|
||||
- [Full name pipe](core/pipes/full-name.pipe.md)
|
||||
- [Group cloud component](process-services-cloud/group-cloud.component.md)
|
||||
- [Group cloud service](process-services-cloud/group-cloud.service.md)
|
||||
- [Group initial pipe](process-services-cloud/group-initial.pipe.md)
|
||||
- [Group cloud component](process-services-cloud/components/group-cloud.component.md)
|
||||
- [Group cloud service](process-services-cloud/services/group-cloud.service.md)
|
||||
- [Group initial pipe](process-services-cloud/pipes/group-initial.pipe.md)
|
||||
- [Icon component](core/components/icon.component.md)
|
||||
- [Identity user service](core/services/identity-user.service.md)
|
||||
- [Jwt helper service](core/services/jwt-helper.service.md)
|
||||
- [People cloud component](process-services-cloud/people-cloud.component.md)
|
||||
- [Process filter cloud service](process-services-cloud/process-filter-cloud.service.md)
|
||||
- [Process filters cloud component](process-services-cloud/process-filters-cloud.component.md)
|
||||
- [Process list cloud component](process-services-cloud/process-list-cloud.component.md)
|
||||
- [Process list cloud service](process-services-cloud/process-list-cloud.service.md)
|
||||
- [Start process cloud component](process-services-cloud/start-process-cloud.component.md)
|
||||
- [Start process cloud service](process-services-cloud/start-process-cloud.service.md)
|
||||
- [Start task cloud component](process-services-cloud/start-task-cloud.component.md)
|
||||
- [Start task cloud service](process-services-cloud/start-task-cloud.service.md)
|
||||
- [Task filter cloud service](process-services-cloud/task-filter-cloud.service.md)
|
||||
- [Task filters cloud component](process-services-cloud/task-filters-cloud.component.md)
|
||||
- [Task header cloud component](process-services-cloud/task-header-cloud.component.md)
|
||||
- [Task header cloud service](process-services-cloud/task-header-cloud.service.md)
|
||||
- [Task list cloud component](process-services-cloud/task-list-cloud.component.md)
|
||||
- [Task list cloud service](process-services-cloud/task-list-cloud.service.md)
|
||||
- [People cloud component](process-services-cloud/components/people-cloud.component.md)
|
||||
- [Process filter cloud service](process-services-cloud/services/process-filter-cloud.service.md)
|
||||
- [Process filters cloud component](process-services-cloud/components/process-filters-cloud.component.md)
|
||||
- [Process header cloud component](process-services-cloud/components/process-header-cloud.component.md)
|
||||
- [Process header cloud service](process-services-cloud/services/process-header-cloud.service.md)
|
||||
- [Process list cloud component](process-services-cloud/components/process-list-cloud.component.md)
|
||||
- [Process list cloud service](process-services-cloud/services/process-list-cloud.service.md)
|
||||
- [Start process cloud component](process-services-cloud/components/start-process-cloud.component.md)
|
||||
- [Start process cloud service](process-services-cloud/services/start-process-cloud.service.md)
|
||||
- [Start task cloud component](process-services-cloud/components/start-task-cloud.component.md)
|
||||
- [Start task cloud service](process-services-cloud/services/start-task-cloud.service.md)
|
||||
- [Task filter cloud service](process-services-cloud/services/task-filter-cloud.service.md)
|
||||
- [Task filters cloud component](process-services-cloud/components/task-filters-cloud.component.md)
|
||||
- [Task header cloud component](process-services-cloud/components/task-header-cloud.component.md)
|
||||
- [Task header cloud service](process-services-cloud/services/task-header-cloud.service.md)
|
||||
- [Task list cloud component](process-services-cloud/components/task-list-cloud.component.md)
|
||||
- [Task list cloud service](process-services-cloud/services/task-list-cloud.service.md)
|
||||
- [Tree view component](content-services/components/tree-view.component.md)
|
||||
|
||||
<!--v300 end-->
|
||||
@@ -193,7 +195,6 @@ backend services have been tested with each released version of ADF.
|
||||
<!--v210 start-->
|
||||
|
||||
- [Content metadata card component](content-services/components/content-metadata-card.component.md)
|
||||
- [Content metadata component](content-services/components/content-metadata.component.md)
|
||||
- [Content node dialog service](content-services/services/content-node-dialog.service.md)
|
||||
- [Content node selector panel component](content-services/components/content-node-selector-panel.component.md)
|
||||
- [Search configuration service](core/services/search-configuration.service.md)
|
||||
@@ -215,9 +216,9 @@ backend services have been tested with each released version of ADF.
|
||||
|
||||
- [Activiti alfresco service](core/services/activiti-alfresco.service.md)
|
||||
- [Alfresco api service](core/services/alfresco-api.service.md)
|
||||
- [Analytics generator component](insights/analytics-generator.component.md)
|
||||
- [Analytics report list component](insights/analytics-report-list.component.md)
|
||||
- [Analytics component](insights/analytics.component.md)
|
||||
- [Analytics generator component](insights/components/analytics-generator.component.md)
|
||||
- [Analytics report list component](insights/components/analytics-report-list.component.md)
|
||||
- [Analytics component](insights/components/analytics.component.md)
|
||||
- [App config service](core/services/app-config.service.md)
|
||||
- [Apps list component](process-services/components/apps-list.component.md)
|
||||
- [Apps process service](core/services/apps-process.service.md)
|
||||
@@ -248,7 +249,7 @@ backend services have been tested with each released version of ADF.
|
||||
- [Data column component](core/components/data-column.component.md)
|
||||
- [Datatable component](core/components/datatable.component.md)
|
||||
- [Deleted nodes api service](core/services/deleted-nodes-api.service.md)
|
||||
- [Diagram component](insights/diagram.component.md)
|
||||
- [Diagram component](insights/components/diagram.component.md)
|
||||
- [Discovery api service](core/services/discovery-api.service.md)
|
||||
- [Document actions service](content-services/services/document-actions.service.md)
|
||||
- [Document list component](content-services/components/document-list.component.md)
|
||||
@@ -360,7 +361,7 @@ backend services have been tested with each released version of ADF.
|
||||
- [Version manager component](content-services/components/version-manager.component.md)
|
||||
- [Viewer component](core/components/viewer.component.md)
|
||||
- [Webscript component](content-services/components/webscript.component.md)
|
||||
- [Widget component](insights/widget.component.md)
|
||||
- [Widget component](insights/components/widget.component.md)
|
||||
|
||||
<!--v200 end-->
|
||||
|
||||
|
Reference in New Issue
Block a user