mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[ACS-6124] Mark tree view component for deprecation (#9781)
This commit is contained in:
parent
6586becdbd
commit
9c67c92b82
20
docs/release-notes/RelNote-6.10.0.md
Normal file
20
docs/release-notes/RelNote-6.10.0.md
Normal file
@ -0,0 +1,20 @@
|
||||
# Release Notes v6.10.0
|
||||
|
||||
## Deprecated Content
|
||||
|
||||
The following components have been deprecated and will be removed in the next major release:
|
||||
|
||||
- Content Services: `TreeViewComponent`
|
||||
|
||||
## Removed Content
|
||||
|
||||
The following components have been removed:
|
||||
|
||||
- ACS-5571: Content Services: `WebScriptComponent`
|
||||
- ACS-5572: Content Services: `RatingComponent`
|
||||
- ACS-5572: Content Services: `LikeComponent`
|
||||
- ACS-7577: Content Services: `adf-create-folder`, `adf-edit-folder` directives
|
||||
|
||||
## Changelog
|
||||
|
||||
TBD
|
@ -74,7 +74,7 @@ describe('TreeViewComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ContentTestingModule]
|
||||
imports: [ContentTestingModule, TreeViewComponent]
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -21,9 +21,16 @@ import { TreeBaseNode } from '../models/tree-view.model';
|
||||
import { TreeViewDataSource } from '../data/tree-view-datasource';
|
||||
import { TreeViewService } from '../services/tree-view.service';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatTreeModule } from '@angular/material/tree';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-tree-view-list',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatTreeModule, MatButtonModule, MatIconModule, TranslateModule],
|
||||
templateUrl: './tree-view.component.html',
|
||||
styleUrls: ['./tree-view.component.scss']
|
||||
})
|
||||
|
@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { NodesApiService } from '../../common/services/nodes-api.service';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { NodesApiService } from '../../common/services/nodes-api.service';
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { TreeBaseNode } from '../models/tree-view.model';
|
||||
import { NodePaging, NodeEntry } from '@alfresco/js-api';
|
||||
@ -26,16 +26,12 @@ import { map } from 'rxjs/operators';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TreeViewService {
|
||||
private nodeApi = inject(NodesApiService);
|
||||
|
||||
constructor(private nodeApi: NodesApiService) {
|
||||
getTreeNodes(nodeId: string): Observable<TreeBaseNode[]> {
|
||||
return this.nodeApi.getNodeChildren(nodeId).pipe(
|
||||
map((nodePage: NodePaging) => nodePage.list.entries.filter((node) => (node.entry.isFolder ? node : null))),
|
||||
map((nodes: NodeEntry[]) => nodes.map((node) => new TreeBaseNode(node)))
|
||||
);
|
||||
}
|
||||
|
||||
getTreeNodes(nodeId): Observable<TreeBaseNode[]> {
|
||||
return this.nodeApi.getNodeChildren(nodeId)
|
||||
.pipe(
|
||||
map((nodePage: NodePaging) => nodePage.list.entries.filter((node) => node.entry.isFolder ? node : null)),
|
||||
map((nodes: NodeEntry[]) => nodes.map((node) => new TreeBaseNode(node)))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,24 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { TreeViewComponent } from './components/tree-view.component';
|
||||
|
||||
/** @deprecated this module is deprecated and will be removed in future versions */
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule
|
||||
],
|
||||
declarations: [
|
||||
TreeViewComponent
|
||||
],
|
||||
exports: [
|
||||
TreeViewComponent
|
||||
]
|
||||
imports: [TreeViewComponent],
|
||||
exports: [TreeViewComponent]
|
||||
})
|
||||
export class TreeViewModule {
|
||||
}
|
||||
export class TreeViewModule {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user