mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -15,7 +15,14 @@
|
|||||||
* limitations under the License.
|
* 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 { Injectable } from '@angular/core';
|
||||||
import { Response } from '@angular/http';
|
import { Response } from '@angular/http';
|
||||||
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging } from 'alfresco-js-api';
|
import { MinimalNodeEntity, MinimalNodeEntryEntity, NodePaging } from 'alfresco-js-api';
|
||||||
@@ -96,7 +103,6 @@ export class DocumentListService {
|
|||||||
* Create a new folder in the path.
|
* Create a new folder in the path.
|
||||||
* @param name Folder name
|
* @param name Folder name
|
||||||
* @param parentId Parent folder ID
|
* @param parentId Parent folder ID
|
||||||
* @returns {any}
|
|
||||||
*/
|
*/
|
||||||
createFolder(name: string, parentId: string): Observable<MinimalNodeEntity> {
|
createFolder(name: string, parentId: string): Observable<MinimalNodeEntity> {
|
||||||
return Observable.fromPromise(this.apiService.getInstance().nodes.createFolder(name, '/', parentId))
|
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.
|
* Gets the folder node with the specified relative name path below the root node.
|
||||||
* @param folder Path to folder.
|
* @param folder Path to folder.
|
||||||
* @param opts Options.
|
* @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))
|
return Observable.fromPromise(this.getNodesPromise(folder, opts))
|
||||||
.map(res => <NodePaging> res)
|
.map(res => <NodePaging> res)
|
||||||
.catch(err => this.handleError(err));
|
.catch(err => this.handleError(err));
|
||||||
@@ -132,9 +137,8 @@ export class DocumentListService {
|
|||||||
/**
|
/**
|
||||||
* Get thumbnail URL for the given document node.
|
* Get thumbnail URL for the given document node.
|
||||||
* @param node Node to get URL for.
|
* @param node Node to get URL for.
|
||||||
* @returns {string} URL address.
|
|
||||||
*/
|
*/
|
||||||
getDocumentThumbnailUrl(node: MinimalNodeEntity) {
|
getDocumentThumbnailUrl(node: MinimalNodeEntity): string {
|
||||||
return this.thumbnailService.getDocumentThumbnailUrl(node);
|
return this.thumbnailService.getDocumentThumbnailUrl(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,7 +162,7 @@ export class DocumentListService {
|
|||||||
* @param node Target node
|
* @param node Target node
|
||||||
* @param permission Permission level to query
|
* @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);
|
return this.contentService.hasPermission(node, permission);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,11 +2,13 @@
|
|||||||
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
||||||
"workingDirectory" : "./ng_work",
|
"workingDirectory" : "./ng_work",
|
||||||
"src": "../content-services/",
|
"src": "../content-services/",
|
||||||
"dest": "../content-services/dist/",
|
"dest": "../dist/content-services/",
|
||||||
"lib": {
|
"lib": {
|
||||||
|
"licensePath": "../config/assets/license_header_add.txt",
|
||||||
|
"comments" : "none",
|
||||||
"entryFile": "./public-api.ts",
|
"entryFile": "./public-api.ts",
|
||||||
"flatModuleFile": "adf-content-services",
|
"flatModuleFile": "adf-content-services",
|
||||||
"externals": {
|
"umdModuleIds": {
|
||||||
"alfresco-js-api": "alfresco-js-api",
|
"alfresco-js-api": "alfresco-js-api",
|
||||||
"minimatch": "minimatch",
|
"minimatch": "minimatch",
|
||||||
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
@@ -20,9 +20,6 @@ import { EventEmitter, Injectable, Output } from '@angular/core';
|
|||||||
import { Observable } from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
import 'rxjs/add/observable/throw';
|
import 'rxjs/add/observable/throw';
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {TagService}
|
|
||||||
*/
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class TagService {
|
export class TagService {
|
||||||
|
|
||||||
|
@@ -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
|
* This component, provide a list of the tags relative a node with actions button to add or remove new tag
|
||||||
*
|
|
||||||
* @returns {TagComponent} .
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -21,8 +21,6 @@ import { TagService } from './services/tag.service';
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* This component provide a list of all the tag inside the ECM
|
* This component provide a list of all the tag inside the ECM
|
||||||
*
|
|
||||||
* @returns {TagList} .
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -21,8 +21,6 @@ import { TagService } from './services/tag.service';
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* This component, ShowNodeTag a list of the tag on relative a node
|
* This component, ShowNodeTag a list of the tag on relative a node
|
||||||
*
|
|
||||||
* @returns {TagNodeList} .
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -44,7 +44,7 @@ export class FileUploadingListComponent {
|
|||||||
/**
|
/**
|
||||||
* Cancel file upload
|
* Cancel file upload
|
||||||
*
|
*
|
||||||
* @param {FileModel} file File model to cancel upload for.
|
* @param file File model to cancel upload for.
|
||||||
*
|
*
|
||||||
* @memberOf FileUploadingListComponent
|
* @memberOf FileUploadingListComponent
|
||||||
*/
|
*/
|
||||||
@@ -88,8 +88,7 @@ export class FileUploadingListComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if all the files are uploaded
|
* Checks if all the files are uploaded false if there is at least one file in Progress | Starting | Pending
|
||||||
* @returns {boolean} - false if there is at least one file in Progress | Starting | Pending
|
|
||||||
*/
|
*/
|
||||||
isUploadCompleted(): boolean {
|
isUploadCompleted(): boolean {
|
||||||
return !this.isUploadCancelled() &&
|
return !this.isUploadCancelled() &&
|
||||||
@@ -103,8 +102,7 @@ export class FileUploadingListComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if all the files are Cancelled | Aborted | Error.
|
* Check if all the files are Cancelled | Aborted | Error. false if there is at least one file in uploading states
|
||||||
* @returns {boolean} - false if there is at least one file in uploading states
|
|
||||||
*/
|
*/
|
||||||
isUploadCancelled(): boolean {
|
isUploadCancelled(): boolean {
|
||||||
return !!this.files.length &&
|
return !!this.files.length &&
|
||||||
|
@@ -64,7 +64,7 @@ export class UploadDragAreaComponent implements NodePermissionSubject {
|
|||||||
/**
|
/**
|
||||||
* Method called when files are dropped in the drag area.
|
* 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 {
|
onFilesDropped(files: File[]): void {
|
||||||
if (!this.disabled && files.length) {
|
if (!this.disabled && files.length) {
|
||||||
@@ -121,7 +121,7 @@ export class UploadDragAreaComponent implements NodePermissionSubject {
|
|||||||
/**
|
/**
|
||||||
* Show undo notification bar.
|
* 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[]) {
|
showUndoNotificationBar(latestFilesAdded: FileModel[]) {
|
||||||
let messageTranslate: any, actionTranslate: any;
|
let messageTranslate: any, actionTranslate: any;
|
||||||
@@ -137,7 +137,6 @@ export class UploadDragAreaComponent implements NodePermissionSubject {
|
|||||||
* Show the error inside Notification bar
|
* Show the error inside Notification bar
|
||||||
*
|
*
|
||||||
* @param Error message
|
* @param Error message
|
||||||
* @private
|
|
||||||
*/
|
*/
|
||||||
showErrorNotificationBar(errorMessage: string) {
|
showErrorNotificationBar(errorMessage: string) {
|
||||||
this.notificationService.openSnackMessage(errorMessage, 3000);
|
this.notificationService.openSnackMessage(errorMessage, 3000);
|
||||||
|
@@ -100,7 +100,7 @@ export class FileDraggableDirective implements OnInit, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* Change the style of the drag area when a file drag in.
|
* 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 {
|
onDragEnter(event: Event): void {
|
||||||
if (this.enabled && !event.defaultPrevented) {
|
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.
|
* 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 {
|
onDragLeave(event: Event): void {
|
||||||
if (this.enabled && !event.defaultPrevented) {
|
if (this.enabled && !event.defaultPrevented) {
|
||||||
@@ -136,7 +136,7 @@ export class FileDraggableDirective implements OnInit, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* Prevent default and stop propagation of the DOM event.
|
* Prevent default and stop propagation of the DOM event.
|
||||||
*
|
*
|
||||||
* @param {event} $event - DOM event.
|
* @param $event - DOM event.
|
||||||
*/
|
*/
|
||||||
preventDefault(event: Event): void {
|
preventDefault(event: Event): void {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
@@ -38,7 +38,6 @@ import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core
|
|||||||
*
|
*
|
||||||
* @Output - success - The event is emitted when the data are recived
|
* @Output - success - The event is emitted when the data are recived
|
||||||
*
|
*
|
||||||
* @returns {WebscriptComponent} .
|
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-webscript-get',
|
selector: 'adf-webscript-get',
|
||||||
|
@@ -56,7 +56,6 @@ export class NodePermissionDirective implements OnChanges {
|
|||||||
/**
|
/**
|
||||||
* Updates disabled state for the decorated elememtn
|
* Updates disabled state for the decorated elememtn
|
||||||
*
|
*
|
||||||
* @returns {boolean} True if decorated element got disabled, otherwise False
|
|
||||||
* @memberof NodePermissionDirective
|
* @memberof NodePermissionDirective
|
||||||
*/
|
*/
|
||||||
updateElement(): boolean {
|
updateElement(): boolean {
|
||||||
@@ -110,9 +109,8 @@ export class NodePermissionDirective implements OnChanges {
|
|||||||
/**
|
/**
|
||||||
* Checks whether all nodes have a particular permission
|
* Checks whether all nodes have a particular permission
|
||||||
*
|
*
|
||||||
* @param {MinimalNodeEntity[]} nodes Node collection to check
|
* @param nodes Node collection to check
|
||||||
* @param {string} permission Permission to check for each node
|
* @param permission Permission to check for each node
|
||||||
* @returns {boolean} True if all nodes have provided permission, otherwise False
|
|
||||||
* @memberof NodePermissionDirective
|
* @memberof NodePermissionDirective
|
||||||
*/
|
*/
|
||||||
hasPermission(nodes: MinimalNodeEntity[], permission: string): boolean {
|
hasPermission(nodes: MinimalNodeEntity[], permission: string): boolean {
|
||||||
|
@@ -253,7 +253,6 @@ export class FormComponent implements OnInit, OnChanges {
|
|||||||
/**
|
/**
|
||||||
* Invoked when user clicks outcome button.
|
* Invoked when user clicks outcome button.
|
||||||
* @param outcome Form outcome model
|
* @param outcome Form outcome model
|
||||||
* @returns {boolean} True if outcome action was executed, otherwise false.
|
|
||||||
*/
|
*/
|
||||||
onOutcomeClicked(outcome: FormOutcomeModel): boolean {
|
onOutcomeClicked(outcome: FormOutcomeModel): boolean {
|
||||||
if (!this.readOnly && outcome && this.form) {
|
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.
|
* Get custom set of outcomes for a Form Definition.
|
||||||
* @param form Form definition model.
|
* @param form Form definition model.
|
||||||
* @returns {FormOutcomeModel[]} Outcomes for a given form definition.
|
|
||||||
*/
|
*/
|
||||||
getFormDefinitionOutcomes(form: FormModel): FormOutcomeModel[] {
|
getFormDefinitionOutcomes(form: FormModel): FormOutcomeModel[] {
|
||||||
return [
|
return [
|
||||||
|
@@ -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.
|
* {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.
|
* {formCompleted} EventEmitter - This event is fired when the form is completed, it pass all the value in the form.
|
||||||
*
|
*
|
||||||
* @returns {FormComponent} .
|
|
||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-start-form',
|
selector: 'adf-start-form',
|
||||||
|
@@ -173,7 +173,6 @@ export class FormModel {
|
|||||||
/**
|
/**
|
||||||
* Validates entire form and all form fields.
|
* Validates entire form and all form fields.
|
||||||
*
|
*
|
||||||
* @returns {void}
|
|
||||||
* @memberof FormModel
|
* @memberof FormModel
|
||||||
*/
|
*/
|
||||||
validateForm(): void {
|
validateForm(): void {
|
||||||
@@ -203,8 +202,7 @@ export class FormModel {
|
|||||||
/**
|
/**
|
||||||
* Validates a specific form field, triggers form validation.
|
* Validates a specific form field, triggers form validation.
|
||||||
*
|
*
|
||||||
* @param {FormFieldModel} field Form field to validate.
|
* @param field Form field to validate.
|
||||||
* @returns {void}
|
|
||||||
* @memberof FormModel
|
* @memberof FormModel
|
||||||
*/
|
*/
|
||||||
validateField(field: FormFieldModel): void {
|
validateField(field: FormFieldModel): void {
|
||||||
|
@@ -39,7 +39,6 @@ export class ActivitiContentService {
|
|||||||
*
|
*
|
||||||
* @param accountId
|
* @param accountId
|
||||||
* @param folderId
|
* @param folderId
|
||||||
* @returns {null}
|
|
||||||
*/
|
*/
|
||||||
getAlfrescoNodes(accountId: string, folderId: string): Observable<[ExternalContent]> {
|
getAlfrescoNodes(accountId: string, folderId: string): Observable<[ExternalContent]> {
|
||||||
let apiService: AlfrescoApi = this.apiService.getInstance();
|
let apiService: AlfrescoApi = this.apiService.getInstance();
|
||||||
@@ -54,7 +53,6 @@ export class ActivitiContentService {
|
|||||||
*
|
*
|
||||||
* @param accountId
|
* @param accountId
|
||||||
* @param folderId
|
* @param folderId
|
||||||
* @returns {any}
|
|
||||||
*/
|
*/
|
||||||
getAlfrescoRepositories(tenantId: number, includeAccount: boolean): Observable<any> {
|
getAlfrescoRepositories(tenantId: number, includeAccount: boolean): Observable<any> {
|
||||||
let apiService: AlfrescoApi = this.apiService.getInstance();
|
let apiService: AlfrescoApi = this.apiService.getInstance();
|
||||||
@@ -73,7 +71,6 @@ export class ActivitiContentService {
|
|||||||
* @param accountId
|
* @param accountId
|
||||||
* @param node
|
* @param node
|
||||||
* @param siteId
|
* @param siteId
|
||||||
* @returns {null}
|
|
||||||
*/
|
*/
|
||||||
linkAlfrescoNode(accountId: string, node: ExternalContent, siteId: string): Observable<ExternalContentLink> {
|
linkAlfrescoNode(accountId: string, node: ExternalContent, siteId: string): Observable<ExternalContentLink> {
|
||||||
let apiService: AlfrescoApi = this.apiService.getInstance();
|
let apiService: AlfrescoApi = this.apiService.getInstance();
|
||||||
|
@@ -109,7 +109,6 @@ export class FormService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a Form with a fields for each metadata properties
|
* Create a Form with a fields for each metadata properties
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
createFormFromANode(formName: string): Observable<any> {
|
createFormFromANode(formName: string): Observable<any> {
|
||||||
return Observable.create(observer => {
|
return Observable.create(observer => {
|
||||||
@@ -131,7 +130,6 @@ export class FormService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a Form
|
* Create a Form
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
createForm(formName: string): Observable<any> {
|
createForm(formName: string): Observable<any> {
|
||||||
let dataModel = {
|
let dataModel = {
|
||||||
@@ -155,7 +153,6 @@ export class FormService {
|
|||||||
/**
|
/**
|
||||||
* @deprecated in 1.7.0, use saveForm API instead
|
* @deprecated in 1.7.0, use saveForm API instead
|
||||||
* Add Fileds to A form
|
* Add Fileds to A form
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
addFieldsToAForm(formId: string, formModel: FormDefinitionModel): Observable<any> {
|
addFieldsToAForm(formId: string, formModel: FormDefinitionModel): Observable<any> {
|
||||||
this.logService.log('addFieldsToAForm is deprecated in 1.7.0, use saveForm API instead');
|
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
|
* Search For A Form by name
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
searchFrom(name: string): Observable<any> {
|
searchFrom(name: string): Observable<any> {
|
||||||
let opts = {
|
let opts = {
|
||||||
@@ -184,7 +180,6 @@ export class FormService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get All the forms
|
* Get All the forms
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getForms(): Observable<any> {
|
getForms(): Observable<any> {
|
||||||
let opts = {
|
let opts = {
|
||||||
@@ -198,7 +193,6 @@ export class FormService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Process Definitions
|
* Get Process Definitions
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getProcessDefinitions(): Observable<any> {
|
getProcessDefinitions(): Observable<any> {
|
||||||
return Observable.fromPromise(this.processApi.getProcessDefinitions({}))
|
return Observable.fromPromise(this.processApi.getProcessDefinitions({}))
|
||||||
@@ -214,7 +208,6 @@ export class FormService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get All the Tasks
|
* Get All the Tasks
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getTasks(): Observable<any> {
|
getTasks(): Observable<any> {
|
||||||
return Observable.fromPromise(this.taskApi.listTasks({}))
|
return Observable.fromPromise(this.taskApi.listTasks({}))
|
||||||
@@ -225,7 +218,6 @@ export class FormService {
|
|||||||
/**
|
/**
|
||||||
* Get Task
|
* Get Task
|
||||||
* @param taskId Task Id
|
* @param taskId Task Id
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getTask(taskId: string): Observable<any> {
|
getTask(taskId: string): Observable<any> {
|
||||||
return Observable.fromPromise(this.taskApi.getTask(taskId))
|
return Observable.fromPromise(this.taskApi.getTask(taskId))
|
||||||
@@ -237,7 +229,6 @@ export class FormService {
|
|||||||
* Save Task Form
|
* Save Task Form
|
||||||
* @param taskId Task Id
|
* @param taskId Task Id
|
||||||
* @param formValues Form Values
|
* @param formValues Form Values
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
saveTaskForm(taskId: string, formValues: FormValues): Observable<any> {
|
saveTaskForm(taskId: string, formValues: FormValues): Observable<any> {
|
||||||
let body = JSON.stringify({values: formValues});
|
let body = JSON.stringify({values: formValues});
|
||||||
@@ -251,7 +242,6 @@ export class FormService {
|
|||||||
* @param taskId Task Id
|
* @param taskId Task Id
|
||||||
* @param formValues Form Values
|
* @param formValues Form Values
|
||||||
* @param outcome Form Outcome
|
* @param outcome Form Outcome
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
completeTaskForm(taskId: string, formValues: FormValues, outcome?: string): Observable<any> {
|
completeTaskForm(taskId: string, formValues: FormValues, outcome?: string): Observable<any> {
|
||||||
let data: any = {values: formValues};
|
let data: any = {values: formValues};
|
||||||
@@ -267,7 +257,6 @@ export class FormService {
|
|||||||
/**
|
/**
|
||||||
* Get Form related to a taskId
|
* Get Form related to a taskId
|
||||||
* @param taskId Task Id
|
* @param taskId Task Id
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getTaskForm(taskId: string): Observable<any> {
|
getTaskForm(taskId: string): Observable<any> {
|
||||||
return Observable.fromPromise(this.taskApi.getTaskForm(taskId))
|
return Observable.fromPromise(this.taskApi.getTaskForm(taskId))
|
||||||
@@ -278,7 +267,6 @@ export class FormService {
|
|||||||
/**
|
/**
|
||||||
* Get Form Definition
|
* Get Form Definition
|
||||||
* @param formId Form Id
|
* @param formId Form Id
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getFormDefinitionById(formId: string): Observable<any> {
|
getFormDefinitionById(formId: string): Observable<any> {
|
||||||
return Observable.fromPromise(this.editorApi.getForm(formId))
|
return Observable.fromPromise(this.editorApi.getForm(formId))
|
||||||
@@ -289,7 +277,6 @@ export class FormService {
|
|||||||
/**
|
/**
|
||||||
* Returns form definition by a given name.
|
* Returns form definition by a given name.
|
||||||
* @param name
|
* @param name
|
||||||
* @returns {Promise<T>|Promise<ErrorObservable>}
|
|
||||||
*/
|
*/
|
||||||
getFormDefinitionByName(name: string): Observable<any> {
|
getFormDefinitionByName(name: string): Observable<any> {
|
||||||
let opts = {
|
let opts = {
|
||||||
@@ -306,7 +293,6 @@ export class FormService {
|
|||||||
/**
|
/**
|
||||||
* Get start form instance for a given processId
|
* Get start form instance for a given processId
|
||||||
* @param processId Process definition ID
|
* @param processId Process definition ID
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getStartFormInstance(processId: string): Observable<any> {
|
getStartFormInstance(processId: string): Observable<any> {
|
||||||
return Observable.fromPromise(
|
return Observable.fromPromise(
|
||||||
@@ -324,7 +310,6 @@ export class FormService {
|
|||||||
/**
|
/**
|
||||||
* Get start form definition for a given process
|
* Get start form definition for a given process
|
||||||
* @param processId Process definition ID
|
* @param processId Process definition ID
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getStartFormDefinition(processId: string): Observable<any> {
|
getStartFormDefinition(processId: string): Observable<any> {
|
||||||
return Observable.fromPromise(
|
return Observable.fromPromise(
|
||||||
|
@@ -29,7 +29,6 @@ export class NodeService {
|
|||||||
/**
|
/**
|
||||||
* Get All the metadata and the nodeType for a nodeId cleaned by the prefix
|
* Get All the metadata and the nodeType for a nodeId cleaned by the prefix
|
||||||
* @param nodeId Node Id
|
* @param nodeId Node Id
|
||||||
* @returns NodeMetadata
|
|
||||||
*/
|
*/
|
||||||
public getNodeMetadata(nodeId: string): Observable<NodeMetadata> {
|
public getNodeMetadata(nodeId: string): Observable<NodeMetadata> {
|
||||||
return Observable.fromPromise(this.apiService.getInstance().nodes.getNodeInfo(nodeId)).map(this.cleanMetadataFromSemicolon);
|
return Observable.fromPromise(this.apiService.getInstance().nodes.getNodeInfo(nodeId)).map(this.cleanMetadataFromSemicolon);
|
||||||
@@ -41,7 +40,6 @@ export class NodeService {
|
|||||||
* @param nodeType node type
|
* @param nodeType node type
|
||||||
* @param nameSpace namespace node
|
* @param nameSpace namespace node
|
||||||
* @param data data to store
|
* @param data data to store
|
||||||
* @returns NodeMetadata
|
|
||||||
*/
|
*/
|
||||||
public createNodeMetadata(nodeType: string, nameSpace: any, data: any, path: string, name?: string): Observable<any> {
|
public createNodeMetadata(nodeType: string, nameSpace: any, data: any, path: string, name?: string): Observable<any> {
|
||||||
let properties = {};
|
let properties = {};
|
||||||
@@ -60,7 +58,6 @@ export class NodeService {
|
|||||||
* @param nodeType node type
|
* @param nodeType node type
|
||||||
* @param properties namespace node
|
* @param properties namespace node
|
||||||
* @param path path
|
* @param path path
|
||||||
* @returns NodeMetadata
|
|
||||||
*/
|
*/
|
||||||
public createNode(name: string, nodeType: string, properties: any, path: string): Observable<any> {
|
public createNode(name: string, nodeType: string, properties: any, path: string): Observable<any> {
|
||||||
let body = {
|
let body = {
|
||||||
|
@@ -255,7 +255,6 @@ export class LoginComponent implements OnInit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check the require parameter
|
* Check the require parameter
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
private checkRequiredParams(): boolean {
|
private checkRequiredParams(): boolean {
|
||||||
|
|
||||||
@@ -309,7 +308,6 @@ export class LoginComponent implements OnInit {
|
|||||||
/**
|
/**
|
||||||
* The method return if a field is valid or not
|
* The method return if a field is valid or not
|
||||||
* @param field
|
* @param field
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isErrorStyle(field: AbstractControl) {
|
isErrorStyle(field: AbstractControl) {
|
||||||
return !field.valid && field.dirty && !field.pristine;
|
return !field.valid && field.dirty && !field.pristine;
|
||||||
|
@@ -1,12 +1,14 @@
|
|||||||
{
|
{
|
||||||
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
||||||
"workingDirectory" : "./ng_work",
|
"workingDirectory" : "./ng_work",
|
||||||
"src": "../core/",
|
"src": "./core/",
|
||||||
"dest": "../core/dist/",
|
"dest": "../dist/core/",
|
||||||
"lib": {
|
"lib": {
|
||||||
|
"licensePath": "../config/assets/license_header_add.txt",
|
||||||
|
"comments" : "none",
|
||||||
"entryFile": "./public-api.ts",
|
"entryFile": "./public-api.ts",
|
||||||
"flatModuleFile": "adf-core",
|
"flatModuleFile": "adf-core",
|
||||||
"externals": {
|
"umdModuleIds": {
|
||||||
"alfresco-js-api": "alfresco-js-api",
|
"alfresco-js-api": "alfresco-js-api",
|
||||||
"minimatch": "minimatch",
|
"minimatch": "minimatch",
|
||||||
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
@@ -48,7 +48,6 @@ export class AuthenticationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The method return true if the user is logged in
|
* The method return true if the user is logged in
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isLoggedIn(): boolean {
|
isLoggedIn(): boolean {
|
||||||
return !!this.alfrescoApi.getInstance().isLoggedIn();
|
return !!this.alfrescoApi.getInstance().isLoggedIn();
|
||||||
@@ -58,7 +57,6 @@ export class AuthenticationService {
|
|||||||
* Method to delegate to POST login
|
* Method to delegate to POST login
|
||||||
* @param username
|
* @param username
|
||||||
* @param password
|
* @param password
|
||||||
* @returns {Observable<R>|Observable<T>}
|
|
||||||
*/
|
*/
|
||||||
login(username: string, password: string, rememberMe: boolean = false): Observable<{ type: string, ticket: any }> {
|
login(username: string, password: string, rememberMe: boolean = false): Observable<{ type: string, ticket: any }> {
|
||||||
this.removeTicket();
|
this.removeTicket();
|
||||||
@@ -94,7 +92,6 @@ export class AuthenticationService {
|
|||||||
/**
|
/**
|
||||||
* The method retrieve whether the "remember me" cookie was set or not
|
* The method retrieve whether the "remember me" cookie was set or not
|
||||||
*
|
*
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isRememberMeSet(): boolean {
|
isRememberMeSet(): boolean {
|
||||||
return (this.cookie.getItem(REMEMBER_ME_COOKIE_KEY) === null) ? false : true;
|
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
|
* Initialize the alfresco Api with user and password end call the login method
|
||||||
* @param username
|
* @param username
|
||||||
* @param password
|
* @param password
|
||||||
* @returns {*|Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
private callApiLogin(username: string, password: string) {
|
private callApiLogin(username: string, password: string) {
|
||||||
return this.alfrescoApi.getInstance().login(username, password);
|
return this.alfrescoApi.getInstance().login(username, password);
|
||||||
@@ -113,7 +109,6 @@ export class AuthenticationService {
|
|||||||
/**
|
/**
|
||||||
* The method remove the ticket from the Storage
|
* The method remove the ticket from the Storage
|
||||||
*
|
*
|
||||||
* @returns {Observable<R>|Observable<T>}
|
|
||||||
*/
|
*/
|
||||||
logout() {
|
logout() {
|
||||||
return Observable.fromPromise(this.callApiLogout())
|
return Observable.fromPromise(this.callApiLogout())
|
||||||
@@ -127,7 +122,6 @@ export class AuthenticationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns {*|Observable<string>|Observable<any>|Promise<T>}
|
|
||||||
*/
|
*/
|
||||||
private callApiLogout(): Promise<any> {
|
private callApiLogout(): Promise<any> {
|
||||||
if (this.alfrescoApi.getInstance()) {
|
if (this.alfrescoApi.getInstance()) {
|
||||||
@@ -146,7 +140,6 @@ export class AuthenticationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The method return the ECM ticket stored in the Storage
|
* The method return the ECM ticket stored in the Storage
|
||||||
* @returns ticket
|
|
||||||
*/
|
*/
|
||||||
getTicketEcm(): string | null {
|
getTicketEcm(): string | null {
|
||||||
return this.storage.getItem('ticket-ECM');
|
return this.storage.getItem('ticket-ECM');
|
||||||
@@ -154,7 +147,6 @@ export class AuthenticationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The method return the BPM ticket stored in the Storage
|
* The method return the BPM ticket stored in the Storage
|
||||||
* @returns ticket
|
|
||||||
*/
|
*/
|
||||||
getTicketBpm(): string | null {
|
getTicketBpm(): string | null {
|
||||||
return this.storage.getItem('ticket-BPM');
|
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
|
* The method return true if user is logged in on ecm provider
|
||||||
*
|
*
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isEcmLoggedIn(): boolean {
|
isEcmLoggedIn(): boolean {
|
||||||
if (this.cookie.isEnabled() && !this.isRememberMeSet()) {
|
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
|
* The method return true if user is logged in on bpm provider
|
||||||
*
|
*
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isBpmLoggedIn(): boolean {
|
isBpmLoggedIn(): boolean {
|
||||||
if (this.cookie.isEnabled() && !this.isRememberMeSet()) {
|
if (this.cookie.isEnabled() && !this.isRememberMeSet()) {
|
||||||
@@ -231,7 +221,6 @@ export class AuthenticationService {
|
|||||||
/**
|
/**
|
||||||
* Get the ECM username
|
* Get the ECM username
|
||||||
*
|
*
|
||||||
* @returns {string} The username value
|
|
||||||
*
|
*
|
||||||
* @memberof AuthenticationService
|
* @memberof AuthenticationService
|
||||||
*/
|
*/
|
||||||
@@ -242,7 +231,6 @@ export class AuthenticationService {
|
|||||||
/**
|
/**
|
||||||
* Get the BPM username
|
* Get the BPM username
|
||||||
*
|
*
|
||||||
* @returns {string} The username value
|
|
||||||
*
|
*
|
||||||
* @memberof AuthenticationService
|
* @memberof AuthenticationService
|
||||||
*/
|
*/
|
||||||
@@ -269,7 +257,6 @@ export class AuthenticationService {
|
|||||||
/**
|
/**
|
||||||
* The method write the error in the console browser
|
* The method write the error in the console browser
|
||||||
* @param error
|
* @param error
|
||||||
* @returns {ErrorObservable}
|
|
||||||
*/
|
*/
|
||||||
handleError(error: any): Observable<any> {
|
handleError(error: any): Observable<any> {
|
||||||
this.logService.error('Error when logging in', error);
|
this.logService.error('Error when logging in', error);
|
||||||
|
@@ -80,8 +80,8 @@ export class ContentService {
|
|||||||
/**
|
/**
|
||||||
* Invokes content download for a Blob with a file name.
|
* Invokes content download for a Blob with a file name.
|
||||||
*
|
*
|
||||||
* @param {Blob} blob Content to download.
|
* @param blob Content to download.
|
||||||
* @param {string} fileName Name of the resulting file.
|
* @param fileName Name of the resulting file.
|
||||||
*
|
*
|
||||||
* @memberOf ContentService
|
* @memberOf ContentService
|
||||||
*/
|
*/
|
||||||
@@ -92,8 +92,8 @@ export class ContentService {
|
|||||||
/**
|
/**
|
||||||
* Invokes content download for a data array with a file name.
|
* Invokes content download for a data array with a file name.
|
||||||
*
|
*
|
||||||
* @param {*} data Data to download.
|
* @param data Data to download.
|
||||||
* @param {string} fileName Name of the resulting file.
|
* @param fileName Name of the resulting file.
|
||||||
*
|
*
|
||||||
* @memberOf ContentService
|
* @memberOf ContentService
|
||||||
*/
|
*/
|
||||||
@@ -104,20 +104,19 @@ export class ContentService {
|
|||||||
/**
|
/**
|
||||||
* Invokes content download for a JSON object with a file name.
|
* Invokes content download for a JSON object with a file name.
|
||||||
*
|
*
|
||||||
* @param {*} json JSON object to download.
|
* @param json JSON object to download.
|
||||||
* @param {any} fileName Name of the resulting file.
|
* @param fileName Name of the resulting file.
|
||||||
*
|
*
|
||||||
* @memberOf ContentService
|
* @memberOf ContentService
|
||||||
*/
|
*/
|
||||||
downloadJSON(json: any, fileName): void {
|
downloadJSON(json: any, fileName: string): void {
|
||||||
this.saveData(json, 'json', fileName);
|
this.saveData(json, 'json', fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a trusted object URL from the Blob.
|
* Creates a trusted object URL from the Blob.
|
||||||
* WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
|
* WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
|
||||||
* @param {Blob} blob Data to wrap into object URL
|
* @param blob Data to wrap into object URL
|
||||||
* @returns {string} Object URL content.
|
|
||||||
*
|
*
|
||||||
* @memberOf ContentService
|
* @memberOf ContentService
|
||||||
*/
|
*/
|
||||||
@@ -133,10 +132,9 @@ export class ContentService {
|
|||||||
/**
|
/**
|
||||||
* Get thumbnail URL for the given document node.
|
* Get thumbnail URL for the given document node.
|
||||||
*
|
*
|
||||||
* @param {string|MinimalNodeEntity} node Node to get URL for.
|
* @param node Node to get URL for.
|
||||||
* @param {boolean} [attachment] Retrieve content as an attachment for download
|
* @param [attachment] Retrieve content as an attachment for download
|
||||||
* @param {string} [ticket] Custom ticket to use for authentication
|
* @param [ticket] Custom ticket to use for authentication
|
||||||
* @returns {string} The URL address pointing to the content.
|
|
||||||
*/
|
*/
|
||||||
getDocumentThumbnailUrl(node: any, attachment?: boolean, ticket?: string): string {
|
getDocumentThumbnailUrl(node: any, attachment?: boolean, ticket?: string): string {
|
||||||
|
|
||||||
@@ -150,10 +148,9 @@ export class ContentService {
|
|||||||
/**
|
/**
|
||||||
* Get content URL for the given node.
|
* Get content URL for the given node.
|
||||||
*
|
*
|
||||||
* @param node {string|MinimalNodeEntity} nodeId or node to get URL for.
|
* @param nodeId or node to get URL for.
|
||||||
* @param {boolean} [attachment] Retrieve content as an attachment for download
|
* @param [attachment] Retrieve content as an attachment for download
|
||||||
* @param {string} [ticket] Custom ticket to use for authentication
|
* @param [ticket] Custom ticket to use for authentication
|
||||||
* @returns {string} The URL address pointing to the content.
|
|
||||||
*/
|
*/
|
||||||
getContentUrl(node: any, attachment?: boolean, ticket?: string): string {
|
getContentUrl(node: any, attachment?: boolean, ticket?: string): string {
|
||||||
|
|
||||||
@@ -168,7 +165,6 @@ export class ContentService {
|
|||||||
* Get content for the given node.
|
* Get content for the given node.
|
||||||
* @param nodeId ID of the target node
|
* @param nodeId ID of the target node
|
||||||
*
|
*
|
||||||
* @returns {Observable<any>} URL address.
|
|
||||||
*/
|
*/
|
||||||
getNodeContent(nodeId: string): Observable<any> {
|
getNodeContent(nodeId: string): Observable<any> {
|
||||||
return Observable.fromPromise(this.apiService.getInstance().core.nodesApi.getFileContent(nodeId).then((dataContent) => {
|
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 node Node to check allowableOperations
|
||||||
* @param permission Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
|
* @param permission Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
|
||||||
*
|
*
|
||||||
* @returns {boolean} has permission
|
|
||||||
*/
|
*/
|
||||||
hasPermission(node: any, permission: PermissionsEnum | string): boolean {
|
hasPermission(node: any, permission: PermissionsEnum | string): boolean {
|
||||||
let hasPermission = false;
|
let hasPermission = false;
|
||||||
@@ -225,7 +220,6 @@ export class ContentService {
|
|||||||
* Check if the node has the properties allowableOperations
|
* Check if the node has the properties allowableOperations
|
||||||
* @param node Node to check allowableOperations
|
* @param node Node to check allowableOperations
|
||||||
*
|
*
|
||||||
* @returns {boolean} has AllowableOperations
|
|
||||||
*/
|
*/
|
||||||
hasAllowableOperations(node: any): boolean {
|
hasAllowableOperations(node: any): boolean {
|
||||||
return node && node.allowableOperations ? true : false;
|
return node && node.allowableOperations ? true : false;
|
||||||
|
@@ -36,7 +36,6 @@ export class CookieService {
|
|||||||
/**
|
/**
|
||||||
* Retrieves a cookie by its key.
|
* Retrieves a cookie by its key.
|
||||||
* @param key Key to identify the cookie
|
* @param key Key to identify the cookie
|
||||||
* @returns {string | null}
|
|
||||||
*/
|
*/
|
||||||
getItem(key: string): string | null {
|
getItem(key: string): string | null {
|
||||||
const regexp = new RegExp('(?:' + key + '|;\s*' + key + ')=(.*?)(?:;|$)', 'g');
|
const regexp = new RegExp('(?:' + key + '|;\s*' + key + ')=(.*?)(?:;|$)', 'g');
|
||||||
@@ -51,7 +50,6 @@ export class CookieService {
|
|||||||
* @param expiration Expiration date of the data
|
* @param expiration Expiration date of the data
|
||||||
* @param path "Pathname" to store the cookie
|
* @param path "Pathname" to store the cookie
|
||||||
*
|
*
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
setItem(key: string, data: string, expiration: Date | null, path: string | null): void {
|
setItem(key: string, data: string, expiration: Date | null, path: string | null): void {
|
||||||
document.cookie = `${key}=${data}` +
|
document.cookie = `${key}=${data}` +
|
||||||
|
@@ -73,7 +73,6 @@ export class PeopleProcessService {
|
|||||||
/**
|
/**
|
||||||
* Throw the error
|
* Throw the error
|
||||||
* @param error
|
* @param error
|
||||||
* @returns {ErrorObservable}
|
|
||||||
*/
|
*/
|
||||||
private handleError(error: Response) {
|
private handleError(error: Response) {
|
||||||
this.logService.error(error);
|
this.logService.error(error);
|
||||||
|
@@ -29,8 +29,6 @@ import 'rxjs/add/operator/takeWhile';
|
|||||||
* @deprecated
|
* @deprecated
|
||||||
* RenditionsService
|
* RenditionsService
|
||||||
* (this service is deprecated in 2.2.0 and will be removed in future revisions)
|
* (this service is deprecated in 2.2.0 and will be removed in future revisions)
|
||||||
*
|
|
||||||
* @returns {RenditionsService} .
|
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class RenditionsService {
|
export class RenditionsService {
|
||||||
|
@@ -158,7 +158,6 @@ export class ThumbnailService {
|
|||||||
/**
|
/**
|
||||||
* Get thumbnail URL for the given document node.
|
* Get thumbnail URL for the given document node.
|
||||||
* @param document Node to get URL for.
|
* @param document Node to get URL for.
|
||||||
* @returns {string} URL address.
|
|
||||||
*/
|
*/
|
||||||
public getDocumentThumbnailUrl(node: any): string {
|
public getDocumentThumbnailUrl(node: any): string {
|
||||||
let thumbnail = this.contentService.getDocumentThumbnailUrl(node);
|
let thumbnail = this.contentService.getDocumentThumbnailUrl(node);
|
||||||
@@ -168,7 +167,6 @@ export class ThumbnailService {
|
|||||||
/**
|
/**
|
||||||
* Get mimeType SVG
|
* Get mimeType SVG
|
||||||
* @param mimeType
|
* @param mimeType
|
||||||
* @returns {string} URL SVG address.
|
|
||||||
*/
|
*/
|
||||||
public getMimeTypeIcon(mimeType: string): string {
|
public getMimeTypeIcon(mimeType: string): string {
|
||||||
let icon = this.mimeTypeIcons[mimeType];
|
let icon = this.mimeTypeIcons[mimeType];
|
||||||
@@ -177,7 +175,6 @@ export class ThumbnailService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get default SVG
|
* Get default SVG
|
||||||
* @returns {string} URL SVG default.
|
|
||||||
*/
|
*/
|
||||||
public getDefaultMimeTypeIcon(): string {
|
public getDefaultMimeTypeIcon(): string {
|
||||||
return this.DEFAULT_ICON;
|
return this.DEFAULT_ICON;
|
||||||
|
@@ -19,7 +19,12 @@ import { EventEmitter, Injectable } from '@angular/core';
|
|||||||
import * as minimatch_ from 'minimatch';
|
import * as minimatch_ from 'minimatch';
|
||||||
import { Subject } from 'rxjs/Subject';
|
import { Subject } from 'rxjs/Subject';
|
||||||
import { AppConfigService } from '../app-config/app-config.service';
|
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 { FileModel, FileUploadProgress, FileUploadStatus } from '../models/file.model';
|
||||||
import { AlfrescoApiService } from './alfresco-api.service';
|
import { AlfrescoApiService } from './alfresco-api.service';
|
||||||
|
|
||||||
@@ -53,9 +58,6 @@ export class UploadService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the service is uploading a file.
|
* Checks whether the service is uploading a file.
|
||||||
*
|
|
||||||
* @returns {boolean}
|
|
||||||
*
|
|
||||||
* @memberof UploadService
|
* @memberof UploadService
|
||||||
*/
|
*/
|
||||||
isUploading(): boolean {
|
isUploading(): boolean {
|
||||||
@@ -64,8 +66,6 @@ export class UploadService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the file Queue
|
* Returns the file Queue
|
||||||
*
|
|
||||||
* @return {FileModel[]} - files in the upload queue.
|
|
||||||
*/
|
*/
|
||||||
getQueue(): FileModel[] {
|
getQueue(): FileModel[] {
|
||||||
return this.queue;
|
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.
|
* 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
|
* @memberof UploadService
|
||||||
*/
|
*/
|
||||||
|
@@ -27,7 +27,6 @@ import 'rxjs/add/observable/throw';
|
|||||||
*
|
*
|
||||||
* BPMUserService retrieve all the information of an Ecm user.
|
* BPMUserService retrieve all the information of an Ecm user.
|
||||||
*
|
*
|
||||||
* @returns {BPMUserService} .
|
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BpmUserService {
|
export class BpmUserService {
|
||||||
@@ -53,7 +52,6 @@ export class BpmUserService {
|
|||||||
/**
|
/**
|
||||||
* Throw the error
|
* Throw the error
|
||||||
* @param error
|
* @param error
|
||||||
* @returns {ErrorObservable}
|
|
||||||
*/
|
*/
|
||||||
private handleError(error: Response) {
|
private handleError(error: Response) {
|
||||||
// in a real world app, we may send the error to some remote logging infrastructure
|
// in a real world app, we may send the error to some remote logging infrastructure
|
||||||
|
@@ -63,7 +63,6 @@ export class EcmUserService {
|
|||||||
/**
|
/**
|
||||||
* Throw the error
|
* Throw the error
|
||||||
* @param error
|
* @param error
|
||||||
* @returns {ErrorObservable}
|
|
||||||
*/
|
*/
|
||||||
private handleError(error: Response) {
|
private handleError(error: Response) {
|
||||||
// in a real world app, we may send the error to some remote logging infrastructure
|
// in a real world app, we may send the error to some remote logging infrastructure
|
||||||
|
@@ -21,7 +21,6 @@ export class ObjectUtils {
|
|||||||
* ObjectUtils.getValue({ item: { nodeType: 'cm:folder' }}, 'item.nodeType') ==> 'cm:folder'
|
* ObjectUtils.getValue({ item: { nodeType: 'cm:folder' }}, 'item.nodeType') ==> 'cm:folder'
|
||||||
* @param target
|
* @param target
|
||||||
* @param key
|
* @param key
|
||||||
* @returns {string}
|
|
||||||
*/
|
*/
|
||||||
static getValue(target: any, key: string): any {
|
static getValue(target: any, key: string): any {
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ declare let PDFJS: any;
|
|||||||
'./pdfViewer.component.scss',
|
'./pdfViewer.component.scss',
|
||||||
'./pdfViewerHost.component.scss'
|
'./pdfViewerHost.component.scss'
|
||||||
],
|
],
|
||||||
providers: [ RenderingQueueServices ],
|
providers: [RenderingQueueServices],
|
||||||
host: { 'class': 'adf-pdf-viewer' },
|
host: { 'class': 'adf-pdf-viewer' },
|
||||||
encapsulation: ViewEncapsulation.None
|
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)
|
* return the PDFJS global object (exist to facilitate the mock of PDFJS in the test)
|
||||||
*
|
|
||||||
* @returns {PDFJS}
|
|
||||||
*/
|
*/
|
||||||
getPDFJS() {
|
getPDFJS() {
|
||||||
return PDFJS;
|
return PDFJS;
|
||||||
@@ -151,7 +149,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
if(this.documentContainer) {
|
if (this.documentContainer) {
|
||||||
this.documentContainer.removeEventListener('pagechange', this.onPageChange, true);
|
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
|
* Method to scale the page current support implementation
|
||||||
*
|
*
|
||||||
* @param {string} scaleMode - new scale mode
|
* @param scaleMode - new scale mode
|
||||||
*/
|
*/
|
||||||
scalePage(scaleMode) {
|
scalePage(scaleMode) {
|
||||||
this.currentScaleMode = scaleMode;
|
this.currentScaleMode = scaleMode;
|
||||||
@@ -223,7 +221,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* Update all the pages with the newScale scale
|
* Update all the pages with the newScale scale
|
||||||
*
|
*
|
||||||
* @param {number} newScale - new scale page
|
* @param newScale - new scale page
|
||||||
*/
|
*/
|
||||||
setScaleUpdatePages(newScale: number) {
|
setScaleUpdatePages(newScale: number) {
|
||||||
if (!this.isSameScale(this.currentScale, newScale)) {
|
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
|
* Check if the request scale of the page is the same for avoid useless re-rendering
|
||||||
*
|
*
|
||||||
* @param {number} oldScale - old scale page
|
* @param oldScale - old scale page
|
||||||
* @param {number} newScale - new scale page
|
* @param newScale - new scale page
|
||||||
*
|
*
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isSameScale(oldScale: number, newScale: number) {
|
isSameScale(oldScale: number, newScale: number): boolean {
|
||||||
return (newScale === oldScale);
|
return (newScale === oldScale);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if is a land scape view
|
* Check if is a land scape view
|
||||||
*
|
*
|
||||||
* @param {number} width
|
* @param width
|
||||||
* @param {number} height
|
* @param height
|
||||||
*
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isLandscape(width: number, height: number) {
|
isLandscape(width: number, height: number): boolean {
|
||||||
return (width > height);
|
return (width > height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,7 +277,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* zoom in page pdf
|
* zoom in page pdf
|
||||||
*
|
*
|
||||||
* @param {number} ticks
|
* @param ticks
|
||||||
*/
|
*/
|
||||||
zoomIn(ticks: number) {
|
zoomIn(ticks: number) {
|
||||||
let newScale: any = this.currentScale;
|
let newScale: any = this.currentScale;
|
||||||
@@ -298,7 +293,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* zoom out page pdf
|
* zoom out page pdf
|
||||||
*
|
*
|
||||||
* @param {number} ticks
|
* @param ticks
|
||||||
*/
|
*/
|
||||||
zoomOut(ticks: number) {
|
zoomOut(ticks: number) {
|
||||||
let newScale: any = this.currentScale;
|
let newScale: any = this.currentScale;
|
||||||
@@ -338,7 +333,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* load the page in input
|
* load the page in input
|
||||||
*
|
*
|
||||||
* @param {string} page - page to load
|
* @param page to load
|
||||||
*/
|
*/
|
||||||
inputPage(page: string) {
|
inputPage(page: string) {
|
||||||
let pageInput = parseInt(page, 10);
|
let pageInput = parseInt(page, 10);
|
||||||
@@ -355,7 +350,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
|||||||
/**
|
/**
|
||||||
* Page Change Event
|
* Page Change Event
|
||||||
*
|
*
|
||||||
* @param {Event} event
|
* @param event
|
||||||
*/
|
*/
|
||||||
onPageChange(event) {
|
onPageChange(event) {
|
||||||
this.page = event.pageNumber;
|
this.page = event.pageNumber;
|
||||||
@@ -364,7 +359,7 @@ export class PdfViewerComponent implements OnChanges, OnDestroy {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Litener Keyboard Event
|
* Litener Keyboard Event
|
||||||
* @param {KeyboardEvent} event
|
* @param KeyboardEvent event
|
||||||
*/
|
*/
|
||||||
@HostListener('document:keydown', ['$event'])
|
@HostListener('document:keydown', ['$event'])
|
||||||
handleKeyboardEvent(event: KeyboardEvent) {
|
handleKeyboardEvent(event: KeyboardEvent) {
|
||||||
|
@@ -436,8 +436,7 @@ export class ViewerComponent implements OnChanges {
|
|||||||
/**
|
/**
|
||||||
* get File name from url
|
* get File name from url
|
||||||
*
|
*
|
||||||
* @param {string} url - url file
|
* @param url - url file
|
||||||
* @returns {string} name file
|
|
||||||
*/
|
*/
|
||||||
getFilenameFromUrl(url: string): string {
|
getFilenameFromUrl(url: string): string {
|
||||||
let anchor = url.indexOf('#');
|
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
|
||||||
* http://localhost/test.jpg#cache=1000
|
* http://localhost/test.jpg#cache=1000
|
||||||
*
|
*
|
||||||
* @param {string} fileName - file name
|
* @param fileName - file name
|
||||||
* @returns {string} file name extension
|
|
||||||
*/
|
*/
|
||||||
getFileExtension(fileName: string): string {
|
getFileExtension(fileName: string): string {
|
||||||
if (fileName) {
|
if (fileName) {
|
||||||
@@ -478,7 +476,7 @@ export class ViewerComponent implements OnChanges {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Keyboard event listener
|
* Keyboard event listener
|
||||||
* @param {KeyboardEvent} event
|
* @param event
|
||||||
*/
|
*/
|
||||||
@HostListener('document:keyup', ['$event'])
|
@HostListener('document:keyup', ['$event'])
|
||||||
handleKeyboardEvent(event: KeyboardEvent) {
|
handleKeyboardEvent(event: KeyboardEvent) {
|
||||||
|
@@ -41,7 +41,7 @@ export class ViewerExtensionDirective implements AfterContentInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngAfterContentInit() {
|
ngAfterContentInit() {
|
||||||
this.templateModel = {template: this.template, isVisible: false};
|
this.templateModel = { template: this.template, isVisible: false };
|
||||||
|
|
||||||
this.viewerComponent.extensionTemplates.push(this.templateModel);
|
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
|
* 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;
|
let supportedExtension: string;
|
||||||
|
|
||||||
if (this.supportedExtensions && (this.supportedExtensions instanceof Array)) {
|
if (this.supportedExtensions && (this.supportedExtensions instanceof Array)) {
|
||||||
|
@@ -19,7 +19,6 @@ import { Injectable } from '@angular/core';
|
|||||||
*
|
*
|
||||||
* RenderingQueueServices rendering of the views for pages and thumbnails.
|
* RenderingQueueServices rendering of the views for pages and thumbnails.
|
||||||
*
|
*
|
||||||
* @returns {RenderingQueueServices} .
|
|
||||||
*/
|
*/
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class RenderingQueueServices {
|
export class RenderingQueueServices {
|
||||||
@@ -43,24 +42,23 @@ export class RenderingQueueServices {
|
|||||||
isThumbnailViewEnabled: any = false;
|
isThumbnailViewEnabled: any = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {PDFViewer} pdfViewer
|
* @param pdfViewer
|
||||||
*/
|
*/
|
||||||
setViewer(pdfViewer) {
|
setViewer(pdfViewer) {
|
||||||
this.pdfViewer = pdfViewer;
|
this.pdfViewer = pdfViewer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {PDFThumbnailViewer} pdfThumbnailViewer
|
* @param pdfThumbnailViewer
|
||||||
*/
|
*/
|
||||||
setThumbnailViewer(pdfThumbnailViewer) {
|
setThumbnailViewer(pdfThumbnailViewer) {
|
||||||
this.pdfThumbnailViewer = pdfThumbnailViewer;
|
this.pdfThumbnailViewer = pdfThumbnailViewer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {IRenderableView} view
|
* @param view
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isHighestPriority(view: any) {
|
isHighestPriority(view: any): boolean {
|
||||||
return this.highestPriorityPage === view.renderingId;
|
return this.highestPriorityPage === view.renderingId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,10 +127,9 @@ export class RenderingQueueServices {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {IRenderableView} view
|
* @param view
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isViewFinished(view) {
|
isViewFinished(view): boolean {
|
||||||
return view.renderingState === this.renderingStates.FINISHED;
|
return view.renderingState === this.renderingStates.FINISHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +137,7 @@ export class RenderingQueueServices {
|
|||||||
* Render a page or thumbnail view. This calls the appropriate function
|
* 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
|
* based on the views state. If the view is already rendered it will return
|
||||||
* false.
|
* false.
|
||||||
* @param {IRenderableView} view
|
* @param view
|
||||||
*/
|
*/
|
||||||
renderView(view: any) {
|
renderView(view: any) {
|
||||||
let state = view.renderingState;
|
let state = view.renderingState;
|
||||||
|
@@ -128,7 +128,6 @@ export class AnalyticsReportListComponent implements OnInit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the report list is empty
|
* Check if the report list is empty
|
||||||
* @returns {boolean|ReportParametersModel[]}
|
|
||||||
*/
|
*/
|
||||||
isReportsEmpty(): boolean {
|
isReportsEmpty(): boolean {
|
||||||
return this.reports === undefined || (this.reports && this.reports.length === 0);
|
return this.reports === undefined || (this.reports && this.reports.length === 0);
|
||||||
|
@@ -40,7 +40,6 @@ export class AnalyticsService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrive all the Deployed app
|
* Retrive all the Deployed app
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getReportList(appId: number): Observable<any> {
|
getReportList(appId: number): Observable<any> {
|
||||||
return Observable.fromPromise(this.apiService.getInstance().activiti.reportApi.getReportList())
|
return Observable.fromPromise(this.apiService.getInstance().activiti.reportApi.getReportList())
|
||||||
@@ -59,7 +58,6 @@ export class AnalyticsService {
|
|||||||
/**
|
/**
|
||||||
* Retrive Report by name
|
* Retrive Report by name
|
||||||
* @param reportName - string - The name of report
|
* @param reportName - string - The name of report
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getReportByName(reportName: string): Observable<any> {
|
getReportByName(reportName: string): Observable<any> {
|
||||||
return Observable.fromPromise(this.apiService.getInstance().activiti.reportApi.getReportList())
|
return Observable.fromPromise(this.apiService.getInstance().activiti.reportApi.getReportList())
|
||||||
|
@@ -2,11 +2,13 @@
|
|||||||
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
||||||
"workingDirectory" : "./ng_work",
|
"workingDirectory" : "./ng_work",
|
||||||
"src": "../insights/",
|
"src": "../insights/",
|
||||||
"dest": "../insights/dist/",
|
"dest": "../dist/insights/",
|
||||||
"lib": {
|
"lib": {
|
||||||
|
"licensePath": "../config/assets/license_header_add.txt",
|
||||||
|
"comments" : "none",
|
||||||
"entryFile": "./public-api.ts",
|
"entryFile": "./public-api.ts",
|
||||||
"flatModuleFile": "adf-insights",
|
"flatModuleFile": "adf-insights",
|
||||||
"externals": {
|
"umdModuleIds": {
|
||||||
"alfresco-js-api": "alfresco-js-api",
|
"alfresco-js-api": "alfresco-js-api",
|
||||||
"minimatch": "minimatch",
|
"minimatch": "minimatch",
|
||||||
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
@@ -26,12 +26,12 @@
|
|||||||
"copy-app-schema": "cp core/app-config/schema.json core/dist/app.config.schema.json",
|
"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",
|
"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",
|
"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-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 ./content-services/dist/* ./node_modules/@alfresco/adf-content-services/",
|
"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 ./ng-package/ng-package-core.json",
|
"build-core": "ng-packagr -p ./core/package.json",
|
||||||
"build-content": "ng-packagr -p ./ng-package/ng-package-content.json",
|
"build-content": "ng-packagr -p ./content-services/package.json",
|
||||||
"build-process": "ng-packagr -p ./ng-package/ng-package-process.json",
|
"build-process": "ng-packagr -p ./process-services/package.json",
|
||||||
"build-insights": "ng-packagr -p ./ng-package/ng-package-insights.json",
|
"build-insights": "ng-packagr -p ./insights/package.json",
|
||||||
"test-export": "node config/test-export.js",
|
"test-export": "node config/test-export.js",
|
||||||
"webpack": "node node_modules/webpack/bin/webpack.js"
|
"webpack": "node node_modules/webpack/bin/webpack.js"
|
||||||
},
|
},
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
"minimatch": "3.0.4",
|
"minimatch": "3.0.4",
|
||||||
"moment": "2.18.1",
|
"moment": "2.18.1",
|
||||||
"moment-es6": "^1.0.0",
|
"moment-es6": "^1.0.0",
|
||||||
"ng-packagr": "2.0.0-rc.4",
|
"ng-packagr": "2.0.0",
|
||||||
"ng2-charts": "1.6.0",
|
"ng2-charts": "1.6.0",
|
||||||
"pdfjs-dist": "2.0.265",
|
"pdfjs-dist": "2.0.265",
|
||||||
"raphael": "2.2.7",
|
"raphael": "2.2.7",
|
||||||
@@ -143,6 +143,7 @@
|
|||||||
"traceur": "0.0.91",
|
"traceur": "0.0.91",
|
||||||
"ts-loader": "3.3.0",
|
"ts-loader": "3.3.0",
|
||||||
"ts-node": "2.0.0",
|
"ts-node": "2.0.0",
|
||||||
|
"tsickle": "^0.26.0",
|
||||||
"tslint": "5.9.1",
|
"tslint": "5.9.1",
|
||||||
"tslint-loader": "3.5.3",
|
"tslint-loader": "3.5.3",
|
||||||
"typescript": "2.6.1",
|
"typescript": "2.6.1",
|
||||||
|
@@ -124,7 +124,6 @@ export class AppsListComponent implements OnInit {
|
|||||||
/**
|
/**
|
||||||
* Return true if the appId is the current app
|
* Return true if the appId is the current app
|
||||||
* @param appId
|
* @param appId
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isSelected(appId: number): boolean {
|
isSelected(appId: number): boolean {
|
||||||
return (this.currentApp !== undefined && appId === this.currentApp.id);
|
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
|
* Check if the value of the layoutType property is an allowed value
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isValidType(): boolean {
|
isValidType(): boolean {
|
||||||
if (this.layoutType && (this.layoutType === AppsListComponent.LAYOUT_LIST || this.layoutType === AppsListComponent.LAYOUT_GRID)) {
|
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
|
* Return true if the layout type is LIST
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isList(): boolean {
|
isList(): boolean {
|
||||||
return this.layoutType === AppsListComponent.LAYOUT_LIST;
|
return this.layoutType === AppsListComponent.LAYOUT_LIST;
|
||||||
@@ -179,7 +176,6 @@ export class AppsListComponent implements OnInit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the layout type is GRID
|
* Return true if the layout type is GRID
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isGrid(): boolean {
|
isGrid(): boolean {
|
||||||
return this.layoutType === AppsListComponent.LAYOUT_GRID;
|
return this.layoutType === AppsListComponent.LAYOUT_GRID;
|
||||||
|
@@ -2,10 +2,12 @@
|
|||||||
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
|
||||||
"workingDirectory": "./ng_work",
|
"workingDirectory": "./ng_work",
|
||||||
"src": "../process-services/",
|
"src": "../process-services/",
|
||||||
"dest": "../process-services/dist/",
|
"dest": "../dist/process-services/",
|
||||||
"lib": {
|
"lib": {
|
||||||
|
"licensePath": "../config/assets/license_header_add.txt",
|
||||||
|
"comments" : "none",
|
||||||
"entryFile": "./public-api.ts",
|
"entryFile": "./public-api.ts",
|
||||||
"externals": {
|
"umdModuleIds": {
|
||||||
"alfresco-js-api": "alfresco-js-api",
|
"alfresco-js-api": "alfresco-js-api",
|
||||||
"flatModuleFile": "adf-process-services",
|
"flatModuleFile": "adf-process-services",
|
||||||
"minimatch": "minimatch",
|
"minimatch": "minimatch",
|
@@ -186,7 +186,6 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the current task
|
* Return the current task
|
||||||
* @returns {ProcessInstanceFilterRepresentation}
|
|
||||||
*/
|
*/
|
||||||
getCurrentFilter(): ProcessInstanceFilterRepresentation {
|
getCurrentFilter(): ProcessInstanceFilterRepresentation {
|
||||||
return this.currentFilter;
|
return this.currentFilter;
|
||||||
@@ -194,7 +193,6 @@ export class ProcessFiltersComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the filter list is empty
|
* Check if the filter list is empty
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isFilterListEmpty(): boolean {
|
isFilterListEmpty(): boolean {
|
||||||
return this.filters === undefined || (this.filters && this.filters.length === 0);
|
return this.filters === undefined || (this.filters && this.filters.length === 0);
|
||||||
|
@@ -15,10 +15,34 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DataColumn, DataRowEvent, DataSorting, DataTableAdapter, ObjectDataColumn, ObjectDataRow, ObjectDataTableAdapter } from '@alfresco/adf-core';
|
import {
|
||||||
import { AppConfigService, DataColumnListComponent, PaginatedComponent, PaginationComponent, PaginationQueryParams, UserPreferencesService } from '@alfresco/adf-core';
|
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 { 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 { ProcessFilterParamRepresentationModel } from '../models/filter-process.model';
|
||||||
import { processPresetsDefaultModel } from '../models/process-preset.model';
|
import { processPresetsDefaultModel } from '../models/process-preset.model';
|
||||||
import { ProcessService } from '../services/process.service';
|
import { ProcessService } from '../services/process.service';
|
||||||
@@ -200,7 +224,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
|||||||
/**
|
/**
|
||||||
* Create an array of ObjectDataRow
|
* Create an array of ObjectDataRow
|
||||||
* @param instances
|
* @param instances
|
||||||
* @returns {ObjectDataRow[]}
|
|
||||||
*/
|
*/
|
||||||
private createDataRow(instances: any[]): ObjectDataRow[] {
|
private createDataRow(instances: any[]): ObjectDataRow[] {
|
||||||
let instancesRows: ObjectDataRow[] = [];
|
let instancesRows: ObjectDataRow[] = [];
|
||||||
@@ -255,7 +278,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the current id
|
* Return the current id
|
||||||
* @returns {string}
|
|
||||||
*/
|
*/
|
||||||
getCurrentId(): string {
|
getCurrentId(): string {
|
||||||
return this.currentInstanceId;
|
return this.currentInstanceId;
|
||||||
@@ -263,7 +285,6 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the list is empty
|
* Check if the list is empty
|
||||||
* @returns {ObjectDataTableAdapter|boolean}
|
|
||||||
*/
|
*/
|
||||||
isListEmpty(): boolean {
|
isListEmpty(): boolean {
|
||||||
return this.data === undefined ||
|
return this.data === undefined ||
|
||||||
@@ -295,9 +316,8 @@ export class ProcessInstanceListComponent implements OnChanges, AfterContentInit
|
|||||||
/**
|
/**
|
||||||
* Optimize name field
|
* Optimize name field
|
||||||
* @param instances
|
* @param instances
|
||||||
* @returns {any[]}
|
|
||||||
*/
|
*/
|
||||||
private optimizeNames(instances: any[]) {
|
private optimizeNames(instances: any[]): any[] {
|
||||||
instances = instances.map(t => {
|
instances = instances.map(t => {
|
||||||
t.obj.name = this.getProcessNameOrDescription(t.obj, 'medium');
|
t.obj.name = this.getProcessNameOrDescription(t.obj, 'medium');
|
||||||
return t;
|
return t;
|
||||||
|
@@ -44,11 +44,7 @@ export class FilterProcessRepresentationModel implements UserProcessInstanceFilt
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This object represent the parameters of a process filter.
|
* This object represent the parameters of a process filter.
|
||||||
*
|
|
||||||
*
|
|
||||||
* @returns {ProcessFilterParamRepresentationModel} .
|
|
||||||
*/
|
*/
|
||||||
export class ProcessFilterParamRepresentationModel implements ProcessFilterRequestRepresentation {
|
export class ProcessFilterParamRepresentationModel implements ProcessFilterRequestRepresentation {
|
||||||
|
|
||||||
|
@@ -44,7 +44,6 @@ export class ProcessFilterService {
|
|||||||
* Retrieve the process filter by id
|
* Retrieve the process filter by id
|
||||||
* @param filterId - number - The id of the filter
|
* @param filterId - number - The id of the filter
|
||||||
* @param appId - string - optional - The id of app
|
* @param appId - string - optional - The id of app
|
||||||
* @returns {Observable<FilterProcessRepresentationModel>}
|
|
||||||
*/
|
*/
|
||||||
getProcessFilterById(filterId: number, appId?: number): Observable<FilterProcessRepresentationModel> {
|
getProcessFilterById(filterId: number, appId?: number): Observable<FilterProcessRepresentationModel> {
|
||||||
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
||||||
@@ -57,7 +56,6 @@ export class ProcessFilterService {
|
|||||||
* Retrieve the process filter by name
|
* Retrieve the process filter by name
|
||||||
* @param filterName - string - The name of the filter
|
* @param filterName - string - The name of the filter
|
||||||
* @param appId - string - optional - The id of app
|
* @param appId - string - optional - The id of app
|
||||||
* @returns {Observable<FilterProcessRepresentationModel>}
|
|
||||||
*/
|
*/
|
||||||
getProcessFilterByName(filterName: string, appId?: number): Observable<FilterProcessRepresentationModel> {
|
getProcessFilterByName(filterName: string, appId?: number): Observable<FilterProcessRepresentationModel> {
|
||||||
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
return Observable.fromPromise(this.callApiProcessFilters(appId))
|
||||||
@@ -69,7 +67,6 @@ export class ProcessFilterService {
|
|||||||
/**
|
/**
|
||||||
* Create and return the default filters
|
* Create and return the default filters
|
||||||
* @param appId
|
* @param appId
|
||||||
* @returns {FilterProcessRepresentationModel[]}
|
|
||||||
*/
|
*/
|
||||||
public createDefaultFilters(appId: number): Observable<FilterProcessRepresentationModel[]> {
|
public createDefaultFilters(appId: number): Observable<FilterProcessRepresentationModel[]> {
|
||||||
let runningFilter = this.getRunningFilterInstance(appId);
|
let runningFilter = this.getRunningFilterInstance(appId);
|
||||||
@@ -123,7 +120,6 @@ export class ProcessFilterService {
|
|||||||
/**
|
/**
|
||||||
* Return a static Completed filter instance
|
* Return a static Completed filter instance
|
||||||
* @param appId
|
* @param appId
|
||||||
* @returns {FilterProcessRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
private getCompletedFilterInstance(appId: number): FilterProcessRepresentationModel {
|
private getCompletedFilterInstance(appId: number): FilterProcessRepresentationModel {
|
||||||
return new FilterProcessRepresentationModel({
|
return new FilterProcessRepresentationModel({
|
||||||
@@ -138,7 +134,6 @@ export class ProcessFilterService {
|
|||||||
/**
|
/**
|
||||||
* Return a static All filter instance
|
* Return a static All filter instance
|
||||||
* @param appId
|
* @param appId
|
||||||
* @returns {FilterProcessRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
private getAllFilterInstance(appId: number): FilterProcessRepresentationModel {
|
private getAllFilterInstance(appId: number): FilterProcessRepresentationModel {
|
||||||
return new FilterProcessRepresentationModel({
|
return new FilterProcessRepresentationModel({
|
||||||
@@ -153,7 +148,6 @@ export class ProcessFilterService {
|
|||||||
/**
|
/**
|
||||||
* Add a filter
|
* Add a filter
|
||||||
* @param filter - FilterProcessRepresentationModel
|
* @param filter - FilterProcessRepresentationModel
|
||||||
* @returns {FilterProcessRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
addProcessFilter(filter: FilterProcessRepresentationModel): Observable<FilterProcessRepresentationModel> {
|
addProcessFilter(filter: FilterProcessRepresentationModel): Observable<FilterProcessRepresentationModel> {
|
||||||
return Observable.fromPromise(this.alfrescoApiService.getInstance().activiti.userFiltersApi.createUserProcessInstanceFilter(filter))
|
return Observable.fromPromise(this.alfrescoApiService.getInstance().activiti.userFiltersApi.createUserProcessInstanceFilter(filter))
|
||||||
|
@@ -16,8 +16,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { PeopleProcessService, UserProcessModel } from '@alfresco/adf-core';
|
import { PeopleProcessService, UserProcessModel } from '@alfresco/adf-core';
|
||||||
import { AuthenticationService, CardViewUpdateService, ClickNotification, LogService, UpdateNotification, FormRenderingService } from '@alfresco/adf-core';
|
import {
|
||||||
import { Component,
|
AuthenticationService,
|
||||||
|
CardViewUpdateService,
|
||||||
|
ClickNotification,
|
||||||
|
LogService,
|
||||||
|
UpdateNotification,
|
||||||
|
FormRenderingService
|
||||||
|
} from '@alfresco/adf-core';
|
||||||
|
import {
|
||||||
|
Component,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
@@ -209,9 +217,8 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the task has a form
|
* Check if the task has a form
|
||||||
* @returns {TaskDetailsModel|string|boolean}
|
|
||||||
*/
|
*/
|
||||||
hasFormKey() {
|
hasFormKey(): TaskDetailsModel | string | boolean {
|
||||||
return (this.taskDetails
|
return (this.taskDetails
|
||||||
&& this.taskDetails.formKey
|
&& this.taskDetails.formKey
|
||||||
&& this.taskDetails.formKey !== 'null');
|
&& this.taskDetails.formKey !== 'null');
|
||||||
@@ -339,7 +346,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onFormError(error: any): void {
|
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);
|
this.error.emit(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -216,7 +216,6 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the current task
|
* Return the current task
|
||||||
* @returns {FilterRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
getCurrentFilter(): FilterRepresentationModel {
|
getCurrentFilter(): FilterRepresentationModel {
|
||||||
return this.currentFilter;
|
return this.currentFilter;
|
||||||
@@ -224,7 +223,6 @@ export class TaskFiltersComponent implements OnInit, OnChanges {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the filter list is empty
|
* Check if the filter list is empty
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isFilterListEmpty(): boolean {
|
isFilterListEmpty(): boolean {
|
||||||
return this.filters === undefined || (this.filters && this.filters.length === 0);
|
return this.filters === undefined || (this.filters && this.filters.length === 0);
|
||||||
|
@@ -15,9 +15,26 @@
|
|||||||
* limitations under the License.
|
* 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 { 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 { Observable } from 'rxjs/Observable';
|
||||||
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||||
import { TaskListModel } from '../models/task-list.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.
|
* 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).
|
* This allows generating and displaying custom data sets (i.e. filtered out content).
|
||||||
*
|
*
|
||||||
* @type {boolean}
|
|
||||||
* @memberOf TaskListComponent
|
* @memberOf TaskListComponent
|
||||||
*/
|
*/
|
||||||
hasCustomDataSource: boolean = false;
|
hasCustomDataSource: boolean = false;
|
||||||
@@ -225,7 +241,6 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
|||||||
/**
|
/**
|
||||||
* Create an array of ObjectDataRow
|
* Create an array of ObjectDataRow
|
||||||
* @param instances
|
* @param instances
|
||||||
* @returns {ObjectDataRow[]}
|
|
||||||
*/
|
*/
|
||||||
private createDataRow(instances: any[]): ObjectDataRow[] {
|
private createDataRow(instances: any[]): ObjectDataRow[] {
|
||||||
let instancesRows: ObjectDataRow[] = [];
|
let instancesRows: ObjectDataRow[] = [];
|
||||||
@@ -280,7 +295,6 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the current id
|
* Return the current id
|
||||||
* @returns {string}
|
|
||||||
*/
|
*/
|
||||||
getCurrentId(): string {
|
getCurrentId(): string {
|
||||||
return this.currentInstanceId;
|
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
|
* Check if the taskId is the same of the selected task
|
||||||
* @param taskId
|
* @param taskId
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
isEqualToCurrentId(taskId: string) {
|
isEqualToCurrentId(taskId: string): boolean {
|
||||||
return this.currentInstanceId === taskId ? true : false;
|
return this.currentInstanceId === taskId ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the list is empty
|
* Check if the list is empty
|
||||||
* @returns {ObjectDataTableAdapter|boolean}
|
|
||||||
*/
|
*/
|
||||||
isListEmpty(): boolean {
|
isListEmpty(): boolean {
|
||||||
return this.data === undefined ||
|
return this.data === undefined ||
|
||||||
@@ -330,9 +342,8 @@ export class TaskListComponent implements OnChanges, OnInit, AfterContentInit {
|
|||||||
/**
|
/**
|
||||||
* Optimize name field
|
* Optimize name field
|
||||||
* @param istances
|
* @param istances
|
||||||
* @returns {any[]}
|
|
||||||
*/
|
*/
|
||||||
private optimizeNames(istances: any[]) {
|
private optimizeNames(istances: any[]): any[] {
|
||||||
istances = istances.map(t => {
|
istances = istances.map(t => {
|
||||||
t.obj.name = t.obj.name || 'No name';
|
t.obj.name = t.obj.name || 'No name';
|
||||||
return t;
|
return t;
|
||||||
|
@@ -16,11 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This object represent of the Form.
|
* This object represent of the Form.
|
||||||
*
|
|
||||||
*
|
|
||||||
* @returns {Form} .
|
|
||||||
*/
|
*/
|
||||||
export class Form {
|
export class Form {
|
||||||
|
|
||||||
|
@@ -16,11 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This object represent of the StartTaskModel.
|
* This object represent of the StartTaskModel.
|
||||||
*
|
|
||||||
*
|
|
||||||
* @returns {StartTaskModel} .
|
|
||||||
*/
|
*/
|
||||||
import { UserProcessModel } from '@alfresco/adf-core';
|
import { UserProcessModel } from '@alfresco/adf-core';
|
||||||
|
|
||||||
|
@@ -16,11 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This object represent the details of a task.
|
* This object represent the details of a task.
|
||||||
*
|
|
||||||
*
|
|
||||||
* @returns {TaskDetailsModel} .
|
|
||||||
*/
|
*/
|
||||||
import { UserProcessModel } from '@alfresco/adf-core';
|
import { UserProcessModel } from '@alfresco/adf-core';
|
||||||
import { TaskRepresentation } from 'alfresco-js-api';
|
import { TaskRepresentation } from 'alfresco-js-api';
|
||||||
|
@@ -16,11 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This object represent the User Event.
|
* This object represent the User Event.
|
||||||
*
|
|
||||||
*
|
|
||||||
* @returns {UserEventModel} .
|
|
||||||
*/
|
*/
|
||||||
export class UserEventModel {
|
export class UserEventModel {
|
||||||
type: string = '';
|
type: string = '';
|
||||||
|
@@ -37,7 +37,6 @@ export class TaskFilterService {
|
|||||||
/**
|
/**
|
||||||
* Create and return the default filters
|
* Create and return the default filters
|
||||||
* @param appId
|
* @param appId
|
||||||
* @returns {FilterRepresentationModel[]}
|
|
||||||
*/
|
*/
|
||||||
public createDefaultFilters(appId: number): Observable<FilterRepresentationModel[]> {
|
public createDefaultFilters(appId: number): Observable<FilterRepresentationModel[]> {
|
||||||
let involvedTasksFilter = this.getInvolvedTasksFilterInstance(appId);
|
let involvedTasksFilter = this.getInvolvedTasksFilterInstance(appId);
|
||||||
@@ -87,7 +86,6 @@ export class TaskFilterService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve all the Tasks filters
|
* Retrieve all the Tasks filters
|
||||||
* @returns {Observable<any>}
|
|
||||||
*/
|
*/
|
||||||
getTaskListFilters(appId?: number): Observable<any> {
|
getTaskListFilters(appId?: number): Observable<any> {
|
||||||
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
||||||
@@ -105,7 +103,6 @@ export class TaskFilterService {
|
|||||||
* Retrieve the Tasks filter by id
|
* Retrieve the Tasks filter by id
|
||||||
* @param filterId - number - The id of the filter
|
* @param filterId - number - The id of the filter
|
||||||
* @param appId - string - optional - The id of app
|
* @param appId - string - optional - The id of app
|
||||||
* @returns {Observable<FilterRepresentationModel>}
|
|
||||||
*/
|
*/
|
||||||
getTaskFilterById(filterId: number, appId?: number): Observable<FilterRepresentationModel> {
|
getTaskFilterById(filterId: number, appId?: number): Observable<FilterRepresentationModel> {
|
||||||
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
||||||
@@ -117,7 +114,6 @@ export class TaskFilterService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve the Tasks filter by name
|
* Retrieve the Tasks filter by name
|
||||||
* @param taskName - string - The name of the filter
|
* @param taskName - string - The name of the filter
|
||||||
* @returns {Observable<FilterRepresentationModel>}
|
|
||||||
*/
|
*/
|
||||||
getTaskFilterByName(taskName: string, appId?: number): Observable<FilterRepresentationModel> {
|
getTaskFilterByName(taskName: string, appId?: number): Observable<FilterRepresentationModel> {
|
||||||
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
return Observable.fromPromise(this.callApiTaskFilters(appId))
|
||||||
@@ -129,7 +125,6 @@ export class TaskFilterService {
|
|||||||
/**
|
/**
|
||||||
* Add a filter
|
* Add a filter
|
||||||
* @param filter - FilterRepresentationModel
|
* @param filter - FilterRepresentationModel
|
||||||
* @returns {FilterRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
addFilter(filter: FilterRepresentationModel): Observable<FilterRepresentationModel> {
|
addFilter(filter: FilterRepresentationModel): Observable<FilterRepresentationModel> {
|
||||||
return Observable.fromPromise(this.apiService.getInstance().activiti.userFiltersApi.createUserTaskFilter(filter))
|
return Observable.fromPromise(this.apiService.getInstance().activiti.userFiltersApi.createUserTaskFilter(filter))
|
||||||
@@ -150,7 +145,6 @@ export class TaskFilterService {
|
|||||||
/**
|
/**
|
||||||
* Return a static Involved filter instance
|
* Return a static Involved filter instance
|
||||||
* @param appId
|
* @param appId
|
||||||
* @returns {FilterRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
getInvolvedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
getInvolvedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||||
return new FilterRepresentationModel({
|
return new FilterRepresentationModel({
|
||||||
@@ -165,7 +159,6 @@ export class TaskFilterService {
|
|||||||
/**
|
/**
|
||||||
* Return a static My task filter instance
|
* Return a static My task filter instance
|
||||||
* @param appId
|
* @param appId
|
||||||
* @returns {FilterRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
getMyTasksFilterInstance(appId: number): FilterRepresentationModel {
|
getMyTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||||
return new FilterRepresentationModel({
|
return new FilterRepresentationModel({
|
||||||
@@ -180,7 +173,6 @@ export class TaskFilterService {
|
|||||||
/**
|
/**
|
||||||
* Return a static Queued filter instance
|
* Return a static Queued filter instance
|
||||||
* @param appId
|
* @param appId
|
||||||
* @returns {FilterRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
getQueuedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
getQueuedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||||
return new FilterRepresentationModel({
|
return new FilterRepresentationModel({
|
||||||
@@ -195,7 +187,6 @@ export class TaskFilterService {
|
|||||||
/**
|
/**
|
||||||
* Return a static Completed filter instance
|
* Return a static Completed filter instance
|
||||||
* @param appId
|
* @param appId
|
||||||
* @returns {FilterRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
getCompletedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
getCompletedTasksFilterInstance(appId: number): FilterRepresentationModel {
|
||||||
return new FilterRepresentationModel({
|
return new FilterRepresentationModel({
|
||||||
|
@@ -43,7 +43,6 @@ export class TaskListService {
|
|||||||
* Return all the filters in the list where the task id belong
|
* Return all the filters in the list where the task id belong
|
||||||
* @param taskId - string
|
* @param taskId - string
|
||||||
* @param filter - FilterRepresentationModel []
|
* @param filter - FilterRepresentationModel []
|
||||||
* @returns {FilterRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
getFilterForTaskById(taskId: string, filterList: FilterRepresentationModel[]): Observable<FilterRepresentationModel> {
|
getFilterForTaskById(taskId: string, filterList: FilterRepresentationModel[]): Observable<FilterRepresentationModel> {
|
||||||
return Observable.from(filterList)
|
return Observable.from(filterList)
|
||||||
@@ -54,7 +53,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Return the search node for query task based on the given filter
|
* Return the search node for query task based on the given filter
|
||||||
* @param filter - FilterRepresentationModel
|
* @param filter - FilterRepresentationModel
|
||||||
* @returns {TaskQueryRequestRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
private generateTaskRequestNodeFromFilter(filter: FilterRepresentationModel): TaskQueryRequestRepresentationModel {
|
private generateTaskRequestNodeFromFilter(filter: FilterRepresentationModel): TaskQueryRequestRepresentationModel {
|
||||||
let requestNode = {
|
let requestNode = {
|
||||||
@@ -70,7 +68,6 @@ export class TaskListService {
|
|||||||
* Check if a taskId is filtered with the given filter
|
* Check if a taskId is filtered with the given filter
|
||||||
* @param taskId - string
|
* @param taskId - string
|
||||||
* @param filter - FilterRepresentationModel
|
* @param filter - FilterRepresentationModel
|
||||||
* @returns {FilterRepresentationModel}
|
|
||||||
*/
|
*/
|
||||||
isTaskRelatedToFilter(taskId: string, filter: FilterRepresentationModel): Observable<FilterRepresentationModel> {
|
isTaskRelatedToFilter(taskId: string, filter: FilterRepresentationModel): Observable<FilterRepresentationModel> {
|
||||||
let requestNodeForFilter = this.generateTaskRequestNodeFromFilter(filter);
|
let requestNodeForFilter = this.generateTaskRequestNodeFromFilter(filter);
|
||||||
@@ -83,7 +80,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve all the tasks filtered by filterModel
|
* Retrieve all the tasks filtered by filterModel
|
||||||
* @param filter - TaskFilterRepresentationModel
|
* @param filter - TaskFilterRepresentationModel
|
||||||
* @returns {any}
|
|
||||||
*/
|
*/
|
||||||
getTasks(requestNode: TaskQueryRequestRepresentationModel): Observable<TaskListModel> {
|
getTasks(requestNode: TaskQueryRequestRepresentationModel): Observable<TaskListModel> {
|
||||||
return Observable.fromPromise(this.callApiTasksFiltered(requestNode))
|
return Observable.fromPromise(this.callApiTasksFiltered(requestNode))
|
||||||
@@ -96,7 +92,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve tasks filtered by filterModel and state
|
* Retrieve tasks filtered by filterModel and state
|
||||||
* @param filter - TaskFilterRepresentationModel
|
* @param filter - TaskFilterRepresentationModel
|
||||||
* @returns {any}
|
|
||||||
*/
|
*/
|
||||||
findTasksByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable<TaskListModel> {
|
findTasksByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable<TaskListModel> {
|
||||||
if (state) {
|
if (state) {
|
||||||
@@ -108,7 +103,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve all tasks filtered by filterModel and state
|
* Retrieve all tasks filtered by filterModel and state
|
||||||
* @param filter - TaskFilterRepresentationModel
|
* @param filter - TaskFilterRepresentationModel
|
||||||
* @returns {any}
|
|
||||||
*/
|
*/
|
||||||
findAllTaskByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable<TaskListModel> {
|
findAllTaskByState(requestNode: TaskQueryRequestRepresentationModel, state?: string): Observable<TaskListModel> {
|
||||||
if (state) {
|
if (state) {
|
||||||
@@ -123,7 +117,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve all tasks filtered by filterModel irrespective of state
|
* Retrieve all tasks filtered by filterModel irrespective of state
|
||||||
* @param filter - TaskFilterRepresentationModel
|
* @param filter - TaskFilterRepresentationModel
|
||||||
* @returns {any}
|
|
||||||
*/
|
*/
|
||||||
findAllTasksWithoutState(requestNode: TaskQueryRequestRepresentationModel): Observable<TaskListModel> {
|
findAllTasksWithoutState(requestNode: TaskQueryRequestRepresentationModel): Observable<TaskListModel> {
|
||||||
return Observable.forkJoin(
|
return Observable.forkJoin(
|
||||||
@@ -142,7 +135,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve all the task details
|
* Retrieve all the task details
|
||||||
* @param id - taskId
|
* @param id - taskId
|
||||||
* @returns {<TaskDetailsModel>}
|
|
||||||
*/
|
*/
|
||||||
getTaskDetails(taskId: string): Observable<TaskDetailsModel> {
|
getTaskDetails(taskId: string): Observable<TaskDetailsModel> {
|
||||||
return Observable.fromPromise(this.callApiTaskDetails(taskId))
|
return Observable.fromPromise(this.callApiTaskDetails(taskId))
|
||||||
@@ -155,7 +147,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve all the task's checklist
|
* Retrieve all the task's checklist
|
||||||
* @param id - taskId
|
* @param id - taskId
|
||||||
* @returns {TaskDetailsModel}
|
|
||||||
*/
|
*/
|
||||||
getTaskChecklist(id: string): Observable<TaskDetailsModel[]> {
|
getTaskChecklist(id: string): Observable<TaskDetailsModel[]> {
|
||||||
return Observable.fromPromise(this.callApiTaskChecklist(id))
|
return Observable.fromPromise(this.callApiTaskChecklist(id))
|
||||||
@@ -171,7 +162,6 @@ export class TaskListService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve all the form shared with this user
|
* Retrieve all the form shared with this user
|
||||||
* @returns {TaskDetailsModel}
|
|
||||||
*/
|
*/
|
||||||
getFormList(): Observable<Form []> {
|
getFormList(): Observable<Form []> {
|
||||||
let opts = {
|
let opts = {
|
||||||
@@ -197,7 +187,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Add a task
|
* Add a task
|
||||||
* @param task - TaskDetailsModel
|
* @param task - TaskDetailsModel
|
||||||
* @returns {TaskDetailsModel}
|
|
||||||
*/
|
*/
|
||||||
addTask(task: TaskDetailsModel): Observable<TaskDetailsModel> {
|
addTask(task: TaskDetailsModel): Observable<TaskDetailsModel> {
|
||||||
return Observable.fromPromise(this.callApiAddTask(task))
|
return Observable.fromPromise(this.callApiAddTask(task))
|
||||||
@@ -219,7 +208,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Make the task completed
|
* Make the task completed
|
||||||
* @param id - taskId
|
* @param id - taskId
|
||||||
* @returns {TaskDetailsModel}
|
|
||||||
*/
|
*/
|
||||||
completeTask(taskId: string) {
|
completeTask(taskId: string) {
|
||||||
return Observable.fromPromise(this.apiService.getInstance().activiti.taskApi.completeTask(taskId))
|
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
|
* Return the total number of the tasks by filter
|
||||||
* @param requestNode - TaskFilterRepresentationModel
|
* @param requestNode - TaskFilterRepresentationModel
|
||||||
* @returns {any}
|
|
||||||
*/
|
*/
|
||||||
public getTotalTasks(requestNode: TaskQueryRequestRepresentationModel): Observable<any> {
|
public getTotalTasks(requestNode: TaskQueryRequestRepresentationModel): Observable<any> {
|
||||||
requestNode.size = 0;
|
requestNode.size = 0;
|
||||||
@@ -243,7 +230,6 @@ export class TaskListService {
|
|||||||
/**
|
/**
|
||||||
* Create a new standalone task
|
* Create a new standalone task
|
||||||
* @param task - TaskDetailsModel
|
* @param task - TaskDetailsModel
|
||||||
* @returns {TaskDetailsModel}
|
|
||||||
*/
|
*/
|
||||||
createNewTask(task: TaskDetailsModel): Observable<TaskDetailsModel> {
|
createNewTask(task: TaskDetailsModel): Observable<TaskDetailsModel> {
|
||||||
return Observable.fromPromise(this.callApiCreateTask(task))
|
return Observable.fromPromise(this.callApiCreateTask(task))
|
||||||
@@ -257,7 +243,6 @@ export class TaskListService {
|
|||||||
* Assign task to user/group
|
* Assign task to user/group
|
||||||
* @param taskId - string
|
* @param taskId - string
|
||||||
* @param requestNode - any
|
* @param requestNode - any
|
||||||
* @returns {TaskDetailsModel}
|
|
||||||
*/
|
*/
|
||||||
assignTask(taskId: string, requestNode: any): Observable<TaskDetailsModel> {
|
assignTask(taskId: string, requestNode: any): Observable<TaskDetailsModel> {
|
||||||
let assignee = {assignee: requestNode.id};
|
let assignee = {assignee: requestNode.id};
|
||||||
|
@@ -152,7 +152,7 @@ fi
|
|||||||
for PACKAGE in ${projects[@]}
|
for PACKAGE in ${projects[@]}
|
||||||
do
|
do
|
||||||
|
|
||||||
DESTDIR="$DIR/../lib/${PACKAGE}/dist"
|
DESTDIR="$DIR/../lib/dist/${PACKAGE}"
|
||||||
echo "====== MOVE DIR: ${DESTDIR} ===== "
|
echo "====== MOVE DIR: ${DESTDIR} ===== "
|
||||||
cd ${DESTDIR}
|
cd ${DESTDIR}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user