mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[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:
parent
85429b4cf1
commit
4da74f1c07
@ -15,15 +15,48 @@
|
||||
* 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 { MatDialog } from '@angular/material/dialog';
|
||||
import { ActivatedRoute, Params, Router } from '@angular/router';
|
||||
import { MinimalNodeEntity, NodePaging, 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,
|
||||
MinimalNodeEntity,
|
||||
NodePaging,
|
||||
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,
|
||||
FormRenderingService,
|
||||
FileUploadEvent,
|
||||
@ -58,7 +91,7 @@ const DEFAULT_FOLDER_TO_SHOW = '-my-';
|
||||
styleUrls: ['./files.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
providers: [
|
||||
{ provide: FormRenderingService, useClass: ProcessFormRenderingService }
|
||||
{provide: FormRenderingService, useClass: ProcessFormRenderingService}
|
||||
]
|
||||
})
|
||||
export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@ -80,9 +113,9 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
toolbarColor: ThemePalette;
|
||||
|
||||
selectionModes = [
|
||||
{ value: 'none', viewValue: 'None' },
|
||||
{ value: 'single', viewValue: 'Single' },
|
||||
{ value: 'multiple', viewValue: 'Multiple' }
|
||||
{value: 'none', viewValue: 'None'},
|
||||
{value: 'single', viewValue: 'Single'},
|
||||
{value: 'multiple', viewValue: 'Multiple'}
|
||||
];
|
||||
|
||||
// The identifier of a node. You can also use one of these well-known aliases: -my- | -shared- | -root-
|
||||
@ -195,13 +228,13 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
@Output()
|
||||
deleteElementSuccess: EventEmitter<any> = new EventEmitter();
|
||||
|
||||
@ViewChild('documentList', { static: true })
|
||||
@ViewChild('documentList', {static: true})
|
||||
documentList: DocumentListComponent;
|
||||
|
||||
@ViewChild('standardPagination')
|
||||
standardPagination: PaginationComponent;
|
||||
|
||||
@ViewChild(InfinitePaginationComponent, { static: true })
|
||||
@ViewChild(InfinitePaginationComponent, {static: true})
|
||||
infinitePaginationComponent: InfinitePaginationComponent;
|
||||
|
||||
permissionsStyle: PermissionStyleModel[] = [];
|
||||
@ -290,7 +323,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
let selectedNodes: NodeEntry[] = [];
|
||||
|
||||
if (this.preselectNodes) {
|
||||
if (value && value.length > 0 ) {
|
||||
if (value && value.length > 0) {
|
||||
if (this.selectionMode === 'single') {
|
||||
selectedNodes = [...[value[value.length - 1]].map((uploadedFile) => uploadedFile.data)];
|
||||
} else {
|
||||
@ -364,7 +397,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
|
||||
getCurrentDocumentListNode(): MinimalNodeEntity[] {
|
||||
if (this.documentList.folderNode) {
|
||||
return [{ entry: this.documentList.folderNode }];
|
||||
return [{entry: this.documentList.folderNode}];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
@ -464,7 +497,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
|
||||
if (this.contentService.hasAllowableOperations(contentEntry, 'update')) {
|
||||
this.dialog.open(VersionManagerDialogAdapterComponent, {
|
||||
data: { contentEntry, showComments, allowDownload },
|
||||
data: {contentEntry, showComments, allowDownload},
|
||||
panelClass: 'adf-version-manager-dialog',
|
||||
width: '630px'
|
||||
});
|
||||
@ -475,7 +508,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
|
||||
onAspectUpdate(event: any) {
|
||||
this.dialogAspectListService.openAspectListDialog(event.value.entry.id).subscribe((aspectList) => {
|
||||
this.nodeService.updateNode(event.value.entry.id, {aspectNames : [...aspectList]}).subscribe(() => {
|
||||
this.nodeService.updateNode(event.value.entry.id, {aspectNames: [...aspectList]}).subscribe(() => {
|
||||
this.openSnackMessageInfo('Node Aspects Updated');
|
||||
});
|
||||
});
|
||||
@ -705,7 +738,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
objectFromMap[filter.key] = paramValue;
|
||||
});
|
||||
|
||||
this.router.navigate([], { relativeTo: this.route, queryParams: objectFromMap });
|
||||
this.router.navigate([], {relativeTo: this.route, queryParams: objectFromMap});
|
||||
}
|
||||
|
||||
clearFilterNavigation() {
|
||||
|
@ -85,12 +85,12 @@ for more information about installing and using the source code.
|
||||
| [About Application Modules Component](core/components/about-application.component.md)  | 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)  | 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)  | 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) |
|
||||
| [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) |
|
||||
| [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) |
|
||||
| [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) |
|
||||
@ -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 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) |
|
||||
| [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) |
|
||||
| [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) |
|
||||
| [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) |
|
||||
| [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) |
|
||||
| [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 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 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) |
|
||||
| [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) |
|
||||
| [Log Service](core/services/log.service.md) | Provides log functionality. | [Source](../lib/core/src/lib/services/log.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) |
|
||||
| [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/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) |
|
||||
| [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) |
|
||||
@ -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 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) |
|
||||
| [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) |
|
||||
| [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) |
|
||||
| [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
|
||||
|
||||
@ -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) |
|
||||
| [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) |
|
||||
| [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) |
|
||||
| [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) |
|
||||
|
||||
|
@ -5,7 +5,7 @@ Status: Active
|
||||
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.
|
||||
|
||||
|
56
docs/core/services/datatable.service.md
Normal file
56
docs/core/services/datatable.service.md
Normal 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)
|
@ -24,8 +24,10 @@ project.
|
||||
- [Library updates](#library-updates)
|
||||
- [Breaking changes](#breaking-changes)
|
||||
- [Deprecated items](#deprecated-items)
|
||||
- [DataColumnModule](#datacolumnmodule)
|
||||
- [PaginationModel](#paginationmodel)
|
||||
- [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)
|
||||
- [nodeUpdated Subject](#nodeupdated-subject)
|
||||
- [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
|
||||
pull requests.
|
||||
|
||||
[TODO ADD HERE the PRs ]
|
||||
[`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
|
||||
[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
|
||||
[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
|
||||
[TODO ADD HERE the PRs ][`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
|
||||
[`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
|
||||
[`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
|
||||
[TODO ADD HERE the PRs ]
|
||||
|
||||
Each section needs to contains:
|
||||
@ -82,6 +83,29 @@ How to fix it:
|
||||
|
||||
## 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
|
||||
|
||||
`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` |
|
||||
| `SearchService` | `@alfresco/adf-core` | `@alfresco/adf-content-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
|
||||
library. You should modify your code to import these classes from
|
||||
`@alfresco/adf-content-services`.
|
||||
v6.0.0 and after You will need to provide a ```DataTableService``` to update a row of your table.
|
||||
The model to update the DataTable require the ID of the row you want change and the new data Object of the row
|
||||
|
||||
- [`CheckAllowableOperationDirective`](../content-services/directives/check-allowable-operation.directive.md)
|
||||
- [`LibraryFavoriteDirective`](../../lib/content-services/src/lib/directives/library-favorite.directive.ts)
|
||||
- [`LibraryMembershipDirective`](../../lib/content-services/src/lib/directives/library-membership.directive.ts)
|
||||
- [`NodeDeleteDirective`](../content-services/directives/node-delete.directive.md)
|
||||
- [`NodeFavoriteDirective`](../content-services/directives/node-favorite.directive.md)
|
||||
- [`NodeRestoreDirective`](../content-services/directives/node-restore.directive.md)
|
||||
```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}});
|
||||
});
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
@ -133,7 +195,7 @@ v6.0.0 and after:
|
||||
|
||||
### 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:
|
||||
|
||||
|
@ -12,6 +12,7 @@ backend services have been tested with each released version of ADF.
|
||||
|
||||
## Versions
|
||||
|
||||
- [v6.0.0](#v600)
|
||||
- [v5.1.0](#v510)
|
||||
- [v4.7.0](#v470)
|
||||
- [v4.6.0](#v460)
|
||||
@ -42,6 +43,17 @@ backend services have been tested with each released version of ADF.
|
||||
|
||||
## 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-->
|
||||
|
||||
- [Auto focus directive](content-services/directives/auto-focus.directive.md)
|
||||
|
@ -46,7 +46,9 @@ import {
|
||||
AlfrescoApiService,
|
||||
UserPreferenceValues,
|
||||
LockService,
|
||||
DataRow
|
||||
DataRow,
|
||||
DataTableService,
|
||||
NodesApiService
|
||||
} from '@alfresco/adf-core';
|
||||
|
||||
import { Node, NodeEntry, NodePaging, NodesApi, Pagination } from '@alfresco/js-api';
|
||||
@ -72,7 +74,7 @@ import { ADF_DOCUMENT_PARENT_COMPONENT } from './document-list.token';
|
||||
providers:[{
|
||||
provide: ADF_DOCUMENT_PARENT_COMPONENT,
|
||||
useExisting: DocumentListComponent
|
||||
}],
|
||||
}, DataTableService],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'adf-document-list' }
|
||||
})
|
||||
@ -363,7 +365,14 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
private contentService: ContentService,
|
||||
private thumbnailService: ThumbnailService,
|
||||
private alfrescoApiService: AlfrescoApiService,
|
||||
private nodeService: NodesApiService,
|
||||
private dataTableService: DataTableService,
|
||||
private lockService: LockService) {
|
||||
|
||||
this.nodeService.nodeUpdated.subscribe((node) => {
|
||||
this.dataTableService.rowUpdate.next({id: node.id, obj: {entry: node}});
|
||||
});
|
||||
|
||||
this.userPreferencesService
|
||||
.select(UserPreferenceValues.PaginationSize)
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
|
@ -25,7 +25,6 @@ import { AboutModule } from './about/about.module';
|
||||
import { AppConfigModule } from './app-config/app-config.module';
|
||||
import { CardViewModule } from './card-view/card-view.module';
|
||||
import { ContextMenuModule } from './context-menu/context-menu.module';
|
||||
import { DataColumnModule } from './data-column/data-column.module';
|
||||
import { DataTableModule } from './datatable/datatable.module';
|
||||
import { InfoDrawerModule } from './info-drawer/info-drawer.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,
|
||||
LanguageMenuModule,
|
||||
InfoDrawerModule,
|
||||
DataColumnModule,
|
||||
DataTableModule,
|
||||
ButtonsMenuModule,
|
||||
TemplateModule,
|
||||
@ -131,7 +129,6 @@ import { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
|
||||
LoginModule,
|
||||
LanguageMenuModule,
|
||||
InfoDrawerModule,
|
||||
DataColumnModule,
|
||||
DataTableModule,
|
||||
TranslateModule,
|
||||
ButtonsMenuModule,
|
||||
|
@ -21,14 +21,14 @@ import {
|
||||
Input,
|
||||
OnInit,
|
||||
ViewEncapsulation,
|
||||
OnDestroy
|
||||
OnDestroy, Optional
|
||||
} from '@angular/core';
|
||||
import { DataColumn } from '../../data/data-column.model';
|
||||
import { DataRow } from '../../data/data-row.model';
|
||||
import { DataTableAdapter } from '../../data/datatable-adapter';
|
||||
import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { NodesApiService } from '../../../services/nodes-api.service';
|
||||
import { DataTableService } from '../../services/datatable.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-datatable-cell',
|
||||
@ -51,7 +51,7 @@ import { NodesApiService } from '../../../services/nodes-api.service';
|
||||
</ng-template>
|
||||
`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: { class: 'adf-datatable-content-cell' }
|
||||
host: {class: 'adf-datatable-content-cell'}
|
||||
})
|
||||
export class DataTableCellComponent implements OnInit, OnDestroy {
|
||||
/** Data table adapter instance. */
|
||||
@ -82,22 +82,28 @@ export class DataTableCellComponent implements OnInit, OnDestroy {
|
||||
|
||||
protected onDestroy$ = new Subject<boolean>();
|
||||
|
||||
constructor(protected nodesApiService: NodesApiService) {}
|
||||
constructor(@Optional() protected dataTableService: DataTableService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.updateValue();
|
||||
this.nodesApiService.nodeUpdated
|
||||
if(this.dataTableService) {
|
||||
this.dataTableService.rowUpdate
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(node => {
|
||||
if (this.row && node && node.id) {
|
||||
if (this.row['node'].entry.id === node.id) {
|
||||
this.row['node'].entry = node;
|
||||
this.row['cache'][this.column.key] = this.column.key.split('.').reduce((source, key) => source ? source[key] : '', node);
|
||||
.subscribe(data => {
|
||||
if (data && data.id) {
|
||||
if (this.row.id === data.id) {
|
||||
if (this.row.obj && data.obj) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected updateValue() {
|
||||
if (this.column && this.column.key && this.row && this.data) {
|
||||
|
@ -26,8 +26,8 @@ import { ObjectDataTableAdapter } from '../../data/object-datatable-adapter';
|
||||
import { DataTableComponent, ShowHeaderMode } from './datatable.component';
|
||||
import { setupTestBed } from '../../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { DataColumnListComponent } from '../../../data-column/data-column-list.component';
|
||||
import { DataColumnComponent } from '../../../data-column/data-column.component';
|
||||
import { DataColumnListComponent } from '../../data-column/data-column-list.component';
|
||||
import { DataColumnComponent } from '../../data-column/data-column.component';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { domSanitizerMock } from '../../../mock/dom-sanitizer-mock';
|
||||
import { matIconRegistryMock } from '../../../mock/mat-icon-registry-mock';
|
||||
|
@ -26,7 +26,7 @@ import { FocusKeyManager } from '@angular/cdk/a11y';
|
||||
import { MatCheckboxChange } from '@angular/material/checkbox';
|
||||
import { MatMenuTrigger } from '@angular/material/menu';
|
||||
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 { DataRowEvent } from '../../data/data-row-event.model';
|
||||
import { DataRow } from '../../data/data-row.model';
|
||||
|
@ -15,19 +15,18 @@
|
||||
* 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 {
|
||||
UserPreferencesService,
|
||||
UserPreferenceValues
|
||||
} from '../../../common/services/user-preferences.service';
|
||||
import { NodesApiService } from '../../../services/nodes-api.service';
|
||||
import { AppConfigService } from '../../../app-config/app-config.service';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { DataTableService } from '../../services/datatable.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-date-cell',
|
||||
|
||||
template: `
|
||||
<ng-container>
|
||||
<span
|
||||
@ -65,10 +64,10 @@ export class DateCellComponent extends DataTableCellComponent {
|
||||
|
||||
constructor(
|
||||
userPreferenceService: UserPreferencesService,
|
||||
nodesApiService: NodesApiService,
|
||||
@Optional() dataTableService: DataTableService,
|
||||
appConfig: AppConfigService
|
||||
) {
|
||||
super(nodesApiService);
|
||||
super(dataTableService);
|
||||
|
||||
this.dateFormat = appConfig.get('dateValues.defaultDateFormat', DateCellComponent.DATE_FORMAT);
|
||||
this.tooltipDateFormat = appConfig.get('dateValues.defaultTooltipDateFormat', DateCellComponent.DATE_FORMAT);
|
||||
|
@ -15,9 +15,9 @@
|
||||
* 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 { NodesApiService } from '../../../services/nodes-api.service';
|
||||
import { DataTableService } from '../../services/datatable.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-filesize-cell',
|
||||
@ -33,7 +33,7 @@ import { NodesApiService } from '../../../services/nodes-api.service';
|
||||
host: { class: 'adf-filesize-cell' }
|
||||
})
|
||||
export class FileSizeCellComponent extends DataTableCellComponent {
|
||||
constructor(nodesApiService: NodesApiService) {
|
||||
super(nodesApiService);
|
||||
constructor(@Optional() dataTableService: DataTableService) {
|
||||
super(dataTableService);
|
||||
}
|
||||
}
|
||||
|
@ -15,11 +15,11 @@
|
||||
* 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 { MatDialog } from '@angular/material/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({
|
||||
selector: 'adf-json-cell',
|
||||
@ -45,9 +45,9 @@ export class JsonCellComponent extends DataTableCellComponent implements OnInit
|
||||
|
||||
constructor(
|
||||
private dialog: MatDialog,
|
||||
nodesApiService: NodesApiService
|
||||
@Optional() dataTableService: DataTableService
|
||||
) {
|
||||
super(nodesApiService);
|
||||
super(dataTableService);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -19,12 +19,12 @@ import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Input,
|
||||
OnInit,
|
||||
OnInit, Optional,
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import { PathInfoEntity } from '@alfresco/js-api';
|
||||
import { DataTableCellComponent } from '../datatable-cell/datatable-cell.component';
|
||||
import { NodesApiService } from '../../../services/nodes-api.service';
|
||||
import { DataTableService } from '../../services/datatable.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-location-cell',
|
||||
@ -43,8 +43,8 @@ export class LocationCellComponent extends DataTableCellComponent implements OnI
|
||||
@Input()
|
||||
link: any[];
|
||||
|
||||
constructor(nodesApiService: NodesApiService) {
|
||||
super(nodesApiService);
|
||||
constructor(@Optional() dataTableService: DataTableService) {
|
||||
super(dataTableService);
|
||||
}
|
||||
|
||||
/** @override */
|
||||
|
@ -16,8 +16,8 @@
|
||||
*/
|
||||
|
||||
import { DataColumnComponent } from './data-column.component';
|
||||
import { setupTestBed } from '../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../testing/core.testing.module';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('DataColumnListComponent', () => {
|
@ -16,13 +16,12 @@
|
||||
*/
|
||||
|
||||
import { Meta, moduleMetadata, Story } from '@storybook/angular';
|
||||
import { DataColumnModule } from './data-column.module';
|
||||
import { DataColumnComponent } from './data-column.component';
|
||||
import { DataTableModule } from './../datatable/datatable.module';
|
||||
import { CoreStoryModule } from '../testing/core.story.module';
|
||||
import * as data from './../mock/data-column.mock';
|
||||
import { DataTableModule } from '../datatable.module';
|
||||
import { CoreStoryModule } from '../../testing/core.story.module';
|
||||
import * as data from '../../mock/data-column.mock';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { DataRow } from './../datatable';
|
||||
import { DataRow } from '../index';
|
||||
|
||||
export default {
|
||||
component: DataColumnComponent,
|
||||
@ -31,7 +30,6 @@ export default {
|
||||
moduleMetadata({
|
||||
imports: [
|
||||
CoreStoryModule,
|
||||
DataColumnModule,
|
||||
DataTableModule,
|
||||
RouterTestingModule
|
||||
]
|
@ -32,9 +32,7 @@ import { DateColumnHeaderComponent } from './data-column-header.component';
|
||||
DateColumnHeaderComponent
|
||||
],
|
||||
exports: [
|
||||
DataColumnComponent,
|
||||
DataColumnListComponent,
|
||||
DateColumnHeaderComponent
|
||||
|
||||
]
|
||||
})
|
||||
export class DataColumnModule {}
|
@ -18,5 +18,3 @@
|
||||
export * from './data-column-list.component';
|
||||
export * from './data-column.component';
|
||||
export * from './data-column-header.component';
|
||||
|
||||
export * from './data-column.module';
|
21
lib/core/src/lib/datatable/data/data-row-update.model.ts
Normal file
21
lib/core/src/lib/datatable/data/data-row-update.model.ts
Normal 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;
|
||||
}
|
@ -18,7 +18,7 @@
|
||||
import { ContentChild, Input, Directive } from '@angular/core';
|
||||
import { ReplaySubject } from 'rxjs';
|
||||
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 { ObjectDataColumn } from './object-datacolumn.model';
|
||||
|
||||
|
@ -47,10 +47,10 @@ import { MainMenuDataTableTemplateDirective } from './directives/main-data-table
|
||||
import { JsonCellComponent } from './components/json-cell/json-cell.component';
|
||||
import { ClipboardModule } from '../clipboard/clipboard.module';
|
||||
import { DropZoneDirective } from './directives/drop-zone.directive';
|
||||
import { DataColumnModule } from '../data-column/data-column.module';
|
||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
import { IconModule } from '../icon/icon.module';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { DataColumnComponent, DataColumnListComponent, DateColumnHeaderComponent } from './data-column';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -58,7 +58,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
MaterialModule,
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
DataColumnModule,
|
||||
ContextMenuModule,
|
||||
PipeModule,
|
||||
DirectiveModule,
|
||||
@ -89,7 +88,10 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
CustomLoadingContentTemplateDirective,
|
||||
CustomNoPermissionTemplateDirective,
|
||||
MainMenuDataTableTemplateDirective,
|
||||
DropZoneDirective
|
||||
DropZoneDirective,
|
||||
DataColumnComponent,
|
||||
DataColumnListComponent,
|
||||
DateColumnHeaderComponent
|
||||
],
|
||||
exports: [
|
||||
DataTableComponent,
|
||||
@ -112,7 +114,10 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
CustomLoadingContentTemplateDirective,
|
||||
CustomNoPermissionTemplateDirective,
|
||||
MainMenuDataTableTemplateDirective,
|
||||
DropZoneDirective
|
||||
DropZoneDirective,
|
||||
DataColumnComponent,
|
||||
DataColumnListComponent,
|
||||
DateColumnHeaderComponent
|
||||
]
|
||||
})
|
||||
export class DataTableModule {}
|
||||
|
@ -50,4 +50,8 @@ export * from './directives/custom-loading-template.directive';
|
||||
export * from './directives/custom-no-permission-template.directive';
|
||||
export * from './directives/main-data-table-action-template.directive';
|
||||
|
||||
export * from './services/datatable.service';
|
||||
|
||||
|
||||
export * from './datatable.module';
|
||||
export * from './data-column';
|
||||
|
29
lib/core/src/lib/datatable/services/datatable.service.ts
Normal file
29
lib/core/src/lib/datatable/services/datatable.service.ts
Normal 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>();
|
||||
}
|
@ -20,7 +20,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { DataTableModule } from '../datatable/datatable.module';
|
||||
import { DataColumnModule } from '../data-column/data-column.module';
|
||||
import { PipeModule } from '../pipes/pipe.module';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
|
||||
@ -51,7 +50,6 @@ import { InplaceFormInputComponent } from './components/inplace-form-input/inpla
|
||||
TranslateModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
DataColumnModule,
|
||||
PipeModule,
|
||||
MatDatetimepickerModule,
|
||||
MatNativeDatetimeModule,
|
||||
|
@ -23,7 +23,7 @@ export * from './lib/pagination/index';
|
||||
export * from './lib/login/index';
|
||||
export * from './lib/language-menu/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/context-menu/index';
|
||||
export * from './lib/card-view/index';
|
||||
|
Loading…
x
Reference in New Issue
Block a user