diff --git a/demo-shell/src/app/components/settings/settings.component.html b/demo-shell/src/app/components/settings/settings.component.html
index 1e45f7c65c..ab701c3f09 100644
--- a/demo-shell/src/app/components/settings/settings.component.html
+++ b/demo-shell/src/app/components/settings/settings.component.html
@@ -1 +1 @@
-
+
diff --git a/demo-shell/src/app/components/settings/settings.component.ts b/demo-shell/src/app/components/settings/settings.component.ts
index 6d4642a9e9..3ba506d76c 100644
--- a/demo-shell/src/app/components/settings/settings.component.ts
+++ b/demo-shell/src/app/components/settings/settings.component.ts
@@ -16,7 +16,6 @@
*/
import { Component } from '@angular/core';
-import { LogService } from '@alfresco/adf-core';
import { Router } from '@angular/router';
@Component({
@@ -24,14 +23,7 @@ import { Router } from '@angular/router';
templateUrl: './settings.component.html'
})
export class SettingsComponent {
-
- constructor(private router: Router,
- public logService: LogService) {
- }
-
- onError(error: string) {
- this.logService.log(error);
- }
+ constructor(private router: Router) {}
onCancel() {
this.router.navigate(['/login']);
diff --git a/demo-shell/src/app/services/in-memory-form.service.ts b/demo-shell/src/app/services/in-memory-form.service.ts
index 823f34f0aa..57c3dd2113 100644
--- a/demo-shell/src/app/services/in-memory-form.service.ts
+++ b/demo-shell/src/app/services/in-memory-form.service.ts
@@ -16,9 +16,7 @@
*/
import { Injectable } from '@angular/core';
-import { AppConfigService, LogService,
- FormFieldOption, FormService, FormValues, FormModel,
- FormOutcomeModel, FormOutcomeEvent } from '@alfresco/adf-core';
+import { AppConfigService, FormFieldOption, FormService, FormValues, FormModel, FormOutcomeModel, FormOutcomeEvent } from '@alfresco/adf-core';
import { Observable, Subject } from 'rxjs';
interface ProcessServiceData {
@@ -37,13 +35,11 @@ interface ProcessServiceData {
//
@Injectable()
export class InMemoryFormService extends FormService {
-
private data: ProcessServiceData;
executeOutcome = new Subject();
- constructor(appConfig: AppConfigService,
- protected logService: LogService) {
+ constructor(appConfig: AppConfigService) {
super();
this.data = appConfig.get('activiti');
}
@@ -53,14 +49,10 @@ export class InMemoryFormService extends FormService {
// Uncomment this to use original call
// return super.getRestFieldValues(taskId, fieldId);
- this.logService.log(`getRestFieldValues: ${taskId} => ${field}`);
return new Observable((observer) => {
- const currentField = this.data.rest.fields.find(
- (f) => f.taskId === taskId && f.fieldId === field
- );
- if ( currentField ) {
+ const currentField = this.data.rest.fields.find((f) => f.taskId === taskId && f.fieldId === field);
+ if (currentField) {
const values: FormFieldOption[] = currentField.values || [];
- this.logService.log(values);
observer.next(values);
}
});
@@ -75,7 +67,7 @@ export class InMemoryFormService extends FormService {
delete flattenForm.formDefinition;
const formValues: FormValues = {};
- (data || []).forEach(variable => {
+ (data || []).forEach((variable) => {
formValues[variable.name] = variable.value;
});
@@ -99,13 +91,11 @@ export class InMemoryFormService extends FormService {
// Uncomment this to use original call
// return super.getRestFieldValuesByProcessId(processDefinitionId, fieldId);
- this.logService.log(`getRestFieldValuesByProcessId: ${processDefinitionId} => ${fieldId}`);
return new Observable((observer) => {
const field = this.data.rest.fields.find(
(currentField) => currentField.processId === processDefinitionId && currentField.fieldId === fieldId
);
const values: FormFieldOption[] = field.values || [];
- this.logService.log(values);
observer.next(values);
});
}
diff --git a/docs/process-services/components/people.component.md b/docs/process-services/components/people.component.md
index dd61cfc886..d6620946c9 100644
--- a/docs/process-services/components/people.component.md
+++ b/docs/process-services/components/people.component.md
@@ -43,6 +43,10 @@ Displays users involved with a specified task
| readOnly | `boolean` | false | Should the data be read-only? |
| taskId | `string` | "" | The numeric ID of the task. |
+### Events
+
+- `error`: Emitted when an error occurs.
+
## Details
### How to customize the people component behavior
diff --git a/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts b/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts
index 289d5ceeda..fd54837029 100644
--- a/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts
+++ b/lib/content-services/src/lib/aspect-list/services/aspect-list.service.ts
@@ -16,7 +16,7 @@
*/
import { Injectable } from '@angular/core';
-import { AlfrescoApiService, AppConfigService, LogService } from '@alfresco/adf-core';
+import { AlfrescoApiService, AppConfigService } from '@alfresco/adf-core';
import { from, Observable, of, zip } from 'rxjs';
import { catchError, map } from 'rxjs/operators';
import { AspectEntry, AspectPaging, AspectsApi } from '@alfresco/js-api';
@@ -25,17 +25,13 @@ import { AspectEntry, AspectPaging, AspectsApi } from '@alfresco/js-api';
providedIn: 'root'
})
export class AspectListService {
-
private _aspectsApi: AspectsApi;
get aspectsApi(): AspectsApi {
this._aspectsApi = this._aspectsApi ?? new AspectsApi(this.alfrescoApiService.getInstance());
return this._aspectsApi;
}
- constructor(private alfrescoApiService: AlfrescoApiService,
- private appConfigService: AppConfigService,
- private logService: LogService) {
- }
+ constructor(private alfrescoApiService: AlfrescoApiService, private appConfigService: AppConfigService) {}
getAspects(): Observable {
const visibleAspectList = this.getVisibleAspects();
@@ -52,14 +48,11 @@ export class AspectListService {
where,
include: ['properties']
};
- return from(this.aspectsApi.listAspects(opts))
- .pipe(
- map((result: AspectPaging) => this.filterAspectByConfig(whiteList, result?.list?.entries)),
- catchError((error) => {
- this.logService.error(error);
- return of([]);
- })
- );
+
+ return from(this.aspectsApi.listAspects(opts)).pipe(
+ map((result: AspectPaging) => this.filterAspectByConfig(whiteList, result?.list?.entries)),
+ catchError(() => of([]))
+ );
}
getCustomAspects(whiteList?: string[]): Observable {
@@ -68,14 +61,10 @@ export class AspectListService {
where,
include: ['properties']
};
- return from(this.aspectsApi.listAspects(opts))
- .pipe(
- map((result: AspectPaging) => this.filterAspectByConfig(whiteList, result?.list?.entries)),
- catchError((error) => {
- this.logService.error(error);
- return of([]);
- })
- );
+ return from(this.aspectsApi.listAspects(opts)).pipe(
+ map((result: AspectPaging) => this.filterAspectByConfig(whiteList, result?.list?.entries)),
+ catchError(() => of([]))
+ );
}
private filterAspectByConfig(visibleAspectList: string[], aspectEntries: AspectEntry[]): AspectEntry[] {
@@ -96,5 +85,4 @@ export class AspectListService {
}
return visibleAspectList;
}
-
}
diff --git a/lib/content-services/src/lib/common/services/rendition.service.ts b/lib/content-services/src/lib/common/services/rendition.service.ts
index 07557b04fc..b0edfaf3ae 100644
--- a/lib/content-services/src/lib/common/services/rendition.service.ts
+++ b/lib/content-services/src/lib/common/services/rendition.service.ts
@@ -17,13 +17,12 @@
import { Injectable } from '@angular/core';
import { ContentApi, RenditionEntry, RenditionPaging, RenditionsApi, VersionsApi } from '@alfresco/js-api';
-import { AlfrescoApiService , LogService, Track,TranslationService, ViewUtilService } from '@alfresco/adf-core';
+import { AlfrescoApiService, Track, TranslationService, ViewUtilService } from '@alfresco/adf-core';
@Injectable({
providedIn: 'root'
})
export class RenditionService {
-
static TARGET = '_new';
/**
@@ -53,7 +52,6 @@ export class RenditionService {
*/
private TRY_TIMEOUT: number = 10000;
-
_renditionsApi: RenditionsApi;
get renditionsApi(): RenditionsApi {
this._renditionsApi = this._renditionsApi ?? new RenditionsApi(this.apiService.getInstance());
@@ -74,17 +72,12 @@ export class RenditionService {
return this._versionsApi;
}
- constructor(private apiService: AlfrescoApiService,
- private logService: LogService,
- private translateService: TranslationService,
- private viewUtilsService: ViewUtilService) {
- }
-
+ constructor(private apiService: AlfrescoApiService, private translateService: TranslationService, private viewUtilsService: ViewUtilService) {}
getRenditionUrl(nodeId: string, type: string, renditionExists: boolean): string {
- return (renditionExists && type !== RenditionService.ContentGroup.IMAGE) ?
- this.contentApi.getRenditionUrl(nodeId, RenditionService.ContentGroup.PDF) :
- this.contentApi.getContentUrl(nodeId, false);
+ return renditionExists && type !== RenditionService.ContentGroup.IMAGE
+ ? this.contentApi.getRenditionUrl(nodeId, RenditionService.ContentGroup.PDF)
+ : this.contentApi.getContentUrl(nodeId, false);
}
private async waitRendition(nodeId: string, renditionId: string, retries: number): Promise {
@@ -110,18 +103,18 @@ export class RenditionService {
async getRendition(nodeId: string, renditionId: string): Promise {
const renditionPaging: RenditionPaging = await this.renditionsApi.listRenditions(nodeId);
- let rendition: RenditionEntry = renditionPaging.list.entries.find((renditionEntry: RenditionEntry) => renditionEntry.entry.id.toLowerCase() === renditionId);
+ let rendition: RenditionEntry = renditionPaging.list.entries.find(
+ (renditionEntry: RenditionEntry) => renditionEntry.entry.id.toLowerCase() === renditionId
+ );
if (rendition) {
const status = rendition.entry.status.toString();
if (status === 'NOT_CREATED') {
try {
- await this.renditionsApi.createRendition(nodeId, {id: renditionId});
+ await this.renditionsApi.createRendition(nodeId, { id: renditionId });
rendition = await this.waitRendition(nodeId, renditionId, 0);
- } catch (err) {
- this.logService.error(err);
- }
+ } catch {}
}
}
return new Promise((resolve) => resolve(rendition));
@@ -129,10 +122,8 @@ export class RenditionService {
async getNodeRendition(nodeId: string, versionId?: string): Promise<{ url: string; mimeType: string }> {
try {
- return versionId ? await this.resolveNodeRendition(nodeId, 'pdf', versionId) :
- await this.resolveNodeRendition(nodeId, 'pdf');
- } catch (err) {
- this.logService.error(err);
+ return versionId ? await this.resolveNodeRendition(nodeId, 'pdf', versionId) : await this.resolveNodeRendition(nodeId, 'pdf');
+ } catch {
return null;
}
}
@@ -140,8 +131,9 @@ export class RenditionService {
private async resolveNodeRendition(nodeId: string, renditionId: string, versionId?: string): Promise<{ url: string; mimeType: string }> {
renditionId = renditionId.toLowerCase();
- const supportedRendition: RenditionPaging = versionId ? await this.versionsApi.listVersionRenditions(nodeId, versionId) :
- await this.renditionsApi.listRenditions(nodeId);
+ const supportedRendition: RenditionPaging = versionId
+ ? await this.versionsApi.listVersionRenditions(nodeId, versionId)
+ : await this.renditionsApi.listRenditions(nodeId);
let rendition = this.findRenditionById(supportedRendition, renditionId);
if (!rendition) {
@@ -154,9 +146,9 @@ export class RenditionService {
const mimeType: string = rendition.entry.content.mimeType;
if (status === 'NOT_CREATED') {
- return {url: await this.requestCreateRendition(nodeId, renditionId, versionId), mimeType};
+ return { url: await this.requestCreateRendition(nodeId, renditionId, versionId), mimeType };
} else {
- return {url: await this.handleNodeRendition(nodeId, renditionId, versionId), mimeType};
+ return { url: await this.handleNodeRendition(nodeId, renditionId, versionId), mimeType };
}
}
@@ -166,25 +158,22 @@ export class RenditionService {
private async requestCreateRendition(nodeId: string, renditionId: string, versionId: string): Promise {
try {
if (versionId) {
- await this.versionsApi.createVersionRendition(nodeId, versionId, {id: renditionId});
+ await this.versionsApi.createVersionRendition(nodeId, versionId, { id: renditionId });
} else {
- await this.renditionsApi.createRendition(nodeId, {id: renditionId});
+ await this.renditionsApi.createRendition(nodeId, { id: renditionId });
}
try {
return versionId ? await this.waitNodeRendition(nodeId, renditionId, versionId) : await this.waitNodeRendition(nodeId, renditionId);
} catch (e) {
return null;
}
-
- } catch (err) {
- this.logService.error(err);
+ } catch {
return null;
}
}
private findRenditionById(supportedRendition: RenditionPaging, renditionId: string) {
- const rendition: RenditionEntry = supportedRendition.list.entries.find((renditionEntry: RenditionEntry) => renditionEntry.entry.id.toLowerCase() === renditionId);
- return rendition;
+ return supportedRendition.list.entries.find((renditionEntry: RenditionEntry) => renditionEntry.entry.id.toLowerCase() === renditionId);
}
private async waitNodeRendition(nodeId: string, renditionId: string, versionId?: string): Promise {
@@ -194,23 +183,29 @@ export class RenditionService {
currentRetry++;
if (this.maxRetries >= currentRetry) {
if (versionId) {
- this.versionsApi.getVersionRendition(nodeId, versionId, renditionId).then((rendition: RenditionEntry) => {
- const status: string = rendition.entry.status.toString();
+ this.versionsApi.getVersionRendition(nodeId, versionId, renditionId).then(
+ (rendition: RenditionEntry) => {
+ const status: string = rendition.entry.status.toString();
- if (status === 'CREATED') {
- clearInterval(intervalId);
- return resolve(this.handleNodeRendition(nodeId, rendition.entry.content.mimeType, versionId));
- }
- }, () => reject(new Error('Error geting version rendition')));
+ if (status === 'CREATED') {
+ clearInterval(intervalId);
+ return resolve(this.handleNodeRendition(nodeId, rendition.entry.content.mimeType, versionId));
+ }
+ },
+ () => reject(new Error('Error geting version rendition'))
+ );
} else {
- this.renditionsApi.getRendition(nodeId, renditionId).then((rendition: RenditionEntry) => {
- const status: string = rendition.entry.status.toString();
+ this.renditionsApi.getRendition(nodeId, renditionId).then(
+ (rendition: RenditionEntry) => {
+ const status: string = rendition.entry.status.toString();
- if (status === 'CREATED') {
- clearInterval(intervalId);
- return resolve(this.handleNodeRendition(nodeId, renditionId, versionId));
- }
- }, () => reject(new Error('Error getting rendition')));
+ if (status === 'CREATED') {
+ clearInterval(intervalId);
+ return resolve(this.handleNodeRendition(nodeId, renditionId, versionId));
+ }
+ },
+ () => reject(new Error('Error getting rendition'))
+ );
}
} else {
clearInterval(intervalId);
@@ -221,11 +216,9 @@ export class RenditionService {
}
private async handleNodeRendition(nodeId: string, renditionId: string, versionId?: string): Promise {
-
- const url = versionId ? this.contentApi.getVersionRenditionUrl(nodeId, versionId, renditionId) :
- this.contentApi.getRenditionUrl(nodeId, renditionId);
-
- return url;
+ return versionId
+ ? this.contentApi.getVersionRenditionUrl(nodeId, versionId, renditionId)
+ : this.contentApi.getRenditionUrl(nodeId, renditionId);
}
async generateMediaTracksRendition(nodeId: string): Promise