[AAE-10769] remove alfresco deps from datatable (#8045)

* remove alfresco dep

* [ci:force] move data-column in datatable

* new datatable service

* doc

* required changes

* fix

* fix
This commit is contained in:
Eugenio Romano 2023-01-04 09:08:03 +01:00 committed by GitHub
parent 85429b4cf1
commit 4da74f1c07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 361 additions and 135 deletions

View File

@ -15,15 +15,48 @@
* limitations under the License. * limitations under the License.
*/ */
import { Component, Input, OnInit, OnChanges, OnDestroy, Optional, EventEmitter, ViewChild, SimpleChanges, Output, ViewEncapsulation } from '@angular/core'; import {
Component,
Input,
OnInit,
OnChanges,
OnDestroy,
Optional,
EventEmitter,
ViewChild,
SimpleChanges,
Output,
ViewEncapsulation
} from '@angular/core';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { ActivatedRoute, Params, Router } from '@angular/router'; import { ActivatedRoute, Params, Router } from '@angular/router';
import { MinimalNodeEntity, NodePaging, Pagination, MinimalNodeEntryEntity, SiteEntry, SearchEntry, NodeEntry } from '@alfresco/js-api';
import { import {
AlfrescoApiService, AuthenticationService, AppConfigService, AppConfigValues, ContentService, FolderCreatedEvent, LogService, NotificationService, MinimalNodeEntity,
UploadService, DataRow, UserPreferencesService, NodePaging,
PaginationComponent, FormValues, DisplayMode, ShowHeaderMode, InfinitePaginationComponent, Pagination,
MinimalNodeEntryEntity,
SiteEntry,
SearchEntry,
NodeEntry
} from '@alfresco/js-api';
import {
AlfrescoApiService,
AuthenticationService,
AppConfigService,
AppConfigValues,
ContentService,
FolderCreatedEvent,
LogService,
NotificationService,
UploadService,
DataRow,
UserPreferencesService,
PaginationComponent,
FormValues,
DisplayMode,
ShowHeaderMode,
InfinitePaginationComponent,
SharedLinksApiService, SharedLinksApiService,
FormRenderingService, FormRenderingService,
FileUploadEvent, FileUploadEvent,

View File

@ -85,12 +85,12 @@ for more information about installing and using the source code.
| [About Application Modules Component](core/components/about-application.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows which ADF libraries and plugins an application is using. | [Source](../lib/core/src/lib/about/about-application-modules/about-application-modules.component.ts) | | [About Application Modules Component](core/components/about-application.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows which ADF libraries and plugins an application is using. | [Source](../lib/core/src/lib/about/about-application-modules/about-application-modules.component.ts) |
| [About GitHub Link Component](core/components/about-github-link.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows which version of the application is running based on the latest GitHub commit, as well as the server settings for the application. | [Source](../lib/core/src/lib/about/about-github-link/about-github-link.component.ts) | | [About GitHub Link Component](core/components/about-github-link.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows which version of the application is running based on the latest GitHub commit, as well as the server settings for the application. | [Source](../lib/core/src/lib/about/about-github-link/about-github-link.component.ts) |
| [About Product Version Component](core/components/about-product-version.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows which version of Process Services (BPM) and Content Services (ECM) an application is running. It also shows the relevant license information, application status and Alfresco modules running in an application. | [Source](../lib/core/src/lib/about/about-product-version/about-product-version.component.ts) | | [About Product Version Component](core/components/about-product-version.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows which version of Process Services (BPM) and Content Services (ECM) an application is running. It also shows the relevant license information, application status and Alfresco modules running in an application. | [Source](../lib/core/src/lib/about/about-product-version/about-product-version.component.ts) |
| [About Component](core/components/about.component.md) | Presentational component to display About information as a set of collapsible panels. | [Source](<>) | | [About Component](core/components/about.component.md) | Presentational component to display About information as a set of collapsible panels. | [Source](../lib/core/src/lib/about/about.component.ts) |
| [Buttons Menu Component](core/components/buttons-menu.component.md) | Displays buttons on a responsive menu. | [Source](../lib/core/src/lib/buttons-menu/buttons-menu.component.ts) | | [Buttons Menu Component](core/components/buttons-menu.component.md) | Displays buttons on a responsive menu. | [Source](../lib/core/src/lib/buttons-menu/buttons-menu.component.ts) |
| [Card View component](core/components/card-view.component.md) | Displays a configurable property list renderer. | [Source](../lib/core/src/lib/card-view/components/card-view/card-view.component.ts) | | [Card View component](core/components/card-view.component.md) | Displays a configurable property list renderer. | [Source](../lib/core/src/lib/card-view/components/card-view/card-view.component.ts) |
| [Comment list component](core/components/comment-list.component.md) | Shows a list of comments. | [Source](../lib/core/src/lib/comments/comment-list.component.ts) | | [Comment list component](core/components/comment-list.component.md) | Shows a list of comments. | [Source](../lib/core/src/lib/comments/comment-list.component.ts) |
| [Comments Component](core/components/comments.component.md) | Displays comments from users involved in a specified environment and allows an involved user to add a comment to a environment. | [Source](../lib/core/src/lib/comments/comments.component.ts) | | [Comments Component](core/components/comments.component.md) | Displays comments from users involved in a specified environment and allows an involved user to add a comment to a environment. | [Source](../lib/core/src/lib/comments/comments.component.ts) |
| [Data Column Component](core/components/data-column.component.md) | Defines column properties for DataTable, Tasklist, Document List and other components. | [Source](../lib/core/src/lib/data-column/data-column.component.ts) | | [Data Column Component](core/components/data-column.component.md) | Defines column properties for DataTable, Tasklist, Document List and other components. | [Source](../lib/core/src/lib/datatable/data-column/data-column.component.ts) |
| [DataTable component](core/components/datatable.component.md) | Displays data as a table with customizable columns and presentation. | [Source](../lib/core/src/lib/datatable/components/datatable/datatable.component.ts) | | [DataTable component](core/components/datatable.component.md) | Displays data as a table with customizable columns and presentation. | [Source](../lib/core/src/lib/datatable/components/datatable/datatable.component.ts) |
| [Empty Content Component](core/components/empty-content.component.md) | Provides a generic "Empty Content" placeholder for components. | [Source](../lib/core/src/lib/templates/empty-content/empty-content.component.ts) | | [Empty Content Component](core/components/empty-content.component.md) | Provides a generic "Empty Content" placeholder for components. | [Source](../lib/core/src/lib/templates/empty-content/empty-content.component.ts) |
| [Empty list component](core/components/empty-list.component.md) | Displays a message indicating that a list is empty. | [Source](../lib/core/src/lib/datatable/components/empty-list/empty-list.component.ts) | | [Empty list component](core/components/empty-list.component.md) | Displays a message indicating that a list is empty. | [Source](../lib/core/src/lib/datatable/components/empty-list/empty-list.component.ts) |
@ -204,20 +204,21 @@ for more information about installing and using the source code.
| [Comment Content service](core/services/comment-content.service.md) | Adds and retrieves comments for nodes in Content Services. | [Source](../lib/core/src/lib/services/comment-content.service.ts) | | [Comment Content service](core/services/comment-content.service.md) | Adds and retrieves comments for nodes in Content Services. | [Source](../lib/core/src/lib/services/comment-content.service.ts) |
| [Comment Process service](core/services/comment-process.service.md) | Adds and retrieves comments for task and process instances in Process Services. | [Source](../lib/core/src/lib/services/comment-process.service.ts) | | [Comment Process service](core/services/comment-process.service.md) | Adds and retrieves comments for task and process instances in Process Services. | [Source](../lib/core/src/lib/services/comment-process.service.ts) |
| [Content service](core/services/content.service.md) | Accesses app-generated data objects via URLs and file downloads. | [Source](../lib/core/src/lib/services/content.service.ts) | | [Content service](core/services/content.service.md) | Accesses app-generated data objects via URLs and file downloads. | [Source](../lib/core/src/lib/services/content.service.ts) |
| [Cookie service](core/services/cookie.service.md) | Stores key-value data items as browser cookies. | [Source](../lib/core/src/lib/services/cookie.service.ts) | | [Cookie service](core/services/cookie.service.md) | Stores key-value data items as browser cookies. | [Source](../lib/core/src/lib/common/services/cookie.service.ts) |
| [DataTable service](core/services/datatable.service.md) | | [Source](<>) |
| [Deleted Nodes Api service](core/services/deleted-nodes-api.service.md) | Gets a list of Content Services nodes currently in the trash. | [Source](../lib/core/src/lib/services/deleted-nodes-api.service.ts) | | [Deleted Nodes Api service](core/services/deleted-nodes-api.service.md) | Gets a list of Content Services nodes currently in the trash. | [Source](../lib/core/src/lib/services/deleted-nodes-api.service.ts) |
| [Discovery Api service](core/services/discovery-api.service.md) | Gets version and license information for Process Services and Content Services. | [Source](../lib/core/src/lib/services/discovery-api.service.ts) | | [Discovery Api service](core/services/discovery-api.service.md) | Gets version and license information for Process Services and Content Services. | [Source](../lib/core/src/lib/services/discovery-api.service.ts) |
| [Download zip service](core/services/download-zip.service.md) | Creates and manages downloads. | [Source](../lib/core/src/lib/services/download-zip.service.ts) | | [Download zip service](core/services/download-zip.service.md) | Creates and manages downloads. | [Source](../lib/core/src/lib/services/download-zip.service.ts) |
| [Ecm User service](core/services/ecm-user.service.md) | Gets information about a Content Services user. | [Source](../lib/core/src/lib/services/ecm-user.service.ts) | | [Ecm User service](core/services/ecm-user.service.md) | Gets information about a Content Services user. | [Source](../lib/core/src/lib/services/ecm-user.service.ts) |
| [Favorites Api service](core/services/favorites-api.service.md) | Gets a list of items a user has marked as their favorites. | [Source](../lib/core/src/lib/services/favorites-api.service.ts) | | [Favorites Api service](core/services/favorites-api.service.md) | Gets a list of items a user has marked as their favorites. | [Source](../lib/core/src/lib/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 Rendering service](core/services/form-rendering.service.md) | Maps a form field type string onto the corresponding form widget component type. | [Source](../lib/core/src/lib/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) | | [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/services/highlight-transform.service.ts) |
| [Identity Group service](core/services/identity-group.service.md) | Performs CRUD operations on identity groups. | [Source](../lib/core/src/lib/services/identity-group.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/services/identity-role.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/core/src/lib/services/identity-user.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) |
| [JWT helper service](core/services/jwt-helper.service.md) | Decodes a JSON Web Token (JWT) to a JavaScript object. | [Source](../lib/core/src/lib/services/jwt-helper.service.ts) | | [JWT helper service](core/services/jwt-helper.service.md) | Decodes a JSON Web Token (JWT) to a JavaScript object. | [Source](../lib/core/src/lib/auth/services/jwt-helper.service.ts) |
| [Log Service](core/services/log.service.md) | Provides log functionality. | [Source](../lib/core/src/lib/services/log.service.ts) | | [Log Service](core/services/log.service.md) | Provides log functionality. | [Source](../lib/core/src/lib/common/services/log.service.ts) |
| [Login Dialog service](core/services/login-dialog.service.md) | Manages login dialogs. | [Source](../lib/core/src/lib/services/login-dialog.service.ts) | | [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) | | [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) | | [Notification Service](core/services/notification.service.md) | Shows a notification message with optional feedback. | [Source](../lib/core/src/lib/notifications/services/notification.service.ts) |
@ -229,12 +230,12 @@ for more information about installing and using the source code.
| [Search Configuration service](core/services/search-configuration.service.md) | Provides fine control of parameters to a search. | [Source](../lib/core/src/lib/services/search-configuration.service.ts) | | [Search Configuration service](core/services/search-configuration.service.md) | Provides fine control of parameters to a search. | [Source](../lib/core/src/lib/services/search-configuration.service.ts) |
| [Search service](core/services/search.service.md) | Accesses the Content Services Search API. | [Source](../lib/core/src/lib/services/search.service.ts) | | [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/core/src/lib/services/shared-links-api.service.ts) | | [Shared Links Api service](core/services/shared-links-api.service.md) | Finds shared links to Content Services items. | [Source](../lib/core/src/lib/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) | | [Storage service](core/services/storage.service.md) | Stores items in the form of key-value pairs. | [Source](../lib/core/src/lib/common/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) | | [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) | | [Translation service](core/services/translation.service.md) | Supports localisation. | [Source](../lib/core/src/lib/services/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) | | [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 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/services/user-preferences.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) |
### Widgets ### Widgets
@ -373,7 +374,7 @@ for more information about installing and using the source code.
| [Rating service](content-services/services/rating.service.md) | Manages ratings for items in Content Services. | [Source](../lib/content-services/src/lib/social/services/rating.service.ts) | | [Rating service](content-services/services/rating.service.md) | Manages ratings for items in Content Services. | [Source](../lib/content-services/src/lib/social/services/rating.service.ts) |
| [Search filter service](content-services/services/search-filter.service.md) | Registers widgets for use with the Search Filter component. | [Source](../lib/content-services/src/lib/search/services/search-filter.service.ts) | | [Search filter service](content-services/services/search-filter.service.md) | Registers widgets for use with the Search Filter component. | [Source](../lib/content-services/src/lib/search/services/search-filter.service.ts) |
| [Search Query Builder service](content-services/services/search-query-builder.service.md) | Stores information from all the custom search and faceted search widgets, compiles and runs the final search query. | [Source](../lib/content-services/src/lib/search/services/search-query-builder.service.ts) | | [Search Query Builder service](content-services/services/search-query-builder.service.md) | Stores information from all the custom search and faceted search widgets, compiles and runs the final search query. | [Source](../lib/content-services/src/lib/search/services/search-query-builder.service.ts) |
| [Sites service](content-services/services/sites.service.md) | Accesses and manipulates sites from a Content Services repository. | [Source](<>) | | [Sites service](content-services/services/sites.service.md) | Accesses and manipulates sites from a Content Services repository. | [Source](../lib/content-services/src/lib/services/sites.service.ts) |
| [Tag service](content-services/services/tag.service.md) | Manages tags in Content Services. | [Source](../lib/content-services/src/lib/tag/services/tag.service.ts) | | [Tag service](content-services/services/tag.service.md) | Manages tags in Content Services. | [Source](../lib/content-services/src/lib/tag/services/tag.service.ts) |
| [Task Comments service](content-services/services/task-comments.service.md) | Adds and retrieves comments for task and process instances in Process Services. | [Source](../lib/process-services/src/lib/task-comments/services/task-comments.service.ts) | | [Task Comments service](content-services/services/task-comments.service.md) | Adds and retrieves comments for task and process instances in Process Services. | [Source](../lib/process-services/src/lib/task-comments/services/task-comments.service.ts) |

View File

@ -5,7 +5,7 @@ Status: Active
Last reviewed: 2019-04-12 Last reviewed: 2019-04-12
--- ---
# [Data Column Component](../../../lib/core/src/lib/data-column/data-column.component.ts "Defined in data-column.component.ts") # [Data Column Component](../../../lib/core/src/lib/datatable/data-column/data-column.component.ts "Defined in data-column.component.ts")
Defines column properties for DataTable, Tasklist, Document List and other components. Defines column properties for DataTable, Tasklist, Document List and other components.

View File

@ -0,0 +1,56 @@
---
Title: DataTable service
Added: v6.0.0
Status: Active
Last reviewed: 2023-01-01
---
# [Datatable service](../../../lib/core/src/lib/datatable/services/datatable.service.ts "Defined in datatable.service.ts")
## Details
If you need to update one row of your datatable you can use the ```DataTableService``` to update it.
To update a single row you can use the rowUpdate subject.
The model to update the DataTable require the ID of the row you want change and the new data Object of the row
```typescript
DataRowUpdateModel {
obj: any;
id: string;
}
```
For example if your table use entry nodes you can pass:
```typescript
this.dataTableService.rowUpdate.next({id: node.id, obj: {entry: node}});
```
As good practice is better to provide a DataTableService in the component where you are going to deliver the new object
```typescript
@Component({
selector: 'app-files-component',
templateUrl: './files.component.html',
styleUrls: ['./files.component.scss'],
encapsulation: ViewEncapsulation.None,
providers: [
DataTableService
]
})
export class FilesComponent implements OnInit {
constructor(private dataTableService: DataTableService,
private nodeService: NodesApiService) {
}
ngOnInit() {
this.nodeService.nodeUpdated.subscribe((node) => {
this.dataTableService.rowUpdate.next({id: node.id, obj: {entry: node}});
});
}
```
## See also
- [Datatable](../components/datatable.component.md)

View File

@ -24,8 +24,10 @@ project.
- [Library updates](#library-updates) - [Library updates](#library-updates)
- [Breaking changes](#breaking-changes) - [Breaking changes](#breaking-changes)
- [Deprecated items](#deprecated-items) - [Deprecated items](#deprecated-items)
- [DataColumnModule](#datacolumnmodule)
- [PaginationModel](#paginationmodel) - [PaginationModel](#paginationmodel)
- [Relocated classes](#relocated-classes) - [Relocated classes](#relocated-classes)
- [Update Data-table or Document List after a node change](#update-data-table-or-document-list-after-a-node-change)
- [NodeNameTooltipPipe](#nodenametooltippipe) - [NodeNameTooltipPipe](#nodenametooltippipe)
- [nodeUpdated Subject](#nodeupdated-subject) - [nodeUpdated Subject](#nodeupdated-subject)
- [Renamed items](#renamed-items) - [Renamed items](#renamed-items)
@ -66,13 +68,12 @@ in 6.0. See also our
For more information about the changes and links to the associated For more information about the changes and links to the associated
pull requests. pull requests.
[TODO ADD HERE the PRs ] [TODO ADD HERE the PRs ][`checkallowableoperationdirective`](../content-services/directives/check-allowable-operation.directive.md): Moved from ADF Core to ADF content services
[`CheckAllowableOperationDirective`](../content-services/directives/check-allowable-operation.directive.md): Moved from ADF Core to ADF content services [`LibraryFavoriteDirective`](../../lib/content-services/src/lib/directives/library-favorite.directive.ts): Moved from ADF Core to ADF content services
[LibraryFavoriteDirective](../../lib/content-services/src/lib/directives/library-favorite.directive.ts): Moved from ADF Core to ADF content services [`LibraryMembershipDirective`](../../lib/content-services/src/lib/directives/library-membership.directive.ts): Moved from ADF Core to ADF content services
[LibraryMembershipDirective](../../lib/content-services/src/lib/directives/library-membership.directive.ts): Moved from ADF Core to ADF content services [`NodeDeleteDirective`](../content-services/directives/node-delete.directive.md): Moved from ADF Core to ADF content services
[NodeDeleteDirective](../content-services/directives/node-delete.directive.md): Moved from ADF Core to ADF content services [`NodeFavoriteDirective`](../content-services/directives/node-favorite.directive.md): Moved from ADF Core to ADF content services
[NodeFavoriteDirective](../content-services/directives/node-favorite.directive.md): Moved from ADF Core to ADF content services [`NodeRestoreDirective`](../content-services/directives/node-restore.directive.md): Moved from ADF Core to ADF content services
[NodeRestoreDirective](../content-services/directives/node-restore.directive.md): Moved from ADF Core to ADF content services
[TODO ADD HERE the PRs ] [TODO ADD HERE the PRs ]
Each section needs to contains: Each section needs to contains:
@ -82,6 +83,29 @@ How to fix it:
## Deprecated items ## Deprecated items
### DataColumnModule
[`DataColumnModule`](../../lib/core/src/lib/datatable/data-column/data-column.module.ts) has been deprecated and moved in [`DataTableModule`](../../lib/core/src/lib/datatable/datatable.module.ts)
v6.0.0 and before:
@NgModule({
imports: [
```
DataColumnModule,
DataTableModule
```
])
v6.0.0 and after:
@NgModule({
imports: [
```
DataTableModule,
```
])
### PaginationModel ### PaginationModel
`Pagination` model from `@alfresco/js-api` has been now deprecated in favour of internal implementated model [`PaginationModel`](../../lib/core/src/lib/models/pagination.model.ts) evrywhere `Pagination` model from `@alfresco/js-api` has been now deprecated in favour of internal implementated model [`PaginationModel`](../../lib/core/src/lib/models/pagination.model.ts) evrywhere
@ -95,23 +119,61 @@ How to fix it:
| `SitesService` | `@alfresco/adf-core` | `@alfresco/adf-content-services` | | `SitesService` | `@alfresco/adf-core` | `@alfresco/adf-content-services` |
| `SearchService` | `@alfresco/adf-core` | `@alfresco/adf-content-services` | | `SearchService` | `@alfresco/adf-core` | `@alfresco/adf-content-services` |
| `AppsProcessService` | `@alfresco/adf-core` | `@alfresco/adf-process-services` | | `AppsProcessService` | `@alfresco/adf-core` | `@alfresco/adf-process-services` |
| [`CheckAllowableOperationDirective`](../content-services/directives/check-allowable-operation.directive.md)| `@alfresco/adf-core` | `@alfresco/adf-content-services` |
| [`LibraryFavoriteDirective`](../../lib/content-services/src/lib/directives/library-favorite.directive.ts)| `@alfresco/adf-core` | `@alfresco/adf-content-services` |
| [`LibraryMembershipDirective`](../../lib/content-services/src/lib/directives/library-membership.directive.ts)| `@alfresco/adf-core` | `@alfresco/adf-content-services` |
| [`NodeDeleteDirective`](../content-services/directives/node-delete.directive.md)| `@alfresco/adf-core` | `@alfresco/adf-content-services` |
| [`NodeFavoriteDirective`](../content-services/directives/node-favorite.directive.md)| `@alfresco/adf-core` | `@alfresco/adf-content-services` |
| [`NodeRestoreDirective`](../content-services/directives/node-restore.directive.md)| `@alfresco/adf-core` | `@alfresco/adf-content-services` |
| [`AppsProcessService`] | `@alfresco/adf-core` | `@alfresco/adf-process-services` |
Following classes have been relocated: ### Update Data-table a data change
The following directives have been moved from the Core library to the Content Services v6.0.0 and after You will need to provide a ```DataTableService``` to update a row of your table.
library. You should modify your code to import these classes from The model to update the DataTable require the ID of the row you want change and the new data Object of the row
`@alfresco/adf-content-services`.
- [`CheckAllowableOperationDirective`](../content-services/directives/check-allowable-operation.directive.md) ```typescript
- [`LibraryFavoriteDirective`](../../lib/content-services/src/lib/directives/library-favorite.directive.ts) DataRowUpdateModel {
- [`LibraryMembershipDirective`](../../lib/content-services/src/lib/directives/library-membership.directive.ts) obj: any;
- [`NodeDeleteDirective`](../content-services/directives/node-delete.directive.md) id: string;
- [`NodeFavoriteDirective`](../content-services/directives/node-favorite.directive.md) }
- [`NodeRestoreDirective`](../content-services/directives/node-restore.directive.md) ```
For example if your table use entry nodes you can pass:
```typescript
this.dataTableService.rowUpdate.next({id: node.id, obj: {entry: node}});
```
As good practice is better to provide a DataTableService in the component where you are going to deliver the new object
```typescript
@Component({
selector: 'app-files-component',
templateUrl: './files.component.html',
styleUrls: ['./files.component.scss'],
encapsulation: ViewEncapsulation.None,
providers: [
DataTableService
]
})
export class FilesComponent implements OnInit {
constructor(private dataTableService: DataTableService,
private nodeService: NodesApiService) {
}
ngOnInit() {
this.nodeService.nodeUpdated.subscribe((node) => {
this.dataTableService.rowUpdate.next({id: node.id, obj: {entry: node}});
});
}
```
### NodeNameTooltipPipe ### NodeNameTooltipPipe
[NodeNameTooltipPipe](../core/pipes/node-name-tooltip.pipe.md) has been moved in the `@alfresco/adf-content-services` in `ContentPipeModule` [`NodeNameTooltipPipe`](../core/pipes/node-name-tooltip.pipe.md) has been moved in the `@alfresco/adf-content-services` in [`ContentPipeModule`](../../lib/content-services/src/lib/pipes/content-pipe.module.ts)
v6.0.0 and before: v6.0.0 and before:
@ -133,7 +195,7 @@ v6.0.0 and after:
### nodeUpdated Subject ### nodeUpdated Subject
The nodeUpdated [Subject](http://reactivex.io/documentation/subject.html) has been moved from [AlfrescoApiService](../core/services/alfresco-api.service.md) to [NodesApiService](../core/services/nodes-api.service.md) The nodeUpdated [`Subject`](http://reactivex.io/documentation/subject.html) has been moved from [`AlfrescoApiService`](../core/services/alfresco-api.service.md) to [`NodesApiService`](../core/services/nodes-api.service.md)
v6.0.0 and before: v6.0.0 and before:

View File

@ -12,6 +12,7 @@ backend services have been tested with each released version of ADF.
## Versions ## Versions
- [v6.0.0](#v600)
- [v5.1.0](#v510) - [v5.1.0](#v510)
- [v4.7.0](#v470) - [v4.7.0](#v470)
- [v4.6.0](#v460) - [v4.6.0](#v460)
@ -42,6 +43,17 @@ backend services have been tested with each released version of ADF.
## v5.1.0 ## v5.1.0
<!--v600 start-->
- [Card view content update service](content-services/services/card-view-content-update.service.md)
- [Datatable service](core/services/datatable.service.md)
- [Node comments service](content-services/services/node-comments.service.md)
- [Task comments service](content-services/services/task-comments.service.md)
<!--v600 end-->
## v5.1.0
<!--v510 start--> <!--v510 start-->
- [Auto focus directive](content-services/directives/auto-focus.directive.md) - [Auto focus directive](content-services/directives/auto-focus.directive.md)

View File

@ -46,7 +46,9 @@ import {
AlfrescoApiService, AlfrescoApiService,
UserPreferenceValues, UserPreferenceValues,
LockService, LockService,
DataRow DataRow,
DataTableService,
NodesApiService
} from '@alfresco/adf-core'; } from '@alfresco/adf-core';
import { Node, NodeEntry, NodePaging, NodesApi, Pagination } from '@alfresco/js-api'; import { Node, NodeEntry, NodePaging, NodesApi, Pagination } from '@alfresco/js-api';
@ -72,7 +74,7 @@ import { ADF_DOCUMENT_PARENT_COMPONENT } from './document-list.token';
providers:[{ providers:[{
provide: ADF_DOCUMENT_PARENT_COMPONENT, provide: ADF_DOCUMENT_PARENT_COMPONENT,
useExisting: DocumentListComponent useExisting: DocumentListComponent
}], }, DataTableService],
encapsulation: ViewEncapsulation.None, encapsulation: ViewEncapsulation.None,
host: { class: 'adf-document-list' } host: { class: 'adf-document-list' }
}) })
@ -363,7 +365,14 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
private contentService: ContentService, private contentService: ContentService,
private thumbnailService: ThumbnailService, private thumbnailService: ThumbnailService,
private alfrescoApiService: AlfrescoApiService, private alfrescoApiService: AlfrescoApiService,
private nodeService: NodesApiService,
private dataTableService: DataTableService,
private lockService: LockService) { private lockService: LockService) {
this.nodeService.nodeUpdated.subscribe((node) => {
this.dataTableService.rowUpdate.next({id: node.id, obj: {entry: node}});
});
this.userPreferencesService this.userPreferencesService
.select(UserPreferenceValues.PaginationSize) .select(UserPreferenceValues.PaginationSize)
.pipe(takeUntil(this.onDestroy$)) .pipe(takeUntil(this.onDestroy$))

View File

@ -25,7 +25,6 @@ import { AboutModule } from './about/about.module';
import { AppConfigModule } from './app-config/app-config.module'; import { AppConfigModule } from './app-config/app-config.module';
import { CardViewModule } from './card-view/card-view.module'; import { CardViewModule } from './card-view/card-view.module';
import { ContextMenuModule } from './context-menu/context-menu.module'; import { ContextMenuModule } from './context-menu/context-menu.module';
import { DataColumnModule } from './data-column/data-column.module';
import { DataTableModule } from './datatable/datatable.module'; import { DataTableModule } from './datatable/datatable.module';
import { InfoDrawerModule } from './info-drawer/info-drawer.module'; import { InfoDrawerModule } from './info-drawer/info-drawer.module';
import { LanguageMenuModule } from './language-menu/language-menu.module'; import { LanguageMenuModule } from './language-menu/language-menu.module';
@ -90,7 +89,6 @@ import { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
LoginModule, LoginModule,
LanguageMenuModule, LanguageMenuModule,
InfoDrawerModule, InfoDrawerModule,
DataColumnModule,
DataTableModule, DataTableModule,
ButtonsMenuModule, ButtonsMenuModule,
TemplateModule, TemplateModule,
@ -131,7 +129,6 @@ import { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
LoginModule, LoginModule,
LanguageMenuModule, LanguageMenuModule,
InfoDrawerModule, InfoDrawerModule,
DataColumnModule,
DataTableModule, DataTableModule,
TranslateModule, TranslateModule,
ButtonsMenuModule, ButtonsMenuModule,

View File

@ -21,14 +21,14 @@ import {
Input, Input,
OnInit, OnInit,
ViewEncapsulation, ViewEncapsulation,
OnDestroy OnDestroy, Optional
} from '@angular/core'; } from '@angular/core';
import { DataColumn } from '../../data/data-column.model'; import { DataColumn } from '../../data/data-column.model';
import { DataRow } from '../../data/data-row.model'; import { DataRow } from '../../data/data-row.model';
import { DataTableAdapter } from '../../data/datatable-adapter'; import { DataTableAdapter } from '../../data/datatable-adapter';
import { BehaviorSubject, Subject } from 'rxjs'; import { BehaviorSubject, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
import { NodesApiService } from '../../../services/nodes-api.service'; import { DataTableService } from '../../services/datatable.service';
@Component({ @Component({
selector: 'adf-datatable-cell', selector: 'adf-datatable-cell',
@ -82,22 +82,28 @@ export class DataTableCellComponent implements OnInit, OnDestroy {
protected onDestroy$ = new Subject<boolean>(); protected onDestroy$ = new Subject<boolean>();
constructor(protected nodesApiService: NodesApiService) {} constructor(@Optional() protected dataTableService: DataTableService) {
}
ngOnInit() { ngOnInit() {
this.updateValue(); this.updateValue();
this.nodesApiService.nodeUpdated if(this.dataTableService) {
this.dataTableService.rowUpdate
.pipe(takeUntil(this.onDestroy$)) .pipe(takeUntil(this.onDestroy$))
.subscribe(node => { .subscribe(data => {
if (this.row && node && node.id) { if (data && data.id) {
if (this.row['node'].entry.id === node.id) { if (this.row.id === data.id) {
this.row['node'].entry = node; if (this.row.obj && data.obj) {
this.row['cache'][this.column.key] = this.column.key.split('.').reduce((source, key) => source ? source[key] : '', node); this.row.obj = data.obj;
this.row['cache'][this.column.key] = this.column.key.split('.').reduce((source, key) => source ? source[key] : '', data.obj);
this.updateValue(); this.updateValue();
} }
} }
}
}); });
} }
}
protected updateValue() { protected updateValue() {
if (this.column && this.column.key && this.row && this.data) { if (this.column && this.column.key && this.row && this.data) {

View File

@ -26,8 +26,8 @@ import { ObjectDataTableAdapter } from '../../data/object-datatable-adapter';
import { DataTableComponent, ShowHeaderMode } from './datatable.component'; import { DataTableComponent, ShowHeaderMode } from './datatable.component';
import { setupTestBed } from '../../../testing/setup-test-bed'; import { setupTestBed } from '../../../testing/setup-test-bed';
import { CoreTestingModule } from '../../../testing/core.testing.module'; import { CoreTestingModule } from '../../../testing/core.testing.module';
import { DataColumnListComponent } from '../../../data-column/data-column-list.component'; import { DataColumnListComponent } from '../../data-column/data-column-list.component';
import { DataColumnComponent } from '../../../data-column/data-column.component'; import { DataColumnComponent } from '../../data-column/data-column.component';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { domSanitizerMock } from '../../../mock/dom-sanitizer-mock'; import { domSanitizerMock } from '../../../mock/dom-sanitizer-mock';
import { matIconRegistryMock } from '../../../mock/mat-icon-registry-mock'; import { matIconRegistryMock } from '../../../mock/mat-icon-registry-mock';

View File

@ -26,7 +26,7 @@ import { FocusKeyManager } from '@angular/cdk/a11y';
import { MatCheckboxChange } from '@angular/material/checkbox'; import { MatCheckboxChange } from '@angular/material/checkbox';
import { MatMenuTrigger } from '@angular/material/menu'; import { MatMenuTrigger } from '@angular/material/menu';
import { Subscription, Observable, Observer } from 'rxjs'; import { Subscription, Observable, Observer } from 'rxjs';
import { DataColumnListComponent } from '../../../data-column/data-column-list.component'; import { DataColumnListComponent } from '../../data-column/data-column-list.component';
import { DataColumn } from '../../data/data-column.model'; import { DataColumn } from '../../data/data-column.model';
import { DataRowEvent } from '../../data/data-row-event.model'; import { DataRowEvent } from '../../data/data-row-event.model';
import { DataRow } from '../../data/data-row.model'; import { DataRow } from '../../data/data-row.model';

View File

@ -15,19 +15,18 @@
* limitations under the License. * limitations under the License.
*/ */
import { Component, ViewEncapsulation } from '@angular/core'; import { Component, Optional, ViewEncapsulation } from '@angular/core';
import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component'; import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component';
import { import {
UserPreferencesService, UserPreferencesService,
UserPreferenceValues UserPreferenceValues
} from '../../../common/services/user-preferences.service'; } from '../../../common/services/user-preferences.service';
import { NodesApiService } from '../../../services/nodes-api.service';
import { AppConfigService } from '../../../app-config/app-config.service'; import { AppConfigService } from '../../../app-config/app-config.service';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
import { DataTableService } from '../../services/datatable.service';
@Component({ @Component({
selector: 'adf-date-cell', selector: 'adf-date-cell',
template: ` template: `
<ng-container> <ng-container>
<span <span
@ -65,10 +64,10 @@ export class DateCellComponent extends DataTableCellComponent {
constructor( constructor(
userPreferenceService: UserPreferencesService, userPreferenceService: UserPreferencesService,
nodesApiService: NodesApiService, @Optional() dataTableService: DataTableService,
appConfig: AppConfigService appConfig: AppConfigService
) { ) {
super(nodesApiService); super(dataTableService);
this.dateFormat = appConfig.get('dateValues.defaultDateFormat', DateCellComponent.DATE_FORMAT); this.dateFormat = appConfig.get('dateValues.defaultDateFormat', DateCellComponent.DATE_FORMAT);
this.tooltipDateFormat = appConfig.get('dateValues.defaultTooltipDateFormat', DateCellComponent.DATE_FORMAT); this.tooltipDateFormat = appConfig.get('dateValues.defaultTooltipDateFormat', DateCellComponent.DATE_FORMAT);

View File

@ -15,9 +15,9 @@
* limitations under the License. * limitations under the License.
*/ */
import { Component, ViewEncapsulation } from '@angular/core'; import { Component, Optional, ViewEncapsulation } from '@angular/core';
import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component'; import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component';
import { NodesApiService } from '../../../services/nodes-api.service'; import { DataTableService } from '../../services/datatable.service';
@Component({ @Component({
selector: 'adf-filesize-cell', selector: 'adf-filesize-cell',
@ -33,7 +33,7 @@ import { NodesApiService } from '../../../services/nodes-api.service';
host: { class: 'adf-filesize-cell' } host: { class: 'adf-filesize-cell' }
}) })
export class FileSizeCellComponent extends DataTableCellComponent { export class FileSizeCellComponent extends DataTableCellComponent {
constructor(nodesApiService: NodesApiService) { constructor(@Optional() dataTableService: DataTableService) {
super(nodesApiService); super(dataTableService);
} }
} }

View File

@ -15,11 +15,11 @@
* limitations under the License. * limitations under the License.
*/ */
import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation, Input } from '@angular/core'; import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation, Input, Optional } from '@angular/core';
import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component'; import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { EditJsonDialogComponent, EditJsonDialogSettings } from '../../../dialogs/edit-json/edit-json.dialog'; import { EditJsonDialogComponent, EditJsonDialogSettings } from '../../../dialogs/edit-json/edit-json.dialog';
import { NodesApiService } from '../../../services/nodes-api.service'; import { DataTableService } from '../../services/datatable.service';
@Component({ @Component({
selector: 'adf-json-cell', selector: 'adf-json-cell',
@ -45,9 +45,9 @@ export class JsonCellComponent extends DataTableCellComponent implements OnInit
constructor( constructor(
private dialog: MatDialog, private dialog: MatDialog,
nodesApiService: NodesApiService @Optional() dataTableService: DataTableService
) { ) {
super(nodesApiService); super(dataTableService);
} }
ngOnInit() { ngOnInit() {

View File

@ -19,12 +19,12 @@ import {
ChangeDetectionStrategy, ChangeDetectionStrategy,
Component, Component,
Input, Input,
OnInit, OnInit, Optional,
ViewEncapsulation ViewEncapsulation
} from '@angular/core'; } from '@angular/core';
import { PathInfoEntity } from '@alfresco/js-api'; import { PathInfoEntity } from '@alfresco/js-api';
import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component'; import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component';
import { NodesApiService } from '../../../services/nodes-api.service'; import { DataTableService } from '../../services/datatable.service';
@Component({ @Component({
selector: 'adf-location-cell', selector: 'adf-location-cell',
@ -43,8 +43,8 @@ export class LocationCellComponent extends DataTableCellComponent implements OnI
@Input() @Input()
link: any[]; link: any[];
constructor(nodesApiService: NodesApiService) { constructor(@Optional() dataTableService: DataTableService) {
super(nodesApiService); super(dataTableService);
} }
/** @override */ /** @override */

View File

@ -16,8 +16,8 @@
*/ */
import { DataColumnComponent } from './data-column.component'; import { DataColumnComponent } from './data-column.component';
import { setupTestBed } from '../testing/setup-test-bed'; import { setupTestBed } from '../../testing/setup-test-bed';
import { CoreTestingModule } from '../testing/core.testing.module'; import { CoreTestingModule } from '../../testing/core.testing.module';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
describe('DataColumnListComponent', () => { describe('DataColumnListComponent', () => {

View File

@ -16,13 +16,12 @@
*/ */
import { Meta, moduleMetadata, Story } from '@storybook/angular'; import { Meta, moduleMetadata, Story } from '@storybook/angular';
import { DataColumnModule } from './data-column.module';
import { DataColumnComponent } from './data-column.component'; import { DataColumnComponent } from './data-column.component';
import { DataTableModule } from './../datatable/datatable.module'; import { DataTableModule } from '../datatable.module';
import { CoreStoryModule } from '../testing/core.story.module'; import { CoreStoryModule } from '../../testing/core.story.module';
import * as data from './../mock/data-column.mock'; import * as data from '../../mock/data-column.mock';
import { RouterTestingModule } from '@angular/router/testing'; import { RouterTestingModule } from '@angular/router/testing';
import { DataRow } from './../datatable'; import { DataRow } from '../index';
export default { export default {
component: DataColumnComponent, component: DataColumnComponent,
@ -31,7 +30,6 @@ export default {
moduleMetadata({ moduleMetadata({
imports: [ imports: [
CoreStoryModule, CoreStoryModule,
DataColumnModule,
DataTableModule, DataTableModule,
RouterTestingModule RouterTestingModule
] ]

View File

@ -32,9 +32,7 @@ import { DateColumnHeaderComponent } from './data-column-header.component';
DateColumnHeaderComponent DateColumnHeaderComponent
], ],
exports: [ exports: [
DataColumnComponent,
DataColumnListComponent,
DateColumnHeaderComponent
] ]
}) })
export class DataColumnModule {} export class DataColumnModule {}

View File

@ -18,5 +18,3 @@
export * from './data-column-list.component'; export * from './data-column-list.component';
export * from './data-column.component'; export * from './data-column.component';
export * from './data-column-header.component'; export * from './data-column-header.component';
export * from './data-column.module';

View File

@ -0,0 +1,21 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface DataRowUpdateModel {
obj: any;
id: string;
}

View File

@ -18,7 +18,7 @@
import { ContentChild, Input, Directive } from '@angular/core'; import { ContentChild, Input, Directive } from '@angular/core';
import { ReplaySubject } from 'rxjs'; import { ReplaySubject } from 'rxjs';
import { AppConfigService } from '../../app-config/app-config.service'; import { AppConfigService } from '../../app-config/app-config.service';
import { DataColumnListComponent } from '../../data-column/data-column-list.component'; import { DataColumnListComponent } from '../data-column/data-column-list.component';
import { DataColumn } from './data-column.model'; import { DataColumn } from './data-column.model';
import { ObjectDataColumn } from './object-datacolumn.model'; import { ObjectDataColumn } from './object-datacolumn.model';

View File

@ -47,10 +47,10 @@ import { MainMenuDataTableTemplateDirective } from './directives/main-data-table
import { JsonCellComponent } from './components/json-cell/json-cell.component'; import { JsonCellComponent } from './components/json-cell/json-cell.component';
import { ClipboardModule } from '../clipboard/clipboard.module'; import { ClipboardModule } from '../clipboard/clipboard.module';
import { DropZoneDirective } from './directives/drop-zone.directive'; import { DropZoneDirective } from './directives/drop-zone.directive';
import { DataColumnModule } from '../data-column/data-column.module';
import { DragDropModule } from '@angular/cdk/drag-drop'; import { DragDropModule } from '@angular/cdk/drag-drop';
import { IconModule } from '../icon/icon.module'; import { IconModule } from '../icon/icon.module';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { DataColumnComponent, DataColumnListComponent, DateColumnHeaderComponent } from './data-column';
@NgModule({ @NgModule({
imports: [ imports: [
@ -58,7 +58,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
MaterialModule, MaterialModule,
CommonModule, CommonModule,
TranslateModule, TranslateModule,
DataColumnModule,
ContextMenuModule, ContextMenuModule,
PipeModule, PipeModule,
DirectiveModule, DirectiveModule,
@ -89,7 +88,10 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
CustomLoadingContentTemplateDirective, CustomLoadingContentTemplateDirective,
CustomNoPermissionTemplateDirective, CustomNoPermissionTemplateDirective,
MainMenuDataTableTemplateDirective, MainMenuDataTableTemplateDirective,
DropZoneDirective DropZoneDirective,
DataColumnComponent,
DataColumnListComponent,
DateColumnHeaderComponent
], ],
exports: [ exports: [
DataTableComponent, DataTableComponent,
@ -112,7 +114,10 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
CustomLoadingContentTemplateDirective, CustomLoadingContentTemplateDirective,
CustomNoPermissionTemplateDirective, CustomNoPermissionTemplateDirective,
MainMenuDataTableTemplateDirective, MainMenuDataTableTemplateDirective,
DropZoneDirective DropZoneDirective,
DataColumnComponent,
DataColumnListComponent,
DateColumnHeaderComponent
] ]
}) })
export class DataTableModule {} export class DataTableModule {}

View File

@ -50,4 +50,8 @@ export * from './directives/custom-loading-template.directive';
export * from './directives/custom-no-permission-template.directive'; export * from './directives/custom-no-permission-template.directive';
export * from './directives/main-data-table-action-template.directive'; export * from './directives/main-data-table-action-template.directive';
export * from './services/datatable.service';
export * from './datatable.module'; export * from './datatable.module';
export * from './data-column';

View File

@ -0,0 +1,29 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import { DataRowUpdateModel } from '../data/data-row-update.model';
@Injectable()
export class DataTableService {
/**
* Publish/subscribe to events related to row updates.
*/
rowUpdate = new Subject<DataRowUpdateModel>();
}

View File

@ -20,7 +20,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { DataTableModule } from '../datatable/datatable.module'; import { DataTableModule } from '../datatable/datatable.module';
import { DataColumnModule } from '../data-column/data-column.module';
import { PipeModule } from '../pipes/pipe.module'; import { PipeModule } from '../pipes/pipe.module';
import { HttpClientModule } from '@angular/common/http'; import { HttpClientModule } from '@angular/common/http';
@ -51,7 +50,6 @@ import { InplaceFormInputComponent } from './components/inplace-form-input/inpla
TranslateModule, TranslateModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
DataColumnModule,
PipeModule, PipeModule,
MatDatetimepickerModule, MatDatetimepickerModule,
MatNativeDatetimeModule, MatNativeDatetimeModule,

View File

@ -23,7 +23,7 @@ export * from './lib/pagination/index';
export * from './lib/login/index'; export * from './lib/login/index';
export * from './lib/language-menu/index'; export * from './lib/language-menu/index';
export * from './lib/info-drawer/index'; export * from './lib/info-drawer/index';
export * from './lib/data-column/index'; export * from './lib/datatable/data-column/index';
export * from './lib/datatable/index'; export * from './lib/datatable/index';
export * from './lib/context-menu/index'; export * from './lib/context-menu/index';
export * from './lib/card-view/index'; export * from './lib/card-view/index';