[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

@@ -2,11 +2,13 @@
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"workingDirectory" : "./ng_work",
"src": "../content-services/",
"dest": "../content-services/dist/",
"dest": "../dist/content-services/",
"lib": {
"licensePath": "../config/assets/license_header_add.txt",
"comments" : "none",
"entryFile": "./public-api.ts",
"flatModuleFile": "adf-content-services",
"externals": {
"umdModuleIds": {
"alfresco-js-api": "alfresco-js-api",
"minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations",

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',

View File

@@ -56,7 +56,6 @@ export class NodePermissionDirective implements OnChanges {
/**
* Updates disabled state for the decorated elememtn
*
* @returns {boolean} True if decorated element got disabled, otherwise False
* @memberof NodePermissionDirective
*/
updateElement(): boolean {
@@ -110,9 +109,8 @@ export class NodePermissionDirective implements OnChanges {
/**
* Checks whether all nodes have a particular permission
*
* @param {MinimalNodeEntity[]} nodes Node collection to check
* @param {string} permission Permission to check for each node
* @returns {boolean} True if all nodes have provided permission, otherwise False
* @param nodes Node collection to check
* @param permission Permission to check for each node
* @memberof NodePermissionDirective
*/
hasPermission(nodes: MinimalNodeEntity[], permission: string): boolean {

View File

@@ -253,7 +253,6 @@ export class FormComponent implements OnInit, OnChanges {
/**
* Invoked when user clicks outcome button.
* @param outcome Form outcome model
* @returns {boolean} True if outcome action was executed, otherwise false.
*/
onOutcomeClicked(outcome: FormOutcomeModel): boolean {
if (!this.readOnly && outcome && this.form) {
@@ -448,7 +447,6 @@ export class FormComponent implements OnInit, OnChanges {
/**
* Get custom set of outcomes for a Form Definition.
* @param form Form definition model.
* @returns {FormOutcomeModel[]} Outcomes for a given form definition.
*/
getFormDefinitionOutcomes(form: FormModel): FormOutcomeModel[] {
return [

View File

@@ -38,7 +38,6 @@ import { FormOutcomeModel } from './widgets/core/index';
* {formSaved} EventEmitter - This event is fired when the form is saved, it pass all the value in the form.
* {formCompleted} EventEmitter - This event is fired when the form is completed, it pass all the value in the form.
*
* @returns {FormComponent} .
*/
@Component({
selector: 'adf-start-form',

View File

@@ -173,7 +173,6 @@ export class FormModel {
/**
* Validates entire form and all form fields.
*
* @returns {void}
* @memberof FormModel
*/
validateForm(): void {
@@ -203,8 +202,7 @@ export class FormModel {
/**
* Validates a specific form field, triggers form validation.
*
* @param {FormFieldModel} field Form field to validate.
* @returns {void}
* @param field Form field to validate.
* @memberof FormModel
*/
validateField(field: FormFieldModel): void {

View File

@@ -39,7 +39,6 @@ export class ActivitiContentService {
*
* @param accountId
* @param folderId
* @returns {null}
*/
getAlfrescoNodes(accountId: string, folderId: string): Observable<[ExternalContent]> {
let apiService: AlfrescoApi = this.apiService.getInstance();
@@ -54,7 +53,6 @@ export class ActivitiContentService {
*
* @param accountId
* @param folderId
* @returns {any}
*/
getAlfrescoRepositories(tenantId: number, includeAccount: boolean): Observable<any> {
let apiService: AlfrescoApi = this.apiService.getInstance();
@@ -73,7 +71,6 @@ export class ActivitiContentService {
* @param accountId
* @param node
* @param siteId
* @returns {null}
*/
linkAlfrescoNode(accountId: string, node: ExternalContent, siteId: string): Observable<ExternalContentLink> {
let apiService: AlfrescoApi = this.apiService.getInstance();

View File

@@ -109,7 +109,6 @@ export class FormService {
/**
* Create a Form with a fields for each metadata properties
* @returns {Observable<any>}
*/
createFormFromANode(formName: string): Observable<any> {
return Observable.create(observer => {
@@ -131,7 +130,6 @@ export class FormService {
/**
* Create a Form
* @returns {Observable<any>}
*/
createForm(formName: string): Observable<any> {
let dataModel = {
@@ -155,7 +153,6 @@ export class FormService {
/**
* @deprecated in 1.7.0, use saveForm API instead
* Add Fileds to A form
* @returns {Observable<any>}
*/
addFieldsToAForm(formId: string, formModel: FormDefinitionModel): Observable<any> {
this.logService.log('addFieldsToAForm is deprecated in 1.7.0, use saveForm API instead');
@@ -166,7 +163,6 @@ export class FormService {
/**
* Search For A Form by name
* @returns {Observable<any>}
*/
searchFrom(name: string): Observable<any> {
let opts = {
@@ -184,7 +180,6 @@ export class FormService {
/**
* Get All the forms
* @returns {Observable<any>}
*/
getForms(): Observable<any> {
let opts = {
@@ -198,7 +193,6 @@ export class FormService {
/**
* Get Process Definitions
* @returns {Observable<any>}
*/
getProcessDefinitions(): Observable<any> {
return Observable.fromPromise(this.processApi.getProcessDefinitions({}))
@@ -214,7 +208,6 @@ export class FormService {
/**
* Get All the Tasks
* @returns {Observable<any>}
*/
getTasks(): Observable<any> {
return Observable.fromPromise(this.taskApi.listTasks({}))
@@ -225,7 +218,6 @@ export class FormService {
/**
* Get Task
* @param taskId Task Id
* @returns {Observable<any>}
*/
getTask(taskId: string): Observable<any> {
return Observable.fromPromise(this.taskApi.getTask(taskId))
@@ -237,7 +229,6 @@ export class FormService {
* Save Task Form
* @param taskId Task Id
* @param formValues Form Values
* @returns {Observable<any>}
*/
saveTaskForm(taskId: string, formValues: FormValues): Observable<any> {
let body = JSON.stringify({values: formValues});
@@ -251,7 +242,6 @@ export class FormService {
* @param taskId Task Id
* @param formValues Form Values
* @param outcome Form Outcome
* @returns {Observable<any>}
*/
completeTaskForm(taskId: string, formValues: FormValues, outcome?: string): Observable<any> {
let data: any = {values: formValues};
@@ -267,7 +257,6 @@ export class FormService {
/**
* Get Form related to a taskId
* @param taskId Task Id
* @returns {Observable<any>}
*/
getTaskForm(taskId: string): Observable<any> {
return Observable.fromPromise(this.taskApi.getTaskForm(taskId))
@@ -278,7 +267,6 @@ export class FormService {
/**
* Get Form Definition
* @param formId Form Id
* @returns {Observable<any>}
*/
getFormDefinitionById(formId: string): Observable<any> {
return Observable.fromPromise(this.editorApi.getForm(formId))
@@ -289,7 +277,6 @@ export class FormService {
/**
* Returns form definition by a given name.
* @param name
* @returns {Promise<T>|Promise<ErrorObservable>}
*/
getFormDefinitionByName(name: string): Observable<any> {
let opts = {
@@ -306,7 +293,6 @@ export class FormService {
/**
* Get start form instance for a given processId
* @param processId Process definition ID
* @returns {Observable<any>}
*/
getStartFormInstance(processId: string): Observable<any> {
return Observable.fromPromise(
@@ -324,7 +310,6 @@ export class FormService {
/**
* Get start form definition for a given process
* @param processId Process definition ID
* @returns {Observable<any>}
*/
getStartFormDefinition(processId: string): Observable<any> {
return Observable.fromPromise(

View File

@@ -29,7 +29,6 @@ export class NodeService {
/**
* Get All the metadata and the nodeType for a nodeId cleaned by the prefix
* @param nodeId Node Id
* @returns NodeMetadata
*/
public getNodeMetadata(nodeId: string): Observable<NodeMetadata> {
return Observable.fromPromise(this.apiService.getInstance().nodes.getNodeInfo(nodeId)).map(this.cleanMetadataFromSemicolon);
@@ -41,7 +40,6 @@ export class NodeService {
* @param nodeType node type
* @param nameSpace namespace node
* @param data data to store
* @returns NodeMetadata
*/
public createNodeMetadata(nodeType: string, nameSpace: any, data: any, path: string, name?: string): Observable<any> {
let properties = {};
@@ -60,7 +58,6 @@ export class NodeService {
* @param nodeType node type
* @param properties namespace node
* @param path path
* @returns NodeMetadata
*/
public createNode(name: string, nodeType: string, properties: any, path: string): Observable<any> {
let body = {

View File

@@ -255,7 +255,6 @@ export class LoginComponent implements OnInit {
/**
* Check the require parameter
* @returns {boolean}
*/
private checkRequiredParams(): boolean {
@@ -309,7 +308,6 @@ export class LoginComponent implements OnInit {
/**
* The method return if a field is valid or not
* @param field
* @returns {boolean}
*/
isErrorStyle(field: AbstractControl) {
return !field.valid && field.dirty && !field.pristine;

View File

@@ -1,12 +1,14 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"workingDirectory" : "./ng_work",
"src": "../core/",
"dest": "../core/dist/",
"src": "./core/",
"dest": "../dist/core/",
"lib": {
"licensePath": "../config/assets/license_header_add.txt",
"comments" : "none",
"entryFile": "./public-api.ts",
"flatModuleFile": "adf-core",
"externals": {
"umdModuleIds": {
"alfresco-js-api": "alfresco-js-api",
"minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations",

View File

@@ -48,7 +48,6 @@ export class AuthenticationService {
/**
* The method return true if the user is logged in
* @returns {boolean}
*/
isLoggedIn(): boolean {
return !!this.alfrescoApi.getInstance().isLoggedIn();
@@ -58,7 +57,6 @@ export class AuthenticationService {
* Method to delegate to POST login
* @param username
* @param password
* @returns {Observable<R>|Observable<T>}
*/
login(username: string, password: string, rememberMe: boolean = false): Observable<{ type: string, ticket: any }> {
this.removeTicket();
@@ -94,7 +92,6 @@ export class AuthenticationService {
/**
* The method retrieve whether the "remember me" cookie was set or not
*
* @returns {boolean}
*/
isRememberMeSet(): boolean {
return (this.cookie.getItem(REMEMBER_ME_COOKIE_KEY) === null) ? false : true;
@@ -104,7 +101,6 @@ export class AuthenticationService {
* Initialize the alfresco Api with user and password end call the login method
* @param username
* @param password
* @returns {*|Observable<any>}
*/
private callApiLogin(username: string, password: string) {
return this.alfrescoApi.getInstance().login(username, password);
@@ -113,7 +109,6 @@ export class AuthenticationService {
/**
* The method remove the ticket from the Storage
*
* @returns {Observable<R>|Observable<T>}
*/
logout() {
return Observable.fromPromise(this.callApiLogout())
@@ -127,7 +122,6 @@ export class AuthenticationService {
/**
*
* @returns {*|Observable<string>|Observable<any>|Promise<T>}
*/
private callApiLogout(): Promise<any> {
if (this.alfrescoApi.getInstance()) {
@@ -146,7 +140,6 @@ export class AuthenticationService {
/**
* The method return the ECM ticket stored in the Storage
* @returns ticket
*/
getTicketEcm(): string | null {
return this.storage.getItem('ticket-ECM');
@@ -154,7 +147,6 @@ export class AuthenticationService {
/**
* The method return the BPM ticket stored in the Storage
* @returns ticket
*/
getTicketBpm(): string | null {
return this.storage.getItem('ticket-BPM');
@@ -207,7 +199,6 @@ export class AuthenticationService {
/**
* The method return true if user is logged in on ecm provider
*
* @returns {boolean}
*/
isEcmLoggedIn(): boolean {
if (this.cookie.isEnabled() && !this.isRememberMeSet()) {
@@ -219,7 +210,6 @@ export class AuthenticationService {
/**
* The method return true if user is logged in on bpm provider
*
* @returns {boolean}
*/
isBpmLoggedIn(): boolean {
if (this.cookie.isEnabled() && !this.isRememberMeSet()) {
@@ -231,7 +221,6 @@ export class AuthenticationService {
/**
* Get the ECM username
*
* @returns {string} The username value
*
* @memberof AuthenticationService
*/
@@ -242,7 +231,6 @@ export class AuthenticationService {
/**
* Get the BPM username
*
* @returns {string} The username value
*
* @memberof AuthenticationService
*/
@@ -269,7 +257,6 @@ export class AuthenticationService {
/**
* The method write the error in the console browser
* @param error
* @returns {ErrorObservable}
*/
handleError(error: any): Observable<any> {
this.logService.error('Error when logging in', error);

View File

@@ -80,8 +80,8 @@ export class ContentService {
/**
* Invokes content download for a Blob with a file name.
*
* @param {Blob} blob Content to download.
* @param {string} fileName Name of the resulting file.
* @param blob Content to download.
* @param fileName Name of the resulting file.
*
* @memberOf ContentService
*/
@@ -92,8 +92,8 @@ export class ContentService {
/**
* Invokes content download for a data array with a file name.
*
* @param {*} data Data to download.
* @param {string} fileName Name of the resulting file.
* @param data Data to download.
* @param fileName Name of the resulting file.
*
* @memberOf ContentService
*/
@@ -104,20 +104,19 @@ export class ContentService {
/**
* Invokes content download for a JSON object with a file name.
*
* @param {*} json JSON object to download.
* @param {any} fileName Name of the resulting file.
* @param json JSON object to download.
* @param fileName Name of the resulting file.
*
* @memberOf ContentService
*/
downloadJSON(json: any, fileName): void {
downloadJSON(json: any, fileName: string): void {
this.saveData(json, 'json', fileName);
}
/**
* Creates a trusted object URL from the Blob.
* WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
* @param {Blob} blob Data to wrap into object URL
* @returns {string} Object URL content.
* @param blob Data to wrap into object URL
*
* @memberOf ContentService
*/
@@ -133,10 +132,9 @@ export class ContentService {
/**
* Get thumbnail URL for the given document node.
*
* @param {string|MinimalNodeEntity} node Node to get URL for.
* @param {boolean} [attachment] Retrieve content as an attachment for download
* @param {string} [ticket] Custom ticket to use for authentication
* @returns {string} The URL address pointing to the content.
* @param node Node to get URL for.
* @param [attachment] Retrieve content as an attachment for download
* @param [ticket] Custom ticket to use for authentication
*/
getDocumentThumbnailUrl(node: any, attachment?: boolean, ticket?: string): string {
@@ -150,10 +148,9 @@ export class ContentService {
/**
* Get content URL for the given node.
*
* @param node {string|MinimalNodeEntity} nodeId or node to get URL for.
* @param {boolean} [attachment] Retrieve content as an attachment for download
* @param {string} [ticket] Custom ticket to use for authentication
* @returns {string} The URL address pointing to the content.
* @param nodeId or node to get URL for.
* @param [attachment] Retrieve content as an attachment for download
* @param [ticket] Custom ticket to use for authentication
*/
getContentUrl(node: any, attachment?: boolean, ticket?: string): string {
@@ -168,7 +165,6 @@ export class ContentService {
* Get content for the given node.
* @param nodeId ID of the target node
*
* @returns {Observable<any>} URL address.
*/
getNodeContent(nodeId: string): Observable<any> {
return Observable.fromPromise(this.apiService.getInstance().core.nodesApi.getFileContent(nodeId).then((dataContent) => {
@@ -200,7 +196,6 @@ export class ContentService {
* @param node Node to check allowableOperations
* @param permission Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
*
* @returns {boolean} has permission
*/
hasPermission(node: any, permission: PermissionsEnum | string): boolean {
let hasPermission = false;
@@ -225,7 +220,6 @@ export class ContentService {
* Check if the node has the properties allowableOperations
* @param node Node to check allowableOperations
*
* @returns {boolean} has AllowableOperations
*/
hasAllowableOperations(node: any): boolean {
return node && node.allowableOperations ? true : false;

View File

@@ -36,7 +36,6 @@ export class CookieService {
/**
* Retrieves a cookie by its key.
* @param key Key to identify the cookie
* @returns {string | null}
*/
getItem(key: string): string | null {
const regexp = new RegExp('(?:' + key + '|;\s*' + key + ')=(.*?)(?:;|$)', 'g');
@@ -51,7 +50,6 @@ export class CookieService {
* @param expiration Expiration date of the data
* @param path "Pathname" to store the cookie
*
* @returns {boolean}
*/
setItem(key: string, data: string, expiration: Date | null, path: string | null): void {
document.cookie = `${key}=${data}` +

View File

@@ -73,7 +73,6 @@ export class PeopleProcessService {
/**
* Throw the error
* @param error
* @returns {ErrorObservable}
*/
private handleError(error: Response) {
this.logService.error(error);

View File

@@ -29,8 +29,6 @@ import 'rxjs/add/operator/takeWhile';
* @deprecated
* RenditionsService
* (this service is deprecated in 2.2.0 and will be removed in future revisions)
*
* @returns {RenditionsService} .
*/
@Injectable()
export class RenditionsService {

View File

@@ -158,7 +158,6 @@ export class ThumbnailService {
/**
* Get thumbnail URL for the given document node.
* @param document Node to get URL for.
* @returns {string} URL address.
*/
public getDocumentThumbnailUrl(node: any): string {
let thumbnail = this.contentService.getDocumentThumbnailUrl(node);
@@ -168,7 +167,6 @@ export class ThumbnailService {
/**
* Get mimeType SVG
* @param mimeType
* @returns {string} URL SVG address.
*/
public getMimeTypeIcon(mimeType: string): string {
let icon = this.mimeTypeIcons[mimeType];
@@ -177,7 +175,6 @@ export class ThumbnailService {
/**
* Get default SVG
* @returns {string} URL SVG default.
*/
public getDefaultMimeTypeIcon(): string {
return this.DEFAULT_ICON;

View File

@@ -19,7 +19,12 @@ import { EventEmitter, Injectable } from '@angular/core';
import * as minimatch_ from 'minimatch';
import { Subject } from 'rxjs/Subject';
import { AppConfigService } from '../app-config/app-config.service';
import { FileUploadCompleteEvent, FileUploadDeleteEvent, FileUploadErrorEvent, FileUploadEvent } from '../events/file.event';
import {
FileUploadCompleteEvent,
FileUploadDeleteEvent,
FileUploadErrorEvent,
FileUploadEvent
} from '../events/file.event';
import { FileModel, FileUploadProgress, FileUploadStatus } from '../models/file.model';
import { AlfrescoApiService } from './alfresco-api.service';
@@ -53,9 +58,6 @@ export class UploadService {
/**
* Checks whether the service is uploading a file.
*
* @returns {boolean}
*
* @memberof UploadService
*/
isUploading(): boolean {
@@ -64,8 +66,6 @@ export class UploadService {
/**
* Returns the file Queue
*
* @return {FileModel[]} - files in the upload queue.
*/
getQueue(): FileModel[] {
return this.queue;
@@ -98,7 +98,7 @@ export class UploadService {
/**
* Pick all the files in the queue that are not been uploaded yet and upload it into the directory folder.
*
* @param {EventEmitter<any>} emitter @deprecated emitter to invoke on file status change
* @param emitter @deprecated emitter to invoke on file status change
*
* @memberof UploadService
*/

View File

@@ -27,7 +27,6 @@ import 'rxjs/add/observable/throw';
*
* BPMUserService retrieve all the information of an Ecm user.
*
* @returns {BPMUserService} .
*/
@Injectable()
export class BpmUserService {
@@ -53,7 +52,6 @@ export class BpmUserService {
/**
* Throw the error
* @param error
* @returns {ErrorObservable}
*/
private handleError(error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure

View File

@@ -63,7 +63,6 @@ export class EcmUserService {
/**
* Throw the error
* @param error
* @returns {ErrorObservable}
*/
private handleError(error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure

View File

@@ -21,7 +21,6 @@ export class ObjectUtils {
* ObjectUtils.getValue({ item: { nodeType: 'cm:folder' }}, 'item.nodeType') ==> 'cm:folder'
* @param target
* @param key
* @returns {string}
*/
static getValue(target: any, key: string): any {

View File

@@ -28,7 +28,7 @@ declare let PDFJS: any;
'./pdfViewer.component.scss',
'./pdfViewerHost.component.scss'
],
providers: [ RenderingQueueServices ],
providers: [RenderingQueueServices],
host: { 'class': 'adf-pdf-viewer' },
encapsulation: ViewEncapsulation.None
})
@@ -123,8 +123,6 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* return the PDFJS global object (exist to facilitate the mock of PDFJS in the test)
*
* @returns {PDFJS}
*/
getPDFJS() {
return PDFJS;
@@ -151,7 +149,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
}
ngOnDestroy() {
if(this.documentContainer) {
if (this.documentContainer) {
this.documentContainer.removeEventListener('pagechange', this.onPageChange, true);
}
}
@@ -159,7 +157,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Method to scale the page current support implementation
*
* @param {string} scaleMode - new scale mode
* @param scaleMode - new scale mode
*/
scalePage(scaleMode) {
this.currentScaleMode = scaleMode;
@@ -223,7 +221,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Update all the pages with the newScale scale
*
* @param {number} newScale - new scale page
* @param newScale - new scale page
*/
setScaleUpdatePages(newScale: number) {
if (!this.isSameScale(this.currentScale, newScale)) {
@@ -240,24 +238,21 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Check if the request scale of the page is the same for avoid useless re-rendering
*
* @param {number} oldScale - old scale page
* @param {number} newScale - new scale page
* @param oldScale - old scale page
* @param newScale - new scale page
*
* @returns {boolean}
*/
isSameScale(oldScale: number, newScale: number) {
isSameScale(oldScale: number, newScale: number): boolean {
return (newScale === oldScale);
}
/**
* Check if is a land scape view
*
* @param {number} width
* @param {number} height
*
* @returns {boolean}
* @param width
* @param height
*/
isLandscape(width: number, height: number) {
isLandscape(width: number, height: number): boolean {
return (width > height);
}
@@ -282,7 +277,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* zoom in page pdf
*
* @param {number} ticks
* @param ticks
*/
zoomIn(ticks: number) {
let newScale: any = this.currentScale;
@@ -298,7 +293,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* zoom out page pdf
*
* @param {number} ticks
* @param ticks
*/
zoomOut(ticks: number) {
let newScale: any = this.currentScale;
@@ -338,7 +333,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* load the page in input
*
* @param {string} page - page to load
* @param page to load
*/
inputPage(page: string) {
let pageInput = parseInt(page, 10);
@@ -355,7 +350,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Page Change Event
*
* @param {Event} event
* @param event
*/
onPageChange(event) {
this.page = event.pageNumber;
@@ -364,7 +359,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
/**
* Litener Keyboard Event
* @param {KeyboardEvent} event
* @param KeyboardEvent event
*/
@HostListener('document:keydown', ['$event'])
handleKeyboardEvent(event: KeyboardEvent) {

View File

@@ -436,8 +436,7 @@ export class ViewerComponent implements OnChanges {
/**
* get File name from url
*
* @param {string} url - url file
* @returns {string} name file
* @param url - url file
*/
getFilenameFromUrl(url: string): string {
let anchor = url.indexOf('#');
@@ -454,8 +453,7 @@ export class ViewerComponent implements OnChanges {
* http://localhost/test.jpg?cache=1000
* http://localhost/test.jpg#cache=1000
*
* @param {string} fileName - file name
* @returns {string} file name extension
* @param fileName - file name
*/
getFileExtension(fileName: string): string {
if (fileName) {
@@ -478,7 +476,7 @@ export class ViewerComponent implements OnChanges {
/**
* Keyboard event listener
* @param {KeyboardEvent} event
* @param event
*/
@HostListener('document:keyup', ['$event'])
handleKeyboardEvent(event: KeyboardEvent) {

View File

@@ -41,7 +41,7 @@ export class ViewerExtensionDirective implements AfterContentInit {
}
ngAfterContentInit() {
this.templateModel = {template: this.template, isVisible: false};
this.templateModel = { template: this.template, isVisible: false };
this.viewerComponent.extensionTemplates.push(this.templateModel);
@@ -58,10 +58,8 @@ export class ViewerExtensionDirective implements AfterContentInit {
/**
* check if the current extension in the viewer is compatible with this extension checking against supportedExtensions
*
* @returns {boolean}
*/
isVisible(fileExtension) {
isVisible(fileExtension): boolean {
let supportedExtension: string;
if (this.supportedExtensions && (this.supportedExtensions instanceof Array)) {

View File

@@ -19,7 +19,6 @@ import { Injectable } from '@angular/core';
*
* RenderingQueueServices rendering of the views for pages and thumbnails.
*
* @returns {RenderingQueueServices} .
*/
@Injectable()
export class RenderingQueueServices {
@@ -43,24 +42,23 @@ export class RenderingQueueServices {
isThumbnailViewEnabled: any = false;
/**
* @param {PDFViewer} pdfViewer
* @param pdfViewer
*/
setViewer(pdfViewer) {
this.pdfViewer = pdfViewer;
}
/**
* @param {PDFThumbnailViewer} pdfThumbnailViewer
* @param pdfThumbnailViewer
*/
setThumbnailViewer(pdfThumbnailViewer) {
this.pdfThumbnailViewer = pdfThumbnailViewer;
}
/**
* @param {IRenderableView} view
* @returns {boolean}
* @param view
*/
isHighestPriority(view: any) {
isHighestPriority(view: any): boolean {
return this.highestPriorityPage === view.renderingId;
}
@@ -129,10 +127,9 @@ export class RenderingQueueServices {
}
/**
* @param {IRenderableView} view
* @returns {boolean}
* @param view
*/
isViewFinished(view) {
isViewFinished(view): boolean {
return view.renderingState === this.renderingStates.FINISHED;
}
@@ -140,7 +137,7 @@ export class RenderingQueueServices {
* Render a page or thumbnail view. This calls the appropriate function
* based on the views state. If the view is already rendered it will return
* false.
* @param {IRenderableView} view
* @param view
*/
renderView(view: any) {
let state = view.renderingState;

View File

@@ -128,7 +128,6 @@ export class AnalyticsReportListComponent implements OnInit {
/**
* Check if the report list is empty
* @returns {boolean|ReportParametersModel[]}
*/
isReportsEmpty(): boolean {
return this.reports === undefined || (this.reports && this.reports.length === 0);

View File

@@ -40,7 +40,6 @@ export class AnalyticsService {
/**
* Retrive all the Deployed app
* @returns {Observable<any>}
*/
getReportList(appId: number): Observable<any> {
return Observable.fromPromise(this.apiService.getInstance().activiti.reportApi.getReportList())
@@ -59,7 +58,6 @@ export class AnalyticsService {
/**
* Retrive Report by name
* @param reportName - string - The name of report
* @returns {Observable<any>}
*/
getReportByName(reportName: string): Observable<any> {
return Observable.fromPromise(this.apiService.getInstance().activiti.reportApi.getReportList())

View File

@@ -2,11 +2,13 @@
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"workingDirectory" : "./ng_work",
"src": "../insights/",
"dest": "../insights/dist/",
"dest": "../dist/insights/",
"lib": {
"licensePath": "../config/assets/license_header_add.txt",
"comments" : "none",
"entryFile": "./public-api.ts",
"flatModuleFile": "adf-insights",
"externals": {
"umdModuleIds": {
"alfresco-js-api": "alfresco-js-api",
"minimatch": "minimatch",
"@angular/platform-browser/animations": "@angular/platform-browser/animations",

View File

@@ -26,12 +26,12 @@
"copy-app-schema": "cp core/app-config/schema.json core/dist/app.config.schema.json",
"new-build": "npm run build-bundles && npm run build-style-new && npm run copy-i18n && npm run copy-assets && npm run copy-app-schema",
"build-bundles": "npm run build-core && npm run link-core && npm run build-content && npm run link-content && npm run build-process && npm run build-insights",
"link-core": "mkdir -p ./node_modules/@alfresco/adf-core/ && cp -R ./core/dist/* ./node_modules/@alfresco/adf-core/",
"link-content": "mkdir -p ./node_modules/@alfresco/adf-content-services/ && cp -R ./content-services/dist/* ./node_modules/@alfresco/adf-content-services/",
"build-core": "ng-packagr -p ./ng-package/ng-package-core.json",
"build-content": "ng-packagr -p ./ng-package/ng-package-content.json",
"build-process": "ng-packagr -p ./ng-package/ng-package-process.json",
"build-insights": "ng-packagr -p ./ng-package/ng-package-insights.json",
"link-core": "mkdir -p ./node_modules/@alfresco/adf-core/ && cp -R ./dist/core/* ./node_modules/@alfresco/adf-core/",
"link-content": "mkdir -p ./node_modules/@alfresco/adf-content-services/ && cp -R ./dist/content-services/* ./node_modules/@alfresco/adf-content-services/",
"build-core": "ng-packagr -p ./core/package.json",
"build-content": "ng-packagr -p ./content-services/package.json",
"build-process": "ng-packagr -p ./process-services/package.json",
"build-insights": "ng-packagr -p ./insights/package.json",
"test-export": "node config/test-export.js",
"webpack": "node node_modules/webpack/bin/webpack.js"
},
@@ -76,7 +76,7 @@
"minimatch": "3.0.4",
"moment": "2.18.1",
"moment-es6": "^1.0.0",
"ng-packagr": "2.0.0-rc.4",
"ng-packagr": "2.0.0",
"ng2-charts": "1.6.0",
"pdfjs-dist": "2.0.265",
"raphael": "2.2.7",
@@ -143,6 +143,7 @@
"traceur": "0.0.91",
"ts-loader": "3.3.0",
"ts-node": "2.0.0",
"tsickle": "^0.26.0",
"tslint": "5.9.1",
"tslint-loader": "3.5.3",
"typescript": "2.6.1",

View File

@@ -124,7 +124,6 @@ export class AppsListComponent implements OnInit {
/**
* Return true if the appId is the current app
* @param appId
* @returns {boolean}
*/
isSelected(appId: number): boolean {
return (this.currentApp !== undefined && appId === this.currentApp.id);
@@ -153,7 +152,6 @@ export class AppsListComponent implements OnInit {
/**
* Check if the value of the layoutType property is an allowed value
* @returns {boolean}
*/
isValidType(): boolean {
if (this.layoutType && (this.layoutType === AppsListComponent.LAYOUT_LIST || this.layoutType === AppsListComponent.LAYOUT_GRID)) {
@@ -171,7 +169,6 @@ export class AppsListComponent implements OnInit {
/**
* Return true if the layout type is LIST
* @returns {boolean}
*/
isList(): boolean {
return this.layoutType === AppsListComponent.LAYOUT_LIST;
@@ -179,7 +176,6 @@ export class AppsListComponent implements OnInit {
/**
* Return true if the layout type is GRID
* @returns {boolean}
*/
isGrid(): boolean {
return this.layoutType === AppsListComponent.LAYOUT_GRID;

View File

@@ -2,10 +2,12 @@
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"workingDirectory": "./ng_work",
"src": "../process-services/",
"dest": "../process-services/dist/",
"dest": "../dist/process-services/",
"lib": {
"licensePath": "../config/assets/license_header_add.txt",
"comments" : "none",
"entryFile": "./public-api.ts",
"externals": {
"umdModuleIds": {
"alfresco-js-api": "alfresco-js-api",
"flatModuleFile": "adf-process-services",
"minimatch": "minimatch",

View File

@@ -186,7 +186,6 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
/**
* Return the current task
* @returns {ProcessInstanceFilterRepresentation}
*/
getCurrentFilter(): ProcessInstanceFilterRepresentation {
return this.currentFilter;
@@ -194,7 +193,6 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
/**
* Check if the filter list is empty
* @returns {boolean}
*/
isFilterListEmpty(): boolean {
return this.filters === undefined || (this.filters && this.filters.length === 0);

View File

@@ -15,10 +15,34 @@
* limitations under the License.
*/
import { DataColumn, DataRowEvent, DataSorting, DataTableAdapter, ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from '@alfresco/adf-core';
import { AppConfigService, DataColumnListComponent, PaginatedComponent, PaginationComponent, PaginationQueryParams, UserPreferencesService } from '@alfresco/adf-core';
import {
DataColumn,
DataRowEvent,
DataSorting,
DataTableAdapter,
ObjectDataColumn,
ObjectDataRow,
ObjectDataTableAdapter
} from '@alfresco/adf-core';
import {
AppConfigService,
DataColumnListComponent,
PaginatedComponent,
PaginationComponent,
PaginationQueryParams,
UserPreferencesService
} from '@alfresco/adf-core';
import { DatePipe } from '@angular/common';
import { AfterContentInit, Component, ContentChild, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core';
import {
AfterContentInit,
Component,
ContentChild,
EventEmitter,
Input,
OnChanges,
Output,
SimpleChanges
} from '@angular/core';
import { ProcessFilterParamRepresentationModel } from '../models/filter-process.model';
import { processPresetsDefaultModel } from '../models/process-preset.model';
import { ProcessService } from '../services/process.service';
@@ -200,7 +224,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
/**
* Create an array of ObjectDataRow
* @param instances
* @returns {ObjectDataRow[]}
*/
private createDataRow(instances: any[]): ObjectDataRow[] {
let instancesRows: ObjectDataRow[] = [];
@@ -255,7 +278,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
/**
* Return the current id
* @returns {string}
*/
getCurrentId(): string {
return this.currentInstanceId;
@@ -263,7 +285,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
/**
* Check if the list is empty
* @returns {ObjectDataTableAdapter|boolean}
*/
isListEmpty(): boolean {
return this.data === undefined ||
@@ -295,9 +316,8 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
/**
* Optimize name field
* @param instances
* @returns {any[]}
*/
private optimizeNames(instances: any[]) {
private optimizeNames(instances: any[]): any[] {
instances = instances.map(t => {
t.obj.name = this.getProcessNameOrDescription(t.obj, 'medium');
return t;

View File

@@ -44,11 +44,7 @@ export class FilterProcessRepresentationModel implements UserProcessInstanceFilt
}
/**
*
* This object represent the parameters of a process filter.
*
*
* @returns {ProcessFilterParamRepresentationModel} .
*/
export class ProcessFilterParamRepresentationModel implements ProcessFilterRequestRepresentation {

View File

@@ -44,7 +44,6 @@ export class ProcessFilterService {
* Retrieve the process filter by id
* @param filterId - number - The id of the filter
* @param appId - string - optional - The id of app
* @returns {Observable<FilterProcessRepresentationModel>}
*/
getProcessFilterById(filterId: number, appId?: number): Observable<FilterProcessRepresentationModel> {
return Observable.fromPromise(this.callApiProcessFilters(appId))
@@ -57,7 +56,6 @@ export class ProcessFilterService {
* Retrieve the process filter by name
* @param filterName - string - The name of the filter
* @param appId - string - optional - The id of app
* @returns {Observable<FilterProcessRepresentationModel>}
*/
getProcessFilterByName(filterName: string, appId?: number): Observable<FilterProcessRepresentationModel> {
return Observable.fromPromise(this.callApiProcessFilters(appId))
@@ -69,7 +67,6 @@ export class ProcessFilterService {
/**
* Create and return the default filters
* @param appId
* @returns {FilterProcessRepresentationModel[]}
*/
public createDefaultFilters(appId: number): Observable<FilterProcessRepresentationModel[]> {
let runningFilter = this.getRunningFilterInstance(appId);
@@ -123,7 +120,6 @@ export class ProcessFilterService {
/**
* Return a static Completed filter instance
* @param appId
* @returns {FilterProcessRepresentationModel}
*/
private getCompletedFilterInstance(appId: number): FilterProcessRepresentationModel {
return new FilterProcessRepresentationModel({
@@ -138,7 +134,6 @@ export class ProcessFilterService {
/**
* Return a static All filter instance
* @param appId
* @returns {FilterProcessRepresentationModel}
*/
private getAllFilterInstance(appId: number): FilterProcessRepresentationModel {
return new FilterProcessRepresentationModel({
@@ -153,7 +148,6 @@ export class ProcessFilterService {
/**
* Add a filter
* @param filter - FilterProcessRepresentationModel
* @returns {FilterProcessRepresentationModel}
*/
addProcessFilter(filter: FilterProcessRepresentationModel): Observable<FilterProcessRepresentationModel> {
return Observable.fromPromise(this.alfrescoApiService.getInstance().activiti.userFiltersApi.createUserProcessInstanceFilter(filter))

View File

@@ -16,8 +16,16 @@
*/
import { PeopleProcessService, UserProcessModel } from '@alfresco/adf-core';
import { AuthenticationService, CardViewUpdateService, ClickNotification, LogService, UpdateNotification, FormRenderingService } from '@alfresco/adf-core';
import { Component,
import {
AuthenticationService,
CardViewUpdateService,
ClickNotification,
LogService,
UpdateNotification,
FormRenderingService
} from '@alfresco/adf-core';
import {
Component,
EventEmitter,
Input,
OnChanges,
@@ -209,9 +217,8 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
/**
* Check if the task has a form
* @returns {TaskDetailsModel|string|boolean}
*/
hasFormKey() {
hasFormKey(): TaskDetailsModel | string | boolean {
return (this.taskDetails
&& this.taskDetails.formKey
&& this.taskDetails.formKey !== 'null');
@@ -339,7 +346,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
}
onFormError(error: any): void {
this.errorDialogRef = this.dialog.open(this.errorDialog, {width: '500px'});
this.errorDialogRef = this.dialog.open(this.errorDialog, { width: '500px' });
this.error.emit(error);
}

View File

@@ -216,7 +216,6 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
/**
* Return the current task
* @returns {FilterRepresentationModel}
*/
getCurrentFilter(): FilterRepresentationModel {
return this.currentFilter;
@@ -224,7 +223,6 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
/**
* Check if the filter list is empty
* @returns {boolean}
*/
isFilterListEmpty(): boolean {
return this.filters === undefined || (this.filters && this.filters.length === 0);

View File

@@ -15,9 +15,26 @@
* limitations under the License.
*/
import { DataColumn, DataRowEvent, DataTableAdapter, ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from '@alfresco/adf-core';
import {
DataColumn,
DataRowEvent,
DataTableAdapter,
ObjectDataColumn,
ObjectDataRow,
ObjectDataTableAdapter
} from '@alfresco/adf-core';
import { AppConfigService, DataColumnListComponent, PaginationComponent } from '@alfresco/adf-core';
import { AfterContentInit, Component, ContentChild, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';
import {
AfterContentInit,
Component,
ContentChild,
EventEmitter,
Input,
OnChanges,
OnInit,
Output,
SimpleChanges
} from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
import { TaskListModel } from '../models/task-list.model';
@@ -128,7 +145,6 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
* When enabled the component reloads data from it's current source instead of the server side.
* This allows generating and displaying custom data sets (i.e. filtered out content).
*
* @type {boolean}
* @memberOf TaskListComponent
*/
hasCustomDataSource: boolean = false;
@@ -225,7 +241,6 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
/**
* Create an array of ObjectDataRow
* @param instances
* @returns {ObjectDataRow[]}
*/
private createDataRow(instances: any[]): ObjectDataRow[] {
let instancesRows: ObjectDataRow[] = [];
@@ -280,7 +295,6 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
/**
* Return the current id
* @returns {string}
*/
getCurrentId(): string {
return this.currentInstanceId;
@@ -289,15 +303,13 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
/**
* Check if the taskId is the same of the selected task
* @param taskId
* @returns {boolean}
*/
isEqualToCurrentId(taskId: string) {
isEqualToCurrentId(taskId: string): boolean {
return this.currentInstanceId === taskId ? true : false;
}
/**
* Check if the list is empty
* @returns {ObjectDataTableAdapter|boolean}
*/
isListEmpty(): boolean {
return this.data === undefined ||
@@ -330,9 +342,8 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
/**
* Optimize name field
* @param istances
* @returns {any[]}
*/
private optimizeNames(istances: any[]) {
private optimizeNames(istances: any[]): any[] {
istances = istances.map(t => {
t.obj.name = t.obj.name || 'No name';
return t;

View File

@@ -16,11 +16,7 @@
*/
/**
*
* This object represent of the Form.
*
*
* @returns {Form} .
*/
export class Form {

View File

@@ -16,11 +16,7 @@
*/
/**
*
* This object represent of the StartTaskModel.
*
*
* @returns {StartTaskModel} .
*/
import { UserProcessModel } from '@alfresco/adf-core';

View File

@@ -16,11 +16,7 @@
*/
/**
*
* This object represent the details of a task.
*
*
* @returns {TaskDetailsModel} .
*/
import { UserProcessModel } from '@alfresco/adf-core';
import { TaskRepresentation } from 'alfresco-js-api';

View File

@@ -16,11 +16,7 @@
*/
/**
*
* This object represent the User Event.
*
*
* @returns {UserEventModel} .
*/
export class UserEventModel {
type: string = '';

View File

@@ -37,7 +37,6 @@ export class TaskFilterService {
/**
* Create and return the default filters
* @param appId
* @returns {FilterRepresentationModel[]}
*/
public createDefaultFilters(appId: number): Observable<FilterRepresentationModel[]> {
let involvedTasksFilter = this.getInvolvedTasksFilterInstance(appId);
@@ -87,7 +86,6 @@ export class TaskFilterService {
/**
* Retrieve all the Tasks filters
* @returns {Observable<any>}
*/
getTaskListFilters(appId?: number): Observable<any> {
return Observable.fromPromise(this.callApiTaskFilters(appId))
@@ -105,7 +103,6 @@ export class TaskFilterService {
* Retrieve the Tasks filter by id
* @param filterId - number - The id of the filter
* @param appId - string - optional - The id of app
* @returns {Observable<FilterRepresentationModel>}
*/
getTaskFilterById(filterId: number, appId?: number): Observable<FilterRepresentationModel> {
return Observable.fromPromise(this.callApiTaskFilters(appId))
@@ -117,7 +114,6 @@ export class TaskFilterService {
/**
* Retrieve the Tasks filter by name
* @param taskName - string - The name of the filter
* @returns {Observable<FilterRepresentationModel>}
*/
getTaskFilterByName(taskName: string, appId?: number): Observable<FilterRepresentationModel> {
return Observable.fromPromise(this.callApiTaskFilters(appId))
@@ -129,7 +125,6 @@ export class TaskFilterService {
/**
* Add a filter
* @param filter - FilterRepresentationModel
* @returns {FilterRepresentationModel}
*/
addFilter(filter: FilterRepresentationModel): Observable<FilterRepresentationModel> {
return Observable.fromPromise(this.apiService.getInstance().activiti.userFiltersApi.createUserTaskFilter(filter))
@@ -150,7 +145,6 @@ export class TaskFilterService {
/**
* Return a static Involved filter instance
* @param appId
* @returns {FilterRepresentationModel}
*/
getInvolvedTasksFilterInstance(appId: number): FilterRepresentationModel {
return new FilterRepresentationModel({
@@ -165,7 +159,6 @@ export class TaskFilterService {
/**
* Return a static My task filter instance
* @param appId
* @returns {FilterRepresentationModel}
*/
getMyTasksFilterInstance(appId: number): FilterRepresentationModel {
return new FilterRepresentationModel({
@@ -180,7 +173,6 @@ export class TaskFilterService {
/**
* Return a static Queued filter instance
* @param appId
* @returns {FilterRepresentationModel}
*/
getQueuedTasksFilterInstance(appId: number): FilterRepresentationModel {
return new FilterRepresentationModel({
@@ -195,7 +187,6 @@ export class TaskFilterService {
/**
* Return a static Completed filter instance
* @param appId
* @returns {FilterRepresentationModel}
*/
getCompletedTasksFilterInstance(appId: number): FilterRepresentationModel {
return new FilterRepresentationModel({

View File

@@ -43,7 +43,6 @@ export class TaskListService {
* Return all the filters in the list where the task id belong
* @param taskId - string
* @param filter - FilterRepresentationModel []
* @returns {FilterRepresentationModel}
*/
getFilterForTaskById(taskId: string, filterList: FilterRepresentationModel[]): Observable<FilterRepresentationModel> {
return Observable.from(filterList)
@@ -54,7 +53,6 @@ export class TaskListService {
/**
* Return the search node for query task based on the given filter
* @param filter - FilterRepresentationModel
* @returns {TaskQueryRequestRepresentationModel}
*/
private generateTaskRequestNodeFromFilter(filter: FilterRepresentationModel): TaskQueryRequestRepresentationModel {
let requestNode = {
@@ -70,7 +68,6 @@ export class TaskListService {
* Check if a taskId is filtered with the given filter
* @param taskId - string
* @param filter - FilterRepresentationModel
* @returns {FilterRepresentationModel}
*/
isTaskRelatedToFilter(taskId: string, filter: FilterRepresentationModel): Observable<FilterRepresentationModel> {
let requestNodeForFilter = this.generateTaskRequestNodeFromFilter(filter);
@@ -83,7 +80,6 @@ export class TaskListService {
/**
* Retrieve all the tasks filtered by filterModel
* @param filter - TaskFilterRepresentationModel
* @returns {any}
*/
getTasks(requestNode: TaskQueryRequestRepresentationModel): Observable<TaskListModel> {
return Observable.fromPromise(this.callApiTasksFiltered(requestNode))
@@ -96,7 +92,6 @@ export class TaskListService {
/**
* Retrieve tasks filtered by filterModel and state
* @param filter - TaskFilterRepresentationModel
* @returns {any}
*/
findTasksByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable<TaskListModel> {
if (state) {
@@ -108,7 +103,6 @@ export class TaskListService {
/**
* Retrieve all tasks filtered by filterModel and state
* @param filter - TaskFilterRepresentationModel
* @returns {any}
*/
findAllTaskByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable<TaskListModel> {
if (state) {
@@ -123,7 +117,6 @@ export class TaskListService {
/**
* Retrieve all tasks filtered by filterModel irrespective of state
* @param filter - TaskFilterRepresentationModel
* @returns {any}
*/
findAllTasksWithoutState(requestNode: TaskQueryRequestRepresentationModel): Observable<TaskListModel> {
return Observable.forkJoin(
@@ -142,7 +135,6 @@ export class TaskListService {
/**
* Retrieve all the task details
* @param id - taskId
* @returns {<TaskDetailsModel>}
*/
getTaskDetails(taskId: string): Observable<TaskDetailsModel> {
return Observable.fromPromise(this.callApiTaskDetails(taskId))
@@ -155,7 +147,6 @@ export class TaskListService {
/**
* Retrieve all the task's checklist
* @param id - taskId
* @returns {TaskDetailsModel}
*/
getTaskChecklist(id: string): Observable<TaskDetailsModel[]> {
return Observable.fromPromise(this.callApiTaskChecklist(id))
@@ -171,7 +162,6 @@ export class TaskListService {
/**
* Retrieve all the form shared with this user
* @returns {TaskDetailsModel}
*/
getFormList(): Observable<Form []> {
let opts = {
@@ -197,7 +187,6 @@ export class TaskListService {
/**
* Add a task
* @param task - TaskDetailsModel
* @returns {TaskDetailsModel}
*/
addTask(task: TaskDetailsModel): Observable<TaskDetailsModel> {
return Observable.fromPromise(this.callApiAddTask(task))
@@ -219,7 +208,6 @@ export class TaskListService {
/**
* Make the task completed
* @param id - taskId
* @returns {TaskDetailsModel}
*/
completeTask(taskId: string) {
return Observable.fromPromise(this.apiService.getInstance().activiti.taskApi.completeTask(taskId))
@@ -230,7 +218,6 @@ export class TaskListService {
/**
* Return the total number of the tasks by filter
* @param requestNode - TaskFilterRepresentationModel
* @returns {any}
*/
public getTotalTasks(requestNode: TaskQueryRequestRepresentationModel): Observable<any> {
requestNode.size = 0;
@@ -243,7 +230,6 @@ export class TaskListService {
/**
* Create a new standalone task
* @param task - TaskDetailsModel
* @returns {TaskDetailsModel}
*/
createNewTask(task: TaskDetailsModel): Observable<TaskDetailsModel> {
return Observable.fromPromise(this.callApiCreateTask(task))
@@ -257,7 +243,6 @@ export class TaskListService {
* Assign task to user/group
* @param taskId - string
* @param requestNode - any
* @returns {TaskDetailsModel}
*/
assignTask(taskId: string, requestNode: any): Observable<TaskDetailsModel> {
let assignee = {assignee: requestNode.id};

View File

@@ -152,7 +152,7 @@ fi
for PACKAGE in ${projects[@]}
do
DESTDIR="$DIR/../lib/${PACKAGE}/dist"
DESTDIR="$DIR/../lib/dist/${PACKAGE}"
echo "====== MOVE DIR: ${DESTDIR} ===== "
cd ${DESTDIR}