[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:
Eugenio Romano
2023-01-31 00:42:29 +01:00
committed by GitHub
parent 89b79c9e45
commit 4f25426c25
105 changed files with 156 additions and 381 deletions

View File

@@ -113,7 +113,7 @@ for more information about installing and using the source code.
| The main purpose of the Notification history component is list all the notification received in the current session. They will disappear from the list after the refresh. | [Source](../lib/core/src/lib/notifications/components/notification-history.component.ts) | |
| [Pagination Component](core/components/pagination.component.md) | Adds pagination to the component it is used with. | [Source](../lib/core/src/lib/pagination/pagination.component.ts) |
| [Rich Text Editor component](core/components/rich-text-editor.md) | Wrap Editor.js element to show a Rich Text editor allows to add formatted text. | [Source](../lib/core/src/lib/rich-text-editor/rich-text-editor.component.ts) |
| [Search Text Input Component](core/components/search-text-input.component.md) | Displays a input text that supports autocompletion | [Source](../lib/core/src/lib/search-text/search-text-input.component.ts) |
| [Search Text Input Component](core/components/search-text-input.component.md) | Displays a input text that supports autocompletion | [Source](lib/content-services/src/lib/search-text/search-text-input.component.ts) |
| [Sidebar action menu component](core/components/sidebar-action-menu.component.md) | Displays a sidebar-action menu information panel. | [Source](../lib/core/src/lib/layout/components/sidebar-action/sidebar-action-menu.component.ts) |
| [Sidenav Layout component](core/components/sidenav-layout.component.md) | Displays the standard three-region ADF application layout. | [Source](../lib/core/src/lib/layout/components/sidenav-layout/sidenav-layout.component.ts) |
| [Snackbar Content Component](core/components/snackbar-content.component.md) | Custom content for Snackbar which allows use icon as action. | [Source](../lib/core/src/lib/snackbar-content/snackbar-content.component.ts) |
@@ -213,7 +213,7 @@ for more information about installing and using the source code.
| [Favorites Api service](core/services/favorites-api.service.md) | Gets a list of items a user has marked as their favorites. | [Source](lib/content-services/src/lib/common/services/favorites-api.service.ts) |
| [Form Rendering service](core/services/form-rendering.service.md) | Maps a form field type string onto the corresponding form widget component type. | [Source](../lib/core/form/services/form-rendering.service.ts) |
| [Form service](core/services/form.service.md) | Implements Process Services form methods | [Source](../lib/core/src/lib/form/services/form.service.ts) |
| [Highlight Transform service](core/services/highlight-transform.service.md) | Adds HTML to a string to highlight chosen sections. | [Source](../lib/core/src/lib/services/highlight-transform.service.ts) |
| [Highlight Transform service](core/services/highlight-transform.service.md) | Adds HTML to a string to highlight chosen sections. | [Source](lib/core/src/lib/common/services/highlight-transform.service.ts) |
| [Identity Group service](core/services/identity-group.service.md) | Performs CRUD operations on identity groups. | [Source](../lib/process-services-cloud/src/lib/group/services/identity-group.service.ts) |
| [Identity role service](core/services/identity-role.service.md) | Provides APIs for working with the Roles in Identity Services. | [Source](../lib/core/src/lib/auth/services/identity-role.service.ts) |
| [Identity user service](core/services/identity-user.service.md) | Gets OAuth2 personal details and roles for users and performs CRUD operations on identity users. | [Source](../lib/process-services-cloud/src/lib/people/services/identity-user.service.ts) |
@@ -222,7 +222,7 @@ for more information about installing and using the source code.
| [Login Dialog service](core/services/login-dialog.service.md) | Manages login dialogs. | [Source](../lib/core/src/lib/services/login-dialog.service.ts) |
| [Nodes Api service](core/services/nodes-api.service.md) | Accesses and manipulates ACS document nodes using their node IDs. | [Source](../lib/core/src/lib/services/nodes-api.service.ts) |
| [Notification Service](core/services/notification.service.md) | Shows a notification message with optional feedback. | [Source](../lib/core/src/lib/notifications/services/notification.service.ts) |
| [Page Title service](core/services/page-title.service.md) | Sets the page title. | [Source](../lib/core/src/lib/services/page-title.service.ts) |
| [Page Title service](core/services/page-title.service.md) | Sets the page title. | [Source](lib/core/src/lib/common/services/page-title.service.ts) |
| [People Content service](core/services/people-content.service.md) | Gets information about a Content Services user. | [Source](../lib/core/src/lib/services/people-content.service.ts) |
| [People Process service](core/services/people-process.service.md) | Gets information about Process Services users. | [Source](../lib/core/src/lib/services/people-process.service.ts) |
| [Process Content Service](core/services/process-content.service.md) | Manipulates content related to a Process Instance or Task Instance in APS. | [Source](../lib/process-services/src/lib/form/services/process-content.service.ts) |
@@ -231,8 +231,8 @@ for more information about installing and using the source code.
| [Search service](core/services/search.service.md) | Accesses the Content Services Search API. | [Source](../lib/core/src/lib/services/search.service.ts) |
| [Shared Links Api service](core/services/shared-links-api.service.md) | Finds shared links to Content Services items. | [Source](lib/content-services/src/lib/content-node-share/services/shared-links-api.service.ts) |
| [Storage service](core/services/storage.service.md) | Stores items in the form of key-value pairs. | [Source](../lib/core/src/lib/services/storage.service.ts) |
| [Thumbnail service](core/services/thumbnail.service.md) | Retrieves an SVG thumbnail image to represent a document type. | [Source](../lib/core/src/lib/services/thumbnail.service.ts) |
| [Translation service](core/services/translation.service.md) | Supports localisation. | [Source](../lib/core/src/lib/services/translation.service.ts) |
| [Thumbnail service](core/services/thumbnail.service.md) | Retrieves an SVG thumbnail image to represent a document type. | [Source](lib/core/src/lib/common/services/thumbnail.service.ts) |
| [Translation service](core/services/translation.service.md) | Supports localisation. | [Source](lib/core/src/lib/translation/translation.service.ts) |
| [Upload Service](core/services/upload.service.md) | Provides access to various APIs related to file upload features. | [Source](../lib/core/src/lib/services/upload.service.ts) |
| [User access service](core/services/user-access.service.md) | Checks the global and application access of a user | [Source](../lib/core/src/lib/services/user-access.service.ts) |
| [User Preferences Service](core/services/user-preferences.service.md) | Stores preferences for the app and for individual components. | [Source](../lib/core/src/lib/common/services/user-preferences.service.ts) |

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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 &lt;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

View File

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

View File

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

View File

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

View File

@@ -133,6 +133,8 @@ v6.0.0 and after:
| `SharedLinksApiService` | `@alfresco/adf-core` | `@alfresco/adf-process-services` |
| `LockService` | `@alfresco/adf-core` | `@alfresco/adf-process-services` |
| `FavoritesApiService` | `@alfresco/adf-core` | `@alfresco/adf-process-services` |
| `SearchConfigurationInterface` | `@alfresco/adf-core` | `@alfresco/adf-content-services` |
### Update Data-table a data change