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

View File

@ -10,22 +10,20 @@ Shows all available filters.
### Properties ### Properties
| Name | Type | Description | | Name | Type | Default value | 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 | | 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 | string | Display filters available to the current user for the application with the specified ID. | | 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. | | 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. | | hasIcon | `boolean` | `true` | Toggles display of the filter's icon. |
If both `appId` and `appName` are specified then `appName` will take precedence and `appId` will be ignored.
### Events ### Events
| Name | Description | | Name | Type | Description |
| ---- | ----------- | | ---- | ---- | ----------- |
| filterClick | Raised when the filter in the list is clicked | | filterClick | `EventEmitter<FilterRepresentationModel>` | Emitted when a filter in the list is clicked. |
| success | Raised when the list is loaded | | success | `EventEmitter<any>` | Emitted when the list is loaded. |
| error | Raised if there is an error during the loading | | error | `EventEmitter<any>` | Emitted when an error occurs during loading. |
## Details ## Details

View File

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

View File

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

View File

@ -18,24 +18,26 @@ Activates a file upload.
### Properties ### Properties
| Name | Type | Default | Description | | Name | Type | Default value | Description |
| --- | --- | --- | --- | | ---- | ---- | ------------- | ----------- |
| disabled | boolean | false | Toggle component disabled state if there is no node permission checking | | disabled | `boolean` | `false` | Toggles component disabled state (if there is no node permission checking). |
| uploadFolders | boolean | false | Allow/disallow upload folders (only for Chrome) | | uploadFolders | `boolean` | `false` | Allows/disallows upload folders (only for Chrome). |
| multipleFiles | boolean | false | Allow/disallow multiple files | | multipleFiles | `boolean` | `false` | Allows/disallows multiple files |
| acceptedFilesType | string | * | array of allowed file extensions , example: ".jpg,.gif,.png,.svg" | | versioning | `boolean` | `false` | Toggles versioning. |
| maxFilesSize | number | | if defined allow to upload files only with this max file size. the size of a file is in bytes | | acceptedFilesType | `string` | `'*'` | List of allowed file extensions, for example: ".jpg,.gif,.png,.svg". |
| 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. | | maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
| 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` | | Defines the text of the upload button. |
| staticTitle | string | (predefined) | define the text of the upload button | | tooltip | `string` | `null` | Custom tooltip text. |
| tooltip | string | | Custom tooltip | | rootFolderId | `string` | `'-root-'` | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
### Events ### Events
| Name | Description | | Name | Type | Description |
| --- | --- | | ---- | ---- | ----------- |
| success | Raised when the file is uploaded | | success | `EventEmitter<{}>` | Emitted when the file is uploaded successfully. |
| permissionEvent | permissionEvent that is raised when the delete permission is missing | | 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 ## Details

View File

@ -10,16 +10,16 @@ Shows user information.
### Properties ### Properties
| Name | Type | Default | Description | | Name | Type | Default value | Description |
| ---- | ---- | ------- | ----------- | | ---- | ---- | ------------- | ----------- |
| ecmBackgroundImage | string | (alfresco image) | Custom path for the background banner image for ECM users | | ecmBackgroundImage | `string` | `'./assets/images/ecm-background.png'` | Custom path for the background banner image for ACS users. |
| bpmBackgroundImage | string | (alfresco image) | Custom path for the background banner image for BPM users | | bpmBackgroundImage | `string` | `'./assets/images/bpm-background.png'` | Custom path for the background banner image for APS users. |
| menuPositionX | string | | Custom choice for opening the menu bottom : `before` or `after` | | menuPositionX | `string` | `'after'` | Custom choice for opening the menu at the bottom. Can be `before` or `after`. |
| menuPositionY | string | | Custom choice for opening the menu bottom : `above` or `below` | | menuPositionY | `string` | `'below'` | Custom choice for opening the menu at the bottom. Can be `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` | Shows/hides the username next to the user info button. |
| showName | boolean | true | Show/Hide the username next 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 ## Details
This will show a round icon with user and on click some user information. 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 ### Properties
| Name | Type | Description | | Name | Type | Default value | Description |
| ---- | ---- | ----------- | | ---- | ---- | ------------- | ----------- |
| id | string | The node id you want to see the version history of. | | id | `string` | | ID of the node whose version history you want to display. |
## Details ## Details

View File

@ -14,9 +14,9 @@ Displays the version history of a node with the ability to upload a new version.
### Properties ### Properties
| Name | Type | Description | | Name | Type | Default value | 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. | | node | `MinimalNodeEntryEntity` | | The node whose version history you want to manage. |
## Details ## Details

View File

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

View File

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

View File

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

View File

@ -38,15 +38,21 @@ import { Component, EventEmitter, forwardRef, Input, Output, ViewEncapsulation }
}) })
export class UploadDragAreaComponent implements NodePermissionSubject { export class UploadDragAreaComponent implements NodePermissionSubject {
/** Toggle component disabled state. */
@Input() @Input()
disabled: boolean = false; 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() @Input()
versioning: boolean = false; versioning: boolean = false;
/** ID of parent folder node. */
@Input() @Input()
parentId: string; parentId: string;
/** Emitted when the file is uploaded. */
@Output() @Output()
success = new EventEmitter(); success = new EventEmitter();

View File

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

View File

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

View File

@ -46,24 +46,36 @@ import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core
}) })
export class WebscriptComponent implements OnChanges { export class WebscriptComponent implements OnChanges {
/** (required) Path to the webscript (as defined by webscript). */
@Input() @Input()
scriptPath: string; scriptPath: string;
/** Arguments to pass to the webscript. */
@Input() @Input()
scriptArgs: any; scriptArgs: any;
/** Toggles whether to show or hide the data. */
@Input() @Input()
showData: boolean = true; showData: boolean = true;
/** Path where the application is deployed */
@Input() @Input()
contextRoot: string = 'alfresco'; contextRoot: string = 'alfresco';
/** Path that the webscript service is mapped to. */
@Input() @Input()
servicePath: string = 'service'; servicePath: string = 'service';
/** Content type to interpret the data received from the webscript.
* Can be "JSON" , "HTML" , "DATATABLE" or "TEXT"
*/
@Input() @Input()
contentType: string = 'TEXT'; 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() @Output()
success = new EventEmitter(); success = new EventEmitter();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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