mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4858] Make sure process-services works with ng commands (#5067)
* Process-services: Making sure you can run ng build process-services ng test process-services * Fix the path of the styles * move the file in the right place
This commit is contained in:
committed by
Eugenio Romano
parent
90b2cee70d
commit
cd7e21a23d
@@ -11,14 +11,14 @@ Represents a UI field in a form.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
All form field editors (aka widgets) on a [`Form`](../../../lib/process-services/task-list/models/form.model.ts) are rendered by means of a [`FormFieldComponent`](../../core/components/form-field.component.md)
|
||||
All form field editors (aka widgets) on a [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) are rendered by means of a [`FormFieldComponent`](../../core/components/form-field.component.md)
|
||||
that takes an instance of a [`FormFieldModel`](../../core/models/form-field.model.md):
|
||||
|
||||
```html
|
||||
<adf-form-field [field]="field"></adf-form-field>
|
||||
```
|
||||
|
||||
This component depends on the [`FormRenderingService`](../../core/services/form-rendering.service.md) to map the [`FormFieldModel`](../../core/models/form-field.model.md) to a [`Form`](../../../lib/process-services/task-list/models/form.model.ts) Field UI component
|
||||
This component depends on the [`FormRenderingService`](../../core/services/form-rendering.service.md) to map the [`FormFieldModel`](../../core/models/form-field.model.md) to a [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Field UI component
|
||||
based on the field type or the metadata information.
|
||||
|
||||
## Class members
|
||||
@@ -38,7 +38,7 @@ uses `<adf-form-field>` components to render the form fields.
|
||||
|
||||
Forms defined in APS have the following default mappings for the form fields:
|
||||
|
||||
| _APS [`Form`](../../../lib/process-services/task-list/models/form.model.ts) Designer_ Widget | Field Type | Component Type |
|
||||
| _APS [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Designer_ Widget | Field Type | Component Type |
|
||||
| -------------------------------------------------------------------------------------------- | ---------- | -------------- |
|
||||
| Text | text | [`TextWidgetComponent`](../../../lib/core/form/components/widgets/text/text.widget.ts) |
|
||||
| Multi-line text | multi-line-text | [`MultilineTextWidgetComponentComponent`](../../../lib/core/form/components/widgets/multiline-text/multiline-text.widget.ts) |
|
||||
|
@@ -5,9 +5,9 @@ Status: Active
|
||||
Last reviewed: 2018-06-08
|
||||
---
|
||||
|
||||
# [Start Form component](../../../lib/process-services/form/start-form.component.ts "Defined in start-form.component.ts")
|
||||
# [Start Form component](../../../lib/process-services/src/lib/form/start-form.component.ts "Defined in start-form.component.ts")
|
||||
|
||||
Displays the Start [`Form`](../../../lib/process-services/task-list/models/form.model.ts) for a process.
|
||||
Displays the Start [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) for a process.
|
||||
|
||||

|
||||
|
||||
@@ -66,7 +66,7 @@ Displays the Start [`Form`](../../../lib/process-services/task-list/models/form.
|
||||
|
||||
## Details
|
||||
|
||||
The [Start Process component](../../process-services/components/start-process.component.md) uses the Start [`Form`](../../../lib/process-services/task-list/models/form.model.ts) component
|
||||
The [Start Process component](../../process-services/components/start-process.component.md) uses the Start [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) component
|
||||
to display the
|
||||
[start form](http://docs.alfresco.com/process-services1.6/topics/none_start_event.html)
|
||||
for the process.
|
||||
|
@@ -6,7 +6,7 @@ Status: Active
|
||||
|
||||
# [FormFieldValidator interface](../../../lib/core/form/components/widgets/core/form-field-validator.ts "Defined in form-field-validator.ts")
|
||||
|
||||
Defines how the input fields of [`Form`](../../../lib/process-services/task-list/models/form.model.ts) and Task Details components are validated.
|
||||
Defines how the input fields of [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) and Task Details components are validated.
|
||||
|
||||
## Basic Usage
|
||||
|
||||
@@ -73,7 +73,7 @@ Several validator classes are predefined for you to use:
|
||||
| [`MinDateFieldValidator`](../../../lib/core/form/components/widgets/core/form-field-validator.ts) | Date within a field occurs after a certain starting point |
|
||||
| [`MaxDateFieldValidator`](../../../lib/core/form/components/widgets/core/form-field-validator.ts) | Date within a field occurs before a certain end point |
|
||||
|
||||
The `FORM_FIELD_VALIDATORS` array contains an instance of each of these classes. You can assign this to the `fieldValidators` property of a [`Form`](../../../lib/process-services/task-list/models/form.model.ts) or [Task Details component](../../process-services/components/task-details.component.md) to enable standard validation.
|
||||
The `FORM_FIELD_VALIDATORS` array contains an instance of each of these classes. You can assign this to the `fieldValidators` property of a [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) or [Task Details component](../../process-services/components/task-details.component.md) to enable standard validation.
|
||||
|
||||
### Custom validators
|
||||
|
||||
@@ -128,7 +128,7 @@ export class AppComponent {
|
||||
}
|
||||
```
|
||||
|
||||
You can now use the 'fieldValidators' property of the [`Form`](../../../lib/process-services/task-list/models/form.model.ts) or Task Details components to assign your
|
||||
You can now use the 'fieldValidators' property of the [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) or Task Details components to assign your
|
||||
custom validator set:
|
||||
|
||||
```html
|
||||
|
@@ -7,7 +7,7 @@ Last reviewed: 2018-03-20
|
||||
|
||||
# [Form Field model](../../../lib/core/form/components/widgets/core/form-field.model.ts "Defined in form-field.model.ts")
|
||||
|
||||
Contains the value and metadata for a field of a [`Form`](../../../lib/process-services/task-list/models/form.model.ts) component.
|
||||
Contains the value and metadata for a field of a [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) component.
|
||||
|
||||
## Properties
|
||||
|
||||
@@ -67,7 +67,7 @@ example, the `currency` property holds the currency symbol to be displayed next
|
||||
|
||||
### Validation
|
||||
|
||||
A [`Form`](../../../lib/process-services/task-list/models/form.model.ts) or [Task Details](../../process-services/components/task-details.component.md) component can
|
||||
A [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) or [Task Details](../../process-services/components/task-details.component.md) component can
|
||||
be supplied with a set of validator objects. Each validator applies a particular kind of
|
||||
check to a field. A number of [`FormFieldModel`](../../core/models/form-field.model.md) properties are used by validators. For
|
||||
example, `minValue` and `maxValue` are used to check that a numeric value falls within an
|
||||
|
@@ -20,7 +20,7 @@ Maps type names to field component types for the [Card View component](../compon
|
||||
- **Returns** [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts) - Resolver function
|
||||
- **resolveComponentType**(model: [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts), defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/>
|
||||
Finds the component type that is needed to render a form field.
|
||||
- _model:_ [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../../lib/process-services/task-list/models/form.model.ts) field model for the field to render
|
||||
- _model:_ [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) field model for the field to render
|
||||
- _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
|
||||
- **Returns** `Type<__type>` - Component type
|
||||
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
||||
|
@@ -20,7 +20,7 @@ Maps a form field type string onto the corresponding form [widget component](../
|
||||
- **Returns** [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts) - Resolver function
|
||||
- **resolveComponentType**(model: [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts), defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/>
|
||||
Finds the component type that is needed to render a form field.
|
||||
- _model:_ [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../../lib/process-services/task-list/models/form.model.ts) field model for the field to render
|
||||
- _model:_ [`DynamicComponentModel`](../../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../../lib/process-services/src/lib/task-list/models/form.model.ts) field model for the field to render
|
||||
- _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
|
||||
- **Returns** `Type<__type>` - Component type
|
||||
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
||||
@@ -31,9 +31,9 @@ Maps a form field type string onto the corresponding form [widget component](../
|
||||
|
||||
## Details
|
||||
|
||||
The [`Form`](../../../lib/process-services/task-list/models/form.model.ts) Field component uses this service to choose which widget to use to render an instance of a
|
||||
form field. The [`Form`](../../../lib/process-services/task-list/models/form.model.ts) Field model stores the field type name as a string (see the table below).
|
||||
The [`Form`](../../../lib/process-services/task-list/models/form.model.ts) Rendering service maintains a mapping between each type name and
|
||||
The [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Field component uses this service to choose which widget to use to render an instance of a
|
||||
form field. The [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Field model stores the field type name as a string (see the table below).
|
||||
The [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Rendering service maintains a mapping between each type name and
|
||||
a corresponding [`DynamicComponentResolveFunction`](../../../lib/core/services/dynamic-component-mapper.service.ts). The function takes a [`FormFieldModel`](../../core/models/form-field.model.md) object as its argument and
|
||||
uses the data from the object to determine which widget should be used to render the field.
|
||||
|
||||
@@ -60,7 +60,7 @@ formRenderingService.setComponentTypeResolver('text', customResolver, true);
|
||||
|
||||
### Default type mapping
|
||||
|
||||
The [`Form`](../../../lib/process-services/task-list/models/form.model.ts) Rendering service is initialized with the mapping shown in the table below:
|
||||
The [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Rendering service is initialized with the mapping shown in the table below:
|
||||
|
||||
| Stencil name | Field type string | Component type |
|
||||
| ------------ | ----------------- | -------------- |
|
||||
|
@@ -53,15 +53,15 @@ class MyComponent {
|
||||
### Methods
|
||||
|
||||
- `parseForm(json: any, data?:`[`FormValues,`](../../../lib/core/form/components/widgets/core/form-values.ts)`readOnly: boolean = false):`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)
|
||||
Parses JSON data to create a corresponding [`Form`](../../../lib/process-services/task-list/models/form.model.ts) model.
|
||||
Parses JSON data to create a corresponding [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) model.
|
||||
- `json` - JSON to create the form
|
||||
- `data` - (Optional) Values for the form fields
|
||||
- `readOnly` - Should the form fields be read-only?
|
||||
- `createFormFromANode(formName: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
|
||||
Create a [`Form`](../../../lib/process-services/task-list/models/form.model.ts) with a field for each metadata property.
|
||||
Create a [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) with a field for each metadata property.
|
||||
- `formName` - Name of the new form
|
||||
- `createForm(formName: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
|
||||
Create a [`Form`](../../../lib/process-services/task-list/models/form.model.ts).
|
||||
Create a [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts).
|
||||
- `formName` - Name of the new form
|
||||
- `saveForm(formId: string, formModel: FormDefinitionModel):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
|
||||
Saves a form.
|
||||
@@ -86,14 +86,14 @@ class MyComponent {
|
||||
Gets a task.
|
||||
- `taskId` - Task Id
|
||||
- `saveTaskForm(taskId: string, formValues: FormValues):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
|
||||
Save Task [`Form`](../../../lib/process-services/task-list/models/form.model.ts).
|
||||
Save Task [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts).
|
||||
- `taskId` - Task Id
|
||||
- `formValues` - [`Form`](../../../lib/process-services/task-list/models/form.model.ts) Values
|
||||
- `formValues` - [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Values
|
||||
- `completeTaskForm(taskId: string, formValues:`[`FormValues,`](../../../lib/core/form/components/widgets/core/form-values.ts)`outcome?: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
|
||||
Complete Task [`Form`](../../../lib/process-services/task-list/models/form.model.ts)
|
||||
Complete Task [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts)
|
||||
- `taskId` - Task Id
|
||||
- `formValues` - [`Form`](../../../lib/process-services/task-list/models/form.model.ts) Values
|
||||
- `outcome` - (Optional) [`Form`](../../../lib/process-services/task-list/models/form.model.ts) Outcome
|
||||
- `formValues` - [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Values
|
||||
- `outcome` - (Optional) [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Outcome
|
||||
- `getTaskForm(taskId: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
|
||||
Get [`Form`](../../../lib/process-services/task-list/models/form.model.ts) related to a taskId
|
||||
- `taskId` - Task Id
|
||||
|
Reference in New Issue
Block a user