fix compilation errors with latest TS/TSLint (#1651)

latest TS/TSLint libs detect couple of problems related to private apis
used earlier; changing to public in order to fix compilation
This commit is contained in:
Denys Vuika 2017-02-23 15:46:58 +00:00 committed by Mario Romano
parent c35f948546
commit 3375a63680
4 changed files with 6 additions and 5 deletions

View File

@ -362,7 +362,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
}); });
} }
private generateDownloadElement(downloadUrl: string, paramQuery: ReportQuery) { generateDownloadElement(downloadUrl: string, paramQuery: ReportQuery) {
let downloadElement = window.document.createElement('a'); let downloadElement = window.document.createElement('a');
downloadElement.setAttribute('id', 'export-download'); downloadElement.setAttribute('id', 'export-download');
downloadElement.setAttribute('href', downloadUrl); downloadElement.setAttribute('href', downloadUrl);

View File

@ -37,13 +37,13 @@ export class AlfrescoSearchService {
* @param options Additional options passed to the search * @param options Additional options passed to the search
* @returns {Observable<NodePaging>} Search results * @returns {Observable<NodePaging>} Search results
*/ */
public getNodeQueryResults(term: string, options?: SearchOptions): Observable<NodePaging> { getNodeQueryResults(term: string, options?: SearchOptions): Observable<NodePaging> {
return Observable.fromPromise(this.getQueryNodesPromise(term, options)) return Observable.fromPromise(this.getQueryNodesPromise(term, options))
.map(res => <NodePaging> res) .map(res => <NodePaging> res)
.catch(err => this.handleError(err)); .catch(err => this.handleError(err));
} }
private getQueryNodesPromise(term: string, opts: SearchOptions): Promise<NodePaging> { getQueryNodesPromise(term: string, opts: SearchOptions): Promise<NodePaging> {
return this.apiService.getInstance().core.queriesApi.findNodes(term, opts); return this.apiService.getInstance().core.queriesApi.findNodes(term, opts);
} }

View File

@ -156,7 +156,7 @@ export class UploadButtonComponent {
* @param path * @param path
* @param files * @param files
*/ */
private uploadFiles(path: string, files: any[]) { uploadFiles(path: string, files: any[]) {
if (files.length) { if (files.length) {
let latestFilesAdded = this.uploadService.addToQueue(files); let latestFilesAdded = this.uploadService.addToQueue(files);
this.uploadService.uploadFilesInTheQueue(this.rootFolderId, path, this.onSuccess); this.uploadService.uploadFilesInTheQueue(this.rootFolderId, path, this.onSuccess);

View File

@ -20,6 +20,7 @@ import { Response } from '@angular/http';
import { Observer, Observable } from 'rxjs/Rx'; import { Observer, Observable } from 'rxjs/Rx';
import { AlfrescoApiService, LogService } from 'ng2-alfresco-core'; import { AlfrescoApiService, LogService } from 'ng2-alfresco-core';
import { FileModel } from '../models/file.model'; import { FileModel } from '../models/file.model';
import { MinimalNodeEntity } from 'alfresco-js-api';
/** /**
* *
@ -170,7 +171,7 @@ export class UploadService {
.catch(err => this.handleError(err)); .catch(err => this.handleError(err));
} }
private callApiCreateFolder(relativePath: string, name: string) { callApiCreateFolder(relativePath: string, name: string): Promise<MinimalNodeEntity> {
return this.apiService.getInstance().nodes.createFolder(name, relativePath); return this.apiService.getInstance().nodes.createFolder(name, relativePath);
} }