mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-] update library to use new js-api 3.0.0 (#4097)
This commit is contained in:
committed by
Eugenio Romano
parent
2acd1b4e26
commit
3ef7d3b7ea
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { RenditionEntry, RenditionPaging } from 'alfresco-js-api';
|
||||
import { RenditionEntry, RenditionPaging } from '@alfresco/js-api';
|
||||
import { Observable, from, interval, empty } from 'rxjs';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { concatMap, switchMap, takeWhile, map } from 'rxjs/operators';
|
||||
@@ -104,7 +104,7 @@ export class RenditionsService {
|
||||
|
||||
/** @deprecated */
|
||||
createRendition(nodeId: string, encoding: string): Observable<{}> {
|
||||
return from(this.apiService.renditionsApi.createRendition(nodeId, {id: encoding}));
|
||||
return from(this.apiService.renditionsApi.createRendition(nodeId, { id: encoding }));
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
@@ -121,12 +121,12 @@ export class RenditionsService {
|
||||
return interval(intervalSize)
|
||||
.pipe(
|
||||
switchMap(() => this.getRendition(nodeId, encoding)),
|
||||
takeWhile((data) => {
|
||||
takeWhile((renditionEntry: RenditionEntry) => {
|
||||
attempts += 1;
|
||||
if (attempts > retries) {
|
||||
return false;
|
||||
}
|
||||
return (data.entry.status.toString() !== 'CREATED');
|
||||
return (renditionEntry.entry.status.toString() !== 'CREATED');
|
||||
})
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user