mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-11205] Add LazyApi decorator (#11711)
* [ACS-11205] Add LazyApi decorator * [ACS-11205] Add unit tests and CR fixes * [ACS-11259] Storybook build fix
This commit is contained in:
@@ -47,7 +47,7 @@ import {
|
||||
UserPreferencesService,
|
||||
UserPreferenceValues
|
||||
} from '@alfresco/adf-core';
|
||||
import { Node, NodeEntry, NodePaging, NodesApi, Pagination } from '@alfresco/js-api';
|
||||
import { LazyApi, Node, NodeEntry, NodePaging, NodesApi, Pagination } from '@alfresco/js-api';
|
||||
import {
|
||||
AfterContentInit,
|
||||
Component,
|
||||
@@ -469,11 +469,8 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On
|
||||
|
||||
private readonly destroyRef = inject(DestroyRef);
|
||||
|
||||
private _nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.alfrescoApiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
@LazyApi((self: DocumentListComponent) => new NodesApi(self.alfrescoApiService.getInstance()))
|
||||
declare readonly nodesApi: NodesApi;
|
||||
|
||||
constructor() {
|
||||
const appConfig = inject(AppConfigService);
|
||||
|
||||
Reference in New Issue
Block a user