[ACS-5845] remove Alfresco Compatibility usage (#8822)

* upgrade to latest js-api

* upgrade to latest js-api

* upgrade to latest js-api

* upgrade to latest js-api

* upgrade to latest js-api

* upgrade to latest js-api

* fix security concerns for execSync

* security fix

* fixes as per code reviews

* code fixes for attach file widget dialog

* code fixes

* code fixes

* disable ACS storage check

* add the jira to the commented out block

* remove useless logger call

* code fixes

* code fixes

* code fixes

* code and typing fixes

* fix lint

* disable the code

* try other fixes, add missing headers

* dump error to console

* replace test file with in-memory stream

* code fixes

* simplify checks

* disable upload

* remove useless test and ng-mocks dependency
This commit is contained in:
Denys Vuika
2023-08-22 00:02:39 +01:00
committed by GitHub
parent d0c35c28ee
commit 29ec2fcc96
23 changed files with 682 additions and 676 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { UrlService, LogService, ContentLinkModel, FormService, DownloadService } from '@alfresco/adf-core';
import { UrlService, ContentLinkModel, FormService, DownloadService } from '@alfresco/adf-core';
import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, ViewEncapsulation } from '@angular/core';
import { Observable } from 'rxjs';
import { ProcessContentService } from '../../services/process-content.service';
@@ -27,7 +27,6 @@ import { ProcessContentService } from '../../services/process-content.service';
encapsulation: ViewEncapsulation.None
})
export class ContentWidgetComponent implements OnChanges {
/** The content id to show. */
@Input()
id: string;
@@ -54,12 +53,12 @@ export class ContentWidgetComponent implements OnChanges {
content: ContentLinkModel;
constructor(protected formService: FormService,
private logService: LogService,
private downloadService: DownloadService,
private urlService: UrlService,
private processContentService: ProcessContentService) {
}
constructor(
protected formService: FormService,
private downloadService: DownloadService,
private urlService: UrlService,
private processContentService: ProcessContentService
) {}
ngOnChanges(changes: SimpleChanges) {
const contentId = changes['id'];
@@ -69,18 +68,16 @@ export class ContentWidgetComponent implements OnChanges {
}
loadContent(id: number) {
this.processContentService
.getFileContent(id)
.subscribe(
(response: ContentLinkModel) => {
this.content = new ContentLinkModel(response);
this.contentLoaded.emit(this.content);
this.loadThumbnailUrl(this.content);
},
(error) => {
this.error.emit(error);
}
);
this.processContentService.getFileContent(id).subscribe(
(response: ContentLinkModel) => {
this.content = new ContentLinkModel(response);
this.contentLoaded.emit(this.content);
this.loadThumbnailUrl(this.content);
},
(error) => {
this.error.emit(error);
}
);
}
loadThumbnailUrl(content: ContentLinkModel) {
@@ -101,7 +98,6 @@ export class ContentWidgetComponent implements OnChanges {
},
(error) => {
this.error.emit(error);
}
);
}
@@ -117,7 +113,6 @@ export class ContentWidgetComponent implements OnChanges {
(blob: Blob) => {
content.contentBlob = blob;
this.contentClick.emit(content);
this.logService.info('Content clicked' + content.id);
this.formService.formContentClicked.next(content);
},
(error) => {