[ADF-2149] Update ng-packagr to 2.0.0 (#2935)

* ng-packagr version 2.0.0 core fixes

* fix content services jsdoc

* fix process service jsdoc

* last update new build 2.0.0

* fix comment jsdoc
This commit is contained in:
Eugenio Romano
2018-02-13 10:37:03 +00:00
committed by GitHub
parent 71a1ca1787
commit a863631f0d
53 changed files with 178 additions and 274 deletions

View File

@@ -15,7 +15,14 @@
* limitations under the License.
*/
import { AlfrescoApiService, AuthenticationService, ContentService, LogService, PermissionsEnum, ThumbnailService } from '@alfresco/adf-core';
import {
AlfrescoApiService,
AuthenticationService,
ContentService,
LogService,
PermissionsEnum,
ThumbnailService
} from '@alfresco/adf-core';
import { Injectable } from '@angular/core';
import { Response } from '@angular/http';
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging } from 'alfresco-js-api';
@@ -96,7 +103,6 @@ export class DocumentListService {
* Create a new folder in the path.
* @param name Folder name
* @param parentId Parent folder ID
* @returns {any}
*/
createFolder(name: string, parentId: string): Observable<MinimalNodeEntity> {
return Observable.fromPromise(this.apiService.getInstance().nodes.createFolder(name, '/', parentId))
@@ -107,9 +113,8 @@ export class DocumentListService {
* Gets the folder node with the specified relative name path below the root node.
* @param folder Path to folder.
* @param opts Options.
* @returns {Observable<NodePaging>} Folder entity.
*/
getFolder(folder: string, opts?: any) {
getFolder(folder: string, opts?: any): Observable<NodePaging> {
return Observable.fromPromise(this.getNodesPromise(folder, opts))
.map(res => <NodePaging> res)
.catch(err => this.handleError(err));
@@ -132,9 +137,8 @@ export class DocumentListService {
/**
* Get thumbnail URL for the given document node.
* @param node Node to get URL for.
* @returns {string} URL address.
*/
getDocumentThumbnailUrl(node: MinimalNodeEntity) {
getDocumentThumbnailUrl(node: MinimalNodeEntity): string {
return this.thumbnailService.getDocumentThumbnailUrl(node);
}
@@ -158,7 +162,7 @@ export class DocumentListService {
* @param node Target node
* @param permission Permission level to query
*/
hasPermission(node: any, permission: PermissionsEnum|string): boolean {
hasPermission(node: any, permission: PermissionsEnum | string): boolean {
return this.contentService.hasPermission(node, permission);
}

View File

@@ -0,0 +1,28 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"workingDirectory" : "./ng_work",
"src": "../content-services/",
"dest": "../dist/content-services/",
"lib": {
"licensePath": "../config/assets/license_header_add.txt",
"comments" : "none",
"entryFile": "./public-api.ts",
"flatModuleFile": "adf-content-services",
"umdModuleIds": {
"alfresco-js-api": "alfresco-js-api",
"minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
"@angular/material": "@angular/material",
"@angular/flex-layout": "@angular/flex-layout",
"@alfresco/adf-core": "@alfresco/adf-core",
"@angular/material-moment-adapter": "@angular/material-moment-adapter",
"@angular/animations": "@angular/animations",
"@angular/cdk/platform": "@angular/cdk/platform",
"@angular/material/core": "@angular/material/core",
"moment": "moment",
"moment-es6": "moment-es6",
"moment/src/moment": "moment/src/moment",
"@ngx-translate/core": "@ngx-translate/core"
}
}
}

View File

@@ -20,9 +20,6 @@ import { EventEmitter, Injectable, Output } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/throw';
/**
* @returns {TagService}
*/
@Injectable()
export class TagService {

View File

@@ -22,8 +22,6 @@ import { TagService } from './services/tag.service';
/**
*
* This component, provide a list of the tags relative a node with actions button to add or remove new tag
*
* @returns {TagComponent} .
*/
@Component({

View File

@@ -21,8 +21,6 @@ import { TagService } from './services/tag.service';
/**
*
* This component provide a list of all the tag inside the ECM
*
* @returns {TagList} .
*/
@Component({

View File

@@ -21,8 +21,6 @@ import { TagService } from './services/tag.service';
/**
*
* This component, ShowNodeTag a list of the tag on relative a node
*
* @returns {TagNodeList} .
*/
@Component({

View File

@@ -44,7 +44,7 @@ export class FileUploadingListComponent {
/**
* Cancel file upload
*
* @param {FileModel} file File model to cancel upload for.
* @param file File model to cancel upload for.
*
* @memberOf FileUploadingListComponent
*/
@@ -88,8 +88,7 @@ export class FileUploadingListComponent {
}
/**
* Checks if all the files are uploaded
* @returns {boolean} - false if there is at least one file in Progress | Starting | Pending
* Checks if all the files are uploaded false if there is at least one file in Progress | Starting | Pending
*/
isUploadCompleted(): boolean {
return !this.isUploadCancelled() &&
@@ -103,8 +102,7 @@ export class FileUploadingListComponent {
}
/**
* Check if all the files are Cancelled | Aborted | Error.
* @returns {boolean} - false if there is at least one file in uploading states
* Check if all the files are Cancelled | Aborted | Error. false if there is at least one file in uploading states
*/
isUploadCancelled(): boolean {
return !!this.files.length &&

View File

@@ -64,7 +64,7 @@ export class UploadDragAreaComponent implements NodePermissionSubject {
/**
* Method called when files are dropped in the drag area.
*
* @param {File[]} files - files dropped in the drag area.
* @param files - files dropped in the drag area.
*/
onFilesDropped(files: File[]): void {
if (!this.disabled && files.length) {
@@ -121,7 +121,7 @@ export class UploadDragAreaComponent implements NodePermissionSubject {
/**
* Show undo notification bar.
*
* @param {FileModel[]} latestFilesAdded - files in the upload queue enriched with status flag and xhr object.
* @param latestFilesAdded - files in the upload queue enriched with status flag and xhr object.
*/
showUndoNotificationBar(latestFilesAdded: FileModel[]) {
let messageTranslate: any, actionTranslate: any;
@@ -137,7 +137,6 @@ export class UploadDragAreaComponent implements NodePermissionSubject {
* Show the error inside Notification bar
*
* @param Error message
* @private
*/
showErrorNotificationBar(errorMessage: string) {
this.notificationService.openSnackMessage(errorMessage, 3000);

View File

@@ -100,7 +100,7 @@ export class FileDraggableDirective implements OnInit, OnDestroy {
/**
* Change the style of the drag area when a file drag in.
*
* @param {event} event - DOM event.
* @param event - DOM event.
*/
onDragEnter(event: Event): void {
if (this.enabled && !event.defaultPrevented) {
@@ -112,7 +112,7 @@ export class FileDraggableDirective implements OnInit, OnDestroy {
/**
* Change the style of the drag area when a file drag out.
*
* @param {event} event - DOM event.
* @param event - DOM event.
*/
onDragLeave(event: Event): void {
if (this.enabled && !event.defaultPrevented) {
@@ -136,7 +136,7 @@ export class FileDraggableDirective implements OnInit, OnDestroy {
/**
* Prevent default and stop propagation of the DOM event.
*
* @param {event} $event - DOM event.
* @param $event - DOM event.
*/
preventDefault(event: Event): void {
event.stopPropagation();

View File

@@ -38,7 +38,6 @@ import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core
*
* @Output - success - The event is emitted when the data are recived
*
* @returns {WebscriptComponent} .
*/
@Component({
selector: 'adf-webscript-get',