mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Improve compatibility (#7214)
* refactor content * refactor core * refactor rest * fix lint * fix * lint * lint * fix * fix * fix
This commit is contained in:
@@ -67,7 +67,11 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent i
|
||||
rootNodeId = AttachFileCloudWidgetComponent.ALIAS_USER_FOLDER;
|
||||
selectedNode: Node;
|
||||
|
||||
private nodesApi: NodesApi;
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
formService: FormService,
|
||||
@@ -81,7 +85,6 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent i
|
||||
private contentNodeSelectorPanelService: ContentNodeSelectorPanelService
|
||||
) {
|
||||
super(formService, thumbnails, processCloudContentService, notificationService, logger);
|
||||
this.nodesApi = new NodesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
@@ -31,14 +31,18 @@ import { Observable, Subject, throwError } from 'rxjs';
|
||||
})
|
||||
export class ContentCloudNodeSelectorService {
|
||||
|
||||
nodesApi: NodesApi;
|
||||
_nodesApi: NodesApi;
|
||||
get nodesApi(): NodesApi {
|
||||
this._nodesApi = this._nodesApi ?? new NodesApi(this.apiService.getInstance());
|
||||
return this._nodesApi;
|
||||
}
|
||||
|
||||
sourceNodeNotFound = false;
|
||||
|
||||
constructor(
|
||||
private apiService: AlfrescoApiService,
|
||||
private notificationService: NotificationService,
|
||||
private dialog: MatDialog) {
|
||||
this.nodesApi = new NodesApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
openUploadFileDialog(currentFolderId?: string, selectionMode?: string, isAllFileSources?: boolean, restrictRootToCurrentFolderId?: boolean): Observable<Node[]> {
|
||||
|
@@ -36,14 +36,17 @@ import { FormContent } from '../../services/form-fields.interfaces';
|
||||
})
|
||||
export class FormCloudService extends BaseCloudService {
|
||||
|
||||
uploadApi: UploadApi;
|
||||
private _uploadApi;
|
||||
get uploadApi(): UploadApi {
|
||||
this._uploadApi = this._uploadApi ?? new UploadApi(this.apiService.getInstance());
|
||||
return this._uploadApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
apiService: AlfrescoApiService,
|
||||
appConfigService: AppConfigService
|
||||
) {
|
||||
super(apiService, appConfigService);
|
||||
this.uploadApi = new UploadApi(apiService.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -31,8 +31,17 @@ import { AuthenticationApi, Node, UploadApi } from '@alfresco/js-api';
|
||||
})
|
||||
export class ProcessCloudContentService {
|
||||
|
||||
uploadApi: UploadApi;
|
||||
authenticationApi: AuthenticationApi;
|
||||
private _uploadApi;
|
||||
get uploadApi(): UploadApi {
|
||||
this._uploadApi = this._uploadApi ?? new UploadApi(this.apiService.getInstance());
|
||||
return this._uploadApi;
|
||||
}
|
||||
|
||||
private _authenticationApi;
|
||||
get authenticationApi(): AuthenticationApi {
|
||||
this._authenticationApi = this._authenticationApi ?? new AuthenticationApi(this.apiService.getInstance());
|
||||
return this._authenticationApi;
|
||||
}
|
||||
|
||||
constructor(
|
||||
private apiService: AlfrescoApiService,
|
||||
@@ -40,8 +49,6 @@ export class ProcessCloudContentService {
|
||||
public contentService: ContentService,
|
||||
private downloadService: DownloadService
|
||||
) {
|
||||
this.uploadApi = new UploadApi(this.apiService.getInstance());
|
||||
this.authenticationApi = new AuthenticationApi(this.apiService.getInstance());
|
||||
}
|
||||
|
||||
createTemporaryRawRelatedContent(
|
||||
|
Reference in New Issue
Block a user