diff --git a/docs/accordion-group.component.md b/docs/accordion-group.component.md index de21a4ee5f..d329b66704 100644 --- a/docs/accordion-group.component.md +++ b/docs/accordion-group.component.md @@ -33,11 +33,18 @@ export class MyComponent implements OnInit { | Name | Type | Description | | ---- | ---- | ----------- | -| heading | string | Title heading for the group. | -| isSelected | boolean | Is this group currently selected? | -| headingIcon | string | The material design icon. | -| hasAccordionIcon | boolean | Should the (expanded) accordion icon be shown? Defaults to true | -| headingIconTooltip | string | Tooltip message to be shown for headingIcon | +| heading | `string` | Title heading for the group. | +| headingIcon | `string` | The material design icon. | +| headingIconTooltip | `string` | Tooltip message to be shown for headingIcon | +| hasAccordionIcon | `boolean` | Should the (expanded) accordion icon be shown?
Default value: `true` | +| isOpen | `boolean` | Is this group currently open? | +| isSelected | `boolean` | Is this group currently selected? | + +### Events + +| Name | Type | Description | +| ---- | ---- | ----------- | +| headingClick | `EventEmitter` | Emitted when the heading is clicked. | ## Details diff --git a/docs/accordion.component.md b/docs/accordion.component.md index 224076d161..cc22c96aac 100644 --- a/docs/accordion.component.md +++ b/docs/accordion.component.md @@ -29,15 +29,6 @@ export class MyComponent implements OnInit { } ``` -### Properties - -| Name | Type | Description | -| ---- | ---- | ----------- | -| heading | string | The header title. | -| isSelected | boolean | Define if the accordion group is selected or not. | -| headingIcon | string | The material design icon. | -| hasAccordionIcon | boolean | Define if the accordion (expand) icon needs to be shown or not, the default value is true | - ## Details An accordion menu contains several panels of content, only one of which is visible at any time. The diff --git a/docs/apps-list.component.md b/docs/apps-list.component.md index 2f4640fcd5..9d9e3d3c51 100644 --- a/docs/apps-list.component.md +++ b/docs/apps-list.component.md @@ -1,4 +1,4 @@ -# Activiti Apps Component +# Apps List Component Shows all available apps. @@ -15,15 +15,16 @@ Shows all available apps. ### Properties | Name | Type | Description | -| --- | --- | --- | -| layoutType | string | (**required**) Define the layout of the apps. There are two possible values: GRID or LIST. | -| filtersAppId | Object | Provide a way to filter the apps to show. | +| ---- | ---- | ----------- | +| layoutType | `string` | (\*\*required\*\*) Defines the layout of the apps. There are two possible values, "GRID" and "LIST".
Default value: `AppsListComponent.LAYOUT_GRID` | +| filtersAppId | `any[]` | Provides a way to filter the apps to show. | ### Events -| Name | Description | -| --- | --- | -| appClick | Raised when an app entry is clicked | +| Name | Type | Description | +| ---- | ---- | ----------- | +| appClick | `EventEmitter` | Emitted when an app entry is clicked. | +| error | `EventEmitter` | Emitted when an error occurs. | ## Details diff --git a/docs/breadcrumb.component.md b/docs/breadcrumb.component.md index 5e07e1f700..ca632764b3 100644 --- a/docs/breadcrumb.component.md +++ b/docs/breadcrumb.component.md @@ -17,16 +17,16 @@ Indicates the current position within a navigation hierarchy. | Name | Type | Description | | ---- | ---- | ----------- | -| target | DocumentListComponent | (optional) DocumentList component to operate with. Upon clicks will instruct the given component to update. | -| folderNode | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | Active node, builds UI based on `folderNode.path.elements` collection. | -| root | string | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use i18n resource key for the property value. | -| rootId | string | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. | +| folderNode | `MinimalNodeEntryEntity` | Active node, builds UI based on folderNode.path.elements collection.
Default value: `null` | +| root | `string` | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use an i18n resource key for the property value.
Default value: `null` | +| rootId | `string` | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with.
Default value: `null` | +| target | `DocumentListComponent` | (optional) Document List component to operate with. The list will update when the breadcrumb is clicked. | ### Events -| Name | Returned Type | Description | -| ---- | ------------- | ----------- | -| navigate | [PathElementEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/PathElementEntity.md) | emitted when user clicks on a breadcrumb | +| Name | Type | Description | +| ---- | ---- | ----------- | +| navigate | `EventEmitter` | Emitted when the user clicks on a breadcrumb. | ## See also diff --git a/docs/checklist.component.md b/docs/checklist.component.md index 65c76cba67..4528ec4f4a 100644 --- a/docs/checklist.component.md +++ b/docs/checklist.component.md @@ -1,4 +1,4 @@ -# Activiti Checklist Component +# Checklist Component Shows the checklist task functionality. @@ -15,7 +15,15 @@ Shows the checklist task functionality. ### Properties | Name | Type | Description | -| --- | --- | --- | -| taskId | string | (**required**) The id of the parent task which sub tasks are attached on. | -| readOnlyForm | boolean | Toggle readonly state of the form. Enforces all form widgets render readonly if enabled. | -| assignee | string | (**required**) The assignee id where the subtasks are assigned to. | +| ---- | ---- | ----------- | +| taskId | `string` | (required) The id of the parent task to which subtasks are attached. | +| readOnly | `boolean` | Toggle readonly state of the form. All form widgets will render as readonly if enabled.
Default value: `false` | +| assignee | `string` | (required) The assignee id that the subtasks are assigned to. | + +### Events + +| Name | Type | Description | +| ---- | ---- | ----------- | +| checklistTaskCreated | `EventEmitter` | Emitted when a new checklist task is created. | +| checklistTaskDeleted | `EventEmitter` | Emitted when a checklist task is deleted. | +| error | `EventEmitter` | Emitted when an error occurs. | diff --git a/docs/comment-list.component.md b/docs/comment-list.component.md index e0bfd14330..d90a9ec9ae 100644 --- a/docs/comment-list.component.md +++ b/docs/comment-list.component.md @@ -54,12 +54,12 @@ In the component template use the comment list component: ### Properties -| Name | Type | Default | Description | -| ---- | ---- | ------- | ----------- | -| comments | CommentProcessModel\[] | | The comments data used to populate the list | +| Name | Type | Description | +| ---- | ---- | ----------- | +| comments | `any[]` | The comments data used to populate the list. | ### Events -| Name | Description | -| ---- | ----------- | -| clickRow | Emitted when the user clicks on one of the comment rows | +| Name | Type | Description | +| ---- | ---- | ----------- | +| clickRow | `EventEmitter` | Emitted when the user clicks on one of the comment rows. | diff --git a/docs/comments.component.md b/docs/comments.component.md index 640da34a1b..818aff2d2e 100644 --- a/docs/comments.component.md +++ b/docs/comments.component.md @@ -1,4 +1,4 @@ -# ADF Comments Component +# Comments Component Displays comments from users involved in a specified task and allows an involved user to add a comment to the task. @@ -16,12 +16,12 @@ Displays comments from users involved in a specified task and allows an involved ### Properties | Name | Type | Description | -| --- | --- | --- | -| taskId | string | The numeric ID of the task | -| readOnly | boolean | The boolean flag | +| ---- | ---- | ----------- | +| taskId | `string` | The numeric ID of the task. | +| readOnly | `boolean` | Are the comments read only?
Default value: `false` | ### Events -| Name | Description | -| --- | --- | -| error | Raised when an error occurs while displaying/adding a comment | +| Name | Type | Description | +| ---- | ---- | ----------- | +| error | `EventEmitter` | Emitted when an error occurs while displaying/adding a comment. | diff --git a/docs/content-action.component.md b/docs/content-action.component.md index cabbbf319b..12f9c8a437 100644 --- a/docs/content-action.component.md +++ b/docs/content-action.component.md @@ -74,24 +74,24 @@ export class MyView { ### Properties -| Name | Type | Default | Description | -| ---- | ---- | ------- | ----------- | -| `target` | string | | "document" or "folder" | -| `title` | string | | The title of the action as shown in the menu | -| `icon` | string | | The name of the icon to display next to the menu command (can be left blank) | -| `handler` | string | | System type actions. Can be "delete", "download", "copy" or "move" | -| `permission` | string | | The name of the permission | -| `disabled` | boolean | | Is the menu item disabled? | -| `disableWithNoPermission` | boolean | | Should this action be disabled in the menu if the user doesn't have permission for it? | +| Name | Type | Description | +| ---- | ---- | ----------- | +| title | `string` | The title of the action as shown in the menu.
Default value: `'Action'` | +| icon | `string` | The name of the icon to display next to the menu command (can be left blank). | +| handler | `string` | System actions. Can be "delete", "download", "copy" or "move". | +| target | `string` | Type of item that the action appies to. Can be "document" or "folder" | +| permission | `string` | The permission type. | +| disableWithNoPermission | `boolean` | Should this action be disabled in the menu if the user doesn't have permission for it? | +| disabled | `boolean` | Is the menu item disabled?
Default value: `false` | ### Events -| Name | Handler | Description | -| ---- | ------- | ----------- | -| `execute` | All | Emitted when user clicks on the action. For combined handlers see below | -| `permissionEvent` | All | Emitted when a permission error happens | -| `success` | copy, move, delete | Emitted on successful action with the success string message | -| `error` | copy, move | Emitted on unsuccessful action with the error event | +| Name | Type | Description | +| ---- | ---- | ----------- | +| execute | `EventEmitter<{}>` | Emitted when the user selects the action from the menu. | +| permissionEvent | `EventEmitter<{}>` | Emitted when a permission error occurs | +| error | `EventEmitter<{}>` | Emitted when an error occurs during the action. Applies to copy and move actions. | +| success | `EventEmitter<{}>` | Emitted when the action succeeds with the success string message. Applies to copy, move and delete actions. | ## Details diff --git a/docs/create-process-attachment.component.md b/docs/create-process-attachment.component.md index a4173999e2..d499d9e23c 100644 --- a/docs/create-process-attachment.component.md +++ b/docs/create-process-attachment.component.md @@ -17,12 +17,12 @@ Displays Upload Component (Drag and Click) to upload the attachment to a specifi ### Properties | Name | Type | Description | -| --- | --- | --- | -| processInstanceId | string | (**required**): The ID of the process instance to display | +| ---- | ---- | ----------- | +| processInstanceId | `string` | (required) The ID of the process instance to display. | ### Events -| Name | Description | -| --- | --- | -| error | Raised when the error occurred while creating/uploading the attachment by the user from within the component | -| success | Raised when the attachment created/uploaded successfully from within the component | +| Name | Type | Description | +| ---- | ---- | ----------- | +| error | `EventEmitter` | Emitted when an error occurs while creating or uploading an attachment from the user within the component. | +| success | `EventEmitter` | Emitted when an attachment is successfully created or uploaded from within the component. | diff --git a/docs/create-task-attachment.component.md b/docs/create-task-attachment.component.md index ed32812b0d..3528fd635e 100644 --- a/docs/create-task-attachment.component.md +++ b/docs/create-task-attachment.component.md @@ -17,12 +17,12 @@ Displays Upload Component (Drag and Click) to upload the attachment to a specifi ### Properties | Name | Type | Description | -| --- | --- | --- | +| ---- | ---- | ----------- | | taskId | string | (**required**): The numeric ID of the task to display | ### Events | Name | Description | -| --- | --- | +| ---- | ----------- | | error | Raised when the error occurred while creating/uploading the attachment by the user from within the component | | success | Raised when the attachment created/uploaded successfully from within the component | diff --git a/docs/data-column.component.md b/docs/data-column.component.md index 4cc7fc6088..f8d5d31aaf 100644 --- a/docs/data-column.component.md +++ b/docs/data-column.component.md @@ -33,17 +33,16 @@ Defines column properties for DataTable, Tasklist, Document List and other compo ### Properties -| Name | Type | Default | Description | -| ---- | ---- | ------- | ----------- | -| key | string | | Data source key, can be either column/property key like `title` or property path like `createdBy.name` | -| type | string | text | Value type for the column. Possible settings are 'text', 'image', 'date', 'fileSize' and 'location'. | -| format | string | | Value format (if supported by components), for example format of the date | -| sortable | boolean | true | Toggles ability to sort by this column, for example by clicking the column header | -| title | string | | Display title of the column, typically used for column headers. You can use the i18n resouce key to get it translated automatically. | -| template | `TemplateRef` | | Custom column template | -| sr-title | string | | Screen reader title, used for accessibility purposes | -| class | string | | Additional CSS class to be applied to column (header and cells) | -| formatTooltip | Function | | Custom tooltip formatter function. | +| Name | Type | Description | +| ---- | ---- | ----------- | +| key | `string` | Data source key. Can be either a column/property key like `title` or a property path like `createdBy.name`. | +| type | `string` | Value type for the column. Possible settings are 'text', 'image', 'date', 'fileSize' and 'location'.
Default value: `'text'` | +| format | `string` | Value format (if supported by the parent component), for example format of the date. | +| sortable | `boolean` | Toggles ability to sort by this column, for example by clicking the column header.
Default value: `true` | +| title | `string` | Display title of the column, typically used for column headers. You can use the i18n resource key to get it translated automatically.
Default value: `''` | +| formatTooltip | `Function` | Custom tooltip formatter function. | +| srTitle | `string` | Title to be used for screen readers. | +| cssClass | `string` | Additional CSS class to be applied to column (header and cells). | ## Details diff --git a/docs/document-list.component.md b/docs/document-list.component.md index 6e9ecfdebc..f23ec46e80 100644 --- a/docs/document-list.component.md +++ b/docs/document-list.component.md @@ -54,17 +54,17 @@ Displays the documents from a repository. | navigate | `boolean` | Toggles navigation to folder content or file preview
Default value: `true` | | navigationMode | `string` | User interaction for folder navigation or file preview. Valid values are "click" and "dblclick".
Default value: `DocumentListComponent.DOUBLE_CLICK_NAVIGATION` | | thumbnails | `boolean` | Show document thumbnails rather than icons
Default value: `false` | -| selectionMode | `string` | Row selection mode. Can be null, \`single\` or \`multiple\`. For \`multiple\` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows.
Default value: `'single'` | +| selectionMode | `string` | Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows.
Default value: `'single'` | | multiselect | `boolean` | Toggles multiselect mode
Default value: `false` | | contentActions | `boolean` | Toggles content actions for each row
Default value: `false` | | contentActionsPosition | `string` | Position of the content actions dropdown menu. Can be set to "left" or "right".
Default value: `'right'` | | contextMenuActions | `boolean` | Toggles context menus for each row
Default value: `false` | | emptyFolderImageUrl | `string` | Custom image for empty folder
Default value: `'./assets/images/empty_doc_lib.svg'` | | allowDropFiles | `boolean` | Toggle file drop support for rows (see Upload Directive for further details
Default value: `false` | -| sorting | `string[]` | Defines default sorting. The format is an array of 2 strings \`\[key, direction]\` i.e. \`\['name', 'desc']\` or \`\['name', 'asc']\`. Set this value only if you want to override the default sorting detected by the component based on columns. | +| sorting | `string[]` | Defines default sorting. The format is an array of 2 strings `[key, direction]` i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to override the default sorting detected by the component based on columns. | | rowStyle | `string` | The inline style to apply to every row. See the Angular NgStyle docs for more details and usage examples. | | rowStyleClass | `string` | The CSS class to apply to every row | -| loading | `boolean` | Toggles the loading state and animated spinners for the component. Used in combination with \`navigate=false\` to perform custom navigation and loading state indication.
Default value: `false` | +| loading | `boolean` | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication.
Default value: `false` | | rowFilter | `any` | Custom row filter
Default value: `null` | | imageResolver | `any` | Custom image resolver
Default value: `null` | | currentFolderId | `string` | The ID of the folder node to display or a reserved string alias for special sources
Default value: `null` | @@ -81,7 +81,7 @@ Displays the documents from a repository. | nodeClick | `EventEmitter` | Emitted when the user clicks a list node | | nodeDblClick | `EventEmitter` | Emitted when the user double-clicks a list node | | folderChange | `EventEmitter` | Emitted when the current display folder changes | -| preview | `EventEmitter` | Emitted when the user acts upon files with either single or double click (depends on \`navigation-mode\`). Useful for integration with the Viewer component. | +| preview | `EventEmitter` | Emitted when the user acts upon files with either single or double click (depends on `navigation-mode`). Useful for integration with the Viewer component. | | ready | `EventEmitter` | Emitted when the Document List has loaded all items and is ready for use | | error | `EventEmitter` | Emitted when the API fails to get the Document List data | diff --git a/docs/dropdown-breadcrumb.component.md b/docs/dropdown-breadcrumb.component.md index 0f0aba167b..81c28f5a18 100644 --- a/docs/dropdown-breadcrumb.component.md +++ b/docs/dropdown-breadcrumb.component.md @@ -16,22 +16,24 @@ Indicates the current position within a navigation hierarchy using a dropdown me ### Properties | Name | Type | Description | -| --- | --- | --- | +| ---- | ---- | ----------- | | target | DocumentListComponent | (optional) DocumentList component to operate with. Upon clicks will instruct the given component to update. | | folderNode | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | Active node, builds UI based on `folderNode.path.elements` collection. | -| root | string | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use i18n resource key for the property value. | +| root | string | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use i18n resource key for the property value. | | rootId | string | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. | ### Events | Name | Returned Type | Description | -| --- | --- | --- | -| navigate | [PathElementEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/PathElementEntity.md) | emitted when user clicks on a breadcrumb | +| ---- | ------------- | ----------- | +| navigate | [PathElementEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/PathElementEntity.md) | emitted when user clicks on a breadcrumb | + + ## See also -- [Document list component](document-list.component.md) -- [Breadcrumb component](breadcrumb.component.md) - \ No newline at end of file +- [Document list component](document-list.component.md) +- [Breadcrumb component](breadcrumb.component.md) + diff --git a/lib/config/DocProcessor/tools/tscProps.js b/lib/config/DocProcessor/tools/tscProps.js index 9336f7db17..bb4e29e7f2 100644 --- a/lib/config/DocProcessor/tools/tscProps.js +++ b/lib/config/DocProcessor/tools/tscProps.js @@ -3,6 +3,7 @@ exports.__esModule = true; var ts = require("typescript"); var path = require("path"); var heading = require("mdast-util-heading-range"); +var remark = require("remark"); var unist = require("../unistHelpers"); function initPhase(aggData) { } @@ -84,7 +85,9 @@ function getPropDataFromClass(checker, classDec, inputs, outputs) { var sourceFile = classDec.getSourceFile(); for (var i = 0; i < classDec.members.length; i++) { var member = classDec.members[i]; - if (ts.isPropertyDeclaration(member)) { + if (ts.isPropertyDeclaration(member) || + ts.isGetAccessorDeclaration(member) || + ts.isSetAccessorDeclaration(member)) { var prop = member; var mods = ts.getCombinedModifierFlags(prop); var nonPrivate = (mods & ts.ModifierFlags.Private) === 0; @@ -139,7 +142,7 @@ function buildInputsTable(inputs) { //pDesc = pDesc.trim().replace(/[\n\r]+/, " "); pDesc = pDesc.replace(/[\n\r]+/, " "); } - var descCellContent = [unist.makeText(pDesc)]; + var descCellContent = remark().parse(pDesc).children; if (pDefault) { descCellContent.push(unist.makeHTML("
")); descCellContent.push(unist.makeText(" Default value: ")); @@ -176,7 +179,7 @@ function buildOutputsTable(outputs) { var cells = [ unist.makeTableCell([unist.makeText(eName)]), unist.makeTableCell([unist.makeInlineCode(eType)]), - unist.makeTableCell([unist.makeText(eDesc)]) + unist.makeTableCell(remark().parse(eDesc).children) ]; rows.push(unist.makeTableRow(cells)); } diff --git a/lib/config/DocProcessor/tools/tscProps.ts b/lib/config/DocProcessor/tools/tscProps.ts index b154ee7ae7..f0246117f8 100644 --- a/lib/config/DocProcessor/tools/tscProps.ts +++ b/lib/config/DocProcessor/tools/tscProps.ts @@ -4,6 +4,7 @@ import * as path from "path"; import * as program from "commander"; import * as heading from "mdast-util-heading-range"; +import * as remark from "remark"; import * as unist from "../unistHelpers"; import { JsxEmit } from "typescript"; @@ -121,7 +122,9 @@ function getPropDataFromClass( for (var i = 0; i < classDec.members.length; i++) { let member = classDec.members[i]; - if (ts.isPropertyDeclaration(member)) { + if (ts.isPropertyDeclaration(member) || + ts.isGetAccessorDeclaration(member) || + ts.isSetAccessorDeclaration(member)) { let prop: ts.PropertyDeclaration = member; let mods = ts.getCombinedModifierFlags(prop); @@ -188,7 +191,7 @@ function buildInputsTable(inputs: any[]) { pDesc = pDesc.replace(/[\n\r]+/, " "); } - var descCellContent = [unist.makeText(pDesc)]; + var descCellContent = remark().parse(pDesc).children; if (pDefault) { descCellContent.push(unist.makeHTML("
")); @@ -235,7 +238,7 @@ function buildOutputsTable(outputs: any[]) { var cells = [ unist.makeTableCell([unist.makeText(eName)]), unist.makeTableCell([unist.makeInlineCode(eType)]), - unist.makeTableCell([unist.makeText(eDesc)]) + unist.makeTableCell(remark().parse(eDesc).children) ]; rows.push(unist.makeTableRow(cells)); diff --git a/lib/content-services/breadcrumb/breadcrumb.component.ts b/lib/content-services/breadcrumb/breadcrumb.component.ts index ae63523d48..9679c7690e 100644 --- a/lib/content-services/breadcrumb/breadcrumb.component.ts +++ b/lib/content-services/breadcrumb/breadcrumb.component.ts @@ -30,15 +30,26 @@ import { DocumentListComponent } from '../document-list'; }) export class BreadcrumbComponent implements OnChanges { + /** Active node, builds UI based on folderNode.path.elements collection. */ @Input() folderNode: MinimalNodeEntryEntity = null; + /** (optional) Name of the root element of the breadcrumb. You can use + * this property to rename "Company Home" to "Personal Files" for + * example. You can use an i18n resource key for the property value. + */ @Input() root: string = null; + /** (optional) The id of the root element. You can use this property + * to set a custom element the breadcrumb should start with. + */ @Input() rootId: string = null; + /** (optional) Document List component to operate with. The list will + * update when the breadcrumb is clicked. + */ @Input() target: DocumentListComponent; @@ -48,6 +59,7 @@ export class BreadcrumbComponent implements OnChanges { return !!this.root; } + /** Emitted when the user clicks on a breadcrumb. */ @Output() navigate: EventEmitter = new EventEmitter(); diff --git a/lib/content-services/document-list/components/content-action/content-action.component.ts b/lib/content-services/document-list/components/content-action/content-action.component.ts index 5361cdfad5..6c0f93fd92 100644 --- a/lib/content-services/document-list/components/content-action/content-action.component.ts +++ b/lib/content-services/document-list/components/content-action/content-action.component.ts @@ -35,36 +35,51 @@ import { ContentActionListComponent } from './content-action-list.component'; }) export class ContentActionComponent implements OnInit, OnChanges { + /** The title of the action as shown in the menu. */ @Input() title: string = 'Action'; + /** The name of the icon to display next to the menu command (can be left blank). */ @Input() icon: string; + /** System actions. Can be "delete", "download", "copy" or "move". */ @Input() handler: string; + /** Type of item that the action appies to. Can be "document" or "folder" */ @Input() target: string; + /** The permission type. */ @Input() permission: string; + /** Should this action be disabled in the menu if the user doesn't have permission for it? */ @Input() disableWithNoPermission: boolean; + /** Is the menu item disabled? */ @Input() disabled: boolean = false; + /** Emitted when the user selects the action from the menu. */ @Output() execute = new EventEmitter(); + /** Emitted when a permission error occurs */ @Output() permissionEvent = new EventEmitter(); + /** Emitted when an error occurs during the action. + * Applies to copy and move actions. + */ @Output() error = new EventEmitter(); + /** Emitted when the action succeeds with the success string message. + * Applies to copy, move and delete actions. + */ @Output() success = new EventEmitter(); diff --git a/lib/core/collapsable/accordion-group.component.ts b/lib/core/collapsable/accordion-group.component.ts index c4b98a9bfb..939b29516b 100644 --- a/lib/core/collapsable/accordion-group.component.ts +++ b/lib/core/collapsable/accordion-group.component.ts @@ -31,21 +31,27 @@ export class AccordionGroupComponent implements OnDestroy { @ViewChild('contentWrapper') contentWrapper: any; + /** Title heading for the group. */ @Input() heading: string; + /** The material design icon. */ @Input() headingIcon: string; + /** Tooltip message to be shown for headingIcon */ @Input() headingIconTooltip: string; + /** Should the (expanded) accordion icon be shown? */ @Input() hasAccordionIcon: boolean = true; + /** Emitted when the heading is clicked. */ @Output() headingClick: EventEmitter = new EventEmitter(); + /** Is this group currently open? */ @Input() set isOpen(value: boolean) { this._isOpen = value; @@ -58,6 +64,7 @@ export class AccordionGroupComponent implements OnDestroy { return this._isOpen; } + /** Is this group currently selected? */ @Input() set isSelected(value: boolean) { this._isSelected = value; diff --git a/lib/core/data-column/data-column.component.ts b/lib/core/data-column/data-column.component.ts index 3ca4e25213..938bf1db9b 100644 --- a/lib/core/data-column/data-column.component.ts +++ b/lib/core/data-column/data-column.component.ts @@ -25,33 +25,44 @@ import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/co }) export class DataColumnComponent implements OnInit { + /** Data source key. Can be either a column/property key like `title` + * or a property path like `createdBy.name`. + */ @Input() key: string; + /** Value type for the column. Possible settings are 'text', 'image', + * 'date', 'fileSize' and 'location'. + */ @Input() type: string = 'text'; + /** Value format (if supported by the parent component), for example format of the date. */ @Input() format: string; + /** Toggles ability to sort by this column, for example by clicking the column header. */ @Input() sortable: boolean = true; + /** Display title of the column, typically used for column headers. You can use the + * i18n resource key to get it translated automatically. + */ @Input() title: string = ''; @ContentChild(TemplateRef) template: any; + /** Custom tooltip formatter function. */ @Input() formatTooltip: Function; - /** - * Title to be used for screen readers. - */ + /** Title to be used for screen readers. */ @Input('sr-title') srTitle: string; + /** Additional CSS class to be applied to column (header and cells). */ @Input('class') cssClass: string; diff --git a/lib/process-services/app-list/apps-list.component.ts b/lib/process-services/app-list/apps-list.component.ts index 01bbb8a786..fb3e83aec6 100644 --- a/lib/process-services/app-list/apps-list.component.ts +++ b/lib/process-services/app-list/apps-list.component.ts @@ -37,15 +37,21 @@ export class AppsListComponent implements OnInit { public static DEFAULT_TASKS_APP_ICON: string = 'glyphicon-asterisk'; public static DEFAULT_TASKS_APP_MATERIAL_ICON: string = 'favorite_border'; + /** (**required**) Defines the layout of the apps. There are two possible + * values, "GRID" and "LIST". + */ @Input() layoutType: string = AppsListComponent.LAYOUT_GRID; + /** Provides a way to filter the apps to show. */ @Input() filtersAppId: any[]; + /** Emitted when an app entry is clicked. */ @Output() appClick: EventEmitter = new EventEmitter(); + /** Emitted when an error occurs. */ @Output() error: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/attachment/create-process-attachment.component.ts b/lib/process-services/attachment/create-process-attachment.component.ts index 669e137f05..c06bbb4b69 100644 --- a/lib/process-services/attachment/create-process-attachment.component.ts +++ b/lib/process-services/attachment/create-process-attachment.component.ts @@ -25,12 +25,19 @@ import { ProcessContentService } from '@alfresco/adf-core'; }) export class CreateProcessAttachmentComponent implements OnChanges { + /** (required) The ID of the process instance to display. */ @Input() processInstanceId: string; + /** Emitted when an error occurs while creating or uploading an attachment + * from the user within the component. + */ @Output() error: EventEmitter = new EventEmitter(); + /** Emitted when an attachment is successfully created or uploaded + * from within the component. + */ @Output() success: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/attachment/create-task-attachment.component.ts b/lib/process-services/attachment/create-task-attachment.component.ts index 65310420e3..037136c9d5 100644 --- a/lib/process-services/attachment/create-task-attachment.component.ts +++ b/lib/process-services/attachment/create-task-attachment.component.ts @@ -25,12 +25,19 @@ import { ProcessContentService } from '@alfresco/adf-core'; }) export class AttachmentComponent implements OnChanges { + /** (required) The numeric ID of the task to display. */ @Input() taskId: string; + /** Emitted when an error occurs while creating or uploading an + * attachment from the user within the component. + */ @Output() error: EventEmitter = new EventEmitter(); + /** Emitted when an attachment is created or uploaded successfully + * from within the component. + */ @Output() success: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/comments/comment-list.component.ts b/lib/process-services/comments/comment-list.component.ts index 3f4bc1f27b..92d357f838 100644 --- a/lib/process-services/comments/comment-list.component.ts +++ b/lib/process-services/comments/comment-list.component.ts @@ -27,9 +27,11 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; export class CommentListComponent { + /** The comments data used to populate the list. */ @Input() comments: CommentProcessModel[]; + /** Emitted when the user clicks on one of the comment rows. */ @Output() clickRow: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/comments/comments.component.ts b/lib/process-services/comments/comments.component.ts index 08102ae930..eece99d06b 100644 --- a/lib/process-services/comments/comments.component.ts +++ b/lib/process-services/comments/comments.component.ts @@ -27,12 +27,15 @@ import { Observer } from 'rxjs/Observer'; }) export class CommentsComponent implements OnChanges { + /** The numeric ID of the task. */ @Input() taskId: string; + /** Are the comments read only? */ @Input() readOnly: boolean = false; + /** Emitted when an error occurs while displaying/adding a comment. */ @Output() error: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/task-list/components/checklist.component.ts b/lib/process-services/task-list/components/checklist.component.ts index adf8fc2e84..02283bc543 100644 --- a/lib/process-services/task-list/components/checklist.component.ts +++ b/lib/process-services/task-list/components/checklist.component.ts @@ -30,21 +30,31 @@ import { TaskListService } from './../services/tasklist.service'; }) export class ChecklistComponent implements OnInit, OnChanges { + /** (required) The id of the parent task to which subtasks are + * attached. + */ @Input() taskId: string; + /** Toggle readonly state of the form. All form widgets + * will render as readonly if enabled. + */ @Input() readOnly: boolean = false; + /** (required) The assignee id that the subtasks are assigned to. */ @Input() assignee: string; + /** Emitted when a new checklist task is created. */ @Output() checklistTaskCreated: EventEmitter = new EventEmitter(); + /** Emitted when a checklist task is deleted. */ @Output() checklistTaskDeleted: EventEmitter = new EventEmitter(); + /** Emitted when an error occurs. */ @Output() error: EventEmitter = new EventEmitter();