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
@@ -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