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(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
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 { TreeViewDataSource } from '../data/tree-view-datasource';
|
||||||
import { TreeViewService } from '../services/tree-view.service';
|
import { TreeViewService } from '../services/tree-view.service';
|
||||||
import { NodeEntry } from '@alfresco/js-api';
|
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({
|
@Component({
|
||||||
selector: 'adf-tree-view-list',
|
selector: 'adf-tree-view-list',
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, MatTreeModule, MatButtonModule, MatIconModule, TranslateModule],
|
||||||
templateUrl: './tree-view.component.html',
|
templateUrl: './tree-view.component.html',
|
||||||
styleUrls: ['./tree-view.component.scss']
|
styleUrls: ['./tree-view.component.scss']
|
||||||
})
|
})
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NodesApiService } from '../../common/services/nodes-api.service';
|
import { NodesApiService } from '../../common/services/nodes-api.service';
|
||||||
import { Injectable } from '@angular/core';
|
import { inject, Injectable } from '@angular/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { TreeBaseNode } from '../models/tree-view.model';
|
import { TreeBaseNode } from '../models/tree-view.model';
|
||||||
import { NodePaging, NodeEntry } from '@alfresco/js-api';
|
import { NodePaging, NodeEntry } from '@alfresco/js-api';
|
||||||
@ -26,16 +26,12 @@ import { map } from 'rxjs/operators';
|
|||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class TreeViewService {
|
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))),
|
||||||
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)))
|
map((nodes: NodeEntry[]) => nodes.map((node) => new TreeBaseNode(node)))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,24 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
import { MaterialModule } from '../material.module';
|
|
||||||
import { TreeViewComponent } from './components/tree-view.component';
|
import { TreeViewComponent } from './components/tree-view.component';
|
||||||
|
|
||||||
|
/** @deprecated this module is deprecated and will be removed in future versions */
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [TreeViewComponent],
|
||||||
CommonModule,
|
exports: [TreeViewComponent]
|
||||||
MaterialModule,
|
|
||||||
TranslateModule
|
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
TreeViewComponent
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
TreeViewComponent
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
export class TreeViewModule {
|
export class TreeViewModule {}
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user