diff --git a/docs/start-form.component.md b/docs/start-form.component.md index a8d1d18f53..0e2186529d 100644 --- a/docs/start-form.component.md +++ b/docs/start-form.component.md @@ -15,19 +15,46 @@ Displays the Start Form for a process. ### Properties -| Name | Type | Default | Description | -| ---- | ---- | ------- | ----------- | -| processDefinitionId | string | | Definition ID of the process to start. | -| processId | string | | Process ID of the process to start. | -| showOutcomeButtons | boolean | true | Should form outcome buttons be shown? | -| showRefreshButton | boolean | true | | -| readOnlyForm | boolean | false | Is the form read-only (ie, can't be edited)? | +| Name | Type | Default value | Description | +| ---- | ---- | ------------- | ----------- | +| processDefinitionId | `string` | | Definition ID of the process to start. | +| processId | `string` | | Process ID of the process to start. | +| showOutcomeButtons | `boolean` | `true` | Should form outcome buttons be shown? | +| showRefreshButton | `boolean` | `true` | Should the refresh button be shown? | +| readOnlyForm | `boolean` | `false` | Is the form read-only (ie, can't be edited)? | +| form | `FormModel` | | Underlying form model instance. | +| taskId | `string` | | Task id to fetch corresponding form and values. | +| nodeId | `string` | | Content Services node ID for the form metadata. | +| formId | `string` | | The id of the form definition to load and display with custom values. | +| formName | `string` | | Name of the form definition to load and display with custom values. | +| saveMetadata | `boolean` | `false` | Toggle saving of form metadata. | +| data | `FormValues` | | Custom form values map to be used with the rendered form. | +| path | `string` | | Path of the folder where the metadata will be stored. | +| nameNode | `string` | | Name to assign to the new node where the metadata are stored. | +| showTitle | `boolean` | `true` | Toggle rendering of the form title. | +| showCompleteButton | `boolean` | `true` | Toggle rendering of the `Complete` outcome button. | +| disableCompleteButton | `boolean` | `false` | If true then the `Complete` outcome button is shown but it will be disabled. | +| disableStartProcessButton | `boolean` | `false` | If true then the `Start Process` outcome button is shown but it will be disabled. | +| showSaveButton | `boolean` | `true` | Toggle rendering of the `Save` outcome button. | +| showDebugButton | `boolean` | `false` | Toggle debug options. | +| readOnly | `boolean` | `false` | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. | +| showRefreshButton | `boolean` | `true` | Toggle rendering of the `Refresh` button. | +| showValidationIcon | `boolean` | `true` | Toggle rendering of the validation icon next to the form title. | +| fieldValidators | `FormFieldValidator[]` | `[]` | Contains a list of form field validator instances. | ### Events -| Name | Description | -| ---- | ----------- | -| outcomeClick | Emitted when the user clicks one of the outcome buttons that completes the form. | +| Name | Type | Description | +| ---- | ---- | ----------- | +| outcomeClick | `EventEmitter` | Emitted when the user clicks one of the outcome buttons that completes the form. | +| formContentClicked | `EventEmitter` | Emitted when a field of the form is clicked. | +| 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 form content is clicked. | +| formLoaded | `EventEmitter` | Emitted when the form is loaded or reloaded. | +| formDataRefreshed | `EventEmitter` | Emitted when form values are refreshed due to a data property change. | +| executeOutcome | `EventEmitter` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. | +| onError | `EventEmitter` | Emitted when any error occurs. | ## Details diff --git a/docs/start-process.component.md b/docs/start-process.component.md index 334fd6246d..fff5d3f482 100644 --- a/docs/start-process.component.md +++ b/docs/start-process.component.md @@ -15,21 +15,21 @@ Starts a process. ### Properties | Name | Type | Description | -| ---- | -- | ----------- | +| ---- | ---- | ----------- | | appId | `number` | (optional): Limit the list of processes which can be started to those contained in the specified app | | name | `string` | (optional) name to assign to the current process | | processDefinitionName | `string` | (optional) definition name of the process to start | -| variables | `ProcessInstanceVariable[]` |Variables in input to the process [RestVariable](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-activiti-rest-api/docs/RestVariable.md) | +| variables | `ProcessInstanceVariable[]` | Variables in input to the process [RestVariable](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-activiti-rest-api/docs/RestVariable.md) | | values | `FormValues` | Parameter to pass form field values in the start form if is associated | -| showSelectProcessDropdown | `boolean` | hide or show the process selection drodown, true by default | +| showSelectProcessDropdown | `boolean` | hide or show the process selection drodown, true by default | ### Events | Name | Type | Description | -| ---- | -- | --------- | +| ---- | ---- | ----------- | | start | `EventEmitter` | Emitted when the process starts | -| cancel | `EventEmitter` | Emitted when the process is canceled | -| error | `EventEmitter` | Emitted when the start process operation fails | +| cancel | `EventEmitter` | Emitted when the process is canceled | +| error | `EventEmitter` | Emitted when the start process operation fails | ### Start a process with a default name and pre-selected process definition name @@ -53,7 +53,6 @@ If your app has more than one process definition, with the property processDefin With the property processDefinitionName you can select as dropdown default value your PROCESS_DEFINITION_NAME. - ### Custom data example Here is an example of how to pass in form field values to initialize the start form that has been diff --git a/docs/start-task.component.md b/docs/start-task.component.md index d1def48554..eee037b420 100644 --- a/docs/start-task.component.md +++ b/docs/start-task.component.md @@ -14,14 +14,14 @@ Creates/Starts new task for the specified app ### Properties -| Name | Type | Description | -| --- | --- | --- | -| appId | string | (**required**): The id of the app. | +| Name | Type | Default value | Description | +| ---- | ---- | ------------- | ----------- | +| appId | `number` | | (required) The id of the app. | ### Events -| Name | Description | -| --- | --- | -| success | Raised when the task is successfully created | -| cancel | Raised when the cancel button is pressed by the user | -| error | Raised if there is an error during task creation | +| Name | Type | Description | +| ---- | ---- | ----------- | +| success | `EventEmitter` | Emitted when the task is successfully created. | +| cancel | `EventEmitter` | Emitted when the cancel button is clicked by the user. | +| error | `EventEmitter` | Emitted when an error occurs. | diff --git a/docs/tag-actions.component.md b/docs/tag-actions.component.md index ad6974f559..84866ed573 100644 --- a/docs/tag-actions.component.md +++ b/docs/tag-actions.component.md @@ -14,6 +14,14 @@ Shows available actions for tags. ### Properties -| Attribute | Type | Default | Description | -| --------- | ---- | ------- | ----------- | -| nodeId | string | | The identifier of a node | +| Name | Type | Default value | Description | +| ---- | ---- | ------------- | ----------- | +| nodeId | `string` | | The identifier of a node. | + +### Events + +| Name | Type | Description | +| ---- | ---- | ----------- | +| successAdd | `EventEmitter` | Emitted when a tag is added successfully. | +| error | `EventEmitter` | Emitted when an error occurs. | +| result | `EventEmitter<{}>` | Emitted when an action is chosen. | diff --git a/docs/tag-list.component.md b/docs/tag-list.component.md index 5fb700cdc5..e3d29a16ec 100644 --- a/docs/tag-list.component.md +++ b/docs/tag-list.component.md @@ -4,6 +4,14 @@ Shows tags for an item. ![Custom columns](docassets/images/tag2.png) +## Basic Usage + +### Events + +| Name | Type | Description | +| ---- | ---- | ----------- | +| result | `EventEmitter<{}>` | Emitted when a tag is selected. | + ## See Also - [Tag service](tag.service.md) diff --git a/docs/tag-node-list.component.md b/docs/tag-node-list.component.md index 30e4dd4dea..d570437832 100644 --- a/docs/tag-node-list.component.md +++ b/docs/tag-node-list.component.md @@ -14,6 +14,12 @@ Shows tags for a node. ### Properties -| Attribute | Type | Default | Description | -| --------- | ---- | ------- | ----------- | -| nodeId | string | | The identifier of a node | +| Name | Type | Default value | Description | +| ---- | ---- | ------------- | ----------- | +| nodeId | `string` | | The identifier of a node. | + +### Events + +| Name | Type | Description | +| ---- | ---- | ----------- | +| results | `EventEmitter<{}>` | Emitted when a tag is selected. | diff --git a/docs/task-attachment-list.component.md b/docs/task-attachment-list.component.md index c1f27086a3..80465d180c 100644 --- a/docs/task-attachment-list.component.md +++ b/docs/task-attachment-list.component.md @@ -12,13 +12,14 @@ Displays attached documents on a specified task. (attachmentClick)="YOUR_HANDLER"> ``` + If the List is empty, a default no content template is displayed. ![default-no-content-template-sample](docassets/images/default-no-content-template.png) ### How to Add Drag and Drop Functionality -If we want user to be able to upload attachments for empty lists, We can wrap our component with upload drag area component. In that case, We should also pass a custom *no content template* as shown below with our component urging the user to drag files to upload whenever the list is empty. +If we want user to be able to upload attachments for empty lists, We can wrap our component with upload drag area component. In that case, We should also pass a custom _no content template_ as shown below with our component urging the user to drag files to upload whenever the list is empty. ```html ` | Emitted when the attachment is double-clicked or a view option is selected from the context menu by the user from within the component. Returns a Blob representing the clicked object. | +| success | `EventEmitter<{}>` | Emitted when the attachment list has fetched all the attachments. Returns a list of attachments. | +| error | `EventEmitter` | Emitted when an error occurs while fetching the attachments. | diff --git a/lib/content-services/tag/tag-actions.component.ts b/lib/content-services/tag/tag-actions.component.ts index fd7068f56e..81f52fcbf0 100644 --- a/lib/content-services/tag/tag-actions.component.ts +++ b/lib/content-services/tag/tag-actions.component.ts @@ -34,15 +34,19 @@ import { TagService } from './services/tag.service'; }) export class TagActionsComponent implements OnChanges { + /** The identifier of a node. */ @Input() nodeId: string; + /** Emitted when a tag is added successfully. */ @Output() successAdd: EventEmitter = new EventEmitter(); + /** Emitted when an error occurs. */ @Output() error: EventEmitter = new EventEmitter(); + /** Emitted when an action is chosen. */ @Output() result = new EventEmitter(); diff --git a/lib/content-services/tag/tag-list.component.ts b/lib/content-services/tag/tag-list.component.ts index e28bf97bf9..ff6ac69700 100644 --- a/lib/content-services/tag/tag-list.component.ts +++ b/lib/content-services/tag/tag-list.component.ts @@ -35,6 +35,7 @@ export class TagListComponent implements OnInit { tagsEntries: any; + /** Emitted when a tag is selected. */ @Output() result = new EventEmitter(); diff --git a/lib/content-services/tag/tag-node-list.component.ts b/lib/content-services/tag/tag-node-list.component.ts index 65dcb5b209..2fea66e01a 100644 --- a/lib/content-services/tag/tag-node-list.component.ts +++ b/lib/content-services/tag/tag-node-list.component.ts @@ -32,12 +32,13 @@ import { TagService } from './services/tag.service'; encapsulation: ViewEncapsulation.None }) export class TagNodeListComponent implements OnChanges { - + /** The identifier of a node. */ @Input() nodeId: string; tagsEntries: any; + /** Emitted when a tag is selected. */ @Output() results = new EventEmitter(); diff --git a/lib/core/form/components/start-form.component.ts b/lib/core/form/components/start-form.component.ts index 8d8a7d566d..fba4d3d36f 100644 --- a/lib/core/form/components/start-form.component.ts +++ b/lib/core/form/components/start-form.component.ts @@ -48,24 +48,31 @@ import { FormOutcomeModel } from './widgets/core/index'; }) export class StartFormComponent extends FormComponent implements OnChanges, OnInit { + /** Definition ID of the process to start. */ @Input() processDefinitionId: string; + /** Process ID of the process to start. */ @Input() processId: string; + /** Should form outcome buttons be shown? */ @Input() showOutcomeButtons: boolean = true; + /** Should the refresh button be shown? */ @Input() showRefreshButton: boolean = true; + /** Is the form read-only (ie, can't be edited)? */ @Input() readOnlyForm: boolean = false; + /** Emitted when the user clicks one of the outcome buttons that completes the form. */ @Output() outcomeClick: EventEmitter = new EventEmitter(); + /** Emitted when a field of the form is clicked. */ @Output() formContentClicked: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/attachment/task-attachment-list.component.ts b/lib/process-services/attachment/task-attachment-list.component.ts index e2ff5606bb..d4f49a44c7 100644 --- a/lib/process-services/attachment/task-attachment-list.component.ts +++ b/lib/process-services/attachment/task-attachment-list.component.ts @@ -30,18 +30,28 @@ export class TaskAttachmentListComponent implements OnChanges, AfterContentInit @ContentChild(EmptyListComponent) emptyTemplate: EmptyListComponent; + /** (**required**) The ID of the task to display. */ @Input() taskId: string; + /** Disable/Enable read only mode for attachement list. */ @Input() disabled: boolean = false; + /** Emitted when the attachment is double-clicked or a view + * option is selected from the context menu by the user from within the component. + * Returns a Blob representing the clicked object. + */ @Output() attachmentClick = new EventEmitter(); + /** Emitted when the attachment list has fetched all the attachments. + * Returns a list of attachments. + */ @Output() success = new EventEmitter(); + /** Emitted when an error occurs while fetching the attachments. */ @Output() error: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/process-list/components/start-process.component.ts b/lib/process-services/process-list/components/start-process.component.ts index d08fda65ea..f26887921a 100644 --- a/lib/process-services/process-list/components/start-process.component.ts +++ b/lib/process-services/process-list/components/start-process.component.ts @@ -46,30 +46,43 @@ import { AttachFileWidgetComponent, AttachFolderWidgetComponent } from '../../co }) export class StartProcessInstanceComponent implements OnChanges { + /** (optional) Limit the list of processes that can be started to those + * contained in the specified app. + */ @Input() appId: number; + /** (optional) Definition name of the process to start. */ @Input() processDefinitionName: string; + /** Variables in input to the process + * [RestVariable](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-activiti-rest-api/docs/RestVariable.md). + */ @Input() variables: ProcessInstanceVariable[]; + /** Parameter to pass form field values in the start form if it is associated. */ @Input() values: FormValues; + /** (optional) Name to assign to the current process. */ @Input() name: string; + /** Hide or show the process selection drodown. */ @Input() showSelectProcessDropdown: boolean = true; + /** Emitted when the process starts. */ @Output() start: EventEmitter = new EventEmitter(); + /** Emitted when the process is canceled. */ @Output() cancel: EventEmitter = new EventEmitter(); + /** Emitted when an error occurs. */ @Output() error: EventEmitter = new EventEmitter(); diff --git a/lib/process-services/task-list/components/start-task.component.ts b/lib/process-services/task-list/components/start-task.component.ts index 68e626f59d..85eea416ff 100644 --- a/lib/process-services/task-list/components/start-task.component.ts +++ b/lib/process-services/task-list/components/start-task.component.ts @@ -40,15 +40,19 @@ export class StartTaskComponent implements OnInit { public FORMAT_DATE: string = 'DD/MM/YYYY'; + /** (required) The id of the app. */ @Input() appId: number; + /** Emitted when the task is successfully created. */ @Output() success: EventEmitter = new EventEmitter(); + /** Emitted when the cancel button is clicked by the user. */ @Output() cancel: EventEmitter = new EventEmitter(); + /** Emitted when an error occurs. */ @Output() error: EventEmitter = new EventEmitter();