Update doc (#8085)

This commit is contained in:
Eugenio Romano
2023-01-02 15:00:01 +01:00
committed by GitHub
parent 093b1e8a67
commit 00dfd7c5d9
158 changed files with 758 additions and 928 deletions

View File

@@ -54,13 +54,13 @@ Any content in the body of `<adf-form>` will be shown when no form definition is
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| data | [`FormValues`](lib/core/src/lib/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
| data | [`FormValues`](../../../lib/core/src/lib/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
| disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. |
| disableSaveButton | `boolean` | false | If true then the `Save` outcome button is shown but will be disabled. |
| disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. |
| enableFixedSpacedForm | `boolean` | true | The form will set a prefixed space for invisible fields. |
| fieldValidators | [`FormFieldValidator`](lib/core/src/lib/form/components/widgets/core/form-field-validator.ts)`[]` | | Contains a list of form field validator instances. |
| form | [`FormModel`](lib/core/src/lib/form/components/widgets/core/form.model.ts) | | Underlying form model instance. |
| fieldValidators | [`FormFieldValidator`](../../../lib/core/src/lib/form/components/widgets/core/form-field-validator.ts)`[]` | | Contains a list of form field validator instances. |
| form | [`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts) | | Underlying form model instance. |
| formId | `number` | | 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. |
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
@@ -80,17 +80,17 @@ Any content in the body of `<adf-form>` will be shown when no form definition is
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when any error occurs. |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../../lib/core/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/form/components/widgets/core/content-link.model.ts)`>` | Emitted when form content is clicked. |
| formDataRefreshed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when form values are refreshed due to a data property change. |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../../lib/core/src/lib/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/src/lib/form/components/widgets/core/content-link.model.ts)`>` | Emitted when form content is clicked. |
| formDataRefreshed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when form values are refreshed due to a data property change. |
| formError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormFieldModel`](../../core/models/form-field.model.md)`[]>` | Emitted when the supplied form values have a validation error. |
| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. |
| formSaved | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. |
| formSaved | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
## Details
All `formXXX` events receive a [`FormModel`](lib/core/src/lib/form/components/widgets/core/form.model.ts) instance as their argument:
All `formXXX` events receive a [`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts) instance as their argument:
**MyView.component.html**

View File

@@ -52,7 +52,7 @@ when the process list is empty:
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| appId | `number` | | The id of the app. |
| data | [`DataTableAdapter`](lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source to define the datatable. |
| data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source to define the datatable. |
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row |
| page | `number` | 0 | The page number of the processes to fetch. |
| presetColumn | `string` | | Custom preset column schema in JSON format. |
@@ -73,7 +73,7 @@ when the process list is empty:
| ---- | ---- | ----------- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs while loading the list of process instances from the server. |
| rowClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a row in the process list is clicked. |
| showRowContextMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted before the context menu is displayed for a row. |
| showRowContextMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/src/lib/datatable/components/data-cell.event.ts)`>` | Emitted before the context menu is displayed for a row. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessListModel`](../../../lib/process-services/src/lib/process-list/models/process-list.model.ts)`>` | Emitted when the list of process instances has been loaded successfully from the server. |
## Details

View File

@@ -47,7 +47,7 @@ Starts a process.
| showSelectApplicationDropdown | `boolean` | false | (optional) Hide or show application selection dropdown. |
| showSelectProcessDropdown | `boolean` | true | Hide or show the process selection dropdown. |
| title | `string` | | (optional) Define the header of the component. |
| values | [`FormValues`](lib/core/src/lib/form/components/widgets/core/form-values.ts) | | Parameter to pass form field values in the start form if one is associated. |
| values | [`FormValues`](../../../lib/core/src/lib/form/components/widgets/core/form-values.ts) | | Parameter to pass form field values in the start form if one is associated. |
| variables | [`ProcessInstanceVariable`](../../../lib/process-services/src/lib/process-list/models/process-instance-variable.model.ts)`[]` | | Variables in the input to the process [`RestVariable`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/activiti-rest-api/docs/RestVariable.md). |
### Events

View File

@@ -25,5 +25,5 @@ Displays comments from users involved in a specified task and allows an involved
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| taskId | `string` | | The numeric ID of the task. |
| readOnly | `boolean` | | Are the comments read only? |
| taskId | `string` | | The numeric ID of the task. |

View File

@@ -24,7 +24,7 @@ Shows the details of the task ID passed in as input.
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| debugMode | `boolean` | false | Toggles debug mode. |
| fieldValidators | [`FormFieldValidator`](lib/core/src/lib/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Field validators for use with the form. |
| fieldValidators | [`FormFieldValidator`](../../../lib/core/src/lib/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Field validators for use with the form. |
| readOnlyForm | `boolean` | false | Toggles read-only state of the form. All form widgets render as read-only if enabled. |
| showChecklist | `boolean` | true | Toggles `Checklist` feature for the Header component. |
| showComments | `boolean` | true | Toggles `Comments` feature for the Header component. |
@@ -45,11 +45,11 @@ Shows the details of the task ID passed in as input.
| assignTask | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<void>` | Emitted when a task is assigned. |
| claimedTask | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a task is claimed. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../../lib/core/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/form/components/widgets/core/content-link.model.ts)`>` | Emitted when the form field content is clicked. |
| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. |
| formSaved | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../../lib/core/src/lib/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/src/lib/form/components/widgets/core/content-link.model.ts)`>` | Emitted when the form field content is clicked. |
| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. |
| formSaved | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| taskCreated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsModel`](../../../lib/process-services/src/lib/task-list/models/task-details.model.ts)`>` | Emitted when a checklist task is created. |
| taskDeleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a checklist task is deleted. |
| unClaimedTask | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a task is unclaimed. |

View File

@@ -23,7 +23,7 @@ Shows a [`form`](../../../lib/process-services/src/lib/task-list/models/form.mod
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| fieldValidators | [`FormFieldValidator`](lib/core/src/lib/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Field validators for use with the form. |
| fieldValidators | [`FormFieldValidator`](../../../lib/core/src/lib/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Field validators for use with the form. |
| readOnlyForm | `boolean` | false | Toggles read-only state of the form. All form widgets render as read-only if enabled. |
| showCancelButton | `boolean` | true | Toggle rendering of the `Cancel` button. |
| showFormCompleteButton | `boolean` | true | Toggles rendering of the `Complete` outcome button. |
@@ -40,12 +40,12 @@ Shows a [`form`](../../../lib/process-services/src/lib/task-list/models/form.mod
| cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<void>` | Emitted when the "Cancel" button is clicked. |
| completed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<void>` | Emitted when the form associated with the task is completed. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../../lib/core/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/form/components/widgets/core/content-link.model.ts)`>` | Emitted when the form field content is clicked. |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../../lib/core/src/lib/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../../lib/core/src/lib/form/components/widgets/core/content-link.model.ts)`>` | Emitted when the form field content is clicked. |
| formError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormFieldModel`](../../core/models/form-field.model.md)`[]>` | Emitted when the supplied form values have a validation error. |
| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. |
| formSaved | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. |
| formSaved | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/src/lib/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| showAttachForm | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<void>` | Emitted when the form associated with the form task is attached. |
| taskClaimed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the task is claimed. |
| taskUnclaimed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the task is unclaimed (ie, requeued).. |

View File

@@ -55,7 +55,7 @@ when the task list is empty:
| ---- | ---- | ------------- | ----------- |
| appId | `number` | | The id of the app. |
| assignment | `string` | | The assignment of the process. Possible values are: "assignee" (the current user is the assignee), "candidate" (the current user is a task candidate, "group_x" (the task is assigned to a group where the current user is a member, no value (the current user is involved). |
| data | [`DataTableAdapter`](lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. |
| data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. |
| dueAfter | `string` | | Filter the tasks. Display only tasks with `created_date` after `dueAfter`. |
| dueBefore | `string` | | Filter the tasks. Display only tasks with `created_date` before `dueBefore`. |
| includeProcessInstance | `boolean` | | Toggles inclusion of Process Instances |
@@ -83,7 +83,7 @@ when the task list is empty:
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| rowClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when a task in the list is clicked |
| rowsSelected | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any[]>` | Emitted when rows are selected/unselected |
| showRowContextMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted before the context menu is displayed for a row. |
| showRowContextMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/src/lib/datatable/components/data-cell.event.ts)`>` | Emitted before the context menu is displayed for a row. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the task list is loaded |
## Details
@@ -215,7 +215,7 @@ The Tasklist also supports pagination as shown in the example below:
### DataTableAdapter example
See the [Data Table Adapter interface](../../core/interfaces/datatable-adapter.interface.md) page for full details of the interface and its standard
implementation, [`ObjectDataTableAdapter`](lib/core/src/lib/datatable/data/object-datatable-adapter.ts). Below is an example of how you can set up the adapter for a
implementation, [`ObjectDataTableAdapter`](../../../lib/core/src/lib/datatable/data/object-datatable-adapter.ts). Below is an example of how you can set up the adapter for a
typical tasklist:
```json

View File

@@ -62,14 +62,26 @@ Manages process instances, process variables, and process audit Log.
- _requestNode:_ [`ProcessFilterParamRepresentationModel`](../../../lib/process-services/src/lib/process-list/models/filter-process.model.ts) - Filter for instances
- _processDefinitionKey:_ `string` - (Optional) Limits returned instances to a process definition
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../../lib/process-services/src/lib/process-list/models/process-list.model.ts)`>` - List of processes
- **startProcess**(processDefinitionId: `string`, name: `string`, outcome?: `string`, startFormValues?: [`FormValues`](lib/core/src/lib/form/components/widgets/core/form-values.ts), variables?: [`ProcessInstanceVariable`](../../../lib/process-services/src/lib/process-list/models/process-instance-variable.model.ts)`[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../../lib/process-services/src/lib/process-list/models/process-instance.model.ts)`>`<br/>
- **getStartFormDefinition**(processId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets the start form definition for a given process.
- _processId:_ `string` - Process definition ID
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Form definition
- **getStartFormInstance**(processId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets the start form instance for a given process.
- _processId:_ `string` - Process definition ID
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Form definition
- **startProcess**(processDefinitionId: `string`, name: `string`, outcome?: `string`, startFormValues?: [`FormValues`](../../../lib/core/src/lib/form/components/widgets/core/form-values.ts), variables?: [`ProcessInstanceVariable`](../../../lib/process-services/src/lib/process-list/models/process-instance-variable.model.ts)`[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../../lib/process-services/src/lib/process-list/models/process-instance.model.ts)`>`<br/>
Starts a process based on a process definition, name, form values or variables.
- _processDefinitionId:_ `string` - Process definition ID
- _name:_ `string` - Process name
- _outcome:_ `string` - (Optional) Process outcome
- _startFormValues:_ [`FormValues`](lib/core/src/lib/form/components/widgets/core/form-values.ts) - (Optional) Values for the start form
- _startFormValues:_ [`FormValues`](../../../lib/core/src/lib/form/components/widgets/core/form-values.ts) - (Optional) Values for the start form
- _variables:_ [`ProcessInstanceVariable`](../../../lib/process-services/src/lib/process-list/models/process-instance-variable.model.ts)`[]` - (Optional) Array of process instance variables
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../../lib/process-services/src/lib/process-list/models/process-instance.model.ts)`>` - Details of the process instance just started
- **toJson**(res: `any`): `any`<br/>
Creates a JSON representation of form data.
- _res:_ `any` - Object representing form data
- **Returns** `any` - JSON data
## Details