diff --git a/docs/task-details.component.md b/docs/task-details.component.md index 4a8c975630..b9bcd44f8a 100644 --- a/docs/task-details.component.md +++ b/docs/task-details.component.md @@ -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` | Emitted when the form is submitted with the `Save` or custom outcomes. | +| formCompleted | `EventEmitter` | Emitted when the form is submitted with the `Complete` outcome. | +| formContentClicked | `EventEmitter` | Emitted when the form field content is clicked. | +| formLoaded | `EventEmitter` | Emitted when the form is loaded or reloaded. | +| taskCreated | `EventEmitter` | Emitted when a checklist task is created. | +| taskDeleted | `EventEmitter` | Emitted when a checklist task is deleted. | +| error | `EventEmitter` | Emitted when an error occurs. | +| executeOutcome | `EventEmitter` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. | +| assignTask | `EventEmitter` | Emitted when a task is assigned. | ## Details diff --git a/docs/task-filters.component.md b/docs/task-filters.component.md index a548d59c78..142c01e72d 100644 --- a/docs/task-filters.component.md +++ b/docs/task-filters.component.md @@ -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` | Emitted when a filter in the list is clicked. | +| success | `EventEmitter` | Emitted when the list is loaded. | +| error | `EventEmitter` | Emitted when an error occurs during loading. | ## Details diff --git a/docs/task-header.component.md b/docs/task-header.component.md index c85607fc73..cbe0e6039d 100644 --- a/docs/task-header.component.md +++ b/docs/task-header.component.md @@ -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` | Emitted when the task is claimed. | +| unclaim | `EventEmitter` | Emitted when the task is unclaimed (ie, requeued). | ## Details diff --git a/docs/toolbar.component.md b/docs/toolbar.component.md index 960639546b..1e81a057d5 100644 --- a/docs/toolbar.component.md +++ b/docs/toolbar.component.md @@ -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 diff --git a/docs/upload-button.component.md b/docs/upload-button.component.md index 363a877bf5..6db3995630 100644 --- a/docs/upload-button.component.md +++ b/docs/upload-button.component.md @@ -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` | Emitted when delete permission is missing. | ## Details diff --git a/docs/user-info.component.md b/docs/user-info.component.md index fe7046a027..743f4d29ae 100644 --- a/docs/user-info.component.md +++ b/docs/user-info.component.md @@ -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. diff --git a/docs/version-list.component.md b/docs/version-list.component.md index 3f3a7d5089..e2a818bea2 100644 --- a/docs/version-list.component.md +++ b/docs/version-list.component.md @@ -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 diff --git a/docs/version-manager.component.md b/docs/version-manager.component.md index 97b3f0de9f..418db835a8 100644 --- a/docs/version-manager.component.md +++ b/docs/version-manager.component.md @@ -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 diff --git a/docs/viewer.component.md b/docs/viewer.component.md index 5a195c34bd..241f191e97 100644 --- a/docs/viewer.component.md +++ b/docs/viewer.component.md @@ -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 | 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" ("<") 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` | `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>` | Emitted when user clicks the 'Back' button. | +| download | `EventEmitter>` | Emitted when user clicks the 'Download' button. | +| print | `EventEmitter>` | Emitted when user clicks the 'Print' button. | +| share | `EventEmitter>` | Emitted when user clicks the 'Share' button. | +| showViewerChange | `EventEmitter` | Emitted when the viewer is shown or hidden. | +| extensionChange | `EventEmitter` | Emitted when the filename extension changes. | +| navigateBefore | `EventEmitter<{}>` | Emitted when user clicks 'Navigate Before' ("<") 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. | @@ -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: -- PDF View - - application/pdf - - *.pdf -- Image View - - image/png - - image/jpeg - - image/gif - - image/bmp - - image/svg+xml - - *.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 -- Media View - - video/mp4 - - video/webm - - video/ogg - - audio/mpeg - - audio/ogg - - audio/wav - - *.wav - - *.mp4 - - *.mp3 - - *.webm - - *.ogg +- PDF View + - application/pdf + - \*.pdf +- Image View + - image/png + - image/jpeg + - image/gif + - image/bmp + - image/svg+xml + - \*.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 +- Media View + - video/mp4 + - video/webm + - video/ogg + - audio/mpeg + - audio/ogg + - audio/wav + - \*.wav + - \*.mp4 + - \*.mp3 + - \*.webm + - \*.ogg ### Content Renditions diff --git a/docs/webscript.component.md b/docs/webscript.component.md index 9cd7d3400a..e5f31d3082 100644 --- a/docs/webscript.component.md +++ b/docs/webscript.component.md @@ -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 diff --git a/lib/content-services/upload/components/upload-button.component.ts b/lib/content-services/upload/components/upload-button.component.ts index acc7fd38e2..aabb8b160a 100644 --- a/lib/content-services/upload/components/upload-button.component.ts +++ b/lib/content-services/upload/components/upload-button.component.ts @@ -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 = new EventEmitter(); diff --git a/lib/content-services/upload/components/upload-drag-area.component.ts b/lib/content-services/upload/components/upload-drag-area.component.ts index b29000424d..cb2e7e7e24 100644 --- a/lib/content-services/upload/components/upload-drag-area.component.ts +++ b/lib/content-services/upload/components/upload-drag-area.component.ts @@ -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(); diff --git a/lib/content-services/version-manager/version-list.component.ts b/lib/content-services/version-manager/version-list.component.ts index 37cb687f36..9536b3d8d8 100644 --- a/lib/content-services/version-manager/version-list.component.ts +++ b/lib/content-services/version-manager/version-list.component.ts @@ -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; diff --git a/lib/content-services/version-manager/version-manager.component.ts b/lib/content-services/version-manager/version-manager.component.ts index a8ee77874c..a8a7bb1291 100644 --- a/lib/content-services/version-manager/version-manager.component.ts +++ b/lib/content-services/version-manager/version-manager.component.ts @@ -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; } diff --git a/lib/content-services/webscript/webscript.component.ts b/lib/content-services/webscript/webscript.component.ts index 7fe31f2b93..d8897c6e24 100644 --- a/lib/content-services/webscript/webscript.component.ts +++ b/lib/content-services/webscript/webscript.component.ts @@ -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(); diff --git a/lib/core/form/components/widgets/widget.component.ts b/lib/core/form/components/widgets/widget.component.ts index ebb17bad4f..4ec2763cfc 100644 --- a/lib/core/form/components/widgets/widget.component.ts +++ b/lib/core/form/components/widgets/widget.component.ts @@ -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; diff --git a/lib/core/toolbar/toolbar.component.ts b/lib/core/toolbar/toolbar.component.ts index 40bb8eb7e4..a45f15e3ed 100644 --- a/lib/core/toolbar/toolbar.component.ts +++ b/lib/core/toolbar/toolbar.component.ts @@ -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; diff --git a/lib/core/userinfo/components/user-info.component.ts b/lib/core/userinfo/components/user-info.component.ts index 4b3803be0e..3e4061f5cc 100644 --- a/lib/core/userinfo/components/user-info.component.ts +++ b/lib/core/userinfo/components/user-info.component.ts @@ -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'; diff --git a/lib/core/viewer/components/viewer.component.ts b/lib/core/viewer/components/viewer.component.ts index 465b035cc2..4dc71f325d 100644 --- a/lib/core/viewer/components/viewer.component.ts +++ b/lib/core/viewer/components/viewer.component.ts @@ -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 = 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>(); + /** Emitted when user clicks the 'Download' button. */ @Output() download = new EventEmitter>(); + /** Emitted when user clicks the 'Print' button. */ @Output() print = new EventEmitter>(); + /** Emitted when user clicks the 'Share' button. */ @Output() share = new EventEmitter>(); + /** Emitted when the viewer is shown or hidden. */ @Output() showViewerChange = new EventEmitter(); + /** Emitted when the filename extension changes. */ @Output() extensionChange = new EventEmitter(); + /** Emitted when user clicks 'Navigate Before' ("<") button. */ @Output() navigateBefore = new EventEmitter(); + /** Emitted when user clicks 'Navigate Next' (">") button. */ @Output() navigateNext = new EventEmitter(); diff --git a/lib/process-services/task-list/components/task-details.component.ts b/lib/process-services/task-list/components/task-details.component.ts index 17db8dce4e..29729c46f6 100644 --- a/lib/process-services/task-list/components/task-details.component.ts +++ b/lib/process-services/task-list/components/task-details.component.ts @@ -56,72 +56,99 @@ export class TaskDetailsComponent implements OnInit, OnChanges { @ViewChild('errorDialog') errorDialog: TemplateRef; + /** 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 = new EventEmitter(); + /** Emitted when the form is submitted with the `Complete` outcome. */ @Output() formCompleted: EventEmitter = new EventEmitter(); + /** Emitted when the form field content is clicked. */ @Output() formContentClicked: EventEmitter = new EventEmitter(); + /** Emitted when the form is loaded or reloaded. */ @Output() formLoaded: EventEmitter = new EventEmitter(); + /** Emitted when a checklist task is created. */ @Output() taskCreated: EventEmitter = new EventEmitter(); + /** Emitted when a checklist task is deleted. */ @Output() taskDeleted: EventEmitter = new EventEmitter(); + /** Emitted when an error occurs. */ @Output() error: EventEmitter = new EventEmitter(); + /** Emitted when any outcome is executed. Default behaviour can be prevented + * via `event.preventDefault()`. + */ @Output() executeOutcome: EventEmitter = new EventEmitter(); + /** Emitted when a task is assigned. */ @Output() assignTask: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/task-list/components/task-filters.component.ts b/lib/process-services/task-list/components/task-filters.component.ts index fb04fd5d97..267e60821c 100644 --- a/lib/process-services/task-list/components/task-filters.component.ts +++ b/lib/process-services/task-list/components/task-filters.component.ts @@ -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 = new EventEmitter(); + /** Emitted when the list is loaded. */ @Output() success: EventEmitter = new EventEmitter(); + /** Emitted when an error occurs during loading. */ @Output() error: EventEmitter = new EventEmitter(); + /** 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; diff --git a/lib/process-services/task-list/components/task-header.component.ts b/lib/process-services/task-list/components/task-header.component.ts index 0efe281723..e8359cf3fc 100644 --- a/lib/process-services/task-list/components/task-header.component.ts +++ b/lib/process-services/task-list/components/task-header.component.ts @@ -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 = new EventEmitter(); + /** Emitted when the task is unclaimed (ie, requeued). */ @Output() unclaim: EventEmitter = new EventEmitter();