diff --git a/docs/extensions/components/preview-extension.component.md b/docs/extensions/components/preview-extension.component.md index a90d7313ee..4b0f275ff5 100644 --- a/docs/extensions/components/preview-extension.component.md +++ b/docs/extensions/components/preview-extension.component.md @@ -2,12 +2,12 @@ Title: Preview Extension Component Added: v3.1.0 Status: Experimental -Last reviewed: 2018-04-12 +Last reviewed: 2019-03-15 --- # [Preview Extension component](../../../lib/extensions/src/lib/components/viewer/preview-extension.component.ts "Defined in preview-extension.component.ts") -Displays dynamically-loaded extension components. +Supports dynamically-loaded viewer preview extensions. See the [ACA monaco extension](https://github.com/eromano/aca-monaco-extension) for an example of a real working viewer extension project. @@ -18,16 +18,16 @@ an example of a real working viewer extension project. | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | -| extension | `string` | | | -| id | `string` | | | -| node | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | of the content to display | -| url | `string` | | URL Of the content in the repository | +| extension | `string` | | File extension (.jpg, .png, etc) for the viewer. | +| id | `string` | | ID string of the component to preview. | +| node | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) | | [Node](https://github.com/Alfresco/alfresco-js-api/blob/development/src/api/content-rest-api/docs/Node.md) containing the content to display. | +| url | `string` | | URL of the content in the repository. | ## Details -If you want create your custom extension viewer you need to create the following files in a separate project: +To create your custom extension viewer you need to create the following files in a separate project: -The Module needs to know which is the Id of your extension: +The Module needs to declare the ID of your extension: ```ts export class YourExtensionViewerModule { @@ -39,7 +39,8 @@ export class YourExtensionViewerModule { } ``` -Your [viewer component](../../core/components/viewer.component.md) extension business logic: +Your [viewer component](../../core/components/viewer.component.md) extension contains +the business logic: ```ts import { Node } from '@alfresco/js-api'; @@ -66,13 +67,15 @@ export class YourExtensionViewerComponent implements ViewerExtensionInterface { } ``` -Your [viewer component](../../core/components/viewer.component.md) template: +The [viewer component](../../core/components/viewer.component.md) +also needs an HTML template (which is referenced by the `templateUrl` property +in the `@Component` decorator of the component class above): ```HTML
This is your custom extension viewer template
``` -Your [viewer component](../../core/components/viewer.component.md) extension.json: +You also need to provide a [viewer component](../../core/components/viewer.component.md)`extension.json` file containing its details: ```JSON { @@ -93,6 +96,10 @@ Your [viewer component](../../core/components/viewer.component.md) extension.jso } ``` +See the [App extensions](../../user-guide/app-extensions.md) page for +further details of how to develop extensions. + ## See also - [Extension service](../services/extension.service.md) +- [App extensions](../../user-guide/app-extensions.md) diff --git a/docs/process-services-cloud/components/process-header-cloud.component.md b/docs/process-services-cloud/components/process-header-cloud.component.md index 3f4e9b2942..5914593f4c 100644 --- a/docs/process-services-cloud/components/process-header-cloud.component.md +++ b/docs/process-services-cloud/components/process-header-cloud.component.md @@ -2,7 +2,7 @@ Title: Process Header Cloud Component Added: v3.0.0 Status: Experimental -Last reviewed: 2019-03-08 +Last reviewed: 2019-03-15 --- # [Process Header Cloud Component](../../../lib/process-services-cloud/src/lib/process/process-header/components/process-header-cloud.component.ts "Defined in process-header-cloud.component.ts") @@ -32,7 +32,7 @@ Shows all the information related to a process instance. ## Details The component populates an internal array of -[`CardViewModel`](../../core/components/card-view.component.md) with the information that we want to display. +[`CardViewModel`](../../core/components/card-view.component.md) with the information to display. By default all properties are displayed: @@ -49,3 +49,7 @@ However, you can also choose which properties to show using a configuration in ` ``` With this configuration, only the four listed properties will be shown. + +## See also + +- [Process header cloud service](../../process-services-cloud/services/process-header-cloud.service.md) diff --git a/docs/process-services-cloud/services/process-header-cloud.service.md b/docs/process-services-cloud/services/process-header-cloud.service.md index fad2158ce6..381fc9a2ae 100644 --- a/docs/process-services-cloud/services/process-header-cloud.service.md +++ b/docs/process-services-cloud/services/process-header-cloud.service.md @@ -2,7 +2,7 @@ Title: Process Header Cloud Service Added: v3.0.0 Status: Experimental -Last reviewed: 2019-03-08 +Last reviewed: 2019-03-15 --- # [Process Header Cloud Service](../../../lib/process-services-cloud/src/lib/process/process-header/services/process-header-cloud.service.ts "Defined in process-header-cloud.service.ts") @@ -29,3 +29,4 @@ but they use the cloud variants of the classes for return values. See the ## See also - [Process list Cloud Service](process-list-cloud.service.md) +- [Process header cloud component](../../process-services-cloud/components/process-header-cloud.component.md) diff --git a/lib/extensions/src/lib/components/viewer/preview-extension.component.ts b/lib/extensions/src/lib/components/viewer/preview-extension.component.ts index 43eedff097..5ad3d189ef 100644 --- a/lib/extensions/src/lib/components/viewer/preview-extension.component.ts +++ b/lib/extensions/src/lib/components/viewer/preview-extension.component.ts @@ -39,15 +39,19 @@ export class PreviewExtensionComponent implements OnInit, OnChanges, OnDestroy { @ViewChild('content', { read: ViewContainerRef }) content: ViewContainerRef; + /** ID string of the component to preview. */ @Input() id: string; + /** URL of the content in the repository. */ @Input() url: string; + /** File extension (.jpg, .png, etc) for the viewer. */ @Input() extension: string; + /** Node containing the content to display. */ @Input() node: Node;