[ADF-1769] Added JSDocs and prop tables (#2913)

This commit is contained in:
Andy Stark 2018-02-05 19:05:48 +00:00 committed by Eugenio Romano
parent b232d05c4f
commit 03cca19599
22 changed files with 302 additions and 166 deletions

View File

@ -12,33 +12,36 @@ Shows the details of the task id passed in input
### Properties
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| taskId | string | | (**required**) The id of the task details that we are asking for. |
| showNextTask | boolean | true | Automatically render the next one, when the task is completed. |
| showFormTitle | boolean | true | Toggle rendering of the form title. |
| readOnlyForm | boolean | false | Toggle readonly state of the form. Enforces all form widgets render readonly if enabled. |
| showFormRefreshButton | boolean | true | Toggle rendering of the `Refresh` button. |
| showFormSaveButton | boolean | true| Toggle rendering of the `Save` outcome button. |
| showFormCompleteButton | boolean | true | Toggle rendering of the Form `Complete` outcome button |
| peopleIconImageUrl | string | | Define a custom people icon image |
| showHeader | boolean | true | Toggle task details Header component |
| showHeaderContent | boolean | true | Toggle collapsed/expanded state of the Header component |
| showInvolvePeople | boolean | true | Toggle `Involve People` feature for Header component |
| showComments | boolean | true | Toggle `Comments` feature for Header component |
| showChecklist | boolean | true | Toggle `Checklist` feature for Header component |
| fieldValidators | FormFieldValidator[] | [] | Field validators for use with the form. |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| debugMode | `boolean` | `false` | Toggles debug mode. |
| taskId | `string` | | (**required**) The id of the task whose details we are asking for. |
| showNextTask | `boolean` | `true` | Automatically renders the next task when the current one is completed. |
| showHeader | `boolean` | `true` | Toggles task details Header component. |
| showHeaderContent | `boolean` | `true` | Toggles collapsed/expanded state of the Header component. |
| showInvolvePeople | `boolean` | `true` | Toggles `Involve People` feature for the Header component. |
| showComments | `boolean` | `true` | Toggles `Comments` feature for the Header component. |
| showChecklist | `boolean` | `true` | Toggles `Checklist` feature for the Header component. |
| showFormTitle | `boolean` | `true` | Toggles rendering of the form title. |
| showFormCompleteButton | `boolean` | `true` | Toggles rendering of the `Complete` outcome button. |
| showFormSaveButton | `boolean` | `true` | Toggles rendering of the `Save` outcome button. |
| readOnlyForm | `boolean` | `false` | Toggles read-only state of the form. All form widgets render as read-only if enabled. |
| showFormRefreshButton | `boolean` | `true` | Toggles rendering of the `Refresh` button. |
| fieldValidators | `any[]` | `[]` | Field validators for use with the form. |
### Events
| Name | Description |
| --- | --- |
| formLoaded | Raised when form is loaded or reloaded. |
| formSaved | Raised when form is submitted with `Save` or custom outcomes. |
| formCompleted | Raised when form is submitted with `Complete` outcome. |
| taskCreated | Raised when a checklist task is created. |
| executeOutcome | Raised when any outcome is executed, default behaviour can be prevented via `event.preventDefault()` |
| error | Raised at any error |
| Name | Type | Description |
| ---- | ---- | ----------- |
| formSaved | `EventEmitter<any>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| formCompleted | `EventEmitter<any>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | `EventEmitter<any>` | Emitted when the form field content is clicked. |
| formLoaded | `EventEmitter<any>` | Emitted when the form is loaded or reloaded. |
| taskCreated | `EventEmitter<TaskDetailsModel>` | Emitted when a checklist task is created. |
| taskDeleted | `EventEmitter<string>` | Emitted when a checklist task is deleted. |
| error | `EventEmitter<any>` | Emitted when an error occurs. |
| executeOutcome | `EventEmitter<any>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| assignTask | `EventEmitter<void>` | Emitted when a task is assigned. |
## Details

View File

@ -10,22 +10,20 @@ Shows all available filters.
### Properties
| Name | Type | Description |
| ---- | ---- | ----------- |
| filterParam | [FilterParamsModel](#filterparamsmodel) | The params to filter the task filter. If there is no match the default one (first filter of the list) is selected |
| appId | string | Display filters available to the current user for the application with the specified ID. |
| `appName` | string | Display filters available to the current user for the application with the specified name. |
| `hasIcon` | boolean | Toggle to show or not the filter's icon. |
If both `appId` and `appName` are specified then `appName` will take precedence and `appId` will be ignored.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| filterParam | `FilterParamsModel` | | Parameters to use for the task filter. If there is no match then the default filter (the first one the list) is selected. |
| appId | `number` | | Display filters available to the current user for the application with the specified ID. |
| appName | `string` | | Display filters available to the current user for the application with the specified name. |
| hasIcon | `boolean` | `true` | Toggles display of the filter's icon. |
### Events
| Name | Description |
| ---- | ----------- |
| filterClick | Raised when the filter in the list is clicked |
| success | Raised when the list is loaded |
| error | Raised if there is an error during the loading |
| Name | Type | Description |
| ---- | ---- | ----------- |
| filterClick | `EventEmitter<FilterRepresentationModel>` | Emitted when a filter in the list is clicked. |
| success | `EventEmitter<any>` | Emitted when the list is loaded. |
| error | `EventEmitter<any>` | Emitted when an error occurs during loading. |
## Details

View File

@ -14,17 +14,17 @@ Shows all the information related to a task.
### Properties
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| taskDetails | [TaskDetailsModel](task-details.model.md) | | (**required**) Details related to the task. |
| formName | string | | The name of the form. |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| formName | `string` | `null` | The name of the form. |
| taskDetails | `TaskDetailsModel` | | (required) Details related to the task. |
### Events
| Name | Description |
| ---- | ----------- |
| claim | Raised when the task is claimed. |
| unclaim | Raised when the task is unclaimed (requeued). |
| Name | Type | Description |
| ---- | ---- | ----------- |
| claim | `EventEmitter<any>` | Emitted when the task is claimed. |
| unclaim | `EventEmitter<any>` | Emitted when the task is unclaimed (ie, requeued). |
## Details

View File

@ -19,10 +19,10 @@ Simple container for headers, titles, actions and breadcrumbs.
### Properties
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| title | string | | Toolbar title |
| color | string | | Toolbar color, can be changed to empty value (default), `primary`, `accent` or `warn`. |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| title | `string` | `''` | Toolbar title. |
| color | `string` | | Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. |
## Details

View File

@ -18,24 +18,26 @@ Activates a file upload.
### Properties
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| disabled | boolean | false | Toggle component disabled state if there is no node permission checking |
| uploadFolders | boolean | false | Allow/disallow upload folders (only for Chrome) |
| multipleFiles | boolean | false | Allow/disallow multiple files |
| acceptedFilesType | string | * | array of allowed file extensions , example: ".jpg,.gif,.png,.svg" |
| maxFilesSize | number | | if defined allow to upload files only with this max file size. the size of a file is in bytes |
| rootFolderId | string | '-root-' | The ID of the root. It can be the nodeId if you are using the upload for the Content Service or taskId/processId for the Process Service. |
| versioning | boolean | false | Versioning false is the default uploader behaviour and it renames the file using an integer suffix if there is a name clash. Versioning true to indicate that a major version should be created |
| staticTitle | string | (predefined) | define the text of the upload button |
| tooltip | string | | Custom tooltip |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| disabled | `boolean` | `false` | Toggles component disabled state (if there is no node permission checking). |
| uploadFolders | `boolean` | `false` | Allows/disallows upload folders (only for Chrome). |
| multipleFiles | `boolean` | `false` | Allows/disallows multiple files |
| versioning | `boolean` | `false` | Toggles versioning. |
| acceptedFilesType | `string` | `'*'` | List of allowed file extensions, for example: ".jpg,.gif,.png,.svg". |
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
| staticTitle | `string` | | Defines the text of the upload button. |
| tooltip | `string` | `null` | Custom tooltip text. |
| rootFolderId | `string` | `'-root-'` | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
### Events
| Name | Description |
| --- | --- |
| success | Raised when the file is uploaded |
| permissionEvent | permissionEvent that is raised when the delete permission is missing |
| Name | Type | Description |
| ---- | ---- | ----------- |
| success | `EventEmitter<{}>` | Emitted when the file is uploaded successfully. |
| error | `EventEmitter<{}>` | Emitted when an error occurs. |
| createFolder | `EventEmitter<{}>` | Emitted when a folder is created. |
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. |
## Details

View File

@ -10,16 +10,16 @@ Shows user information.
### Properties
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| ecmBackgroundImage | string | (alfresco image) | Custom path for the background banner image for ECM users |
| bpmBackgroundImage | string | (alfresco image) | Custom path for the background banner image for BPM users |
| menuPositionX | string | | Custom choice for opening the menu bottom : `before` or `after` |
| menuPositionY | string | | Custom choice for opening the menu bottom : `above` or `below` |
| namePosition | string | `right` | When the username is showed this define his position relatively the user info button. It can be two values : `right` or `left` |
| showName | boolean | true | Show/Hide the username next the user info button |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| ecmBackgroundImage | `string` | `'./assets/images/ecm-background.png'` | Custom path for the background banner image for ACS users. |
| bpmBackgroundImage | `string` | `'./assets/images/bpm-background.png'` | Custom path for the background banner image for APS users. |
| menuPositionX | `string` | `'after'` | Custom choice for opening the menu at the bottom. Can be `before` or `after`. |
| menuPositionY | `string` | `'below'` | Custom choice for opening the menu at the bottom. Can be `above` or `below`. |
| showName | `boolean` | `true` | Shows/hides the username next to the user info button. |
| namePosition | `string` | `'right'` | When the username is shown, this defines its position relative to the user info button. Can be `right` or `left`. |
## Details
This will show a round icon with user and on click some user information.
If user is logged in with ECM and BPM the ECM image will be shown.
If user is logged in with both ACS and APS, the ACS image will be shown.

View File

@ -10,9 +10,9 @@ Displays the version history of a node in a [Version Manager component](version-
### Properties
| Name | Type | Description |
| ---- | ---- | ----------- |
| id | string | The node id you want to see the version history of. |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| id | `string` | | ID of the node whose version history you want to display. |
## Details

View File

@ -14,9 +14,9 @@ Displays the version history of a node with the ability to upload a new version.
### Properties
| Name | Type | Description |
| ---- | ---- | ----------- |
| node | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | The node you want to manage the version history of. |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| node | `MinimalNodeEntryEntity` | | The node whose version history you want to manage. |
## Details

View File

@ -46,46 +46,51 @@ Using with file url:
### Properties
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| fileNodeId | string | | Node Id of the file to load |
| sharedLinkId | string | | Shared link id (to display shared file) |
| urlFile | string | | If you want to load an external file that does not come from ECM you can use this Url where to load the file |
| urlFileViewer | string | null | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. |
| urlBlob | Blob | | If you want to load a Blob File |
| overlayMode | boolean | false | If `true` show the Viewer full page over the present content otherwise will fit the parent div |
| showViewer | boolean | true | Hide or show the viewer |
| showToolbar | boolean | true | Hide or show the toolbar |
| displayName | string | | You can specify the name of the file |
| allowGoBack | boolean | true | Allow `back` navigation |
| allowDownload | boolean | true | Toggle download feature |
| allowPrint | boolean | false | Toggle printing feature |
| allowShare | boolean | false | Toggle sharing feature |
| allowSidebar | boolean | false | Toggle sidebar feature |
| showSidebar | boolean | false | Toggles sidebar visibility. Requires `allowSidebar` to be set to `true`. |
| sidebarPosition | string | right | The position of the sidebar. Can be `left` or `right`. |
| sidebarTemplate | TemplateRef<any> | null | The template intended to be used as a sidebar. The template context contains the loaded node data. |
| allowNavigate | boolean | false | Toggle before/next navigation, arrow buttons to navigate between multiple documents in the collection. |
| canNavigateBefore | boolean | true | Toggle the "before" ("<") button. Requires `allowNavigate` to be enabled. |
| canNavigateNext | boolean | true | Toggle the next (">") button. Requires `allowNavigate` to be enabled.|
| allowFullScreen | boolean | true | Toggle the 'Full Screen' feature. |
| maxRetries | number | 5 | Number of times the Viewer will retry fetching content Rendition. Retries have at least 1 second delay in between. |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| urlFile | `string` | `''` | If you want to load an external file that does not come from ACS you can use this URL to specify where to load the file from. |
| urlFileViewer | `string` | `null` | Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`). Used when `urlFile` has no filename and extension. |
| blobFile | `Blob` | | Loads a Blob File |
| fileNodeId | `string` | `null` | Node Id of the file to load. |
| sharedLinkId | `string` | `null` | Shared link id (to display shared file). |
| overlayMode | `boolean` | `false` | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. |
| showViewer | `boolean` | `true` | Hide or show the viewer |
| showToolbar | `boolean` | `true` | Hide or show the toolbar |
| displayName | `string` | | Specifies the name of the file when it is not available from the URL. |
| allowGoBack | `boolean` | `true` | Allows `back` navigation |
| allowDownload | `boolean` | `true` | Toggles downloading. |
| allowPrint | `boolean` | `false` | Toggles printing. |
| allowShare | `boolean` | `false` | Toggles sharing. |
| allowFullScreen | `boolean` | `true` | Toggles the 'Full Screen' feature. |
| allowNavigate | `boolean` | `false` | Toggles before/next navigation. You can use the arrow buttons to navigate between documents in the collection. |
| canNavigateBefore | `boolean` | `true` | Toggles the "before" ("&lt;") button. Requires `allowNavigate` to be enabled. |
| canNavigateNext | `boolean` | `true` | Toggles the next (">") button. Requires `allowNavigate` to be enabled. |
| allowSidebar | `boolean` | `false` | Toggles the sidebar. |
| showSidebar | `boolean` | `false` | Toggles sidebar visibility. Requires `allowSidebar` to be set to `true`. |
| sidebarPosition | `string` | `'right'` | The position of the sidebar. Can be `left` or `right`. |
| sidebarTemplate | `TemplateRef<any>` | `null` | The template for the sidebar. The template context contains the loaded node data. |
| mimeType | `string` | | MIME type of the file content (when not determined by the filename extension). |
| fileName | `string` | | Content filename. |
| downloadUrl | `string` | `null` | URL to download. |
| maxRetries | `number` | `5` | Number of times the Viewer will retry fetching content Rendition. There is a delay of at least one second between attempts. |
### Events
| Name | Argument Type | Cancelable | Description |
| ---- | ------------- | ---------- | ----------- |
| goBack | any | Yes | Raised when user clicks the 'Back' button. |
| download | any | Yes | Raised when user clicks the 'Download' button. |
| print | any | Yes | Raised when user clicks the 'Print' button. |
| share | any | Yes | Raised when user clicks the 'Share' button. |
| navigateBefore | any | No | Raised when user clicks 'Navigate Before' ("<") button. |
| navigateNext | any | No | Raised when user clicks 'Navigate Next' (">") button. |
| Name | Type | Description |
| ---- | ---- | ----------- |
| goBack | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Back' button. |
| download | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Download' button. |
| print | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Print' button. |
| share | `EventEmitter<BaseEvent<any>>` | Emitted when user clicks the 'Share' button. |
| showViewerChange | `EventEmitter<boolean>` | Emitted when the viewer is shown or hidden. |
| extensionChange | `EventEmitter<string>` | Emitted when the filename extension changes. |
| navigateBefore | `EventEmitter<{}>` | Emitted when user clicks 'Navigate Before' ("&lt;") button. |
| navigateNext | `EventEmitter<{}>` | Emitted when user clicks 'Navigate Next' (">") button. |
### Keyboard shortcuts
| Name | Description |
| --- | --- |
| ---- | ----------- |
| Esc | Close the viewer (overlay mode only). |
| Left | Invoke 'Navigate before' action. |
| Right | Invoke 'Navigate next' action. |
@ -148,31 +153,31 @@ The Viewer component consists of separate Views that handle particular types of
- PDF View
- application/pdf
- *.pdf
- \*.pdf
- Image View
- image/png
- image/jpeg
- image/gif
- image/bmp
- image/svg+xml
- *.png
- *.jpg
- *.jpeg
- *.gif
- *.bpm
- *.svg
- \*.png
- \*.jpg
- \*.jpeg
- \*.gif
- \*.bpm
- \*.svg
- Text View
- text/plain
- text/csv
- text/xml
- text/html
- application/x-javascript
- *.txt
- *.xml
- *.js
- *.html
- *.json
- *.ts
- \*.txt
- \*.xml
- \*.js
- \*.html
- \*.json
- \*.ts
- Media View
- video/mp4
- video/webm
@ -180,11 +185,11 @@ The Viewer component consists of separate Views that handle particular types of
- audio/mpeg
- audio/ogg
- audio/wav
- *.wav
- *.mp4
- *.mp3
- *.webm
- *.ogg
- \*.wav
- \*.mp4
- \*.mp3
- \*.webm
- \*.ogg
### Content Renditions

View File

@ -42,24 +42,20 @@ export class AppComponent {
### Properties
| Attribute | Type | Default | Description |
| --------- | ---- | ------- | ----------- |
| scriptPath | string | | (**mandatory**) path to Web Script (as defined by Web Script) |
| scriptArgs | Object | | arguments to pass to Web Script |
| contextRoot | string | | path where application is deployed |
| scriptPath | string | alfresco | path to Web Script (as defined by Web Script) |
| contentType | string | service | path where Web Script service is mapped default value |
| contentType | string | TEXT | how to handle the data received from the web script JSON , HTML , DATATABLE or TEXT |
| showData | boolean | true | render the webscript data |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| scriptPath | `string` | | (required) Path to the webscript (as defined by webscript). |
| scriptArgs | `any` | | Arguments to pass to the webscript. |
| showData | `boolean` | `true` | Toggles whether to show or hide the data. |
| contextRoot | `string` | `'alfresco'` | Path where the application is deployed |
| servicePath | `string` | `'service'` | Path that the webscript service is mapped to. |
| contentType | `string` | `'TEXT'` | Content type to interpret the data received from the webscript. Can be "JSON" , "HTML" , "DATATABLE" or "TEXT" |
### Events
| Name | Description |
| ---- | ----------- |
| success | You can get the plain data from the webscript through the **success** event parameter and use it as you need in your application |
**contentType** {string}
**_data_** {string} data containing the plain value you get from the webscipt as an output parameter
| Name | Type | Description |
| ---- | ---- | ----------- |
| success | `EventEmitter<{}>` | Emitted when the operation succeeds. You can get the plain data from the webscript through the **success** event parameter and use it as you need in your application. |
## Details

View File

@ -53,42 +53,59 @@ import 'rxjs/add/observable/throw';
})
export class UploadButtonComponent implements OnInit, OnChanges, NodePermissionSubject {
/** Toggles component disabled state (if there is no node permission checking). */
@Input()
disabled: boolean = false;
/** Allows/disallows upload folders (only for Chrome). */
@Input()
uploadFolders: boolean = false;
/** Allows/disallows multiple files */
@Input()
multipleFiles: boolean = false;
/** Toggles versioning. */
@Input()
versioning: boolean = false;
/** List of allowed file extensions, for example: ".jpg,.gif,.png,.svg". */
@Input()
acceptedFilesType: string = '*';
/** Sets a limit on the maximum size (in bytes) of a file to be uploaded.
* Has no effect if undefined.
*/
@Input()
maxFilesSize: number;
/** Defines the text of the upload button. */
@Input()
staticTitle: string;
/** Custom tooltip text. */
@Input()
tooltip: string = null;
/** The ID of the root. Use the nodeId for
* Content Services or the taskId/processId for Process Services.
*/
@Input()
rootFolderId: string = '-root-';
/** Emitted when the file is uploaded successfully. */
@Output()
success = new EventEmitter();
/** Emitted when an error occurs. */
@Output()
error = new EventEmitter();
/** Emitted when a folder is created. */
@Output()
createFolder = new EventEmitter();
/** Emitted when delete permission is missing. */
@Output()
permissionEvent: EventEmitter<PermissionModel> = new EventEmitter<PermissionModel>();

View File

@ -38,15 +38,21 @@ import { Component, EventEmitter, forwardRef, Input, Output, ViewEncapsulation }
})
export class UploadDragAreaComponent implements NodePermissionSubject {
/** Toggle component disabled state. */
@Input()
disabled: boolean = false;
/** When false, renames the file using an integer suffix if there is a name clash.
* Set to true to indicate that a major version should be created instead.
*/
@Input()
versioning: boolean = false;
/** ID of parent folder node. */
@Input()
parentId: string;
/** Emitted when the file is uploaded. */
@Output()
success = new EventEmitter();

View File

@ -34,6 +34,7 @@ export class VersionListComponent implements OnChanges {
versions: any = [];
isLoading: boolean = true;
/** ID of the node whose version history you want to display. */
@Input()
id: string;

View File

@ -26,6 +26,7 @@ import { MinimalNodeEntryEntity } from 'alfresco-js-api';
})
export class VersionManagerComponent {
/** The node whose version history you want to manage. */
@Input()
node: MinimalNodeEntryEntity;
}

View File

@ -46,24 +46,36 @@ import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core
})
export class WebscriptComponent implements OnChanges {
/** (required) Path to the webscript (as defined by webscript). */
@Input()
scriptPath: string;
/** Arguments to pass to the webscript. */
@Input()
scriptArgs: any;
/** Toggles whether to show or hide the data. */
@Input()
showData: boolean = true;
/** Path where the application is deployed */
@Input()
contextRoot: string = 'alfresco';
/** Path that the webscript service is mapped to. */
@Input()
servicePath: string = 'service';
/** Content type to interpret the data received from the webscript.
* Can be "JSON" , "HTML" , "DATATABLE" or "TEXT"
*/
@Input()
contentType: string = 'TEXT';
/** Emitted when the operation succeeds. You can get the plain data from
* the webscript through the **success** event parameter and use it as you
* need in your application.
*/
@Output()
success = new EventEmitter();

View File

@ -47,9 +47,11 @@ export class WidgetComponent implements AfterViewInit {
static DEFAULT_HYPERLINK_URL: string = '#';
static DEFAULT_HYPERLINK_SCHEME: string = 'http://';
/** Does the widget show a read-only value? (ie, can't be edited) */
@Input()
readOnly: boolean = false;
/** Data to be displayed in the field */
@Input()
field: FormFieldModel;

View File

@ -27,9 +27,11 @@ import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@a
})
export class ToolbarComponent {
/** Toolbar title. */
@Input()
title: string = '';
/** Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. */
@Input()
color: string;

View File

@ -30,21 +30,29 @@ import { EcmUserService } from './../services/ecm-user.service';
})
export class UserInfoComponent implements OnInit {
/** Custom path for the background banner image for ACS users. */
@Input()
ecmBackgroundImage: string = './assets/images/ecm-background.png';
/** Custom path for the background banner image for APS users. */
@Input()
bpmBackgroundImage: string = './assets/images/bpm-background.png';
/** Custom choice for opening the menu at the bottom. Can be `before` or `after`. */
@Input()
menuPositionX: string = 'after';
/** Custom choice for opening the menu at the bottom. Can be `above` or `below`. */
@Input()
menuPositionY: string = 'below';
/** Shows/hides the username next to the user info button. */
@Input()
showName: boolean = true;
/** When the username is shown, this defines its position relative to the user info button.
* Can be `right` or `left`.
*/
@Input()
namePosition: string = 'right';

View File

@ -50,102 +50,145 @@ export class ViewerComponent implements OnChanges {
@ContentChild(ViewerMoreActionsComponent)
mnuMoreActions: ViewerMoreActionsComponent;
/** If you want to load an external file that does not come from ACS you
* can use this URL to specify where to load the file from.
*/
@Input()
urlFile = '';
/** Viewer to use with the `urlFile` address (`pdf`, `image`, `media`, `text`).
* Used when `urlFile` has no filename and extension.
*/
@Input()
urlFileViewer: string = null;
/** Loads a Blob File */
@Input()
blobFile: Blob;
/** Node Id of the file to load. */
@Input()
fileNodeId: string = null;
/** Shared link id (to display shared file). */
@Input()
sharedLinkId: string = null;
/** If `true` then show the Viewer as a full page over the current content.
* Otherwise fit inside the parent div.
*/
@Input()
overlayMode = false;
/** Hide or show the viewer */
@Input()
showViewer = true;
/** Hide or show the toolbar */
@Input()
showToolbar = true;
/** Specifies the name of the file when it is not available from the URL. */
@Input()
displayName: string;
/** Allows `back` navigation */
@Input()
allowGoBack = true;
/** Toggles downloading. */
@Input()
allowDownload = true;
/** Toggles printing. */
@Input()
allowPrint = false;
/** Toggles sharing. */
@Input()
allowShare = false;
/** Toggles the 'Full Screen' feature. */
@Input()
allowFullScreen = true;
/** Toggles before/next navigation. You can use the arrow buttons to navigate
* between documents in the collection.
*/
@Input()
allowNavigate = false;
/** Toggles the "before" ("<") button. Requires `allowNavigate` to be enabled. */
@Input()
canNavigateBefore = true;
/** Toggles the next (">") button. Requires `allowNavigate` to be enabled. */
@Input()
canNavigateNext = true;
/** Toggles the sidebar. */
@Input()
allowSidebar = false;
/** Toggles sidebar visibility. Requires `allowSidebar` to be set to `true`. */
@Input()
showSidebar = false;
/** The position of the sidebar. Can be `left` or `right`. */
@Input()
sidebarPosition = 'right';
/** The template for the sidebar. The template context contains the loaded node data. */
@Input()
sidebarTemplate: TemplateRef<any> = null;
/** MIME type of the file content (when not determined by the filename extension). */
@Input()
mimeType: string;
/** Content filename. */
@Input()
fileName: string;
/** URL to download. */
@Input()
downloadUrl: string = null;
/** Number of times the Viewer will retry fetching content Rendition.
* There is a delay of at least one second between attempts.
*/
@Input()
maxRetries = 5;
/** Emitted when user clicks the 'Back' button. */
@Output()
goBack = new EventEmitter<BaseEvent<any>>();
/** Emitted when user clicks the 'Download' button. */
@Output()
download = new EventEmitter<BaseEvent<any>>();
/** Emitted when user clicks the 'Print' button. */
@Output()
print = new EventEmitter<BaseEvent<any>>();
/** Emitted when user clicks the 'Share' button. */
@Output()
share = new EventEmitter<BaseEvent<any>>();
/** Emitted when the viewer is shown or hidden. */
@Output()
showViewerChange = new EventEmitter<boolean>();
/** Emitted when the filename extension changes. */
@Output()
extensionChange = new EventEmitter<string>();
/** Emitted when user clicks 'Navigate Before' ("<") button. */
@Output()
navigateBefore = new EventEmitter();
/** Emitted when user clicks 'Navigate Next' (">") button. */
@Output()
navigateNext = new EventEmitter();

View File

@ -56,72 +56,99 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
@ViewChild('errorDialog')
errorDialog: TemplateRef<any>;
/** Toggles debug mode. */
@Input()
debugMode: boolean = false;
/** (**required**) The id of the task whose details we are asking for. */
@Input()
taskId: string;
/** Automatically renders the next task when the current one is completed. */
@Input()
showNextTask: boolean = true;
/** Toggles task details Header component. */
@Input()
showHeader: boolean = true;
/** Toggles collapsed/expanded state of the Header component. */
@Input()
showHeaderContent: boolean = true;
/** Toggles `Involve People` feature for the Header component. */
@Input()
showInvolvePeople: boolean = true;
/** Toggles `Comments` feature for the Header component. */
@Input()
showComments: boolean = true;
/** Toggles `Checklist` feature for the Header component. */
@Input()
showChecklist: boolean = true;
/** Toggles rendering of the form title. */
@Input()
showFormTitle: boolean = true;
/** Toggles rendering of the `Complete` outcome button. */
@Input()
showFormCompleteButton: boolean = true;
/** Toggles rendering of the `Save` outcome button. */
@Input()
showFormSaveButton: boolean = true;
/** Toggles read-only state of the form. All form widgets render as read-only
* if enabled.
*/
@Input()
readOnlyForm: boolean = false;
/** Toggles rendering of the `Refresh` button. */
@Input()
showFormRefreshButton: boolean = true;
/** Field validators for use with the form. */
@Input()
fieldValidators: FormFieldValidator[] = [];
/** Emitted when the form is submitted with the `Save` or custom outcomes. */
@Output()
formSaved: EventEmitter<FormModel> = new EventEmitter<FormModel>();
/** Emitted when the form is submitted with the `Complete` outcome. */
@Output()
formCompleted: EventEmitter<FormModel> = new EventEmitter<FormModel>();
/** Emitted when the form field content is clicked. */
@Output()
formContentClicked: EventEmitter<ContentLinkModel> = new EventEmitter<ContentLinkModel>();
/** Emitted when the form is loaded or reloaded. */
@Output()
formLoaded: EventEmitter<FormModel> = new EventEmitter<FormModel>();
/** Emitted when a checklist task is created. */
@Output()
taskCreated: EventEmitter<TaskDetailsModel> = new EventEmitter<TaskDetailsModel>();
/** Emitted when a checklist task is deleted. */
@Output()
taskDeleted: EventEmitter<string> = new EventEmitter<string>();
/** Emitted when an error occurs. */
@Output()
error: EventEmitter<any> = new EventEmitter<any>();
/** Emitted when any outcome is executed. Default behaviour can be prevented
* via `event.preventDefault()`.
*/
@Output()
executeOutcome: EventEmitter<FormOutcomeEvent> = new EventEmitter<FormOutcomeEvent>();
/** Emitted when a task is assigned. */
@Output()
assignTask: EventEmitter<void> = new EventEmitter<void>();

View File

@ -30,24 +30,33 @@ import { TaskListService } from './../services/tasklist.service';
})
export class TaskFiltersComponent implements OnInit, OnChanges {
/** Parameters to use for the task filter. If there is no match then
* the default filter (the first one the list) is selected.
*/
@Input()
filterParam: FilterParamsModel;
/** Emitted when a filter in the list is clicked. */
@Output()
filterClick: EventEmitter<FilterRepresentationModel> = new EventEmitter<FilterRepresentationModel>();
/** Emitted when the list is loaded. */
@Output()
success: EventEmitter<any> = new EventEmitter<any>();
/** Emitted when an error occurs during loading. */
@Output()
error: EventEmitter<any> = new EventEmitter<any>();
/** Display filters available to the current user for the application with the specified ID. */
@Input()
appId: number;
/** Display filters available to the current user for the application with the specified name. */
@Input()
appName: string;
/** Toggles display of the filter's icon. */
@Input()
hasIcon: boolean = true;

View File

@ -29,15 +29,19 @@ import { TaskListService } from './../services/tasklist.service';
})
export class TaskHeaderComponent implements OnChanges, OnInit {
/** The name of the form. */
@Input()
formName: string = null;
/** (required) Details related to the task. */
@Input()
taskDetails: TaskDetailsModel;
/** Emitted when the task is claimed. */
@Output()
claim: EventEmitter<any> = new EventEmitter<any>();
/** Emitted when the task is unclaimed (ie, requeued). */
@Output()
unclaim: EventEmitter<any> = new EventEmitter<any>();