mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-10777] Move in common service the real common services (#8203)
* Move in common service the real common services remove Pagination js-api dependencies move search-input component in content * fix unit * fix lint * fix * fix
This commit is contained in:
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2019-11-06
|
||||
---
|
||||
|
||||
# [Search Text Input Component](../../../lib/core/src/lib/search-text/search-text-input.component.ts "Defined in search-text-input.component.ts")
|
||||
# [Search Text Input Component](lib/content-services/src/lib/search-text/search-text-input.component.ts "Defined in search-text-input.component.ts")
|
||||
|
||||
Displays a input text that supports autocompletion
|
||||
|
||||
|
@@ -51,7 +51,7 @@ Picard's birthday (47457.1):
|
||||
1. Define the model for the custom type.
|
||||
|
||||
Your model must extend the [`CardViewBaseItemModel`](../../../lib/core/src/lib/card-view/models/card-view-baseitem.model.ts) class and implement the [`CardViewItem`](../../../lib/core/src/lib/card-view/interfaces/card-view-item.interface.ts)
|
||||
and [`DynamicComponentModel`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) interfaces. See the
|
||||
and [`DynamicComponentModel`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) interfaces. See the
|
||||
[Card View Text Item model source](https://github.com/Alfresco/alfresco-ng2-components/blob/develop/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.ts)
|
||||
for an example of how to do this.
|
||||
|
||||
|
@@ -4,7 +4,7 @@ Added: v2.1.0
|
||||
Status: Active
|
||||
---
|
||||
|
||||
# [Search Configuration interface](lib/core/src/lib/search-text/interfaces/search-configuration.interface.ts "Defined in search-configuration.interface.ts")
|
||||
# [Search Configuration interface](lib/content-services/src/lib/common/interface/search-configuration.interface.ts "Defined in search-configuration.interface.ts")
|
||||
|
||||
Provides fine control of parameters to a search.
|
||||
|
||||
|
@@ -13,31 +13,31 @@ Maps type names to field component types for the [Card View component](../compon
|
||||
|
||||
### Methods
|
||||
|
||||
- **getComponentTypeResolver**(type: `string`, defaultValue: `Type<any>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts)<br/>
|
||||
Gets the currently active [DynamicComponentResolveFunction](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) for a field type.
|
||||
- **getComponentTypeResolver**(type: `string`, defaultValue: `Type<any>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts)<br/>
|
||||
Gets the currently active [DynamicComponentResolveFunction](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) for a field type.
|
||||
- _type:_ `string` - The type whose resolver you want
|
||||
- _defaultValue:_ `Type<any>` - Default type returned for types that are not yet mapped
|
||||
- **Returns** [`DynamicComponentResolveFunction`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) - Resolver function
|
||||
- **Returns** [`DynamicComponentResolveFunction`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) - Resolver function
|
||||
- **register**(components: `Function`, override: `boolean` = `false`)<br/>
|
||||
Register multiple components
|
||||
- _components:_ `Function` -
|
||||
- _override:_ `boolean` -
|
||||
- **resolveComponentType**(model: [`DynamicComponentModel`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts), defaultValue: `Type<any>` = `this.defaultValue`): `Type<any>`<br/>
|
||||
- **resolveComponentType**(model: [`DynamicComponentModel`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts), defaultValue: `Type<any>` = `this.defaultValue`): `Type<any>`<br/>
|
||||
Finds the component type that is needed to render a form field.
|
||||
- _model:_ [`DynamicComponentModel`](../../../lib/core/src/lib/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
|
||||
- _model:_ [`DynamicComponentModel`](lib/core/src/lib/common/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<any>` - Default type returned for field types that are not yet mapped.
|
||||
- **Returns** `Type<any>` - Component type
|
||||
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
||||
Sets or optionally replaces a [DynamicComponentResolveFunction](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) for a field type.
|
||||
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
||||
Sets or optionally replaces a [DynamicComponentResolveFunction](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) for a field type.
|
||||
- _type:_ `string` - The type whose resolver you want to set
|
||||
- _resolver:_ [`DynamicComponentResolveFunction`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) - The new resolver function
|
||||
- _resolver:_ [`DynamicComponentResolveFunction`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) - The new resolver function
|
||||
- _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true
|
||||
|
||||
## Details
|
||||
|
||||
The [Card View component](../components/card-view.component.md) uses this service to find the component
|
||||
type that is required to display a particular field type (text, date, etc). The service
|
||||
maps a type name string to a corresponding [`DynamicComponentResolveFunction`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) that takes a
|
||||
maps a type name string to a corresponding [`DynamicComponentResolveFunction`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) that takes a
|
||||
model object as a parameter and returns the component type needed to display that model.
|
||||
|
||||
The default mapping is shown below:
|
||||
|
@@ -13,24 +13,24 @@ Maps a form field type string onto the corresponding form [widget component](../
|
||||
|
||||
### Methods
|
||||
|
||||
- **getComponentTypeResolver**(type: `string`, defaultValue: `Type<any>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts)<br/>
|
||||
Gets the currently active [DynamicComponentResolveFunction](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) for a field type.
|
||||
- **getComponentTypeResolver**(type: `string`, defaultValue: `Type<any>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts)<br/>
|
||||
Gets the currently active [DynamicComponentResolveFunction](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) for a field type.
|
||||
- _type:_ `string` - The type whose resolver you want
|
||||
- _defaultValue:_ `Type<any>` - Default type returned for types that are not yet mapped
|
||||
- **Returns** [`DynamicComponentResolveFunction`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) - Resolver function
|
||||
- **Returns** [`DynamicComponentResolveFunction`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) - Resolver function
|
||||
- **register**(components: `Function`, override: `boolean` = `false`)<br/>
|
||||
Register multiple components
|
||||
- _components:_ `Function` -
|
||||
- _override:_ `boolean` -
|
||||
- **resolveComponentType**(model: [`DynamicComponentModel`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts), defaultValue: `Type<any>` = `this.defaultValue`): `Type<any>`<br/>
|
||||
- **resolveComponentType**(model: [`DynamicComponentModel`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts), defaultValue: `Type<any>` = `this.defaultValue`): `Type<any>`<br/>
|
||||
Finds the component type that is needed to render a form field.
|
||||
- _model:_ [`DynamicComponentModel`](../../../lib/core/src/lib/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
|
||||
- _model:_ [`DynamicComponentModel`](lib/core/src/lib/common/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<any>` - Default type returned for field types that are not yet mapped.
|
||||
- **Returns** `Type<any>` - Component type
|
||||
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
||||
Sets or optionally replaces a [DynamicComponentResolveFunction](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) for a field type.
|
||||
- **setComponentTypeResolver**(type: `string`, resolver: [`DynamicComponentResolveFunction`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts), override: `boolean` = `true`)<br/>
|
||||
Sets or optionally replaces a [DynamicComponentResolveFunction](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) for a field type.
|
||||
- _type:_ `string` - The type whose resolver you want to set
|
||||
- _resolver:_ [`DynamicComponentResolveFunction`](../../../lib/core/src/lib/services/dynamic-component-mapper.service.ts) - The new resolver function
|
||||
- _resolver:_ [`DynamicComponentResolveFunction`](lib/core/src/lib/common/services/dynamic-component-mapper.service.ts) - The new resolver function
|
||||
- _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true
|
||||
|
||||
## Details
|
||||
@@ -38,7 +38,7 @@ Maps a form field type string onto the corresponding form [widget component](../
|
||||
The [`Form`](../../../lib/process-services/src/lib/task-list/models/form.model.ts) Field component uses this service to choose which [widget](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) 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/src/lib/services/dynamic-component-mapper.service.ts). The function takes a [`FormFieldModel`](../../core/models/form-field.model.md) object as its argument and
|
||||
a corresponding [`DynamicComponentResolveFunction`](lib/core/src/lib/common/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](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) should be used to render the field.
|
||||
|
||||
In some cases, the field type string alone is enough to determine the [widget](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) type and so the function
|
||||
|
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2018-11-13
|
||||
---
|
||||
|
||||
# [Highlight Transform service](../../../lib/core/src/lib/services/highlight-transform.service.ts "Defined in highlight-transform.service.ts")
|
||||
# [Highlight Transform service](lib/core/src/lib/common/services/highlight-transform.service.ts "Defined in highlight-transform.service.ts")
|
||||
|
||||
Adds HTML to a string to highlight chosen sections.
|
||||
|
||||
@@ -13,12 +13,12 @@ Adds HTML to a string to highlight chosen sections.
|
||||
|
||||
### Methods
|
||||
|
||||
- **highlight**(text: `string`, search: `string`, wrapperClass: `string` = `"adf-highlight"`): [`HighlightTransformResult`](../../../lib/core/src/lib/services/highlight-transform.service.ts)<br/>
|
||||
- **highlight**(text: `string`, search: `string`, wrapperClass: `string` = `"adf-highlight"`): [`HighlightTransformResult`](lib/core/src/lib/common/services/highlight-transform.service.ts)<br/>
|
||||
Searches for `search` string(s) within `text` and highlights all occurrences.
|
||||
- _text:_ `string` - Text to search within
|
||||
- _search:_ `string` - Text pattern to search for
|
||||
- _wrapperClass:_ `string` - CSS class used to provide highlighting style
|
||||
- **Returns** [`HighlightTransformResult`](../../../lib/core/src/lib/services/highlight-transform.service.ts) - New text along with boolean value to indicate whether anything was highlighted
|
||||
- **Returns** [`HighlightTransformResult`](lib/core/src/lib/common/services/highlight-transform.service.ts) - New text along with boolean value to indicate whether anything was highlighted
|
||||
|
||||
## Details
|
||||
|
||||
@@ -33,7 +33,7 @@ highlight any of those words individually. The <span> element includes a
|
||||
`class` attribute which defaults to "highlight" but you can pass any class name
|
||||
you like using the `wrapperClass` parameter.
|
||||
|
||||
The resulting text with HTML highlighting is returned within a [`HighlightTransformResult`](../../../lib/core/src/lib/services/highlight-transform.service.ts)
|
||||
The resulting text with HTML highlighting is returned within a [`HighlightTransformResult`](lib/core/src/lib/common/services/highlight-transform.service.ts)
|
||||
object:
|
||||
|
||||
```ts
|
||||
|
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2018-11-19
|
||||
---
|
||||
|
||||
# [Page Title service](../../../lib/core/src/lib/services/page-title.service.ts "Defined in page-title.service.ts")
|
||||
# [Page Title service](lib/core/src/lib/common/services/page-title.service.ts "Defined in page-title.service.ts")
|
||||
|
||||
Sets the page title.
|
||||
|
||||
|
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2019-03-20
|
||||
---
|
||||
|
||||
# [Thumbnail service](../../../lib/core/src/lib/services/thumbnail.service.ts "Defined in thumbnail.service.ts")
|
||||
# [Thumbnail service](lib/core/src/lib/common/services/thumbnail.service.ts "Defined in thumbnail.service.ts")
|
||||
|
||||
Retrieves an SVG thumbnail image to represent a document type.
|
||||
|
||||
|
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2019-02-08
|
||||
---
|
||||
|
||||
# [Translation service](../../../lib/core/src/lib/services/translation.service.ts "Defined in translation.service.ts")
|
||||
# [Translation service](lib/core/src/lib/translation/translation.service.ts "Defined in translation.service.ts")
|
||||
|
||||
Supports localisation.
|
||||
|
||||
|
Reference in New Issue
Block a user