[ACS-11205] Use new LazyApi decorator (#5079)

* [ACS-11205] Use new LazyApi decorator

* [ACS-11205] Use latest ADF

* [ACS-11025] CR fixes
This commit is contained in:
Michal Kinas
2026-03-12 12:00:23 +01:00
committed by GitHub
parent 9ea290dac7
commit ea8c621f54
13 changed files with 100 additions and 139 deletions
+30 -30
View File
@@ -9,11 +9,11 @@
"version": "7.4.0",
"license": "LGPL-3.0",
"dependencies": {
"@alfresco/adf-content-services": "8.5.0-22993888183",
"@alfresco/adf-core": "8.5.0-22993888183",
"@alfresco/adf-extensions": "8.5.0-22993888183",
"@alfresco/eslint-plugin-eslint-angular": "8.3.1",
"@alfresco/js-api": "9.5.0-22993888183",
"@alfresco/adf-content-services": "8.5.0-22994709854",
"@alfresco/adf-core": "8.5.0-22994709854",
"@alfresco/adf-extensions": "8.5.0-22994709854",
"@alfresco/eslint-plugin-eslint-angular": "8.5.0-22994709854",
"@alfresco/js-api": "9.5.0-22994709854",
"@angular/animations": "19.2.19",
"@angular/cdk": "19.2.19",
"@angular/common": "19.2.19",
@@ -46,7 +46,7 @@
"zone.js": "0.15.0"
},
"devDependencies": {
"@alfresco/adf-cli": "8.5.0-22993888183",
"@alfresco/adf-cli": "8.5.0-22994709854",
"@angular-devkit/build-angular": "19.2.19",
"@angular-devkit/core": "19.2.18",
"@angular-devkit/schematics": "19.2.18",
@@ -103,13 +103,13 @@
}
},
"node_modules/@alfresco/adf-cli": {
"version": "8.5.0-22993888183",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-8.5.0-22993888183.tgz",
"integrity": "sha512-UmcIwupfyANVursCZBjxq0TEvwtv6BvK1nY4uLt4T5izoGPEa1PatfOjHyCTMYqijhP9YJt8hLm59rrNceCeyA==",
"version": "8.5.0-22994709854",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-8.5.0-22994709854.tgz",
"integrity": "sha512-agM7Q7Mgp2nV9m1tKwV5bm9lOKKp6ltdZhYFLWfauD4t1bC38iWd2TeTuWSd7xnv/0SiTLAMuviLEPSrDnE4jw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@alfresco/js-api": ">=9.5.0-22993888183",
"@alfresco/js-api": ">=9.5.0-22994709854",
"ejs": "^3.1.10",
"license-checker": "^25.0.1",
"node-fetch": "^2.7.0",
@@ -121,16 +121,16 @@
}
},
"node_modules/@alfresco/adf-content-services": {
"version": "8.5.0-22993888183",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-8.5.0-22993888183.tgz",
"integrity": "sha512-Tn/2Rp+Fbro6fXWPDy2ks0dw47b9ZgFVI8u0zwvI7nMxWV0F4fM1CMOr5a/0keNaBEDZdIT5qZMVhM6cT1UDhQ==",
"version": "8.5.0-22994709854",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-8.5.0-22994709854.tgz",
"integrity": "sha512-p1yfcryD/u6vywgh7ujW7kGHmkK2Bijv4alVyByTPsBGszQM8yBMFcMeOJNFnu0wJjto5X0d96NtGY5qbf78XQ==",
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/adf-core": ">=8.5.0-22993888183",
"@alfresco/js-api": ">=9.5.0-22993888183",
"@alfresco/adf-core": ">=8.5.0-22994709854",
"@alfresco/js-api": ">=9.5.0-22994709854",
"@angular/animations": ">=14.1.3",
"@angular/cdk": ">=14.1.2",
"@angular/common": ">=14.1.3",
@@ -145,9 +145,9 @@
}
},
"node_modules/@alfresco/adf-core": {
"version": "8.5.0-22993888183",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-8.5.0-22993888183.tgz",
"integrity": "sha512-jgrnSXAxoA4nBTin0u1Y1hpZsjSXkWROUXbNSMH0BZSPOFF0r61tvgKuTypqLGrNwmD7qAZxPE1FD+XoR5wmmg==",
"version": "8.5.0-22994709854",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-8.5.0-22994709854.tgz",
"integrity": "sha512-NISpFmj9mFzoTYA4W75DU4bGbHJW0ZWsKZGhd0nuaRA8GMVaTDqqZtQDEJZGsHWEARTyo3YIy2iCPbNo13RieA==",
"license": "Apache-2.0",
"peer": true,
"dependencies": {
@@ -159,8 +159,8 @@
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/adf-extensions": ">=8.5.0-22993888183",
"@alfresco/js-api": ">=9.5.0-22993888183",
"@alfresco/adf-extensions": ">=8.5.0-22994709854",
"@alfresco/js-api": ">=9.5.0-22994709854",
"@angular/animations": ">=16.0.0",
"@angular/cdk": ">=16.0.0",
"@angular/common": ">=16.0.0",
@@ -193,30 +193,30 @@
}
},
"node_modules/@alfresco/adf-extensions": {
"version": "8.5.0-22993888183",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-8.5.0-22993888183.tgz",
"integrity": "sha512-cv7Jlzw7JQzSTbj6gBxH8YCUgaDrBhA/SSIkmNKUhn4now6PdoOBQeYainisjbDXmFqvrKGnv5q2hNrI92vw2g==",
"version": "8.5.0-22994709854",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-8.5.0-22994709854.tgz",
"integrity": "sha512-yUGZ/ZhPiBKD0vhYplVGFSDK1MlIJtF670Jtk6bY2hsGUfzQP+NVb2qee1DSXWdjWs3Q2Q+Ud3c9qaTJVTnF1A==",
"license": "Apache-2.0",
"peer": true,
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/js-api": ">=9.5.0-22993888183",
"@alfresco/js-api": ">=9.5.0-22994709854",
"@angular/common": ">=14.1.3",
"@angular/core": ">=14.1.3"
}
},
"node_modules/@alfresco/eslint-plugin-eslint-angular": {
"version": "8.3.1",
"resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-8.3.1.tgz",
"integrity": "sha512-TUpsXTBBtm6ZTH6Np1d/WaDIiebdzZcRJLs3J+dgm0Bs0vjQJBY0D5cvXXc0hkyAJvQGYx8djaL/05nrcleBVg==",
"version": "8.5.0-22994709854",
"resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-8.5.0-22994709854.tgz",
"integrity": "sha512-IVCW7kx6nKg4jJAidzN3iHaWbXxj8zTtVp7AqG/36lVRXViCRm4p3ox38cA5FErB5GZ8Ut2m+Bu7JBpJyFQXxA==",
"license": "Apache-2.0"
},
"node_modules/@alfresco/js-api": {
"version": "9.5.0-22993888183",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-9.5.0-22993888183.tgz",
"integrity": "sha512-awwkHjMJMw64hRwONQ0fFHevbBztyQL3MIT1sYYikuUV1+C2l39IMiKMhs4yrSz7FlkSQieT8oPyZDn4QJTUgQ==",
"version": "9.5.0-22994709854",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-9.5.0-22994709854.tgz",
"integrity": "sha512-nKho3GMj8gHtb3huQIEcBhVjcWUaFzSmwx6dByG5PEYm/xX3adJbYVvNMSwtH/3yUI7nErTpb+RIi6k6bS5hWg==",
"license": "Apache-2.0",
"peer": true,
"dependencies": {
+6 -6
View File
@@ -41,11 +41,11 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "8.5.0-22993888183",
"@alfresco/adf-core": "8.5.0-22993888183",
"@alfresco/adf-extensions": "8.5.0-22993888183",
"@alfresco/eslint-plugin-eslint-angular": "8.3.1",
"@alfresco/js-api": "9.5.0-22993888183",
"@alfresco/adf-content-services": "8.5.0-22994709854",
"@alfresco/adf-core": "8.5.0-22994709854",
"@alfresco/adf-extensions": "8.5.0-22994709854",
"@alfresco/eslint-plugin-eslint-angular": "8.5.0-22994709854",
"@alfresco/js-api": "9.5.0-22994709854",
"@angular/animations": "19.2.19",
"@angular/cdk": "19.2.19",
"@angular/common": "19.2.19",
@@ -78,7 +78,7 @@
"zone.js": "0.15.0"
},
"devDependencies": {
"@alfresco/adf-cli": "8.5.0-22993888183",
"@alfresco/adf-cli": "8.5.0-22994709854",
"@angular-devkit/build-angular": "19.2.19",
"@angular-devkit/core": "19.2.18",
"@angular-devkit/schematics": "19.2.18",
@@ -34,7 +34,7 @@ import {
ValidationErrors,
Validators
} from '@angular/forms';
import { QueriesApi, SiteEntry, SitePaging } from '@alfresco/js-api';
import { QueriesApi, SiteEntry, SitePaging, LazyApi } from '@alfresco/js-api';
import { Store } from '@ngrx/store';
import { AppStore, isAdmin, UpdateLibraryAction } from '@alfresco/aca-shared/store';
import { AppHookService } from '@alfresco/aca-shared';
@@ -77,13 +77,10 @@ export class InstantErrorStateMatcher implements ErrorStateMatcher {
encapsulation: ViewEncapsulation.None
})
export class LibraryMetadataFormComponent implements OnInit, OnChanges {
private _queriesApi: QueriesApi;
private _titleErrorTranslationKey: string;
get queriesApi(): QueriesApi {
this._queriesApi = this._queriesApi ?? new QueriesApi(this.alfrescoApiService.getInstance());
return this._queriesApi;
}
@LazyApi((self: LibraryMetadataFormComponent) => new QueriesApi(self.alfrescoApiService.getInstance()))
queriesApi: QueriesApi;
get titleErrorTranslationKey(): string {
return this._titleErrorTranslationKey;
@@ -24,7 +24,7 @@
import { AlfrescoApiService } from '@alfresco/adf-content-services';
import { Injectable } from '@angular/core';
import { QueriesApi, SitePaging } from '@alfresco/js-api';
import { QueriesApi, SitePaging, LazyApi } from '@alfresco/js-api';
import { Subject } from 'rxjs';
export interface LibrarySearchQuery {
@@ -39,14 +39,11 @@ export interface LibrarySearchQuery {
providedIn: 'root'
})
export class SearchLibrariesQueryBuilderService {
_queriesApi: QueriesApi;
get queriesApi(): QueriesApi {
this._queriesApi = this._queriesApi ?? new QueriesApi(this.alfrescoApiService.getInstance());
return this._queriesApi;
}
private _userQuery = '';
@LazyApi((self: SearchLibrariesQueryBuilderService) => new QueriesApi(self.alfrescoApiService.getInstance()))
queriesApi: QueriesApi;
updated: Subject<any> = new Subject();
executed: Subject<any> = new Subject();
hadError: Subject<any> = new Subject();
@@ -25,7 +25,7 @@
import { AppStore, SetSelectedNodesAction } from '@alfresco/aca-shared/store';
import { ViewerModule } from '@alfresco/adf-core';
import { ContentActionRef } from '@alfresco/adf-extensions';
import { SharedLinkEntry, SharedlinksApi } from '@alfresco/js-api';
import { SharedLinkEntry, SharedlinksApi, LazyApi } from '@alfresco/js-api';
import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Store } from '@ngrx/store';
@@ -48,6 +48,7 @@ export class SharedLinkViewComponent implements OnInit {
sharedLinkId: string = null;
viewerToolbarActions: Array<ContentActionRef> = [];
@LazyApi((self: SharedLinkViewComponent) => new SharedlinksApi(self.alfrescoApiService.getInstance()))
private sharedLinksApi: SharedlinksApi;
private readonly destroyRef = inject(DestroyRef);
@@ -58,9 +59,7 @@ export class SharedLinkViewComponent implements OnInit {
private extensions: AppExtensionService,
private alfrescoApiService: AlfrescoApiService,
private appService: AppService
) {
this.sharedLinksApi = new SharedlinksApi(this.alfrescoApiService.getInstance());
}
) {}
ngOnInit() {
this.route.params
@@ -23,7 +23,7 @@
*/
import { AppStore, DownloadNodesAction, EditOfflineAction, SetSelectedNodesAction, getAppSelection } from '@alfresco/aca-shared/store';
import { NodeEntry, SharedLinkEntry, Node, NodesApi } from '@alfresco/js-api';
import { NodeEntry, SharedLinkEntry, Node, NodesApi, LazyApi } from '@alfresco/js-api';
import { Component, inject, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppExtensionService, isLocked } from '@alfresco/aca-shared';
@@ -52,7 +52,9 @@ export class ToggleEditOfflineComponent implements OnInit {
private notificationService = inject(NotificationService);
@LazyApi((self: ToggleEditOfflineComponent) => new NodesApi(self.alfrescoApiService.getInstance()))
private nodesApi: NodesApi;
selection: NodeEntry;
nodeTitle = '';
isNodeLocked = false;
@@ -61,9 +63,7 @@ export class ToggleEditOfflineComponent implements OnInit {
private store: Store<AppStore>,
private alfrescoApiService: AlfrescoApiService,
private extensions: AppExtensionService
) {
this.nodesApi = new NodesApi(this.alfrescoApiService.getInstance());
}
) {}
ngOnInit() {
this.store.select(getAppSelection).subscribe(({ file }) => {
@@ -23,7 +23,7 @@
*/
import { AlfrescoApiService } from '@alfresco/adf-content-services';
import { PeopleApi, Person } from '@alfresco/js-api';
import { PeopleApi, Person, LazyApi } from '@alfresco/js-api';
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
import { Router } from '@angular/router';
@@ -57,6 +57,7 @@ import { MatInputModule } from '@angular/material/input';
encapsulation: ViewEncapsulation.None
})
export class ViewProfileComponent implements OnInit {
@LazyApi((self: ViewProfileComponent) => new PeopleApi(self.apiService.getInstance()))
peopleApi: PeopleApi;
profileForm = new FormGroup({
firstName: new FormControl(''),
@@ -93,7 +94,6 @@ export class ViewProfileComponent implements OnInit {
private readonly appService: AppService,
private readonly extensionService: AppExtensionService
) {
this.peopleApi = new PeopleApi(this.apiService.getInstance());
this.appNavNarMode$ = appService.appNavNarMode$.pipe(takeUntilDestroyed());
}
@@ -36,7 +36,17 @@ import {
NodeAction,
ContentService
} from '@alfresco/adf-content-services';
import { NodeEntry, Node, SitePaging, NodeChildAssociationPaging, NodeChildAssociationEntry, NodesApi, Site, SitePagingList } from '@alfresco/js-api';
import {
NodeEntry,
Node,
SitePaging,
NodeChildAssociationPaging,
NodeChildAssociationEntry,
NodesApi,
Site,
SitePagingList,
LazyApi
} from '@alfresco/js-api';
import { ContentApiService } from '@alfresco/aca-shared';
import { catchError, map, mergeMap } from 'rxjs/operators';
@@ -51,11 +61,8 @@ export class NodeActionsService {
moveDeletedEntries: any[] = [];
isSitesDestinationAvailable = false;
_nodesApi: NodesApi;
get nodesApi(): NodesApi {
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
return this._nodesApi;
}
@LazyApi((self: NodeActionsService) => new NodesApi(self.apiService.getInstance()))
nodesApi: NodesApi;
constructor(
private contentService: ContentService,
@@ -26,7 +26,7 @@ import { inject, Injectable } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { CreateFromTemplateDialogComponent } from '../dialogs/node-template/create-from-template.dialog';
import { Subject, from, of } from 'rxjs';
import { Node, ResultNode, PathElement, SearchApi } from '@alfresco/js-api';
import { Node, ResultNode, PathElement, SearchApi, LazyApi } from '@alfresco/js-api';
import { TranslationService, NotificationService } from '@alfresco/adf-core';
import { switchMap, catchError } from 'rxjs/operators';
import {
@@ -54,11 +54,8 @@ export class NodeTemplateService {
private currentTemplateConfig: TemplateDialogConfig = null;
private rootNode: ResultNode;
private _searchApi: SearchApi;
get searchApi(): SearchApi {
this._searchApi = this._searchApi ?? new SearchApi(this.alfrescoApiService.getInstance());
return this._searchApi;
}
@LazyApi((self: NodeTemplateService) => new SearchApi(self.alfrescoApiService.getInstance()))
searchApi: SearchApi;
selectTemplateDialog(config: TemplateDialogConfig): Subject<Node[]> {
this.currentTemplateConfig = config;
@@ -38,7 +38,7 @@ import {
import { NodeTemplateService, TemplateDialogConfig } from '../../services/node-template.service';
import { NotificationService } from '@alfresco/adf-core';
import { from, Observable, of } from 'rxjs';
import { Node, NodeBodyUpdate, NodeEntry, NodesApi } from '@alfresco/js-api';
import { Node, NodeBodyUpdate, NodeEntry, NodesApi, LazyApi } from '@alfresco/js-api';
import { MatDialog } from '@angular/material/dialog';
import { AlfrescoApiService, DocumentListService } from '@alfresco/adf-content-services';
@@ -47,11 +47,8 @@ export class TemplateEffects {
private notificationService = inject(NotificationService);
private documentListService = inject(DocumentListService);
private _nodesApi: NodesApi;
get nodesApi(): NodesApi {
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
return this._nodesApi;
}
@LazyApi((self: TemplateEffects) => new NodesApi(self.apiService.getInstance()))
nodesApi: NodesApi;
matDialog = inject(MatDialog);
store = inject(Store<AppStore>);
@@ -43,7 +43,7 @@ import {
ViewNodeAction
} from '@alfresco/aca-shared/store';
import { ContentActionRef, SelectionState } from '@alfresco/adf-extensions';
import { Node, VersionEntry, VersionsApi } from '@alfresco/js-api';
import { Node, VersionEntry, VersionsApi, LazyApi } from '@alfresco/js-api';
import { Component, DestroyRef, HostListener, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { ActivatedRoute, PRIMARY_OUTLET, Router } from '@angular/router';
import { ViewerOpenWithComponent, ViewerSidebarComponent, ViewerToolbarActionsComponent } from '@alfresco/adf-core';
@@ -78,12 +78,8 @@ export class AcaViewerComponent implements OnInit, OnDestroy {
private documentListService = inject(DocumentListService);
private _versionsApi: VersionsApi;
get versionsApi(): VersionsApi {
this._versionsApi = this._versionsApi ?? new VersionsApi(this.apiService.getInstance());
return this._versionsApi;
}
@LazyApi((self: AcaViewerComponent) => new VersionsApi(self.apiService.getInstance()))
versionsApi: VersionsApi;
fileName: string;
folderId: string = null;
infoDrawerOpened$: Observable<boolean>;
@@ -52,7 +52,8 @@ import {
PeopleApi,
VersionsApi,
DirectAccessUrlEntry,
VersionPaging
VersionPaging,
LazyApi
} from '@alfresco/js-api';
import { map } from 'rxjs/operators';
@@ -60,65 +61,36 @@ import { map } from 'rxjs/operators';
providedIn: 'root'
})
export class ContentApiService {
private _nodesApi: NodesApi;
get nodesApi(): NodesApi {
this._nodesApi = this._nodesApi ?? new NodesApi(this.api.getInstance());
return this._nodesApi;
}
@LazyApi((self: ContentApiService) => new NodesApi(self.api.getInstance()))
nodesApi: NodesApi;
private _trashcanApi: TrashcanApi;
get trashcanApi(): TrashcanApi {
this._trashcanApi = this._trashcanApi ?? new TrashcanApi(this.api.getInstance());
return this._trashcanApi;
}
@LazyApi((self: ContentApiService) => new TrashcanApi(self.api.getInstance()))
trashcanApi: TrashcanApi;
private _sharedLinksApi: SharedlinksApi;
get sharedLinksApi(): SharedlinksApi {
this._sharedLinksApi = this._sharedLinksApi ?? new SharedlinksApi(this.api.getInstance());
return this._sharedLinksApi;
}
@LazyApi((self: ContentApiService) => new SharedlinksApi(self.api.getInstance()))
sharedLinksApi: SharedlinksApi;
private _discoveryApi: DiscoveryApi;
get discoveryApi(): DiscoveryApi {
this._discoveryApi = this._discoveryApi ?? new DiscoveryApi(this.api.getInstance());
return this._discoveryApi;
}
@LazyApi((self: ContentApiService) => new DiscoveryApi(self.api.getInstance()))
discoveryApi: DiscoveryApi;
private _favoritesApi: FavoritesApi;
get favoritesApi(): FavoritesApi {
this._favoritesApi = this._favoritesApi ?? new FavoritesApi(this.api.getInstance());
return this._favoritesApi;
}
@LazyApi((self: ContentApiService) => new FavoritesApi(self.api.getInstance()))
favoritesApi: FavoritesApi;
private _contentApi: ContentApi;
get contentApi(): ContentApi {
this._contentApi = this._contentApi ?? new ContentApi(this.api.getInstance());
return this._contentApi;
}
@LazyApi((self: ContentApiService) => new ContentApi(self.api.getInstance()))
contentApi: ContentApi;
private _sitesApi: SitesApi;
get sitesApi(): SitesApi {
this._sitesApi = this._sitesApi ?? new SitesApi(this.api.getInstance());
return this._sitesApi;
}
@LazyApi((self: ContentApiService) => new SitesApi(self.api.getInstance()))
sitesApi: SitesApi;
private _searchApi: SearchApi;
get searchApi(): SearchApi {
this._searchApi = this._searchApi ?? new SearchApi(this.api.getInstance());
return this._searchApi;
}
@LazyApi((self: ContentApiService) => new SearchApi(self.api.getInstance()))
searchApi: SearchApi;
private _peopleApi: PeopleApi;
get peopleApi(): PeopleApi {
this._peopleApi = this._peopleApi ?? new PeopleApi(this.api.getInstance());
return this._peopleApi;
}
@LazyApi((self: ContentApiService) => new PeopleApi(self.api.getInstance()))
peopleApi: PeopleApi;
@LazyApi((self: ContentApiService) => new VersionsApi(self.api.getInstance()))
versionsApi: VersionsApi;
private _versionsApi: VersionsApi;
get versionsApi(): VersionsApi {
this._versionsApi = this._versionsApi ?? new VersionsApi(this.api.getInstance());
return this._versionsApi;
}
constructor(
private readonly api: AlfrescoApiService,
private readonly preferences: UserPreferencesService
@@ -26,16 +26,15 @@ import { inject, Injectable } from '@angular/core';
import { ProfileState } from '@alfresco/adf-extensions';
import { AlfrescoApiService, GroupService } from '@alfresco/adf-content-services';
import { BehaviorSubject } from 'rxjs';
import { PeopleApi } from '@alfresco/js-api';
import { PeopleApi, LazyApi } from '@alfresco/js-api';
@Injectable({ providedIn: 'root' })
export class UserProfileService {
private api = inject(AlfrescoApiService);
private groupService = inject(GroupService);
private get peopleApi(): PeopleApi {
return new PeopleApi(this.api.getInstance());
}
@LazyApi((self: UserProfileService) => new PeopleApi(self.api.getInstance()))
private peopleApi: PeopleApi;
private userProfile = new BehaviorSubject<ProfileState>(null);
userProfile$ = this.userProfile.asObservable();