[AAE-7245] fix Insights eslint warnings (#7489)

This commit is contained in:
Denys Vuika
2022-02-08 11:19:52 +00:00
committed by GitHub
parent f9be037c4f
commit 8a03e7a2e7
71 changed files with 707 additions and 712 deletions

View File

@@ -20,18 +20,8 @@
"eslint-plugin-rxjs" "eslint-plugin-rxjs"
], ],
"rules": { "rules": {
"jsdoc/newline-after-description": "warn", "no-underscore-dangle": ["error", { "allowAfterThis": true }],
"@typescript-eslint/naming-convention": "warn", "@angular-eslint/no-output-native": "off",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"no-underscore-dangle": "warn",
"no-shadow": "warn",
"quote-props": "warn",
"object-shorthand": "warn",
"prefer-const": "warn",
"arrow-body-style": "warn",
"@angular-eslint/no-output-native": "warn",
"space-before-function-paren": "warn",
"@angular-eslint/component-selector": [ "@angular-eslint/component-selector": [
"error", "error",

View File

@@ -29,8 +29,8 @@ describe('AnalyticsReportHeatMapComponent', () => {
let fixture: ComponentFixture<AnalyticsReportHeatMapComponent>; let fixture: ComponentFixture<AnalyticsReportHeatMapComponent>;
let element: HTMLElement; let element: HTMLElement;
const totalCountPercent: any = { 'sid-fake-id': 0, 'fake-start-event': 100 }; const totalCountsPercentages: any = { 'sid-fake-id': 0, 'fake-start-event': 100 };
const totalTimePercent: any = { 'sid-fake-id': 10, 'fake-start-event': 30 }; const totalTimePercentages: any = { 'sid-fake-id': 10, 'fake-start-event': 30 };
const avgTimePercentages: any = { 'sid-fake-id': 5, 'fake-start-event': 50 }; const avgTimePercentages: any = { 'sid-fake-id': 5, 'fake-start-event': 50 };
const totalCountValues: any = { 'sid-fake-id': 2, 'fake-start-event': 3 }; const totalCountValues: any = { 'sid-fake-id': 2, 'fake-start-event': 3 };
@@ -50,12 +50,12 @@ describe('AnalyticsReportHeatMapComponent', () => {
element = fixture.nativeElement; element = fixture.nativeElement;
component.report = { component.report = {
totalCountsPercentages: totalCountPercent, totalCountsPercentages,
totalCountValues: totalCountValues, totalCountValues,
totalTimePercentages: totalTimePercent, totalTimePercentages,
totalTimeValues: totalTimeValues, totalTimeValues,
avgTimeValues: avgTimeValues, avgTimeValues,
avgTimePercentages: avgTimePercentages avgTimePercentages
}; };
}); });
@@ -96,14 +96,14 @@ describe('AnalyticsReportHeatMapComponent', () => {
const field = { value: 'totalCount' }; const field = { value: 'totalCount' };
component.onMetricChanges(field); component.onMetricChanges(field);
expect(component.currentMetric).toEqual(totalCountValues); expect(component.currentMetric).toEqual(totalCountValues);
expect(component.currentMetricColors).toEqual(totalCountPercent); expect(component.currentMetricColors).toEqual(totalCountsPercentages);
}); });
it('should change the currentMetric width totalTime', () => { it('should change the currentMetric width totalTime', () => {
const field = { value: 'totalTime' }; const field = { value: 'totalTime' };
component.onMetricChanges(field); component.onMetricChanges(field);
expect(component.currentMetric).toEqual(totalTimeValues); expect(component.currentMetric).toEqual(totalTimeValues);
expect(component.currentMetricColors).toEqual(totalTimePercent); expect(component.currentMetricColors).toEqual(totalTimePercentages);
}); });
it('should change the currentMetric width avgTime', () => { it('should change the currentMetric width avgTime', () => {

View File

@@ -16,7 +16,7 @@
*/ */
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AnalyticsReportListComponent } from '../components/analytics-report-list.component'; import { AnalyticsReportListComponent, LAYOUT_GRID, LAYOUT_LIST } from '../components/analytics-report-list.component';
import { ReportParametersModel } from '../../diagram/models/report/report-parameters.model'; import { ReportParametersModel } from '../../diagram/models/report/report-parameters.model';
import { setupTestBed } from '@alfresco/adf-core'; import { setupTestBed } from '@alfresco/adf-core';
import { InsightsTestingModule } from '../../testing/insights.testing.module'; import { InsightsTestingModule } from '../../testing/insights.testing.module';
@@ -27,14 +27,14 @@ declare let jasmine: any;
describe('AnalyticsReportListComponent', () => { describe('AnalyticsReportListComponent', () => {
const reportList = [ const reportList = [
{ 'id': 2002, 'name': 'Fake Test Process definition heat map' }, { id: 2002, name: 'Fake Test Process definition heat map' },
{ 'id': 2003, 'name': 'Fake Test Process definition overview' }, { id: 2003, name: 'Fake Test Process definition overview' },
{ 'id': 2004, 'name': 'Fake Test Process instances overview' }, { id: 2004, name: 'Fake Test Process instances overview' },
{ 'id': 2005, 'name': 'Fake Test Task overview' }, { id: 2005, name: 'Fake Test Task overview' },
{ 'id': 2006, 'name': 'Fake Test Task service level agreement' } { id: 2006, name: 'Fake Test Task service level agreement' }
]; ];
const reportSelected = { 'id': 2003, 'name': 'Fake Test Process definition overview' }; const reportSelected = { id: 2003, name: 'Fake Test Process definition overview' };
let component: AnalyticsReportListComponent; let component: AnalyticsReportListComponent;
let fixture: ComponentFixture<AnalyticsReportListComponent>; let fixture: ComponentFixture<AnalyticsReportListComponent>;
@@ -159,13 +159,13 @@ describe('AnalyticsReportListComponent', () => {
it('Should return false if the current report is different', () => { it('Should return false if the current report is different', () => {
component.selectReport(reportSelected); component.selectReport(reportSelected);
const anotherReport = { 'id': 111, 'name': 'Another Fake Test Process definition overview' }; const anotherReport = { id: 111, name: 'Another Fake Test Process definition overview' };
expect(component.isSelected(anotherReport)).toBe(false); expect(component.isSelected(anotherReport)).toBe(false);
}); });
it('Should reload the report list', (done) => { it('Should reload the report list', (done) => {
component.initObserver(); component.initObserver();
const report = new ReportParametersModel({ 'id': 2002, 'name': 'Fake Test Process definition heat map' }); const report = new ReportParametersModel({ id: 2002, name: 'Fake Test Process definition heat map' });
component.reports = [report]; component.reports = [report];
expect(component.reports.length).toEqual(1); expect(component.reports.length).toEqual(1);
component.reload(); component.reload();
@@ -213,14 +213,14 @@ describe('AnalyticsReportListComponent', () => {
}); });
it('should display a grid when configured to', () => { it('should display a grid when configured to', () => {
component.layoutType = AnalyticsReportListComponent.LAYOUT_GRID; component.layoutType = LAYOUT_GRID;
fixture.detectChanges(); fixture.detectChanges();
expect(component.isGrid()).toBe(true); expect(component.isGrid()).toBe(true);
expect(component.isList()).toBe(false); expect(component.isList()).toBe(false);
}); });
it('should display a list when configured to', () => { it('should display a list when configured to', () => {
component.layoutType = AnalyticsReportListComponent.LAYOUT_LIST; component.layoutType = LAYOUT_LIST;
fixture.detectChanges(); fixture.detectChanges();
expect(component.isGrid()).toBe(false); expect(component.isGrid()).toBe(false);
expect(component.isList()).toBe(true); expect(component.isList()).toBe(true);

View File

@@ -21,6 +21,9 @@ import { ReportParametersModel } from '../../diagram/models/report/report-parame
import { AnalyticsService } from '../services/analytics.service'; import { AnalyticsService } from '../services/analytics.service';
import { share } from 'rxjs/operators'; import { share } from 'rxjs/operators';
export const LAYOUT_LIST = 'LIST';
export const LAYOUT_GRID = 'GRID';
@Component({ @Component({
selector: 'adf-analytics-report-list', selector: 'adf-analytics-report-list',
templateUrl: './analytics-report-list.component.html', templateUrl: './analytics-report-list.component.html',
@@ -28,13 +31,9 @@ import { share } from 'rxjs/operators';
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class AnalyticsReportListComponent implements OnInit { export class AnalyticsReportListComponent implements OnInit {
public static LAYOUT_LIST: string = 'LIST';
public static LAYOUT_GRID: string = 'GRID';
/** layout Type LIST or GRID. */ /** layout Type LIST or GRID. */
@Input() @Input()
layoutType: string = AnalyticsReportListComponent.LAYOUT_LIST; layoutType: string = LAYOUT_LIST;
/** appId ID of the target app. */ /** appId ID of the target app. */
@Input() @Input()
@@ -56,13 +55,12 @@ export class AnalyticsReportListComponent implements OnInit {
@Output() @Output()
error = new EventEmitter(); error = new EventEmitter();
private reportObserver: Observer<any>;
report$: Observable<ReportParametersModel>; report$: Observable<ReportParametersModel>;
currentReport: any; currentReport: any;
reports: ReportParametersModel[] = []; reports: ReportParametersModel[] = [];
private reportObserver: Observer<any>;
constructor(private analyticsService: AnalyticsService) { constructor(private analyticsService: AnalyticsService) {
this.report$ = new Observable<ReportParametersModel>((observer) => this.reportObserver = observer) this.report$ = new Observable<ReportParametersModel>((observer) => this.reportObserver = observer)
.pipe(share()); .pipe(share());
@@ -140,25 +138,17 @@ export class AnalyticsReportListComponent implements OnInit {
return this.reports === undefined || (this.reports && this.reports.length === 0); return this.reports === undefined || (this.reports && this.reports.length === 0);
} }
/**
* Reset the list
*/
private reset() {
if (!this.isReportsEmpty()) {
this.reports = [];
}
}
/** /**
* Select the current report * Select the current report
*
* @param report * @param report
*/ */
public selectReport(report: any) { selectReport(report: any) {
this.currentReport = report; this.currentReport = report;
this.reportClick.emit(report); this.reportClick.emit(report);
} }
public selectReportByReportId(reportId: number) { selectReportByReportId(reportId: number) {
const reportFound = this.reports.find((report) => report.id === reportId); const reportFound = this.reports.find((report) => report.id === reportId);
if (reportFound) { if (reportFound) {
this.currentReport = reportFound; this.currentReport = reportFound;
@@ -176,10 +166,19 @@ export class AnalyticsReportListComponent implements OnInit {
} }
isList(): boolean { isList(): boolean {
return this.layoutType === AnalyticsReportListComponent.LAYOUT_LIST; return this.layoutType === LAYOUT_LIST;
} }
isGrid(): boolean { isGrid(): boolean {
return this.layoutType === AnalyticsReportListComponent.LAYOUT_GRID; return this.layoutType === LAYOUT_GRID;
}
/**
* Reset the list
*/
private reset() {
if (!this.isReportsEmpty()) {
this.reports = [];
}
} }
} }

View File

@@ -48,9 +48,7 @@ describe('AnalyticsReportParametersComponent', () => {
service = TestBed.inject(AnalyticsService); service = TestBed.inject(AnalyticsService);
component = fixture.componentInstance; component = fixture.componentInstance;
element = fixture.nativeElement; element = fixture.nativeElement;
spyOn(component, 'isFormValid').and.callFake(() => { spyOn(component, 'isFormValid').and.callFake(() => validForm);
return validForm;
});
fixture.detectChanges(); fixture.detectChanges();
}); });
@@ -90,7 +88,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
status: 200, status: 200,
@@ -110,7 +108,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
status: 200, status: 200,
@@ -139,7 +137,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
status: 200, status: 200,
@@ -201,7 +199,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
status: 200, status: 200,
@@ -220,7 +218,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.toggleParameters(); component.toggleParameters();
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
status: 200, status: 200,
@@ -245,7 +243,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
status: 200, status: 200,
@@ -283,7 +281,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
}); });
@@ -317,7 +315,7 @@ describe('AnalyticsReportParametersComponent', () => {
component.appId = appId; component.appId = appId;
component.reportId = '1'; component.reportId = '1';
const change = new SimpleChange(null, appId, true); const change = new SimpleChange(null, appId, true);
component.ngOnChanges({'appId': change}); component.ngOnChanges({appId: change});
}); });
@@ -330,7 +328,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
status: 200, status: 200,
@@ -380,7 +378,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
}); });
@@ -392,7 +390,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
status: 404, status: 404,
@@ -411,7 +409,7 @@ describe('AnalyticsReportParametersComponent', () => {
beforeEach(async () => { beforeEach(async () => {
const reportId = 1; const reportId = 1;
const change = new SimpleChange(null, reportId, true); const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({'reportId': change}); component.ngOnChanges({reportId: change});
fixture.detectChanges(); fixture.detectChanges();
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
@@ -522,8 +520,8 @@ describe('AnalyticsReportParametersComponent', () => {
it('Should show export and save button when the form became valid', fakeAsync(() => { it('Should show export and save button when the form became valid', fakeAsync(() => {
validForm = false; validForm = false;
fixture.detectChanges(); fixture.detectChanges();
let saveButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#save-button'); let saveButton = element.querySelector<HTMLButtonElement>('#save-button');
let exportButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#export-button'); let exportButton = element.querySelector<HTMLButtonElement>('#export-button');
expect(saveButton).toBeNull(); expect(saveButton).toBeNull();
expect(exportButton).toBeNull(); expect(exportButton).toBeNull();
validForm = true; validForm = true;
@@ -531,8 +529,8 @@ describe('AnalyticsReportParametersComponent', () => {
fixture.whenStable().then(() => { fixture.whenStable().then(() => {
fixture.detectChanges(); fixture.detectChanges();
saveButton = <HTMLButtonElement> element.querySelector('#save-button'); saveButton = element.querySelector<HTMLButtonElement>('#save-button');
exportButton = <HTMLButtonElement> element.querySelector('#export-button'); exportButton = element.querySelector<HTMLButtonElement>('#export-button');
expect(saveButton).not.toBeNull(); expect(saveButton).not.toBeNull();
expect(saveButton).toBeDefined(); expect(saveButton).toBeDefined();

View File

@@ -40,6 +40,8 @@ import { AnalyticsService } from '../services/analytics.service';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
const FORMAT_DATE_ACTIVITI = 'YYYY-MM-DD';
@Component({ @Component({
selector: 'adf-analytics-report-parameters', selector: 'adf-analytics-report-parameters',
templateUrl: './analytics-report-parameters.component.html', templateUrl: './analytics-report-parameters.component.html',
@@ -47,9 +49,6 @@ import { takeUntil } from 'rxjs/operators';
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class AnalyticsReportParametersComponent implements OnInit, OnChanges, OnDestroy, AfterContentChecked { export class AnalyticsReportParametersComponent implements OnInit, OnChanges, OnDestroy, AfterContentChecked {
public static FORMAT_DATE_ACTIVITI: string = 'YYYY-MM-DD';
/** appId ID of the target app. */ /** appId ID of the target app. */
@Input() @Input()
appId: number; appId: number;
@@ -90,24 +89,18 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
reportNameDialog: any; reportNameDialog: any;
onDropdownChanged = new EventEmitter(); onDropdownChanged = new EventEmitter();
successReportParams = new EventEmitter<ReportParametersModel>(); successReportParams = new EventEmitter<ReportParametersModel>();
successParamOpt = new EventEmitter(); successParamOpt = new EventEmitter();
reportParameters: ReportParametersModel; reportParameters: ReportParametersModel;
reportForm: FormGroup; reportForm: FormGroup;
action: string; action: string;
isEditable: boolean = false; isEditable: boolean = false;
reportName: string; reportName: string;
reportParamQuery: ReportQuery; reportParamQuery: ReportQuery;
private hideParameters: boolean = true;
formValidState: boolean = false; formValidState: boolean = false;
private hideParameters: boolean = true;
private onDestroy$ = new Subject<boolean>(); private onDestroy$ = new Subject<boolean>();
constructor(private analyticsService: AnalyticsService, constructor(private analyticsService: AnalyticsService,
@@ -115,7 +108,6 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
private logService: LogService, private logService: LogService,
private contentService: ContentService, private contentService: ContentService,
private dialog: MatDialog) { private dialog: MatDialog) {
} }
ngOnInit() { ngOnInit() {
@@ -160,58 +152,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
} }
} }
private generateFormGroupFromParameter(parameters: ReportParameterDetailsModel[]) { getReportParams(reportId: string) {
const formBuilderGroup: any = {};
parameters.forEach((param: ReportParameterDetailsModel) => {
switch (param.type) {
case 'dateRange':
formBuilderGroup.dateRange = new FormGroup({}, Validators.required);
break;
case 'processDefinition':
formBuilderGroup.processDefGroup = new FormGroup({
processDefinitionId: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'duration':
formBuilderGroup.durationGroup = new FormGroup({
duration: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'dateInterval':
formBuilderGroup.dateIntervalGroup = new FormGroup({
dateRangeInterval: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'boolean':
formBuilderGroup.typeFilteringGroup = new FormGroup({
typeFiltering: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'task':
formBuilderGroup.taskGroup = new FormGroup({
taskName: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'integer':
formBuilderGroup.processInstanceGroup = new FormGroup({
slowProcessInstanceInteger: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'status':
formBuilderGroup.statusGroup = new FormGroup({
status: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
default:
return;
}
});
this.reportForm = this.formBuilder.group(formBuilderGroup);
this.reportForm.valueChanges.subscribe((data) => this.onValueChanged(data));
this.reportForm.statusChanges.subscribe(() => this.onStatusChanged());
}
public getReportParams(reportId: string) {
this.analyticsService.getReportParams(reportId).subscribe( this.analyticsService.getReportParams(reportId).subscribe(
(res: ReportParametersModel) => { (res: ReportParametersModel) => {
this.reportParameters = res; this.reportParameters = res;
@@ -228,20 +169,6 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
); );
} }
private retrieveParameterOptions(parameters: ReportParameterDetailsModel[], appId: number, reportId?: string, processDefinitionId?: string) {
parameters.forEach((param) => {
this.analyticsService.getParamValuesByType(param.type, appId, reportId, processDefinitionId).subscribe(
(opts: ParameterValueModel[]) => {
param.options = opts;
this.successParamOpt.emit(opts);
},
(err: any) => {
this.error.emit(err);
}
);
});
}
onProcessDefinitionChanges(field: any) { onProcessDefinitionChanges(field: any) {
if (field.value) { if (field.value) {
this.onDropdownChanged.emit(field); this.onDropdownChanged.emit(field);
@@ -266,16 +193,15 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
} }
} }
public convertMomentDate(date: string) { convertMomentDate(date: string) {
return moment(date, AnalyticsReportParametersComponent.FORMAT_DATE_ACTIVITI, true) return moment(date, FORMAT_DATE_ACTIVITI, true).format(FORMAT_DATE_ACTIVITI) + 'T00:00:00.000Z';
.format(AnalyticsReportParametersComponent.FORMAT_DATE_ACTIVITI) + 'T00:00:00.000Z';
} }
public getTodayDate() { getTodayDate() {
return moment().format(AnalyticsReportParametersComponent.FORMAT_DATE_ACTIVITI); return moment().format(FORMAT_DATE_ACTIVITI);
} }
public convertNumber(value: string): number { convertNumber(value: string): number {
return value != null ? parseInt(value, 10) : 0; return value != null ? parseInt(value, 10) : 0;
} }
@@ -314,15 +240,15 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
this.onDestroy$.complete(); this.onDestroy$.complete();
} }
public editEnable() { editEnable() {
this.isEditable = true; this.isEditable = true;
} }
public editDisable() { editDisable() {
this.isEditable = false; this.isEditable = false;
} }
public editTitle() { editTitle() {
this.analyticsService this.analyticsService
.updateReport(`${this.reportParameters.id}`, this.reportParameters.name) .updateReport(`${this.reportParameters.id}`, this.reportParameters.name)
.subscribe( .subscribe(
@@ -336,7 +262,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
); );
} }
public showDialog(event: string) { showDialog(event: string) {
this.dialog.open(this.reportNameDialog, { width: '500px' }); this.dialog.open(this.reportNameDialog, { width: '500px' });
this.action = event; this.action = event;
this.reportName = this.reportParameters.name + ' ( ' + this.getTodayDate() + ' )'; this.reportName = this.reportParameters.name + ' ( ' + this.getTodayDate() + ' )';
@@ -435,4 +361,69 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
get processInstanceGroup(): FormGroup { get processInstanceGroup(): FormGroup {
return this.reportForm.controls.processInstanceGroup as FormGroup; return this.reportForm.controls.processInstanceGroup as FormGroup;
} }
private generateFormGroupFromParameter(parameters: ReportParameterDetailsModel[]) {
const formBuilderGroup: any = {};
parameters.forEach((param: ReportParameterDetailsModel) => {
switch (param.type) {
case 'dateRange':
formBuilderGroup.dateRange = new FormGroup({}, Validators.required);
break;
case 'processDefinition':
formBuilderGroup.processDefGroup = new FormGroup({
processDefinitionId: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'duration':
formBuilderGroup.durationGroup = new FormGroup({
duration: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'dateInterval':
formBuilderGroup.dateIntervalGroup = new FormGroup({
dateRangeInterval: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'boolean':
formBuilderGroup.typeFilteringGroup = new FormGroup({
typeFiltering: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'task':
formBuilderGroup.taskGroup = new FormGroup({
taskName: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'integer':
formBuilderGroup.processInstanceGroup = new FormGroup({
slowProcessInstanceInteger: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
case 'status':
formBuilderGroup.statusGroup = new FormGroup({
status: new FormControl(null, Validators.required, null)
}, Validators.required);
break;
default:
return;
}
});
this.reportForm = this.formBuilder.group(formBuilderGroup);
this.reportForm.valueChanges.subscribe((data) => this.onValueChanged(data));
this.reportForm.statusChanges.subscribe(() => this.onStatusChanged());
}
private retrieveParameterOptions(parameters: ReportParameterDetailsModel[], appId: number, reportId?: string, processDefinitionId?: string) {
parameters.forEach((param) => {
this.analyticsService.getParamValuesByType(param.type, appId, reportId, processDefinitionId).subscribe(
(opts: ParameterValueModel[]) => {
param.options = opts;
this.successParamOpt.emit(opts);
},
(err: any) => {
this.error.emit(err);
}
);
});
}
} }

View File

@@ -26,6 +26,9 @@ import { Moment } from 'moment';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
const FORMAT_DATE_ACTIVITI = 'YYYY-MM-DD';
const SHOW_FORMAT = 'DD/MM/YYYY';
@Component({ @Component({
selector: 'adf-date-range-widget', selector: 'adf-date-range-widget',
templateUrl: './date-range.widget.html', templateUrl: './date-range.widget.html',
@@ -36,18 +39,14 @@ import { takeUntil } from 'rxjs/operators';
encapsulation: ViewEncapsulation.None encapsulation: ViewEncapsulation.None
}) })
export class DateRangeWidgetComponent implements OnInit, OnDestroy { export class DateRangeWidgetComponent implements OnInit, OnDestroy {
public FORMAT_DATE_ACTIVITI: string = 'YYYY-MM-DD';
public SHOW_FORMAT: string = 'DD/MM/YYYY';
@Input('group') @Input('group')
public dateRange: FormGroup; dateRange: FormGroup;
@Input() @Input()
field: any; field: any;
@Output() @Output()
dateRangeChanged: EventEmitter<any> = new EventEmitter<any>(); dateRangeChanged = new EventEmitter<any>();
minDate: Moment; minDate: Moment;
maxDate: Moment; maxDate: Moment;
@@ -67,16 +66,16 @@ export class DateRangeWidgetComponent implements OnInit, OnDestroy {
.pipe(takeUntil(this.onDestroy$)) .pipe(takeUntil(this.onDestroy$))
.subscribe(locale => this.dateAdapter.setLocale(locale)); .subscribe(locale => this.dateAdapter.setLocale(locale));
const momentDateAdapter = <MomentDateAdapter> this.dateAdapter; const momentDateAdapter = this.dateAdapter as MomentDateAdapter;
momentDateAdapter.overrideDisplayFormat = this.SHOW_FORMAT; momentDateAdapter.overrideDisplayFormat = SHOW_FORMAT;
if (this.field) { if (this.field) {
if (this.field.value && this.field.value.startDate) { if (this.field.value && this.field.value.startDate) {
this.startDatePicker = moment(this.field.value.startDate, this.FORMAT_DATE_ACTIVITI); this.startDatePicker = moment(this.field.value.startDate, FORMAT_DATE_ACTIVITI);
} }
if (this.field.value && this.field.value.endDate) { if (this.field.value && this.field.value.endDate) {
this.endDatePicker = moment(this.field.value.endDate, this.FORMAT_DATE_ACTIVITI); this.endDatePicker = moment(this.field.value.endDate, FORMAT_DATE_ACTIVITI);
} }
} }
@@ -106,14 +105,14 @@ export class DateRangeWidgetComponent implements OnInit, OnDestroy {
} }
convertToMomentDateWithTime(date: string) { convertToMomentDateWithTime(date: string) {
return moment(date, this.FORMAT_DATE_ACTIVITI, true).format(this.FORMAT_DATE_ACTIVITI) + 'T00:00:00.000Z'; return moment(date, FORMAT_DATE_ACTIVITI, true).format(FORMAT_DATE_ACTIVITI) + 'T00:00:00.000Z';
} }
dateCheck(formControl: AbstractControl) { dateCheck(formControl: AbstractControl) {
const startDate = moment(formControl.get('startDate').value); const startDate = moment(formControl.get('startDate').value);
const endDate = moment(formControl.get('endDate').value); const endDate = moment(formControl.get('endDate').value);
const isAfterCheck = startDate.isAfter(endDate); const isAfterCheck = startDate.isAfter(endDate);
return isAfterCheck ? {'greaterThan': true} : null; return isAfterCheck ? {greaterThan: true} : null;
} }
isStartDateGreaterThanEndDate() { isStartDateGreaterThanEndDate() {

View File

@@ -61,7 +61,7 @@ describe('AnalyticsService', () => {
); );
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
'status': 200, status: 200,
contentType: 'application/json', contentType: 'application/json',
responseText: JSON.stringify(fakeReportList) responseText: JSON.stringify(fakeReportList)
}); });
@@ -78,7 +78,7 @@ describe('AnalyticsService', () => {
); );
jasmine.Ajax.requests.mostRecent().respondWith({ jasmine.Ajax.requests.mostRecent().respondWith({
'status': 200, status: 200,
contentType: 'application/json', contentType: 'application/json',
responseText: JSON.stringify(fakeReportList) responseText: JSON.stringify(fakeReportList)
}); });

View File

@@ -33,13 +33,13 @@ import { ProcessDefinitionsApi, ReportApi } from '@alfresco/js-api';
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class AnalyticsService { export class AnalyticsService {
_reportApi: ReportApi; private _reportApi: ReportApi;
get reportApi(): ReportApi { get reportApi(): ReportApi {
this._reportApi = this._reportApi ?? new ReportApi(this.apiService.getInstance()); this._reportApi = this._reportApi ?? new ReportApi(this.apiService.getInstance());
return this._reportApi; return this._reportApi;
} }
_processDefinitionsApi: ProcessDefinitionsApi; private _processDefinitionsApi: ProcessDefinitionsApi;
get processDefinitionsApi(): ProcessDefinitionsApi { get processDefinitionsApi(): ProcessDefinitionsApi {
this._processDefinitionsApi = this._processDefinitionsApi ?? new ProcessDefinitionsApi(this.apiService.getInstance()); this._processDefinitionsApi = this._processDefinitionsApi ?? new ProcessDefinitionsApi(this.apiService.getInstance());
return this._processDefinitionsApi; return this._processDefinitionsApi;
@@ -71,32 +71,21 @@ export class AnalyticsService {
/** /**
* Retrieve Report by name * Retrieve Report by name
*
* @param reportName - string - The name of report * @param reportName - string - The name of report
*/ */
getReportByName(reportName: string): Observable<any> { getReportByName(reportName: string): Observable<any> {
return from(this.reportApi.getReportList()) return from(this.reportApi.getReportList())
.pipe( .pipe(
map((response: any) => { map((response: any) => response.find((report) => report.name === reportName)),
return response.find((report) => report.name === reportName);
}),
catchError((err) => this.handleError(err)) catchError((err) => this.handleError(err))
); );
} }
private isReportValid(appId: number, report: ReportParametersModel) {
let isValid: boolean = true;
if (appId && appId !== 0 && report.name.includes('Process definition overview')) {
isValid = false;
}
return isValid;
}
getReportParams(reportId: string): Observable<ReportParametersModel> { getReportParams(reportId: string): Observable<ReportParametersModel> {
return from(this.reportApi.getReportParams(reportId)) return from(this.reportApi.getReportParams(reportId))
.pipe( .pipe(
map((res: any) => { map((res: any) => new ReportParametersModel(res)),
return new ReportParametersModel(res);
}),
catchError((err) => this.handleError(err)) catchError((err) => this.handleError(err))
); );
} }
@@ -166,7 +155,7 @@ export class AnalyticsService {
} }
getProcessDefinitionsValues(appId: number): Observable<ParameterValueModel[]> { getProcessDefinitionsValues(appId: number): Observable<ParameterValueModel[]> {
const options = { 'appDefinitionId': appId }; const options = { appDefinitionId: appId };
return from(this.processDefinitionsApi.getProcessDefinitions(options)) return from(this.processDefinitionsApi.getProcessDefinitions(options))
.pipe( .pipe(
map((res: any) => { map((res: any) => {
@@ -272,4 +261,12 @@ export class AnalyticsService {
this.logService.error(error); this.logService.error(error);
return throwError(error || 'Server error'); return throwError(error || 'Server error');
} }
private isReportValid(appId: number, report: ReportParametersModel) {
let isValid: boolean = true;
if (appId && appId !== 0 && report.name.includes('Process definition overview')) {
isValid = false;
}
return isValid;
}
} }

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ACTIVITY_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -43,7 +44,7 @@ export class DiagramTaskComponent implements OnInit {
this.textPosition = {x: this.data.x + ( this.data.width / 2 ), y: this.data.y + ( this.data.height / 2 )}; this.textPosition = {x: this.data.x + ( this.data.width / 2 ), y: this.data.y + ( this.data.height / 2 )};
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.ACTIVITY_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, ACTIVITY_STROKE_COLOR);
this.options.strokeWidth = this.diagramColorService.getBpmnStrokeWidth(this.data); this.options.strokeWidth = this.diagramColorService.getBpmnStrokeWidth(this.data);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();
} }

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -49,7 +50,7 @@ export class DiagramBoundaryEventComponent implements OnInit {
this.circleRadiusInner = 12; this.circleRadiusInner = 12;
this.circleRadiusOuter = 15; this.circleRadiusOuter = 15;
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -50,7 +51,7 @@ export class DiagramThrowEventComponent implements OnInit {
this.circleRadiusInner = 12; this.circleRadiusInner = 12;
this.circleRadiusOuter = 15; this.circleRadiusOuter = 15;
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();

View File

@@ -22,6 +22,9 @@ import { DiagramColorService } from '../services/diagram-color.service';
import { DiagramsService } from '../services/diagrams.service'; import { DiagramsService } from '../services/diagrams.service';
import { RaphaelService } from './raphael/raphael.service'; import { RaphaelService } from './raphael/raphael.service';
const PADDING_WIDTH: number = 60;
const PADDING_HEIGHT: number = 60;
@Component({ @Component({
selector: 'adf-diagram', selector: 'adf-diagram',
styleUrls: ['./diagram.component.css'], styleUrls: ['./diagram.component.css'],
@@ -65,9 +68,6 @@ export class DiagramComponent implements OnChanges {
@Output() @Output()
error = new EventEmitter(); error = new EventEmitter();
PADDING_WIDTH: number = 60;
PADDING_HEIGHT: number = 60;
diagram: DiagramModel; diagram: DiagramModel;
constructor(private diagramColorService: DiagramColorService, constructor(private diagramColorService: DiagramColorService,
@@ -89,8 +89,8 @@ export class DiagramComponent implements OnChanges {
this.diagramsService.getRunningProcessDefinitionModel(processInstanceId).subscribe( this.diagramsService.getRunningProcessDefinitionModel(processInstanceId).subscribe(
(res: any) => { (res: any) => {
this.diagram = new DiagramModel(res); this.diagram = new DiagramModel(res);
this.raphaelService.setting(this.diagram.diagramWidth + this.PADDING_WIDTH, this.raphaelService.setting(this.diagram.diagramWidth + PADDING_WIDTH,
this.diagram.diagramHeight + this.PADDING_HEIGHT); this.diagram.diagramHeight + PADDING_HEIGHT);
this.setMetricValueToDiagramElement(this.diagram, this.metricPercentages, this.metricType); this.setMetricValueToDiagramElement(this.diagram, this.metricPercentages, this.metricType);
this.success.emit(res); this.success.emit(res);
}, },
@@ -104,8 +104,8 @@ export class DiagramComponent implements OnChanges {
this.diagramsService.getProcessDefinitionModel(processDefinitionId).subscribe( this.diagramsService.getProcessDefinitionModel(processDefinitionId).subscribe(
(res: any) => { (res: any) => {
this.diagram = new DiagramModel(res); this.diagram = new DiagramModel(res);
this.raphaelService.setting(this.diagram.diagramWidth + this.PADDING_WIDTH, this.raphaelService.setting(this.diagram.diagramWidth + PADDING_WIDTH,
this.diagram.diagramHeight + this.PADDING_HEIGHT); this.diagram.diagramHeight + PADDING_HEIGHT);
this.setMetricValueToDiagramElement(this.diagram, this.metricPercentages, this.metricType); this.setMetricValueToDiagramElement(this.diagram, this.metricPercentages, this.metricType);
this.success.emit(res); this.success.emit(res);
}, },

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -41,7 +42,7 @@ export class DiagramEndEventComponent implements OnInit {
this.options.radius = 14; this.options.radius = 14;
this.options.strokeWidth = 4; this.options.strokeWidth = 4;
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -41,7 +42,7 @@ export class DiagramStartEventComponent implements OnInit {
this.options.radius = 15; this.options.radius = 15;
this.options.strokeWidth = 1; this.options.strokeWidth = 1;
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -49,7 +50,7 @@ export class DiagramEventGatewayComponent implements OnInit {
this.centerPentagon.x = this.data.x; this.centerPentagon.x = this.data.x;
this.centerPentagon.y = this.data.y; this.centerPentagon.y = this.data.y;
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();
} }

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -45,7 +46,7 @@ export class DiagramExclusiveGatewayComponent implements OnInit {
this.width = this.data.width; this.width = this.data.width;
this.height = this.data.height; this.height = this.data.height;
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();
} }

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -45,7 +46,7 @@ export class DiagramGatewayComponent implements OnInit {
this.width = this.data.width; this.width = this.data.width;
this.height = this.data.height; this.height = this.data.height;
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();
} }

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -43,7 +44,7 @@ export class DiagramInclusiveGatewayComponent implements OnInit {
this.center.x = this.data.x + (this.data.width / 2); this.center.x = this.data.x + (this.data.width / 2);
this.center.y = this.data.y + (this.data.height / 2); this.center.y = this.data.y + (this.data.height / 2);
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();
} }

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -45,7 +46,7 @@ export class DiagramParallelGatewayComponent implements OnInit {
this.width = this.data.width; this.width = this.data.width;
this.height = this.data.height; this.height = this.data.height;
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();
} }

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -47,7 +48,7 @@ export class DiagramIntermediateCatchingEventComponent implements OnInit {
this.circleRadiusInner = 12; this.circleRadiusInner = 12;
this.circleRadiusOuter = 15; this.circleRadiusOuter = 15;
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id); this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
this.options.fillOpacity = this.diagramColorService.getFillOpacity(); this.options.fillOpacity = this.diagramColorService.getFillOpacity();
} }

View File

@@ -15,27 +15,26 @@
* limitations under the License. * limitations under the License.
*/ */
export class Anchor { export const ANCHOR_TYPE = {
public static ANCHOR_TYPE: any = {
main: 'main', main: 'main',
middle: 'middle', middle: 'middle',
first: 'first', first: 'first',
last: 'last' last: 'last'
}; };
export class Anchor {
uuid: any = null; uuid: any = null;
x: any = 0; x: any = 0;
y: any = 0; y: any = 0;
isFirst: any = false; isFirst: any = false;
isLast: any = false; isLast: any = false;
typeIndex: any = 0; typeIndex: any = 0;
type: any = Anchor.ANCHOR_TYPE.main; type: any = ANCHOR_TYPE.main;
constructor(uuid: any, type: any, x: any, y: any) { constructor(uuid: any, type: any, x: any, y: any) {
this.uuid = uuid; this.uuid = uuid;
this.x = x; this.x = x;
this.y = y; this.y = y;
this.type = (type === Anchor.ANCHOR_TYPE.middle) ? Anchor.ANCHOR_TYPE.middle : Anchor.ANCHOR_TYPE.main; this.type = (type === ANCHOR_TYPE.middle) ? ANCHOR_TYPE.middle : ANCHOR_TYPE.main;
} }
} }

View File

@@ -71,8 +71,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
C3.24683871,3.62387097 3.24683871,5.54219355 4.43006452,6.72541935 C5.61329032,7.90864516 7.5316129,7.90864516 C3.24683871,3.62387097 3.24683871,5.54219355 4.43006452,6.72541935 C5.61329032,7.90864516 7.5316129,7.90864516
8.71483871,6.72541935 C8.80464516,6.6356129 8.88529032,6.54025806 8.96154839,6.44270968 C7.57341935,5.98864516 8.71483871,6.72541935 C8.80464516,6.6356129 8.88529032,6.54025806 8.96154839,6.44270968 C7.57341935,5.98864516
6.57045161,4.68387097 6.57032258,3.144`).attr({ 6.57045161,4.68387097 6.57032258,3.144`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': '#87C040', fill: '#87C040',
'stroke-width': this.strokeWidth 'stroke-width': this.strokeWidth
}); });
@@ -86,8 +86,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
5.91935484 C14.947871,5.82954839 14.8526452,5.74890323 14.7550968,5.67264516 C14.3010323,7.06064516 12.996129,8.06374194 5.91935484 C14.947871,5.82954839 14.8526452,5.74890323 14.7550968,5.67264516 C14.3010323,7.06064516 12.996129,8.06374194
11.4563871,8.06374194 L8.61277419,8.06374194 L10.7529032,10.204 C11.936129,11.3872258 13.8545806,11.3872258 15.0376774,10.204 11.4563871,8.06374194 L8.61277419,8.06374194 L10.7529032,10.204 C11.936129,11.3872258 13.8545806,11.3872258 15.0376774,10.204
C16.2209032,9.02077419 16.2209032,7.10245161 15.0376774,5.91935484`).attr({ C16.2209032,9.02077419 16.2209032,7.10245161 15.0376774,5.91935484`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': '#87C040', fill: '#87C040',
'stroke-width': this.strokeWidth 'stroke-width': this.strokeWidth
}); });
path1.transform('T' + startX + ',' + startY); path1.transform('T' + startX + ',' + startY);
@@ -96,8 +96,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
C6.19458065,2.89032258 5.98141935,4.52309677 4.89225806,5.61225806 L2.88154839,7.62309677 L5.9083871,7.62309677 C6.19458065,2.89032258 5.98141935,4.52309677 4.89225806,5.61225806 L2.88154839,7.62309677 L5.9083871,7.62309677
C7.58154839,7.62309677 8.93806452,6.26658065 8.93806452,4.59329032 C8.93819355,2.92 7.58167742,1.5636129 C7.58154839,7.62309677 8.93806452,6.26658065 8.93806452,4.59329032 C8.93819355,2.92 7.58167742,1.5636129
5.9083871,1.5636129`).attr({ 5.9083871,1.5636129`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': '#ED9A2D', fill: '#ED9A2D',
'stroke-width': this.strokeWidth 'stroke-width': this.strokeWidth
}); });
@@ -108,8 +108,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
C0.206451613,1.10554839 0.125806452,1.20077419 0.0495483871,1.29845161 C1.43754839,1.75251613 2.44064516,3.05729032 C0.206451613,1.10554839 0.125806452,1.20077419 0.0495483871,1.29845161 C1.43754839,1.75251613 2.44064516,3.05729032
2.44064516,4.59703226 L2.44064516,7.44077419 L4.57574194,5.30554839 L4.58090323,5.30051613 C5.76412903,4.11729032 2.44064516,4.59703226 L2.44064516,7.44077419 L4.57574194,5.30554839 L4.58090323,5.30051613 C5.76412903,4.11729032
5.76412903,2.19896774 4.58090323,1.0156129`).attr({ 5.76412903,2.19896774 4.58090323,1.0156129`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': '#5698C6', fill: '#5698C6',
'stroke-width': this.strokeWidth 'stroke-width': this.strokeWidth
}); });
path1.transform('T' + startX2 + ',' + startY); path1.transform('T' + startX2 + ',' + startY);
@@ -139,8 +139,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
C4.04258065,4.74103226 2.12412903,4.74090323 0.941032258,5.92412903 C-0.242193548,7.10735484 -0.242193548,9.02567742 C4.04258065,4.74103226 2.12412903,4.74090323 0.941032258,5.92412903 C-0.242193548,7.10735484 -0.242193548,9.02567742
0.941032258,10.2089032 C1.03070968,10.2985806 1.12464516,10.3814194 1.22206452,10.4575484 C1.22529032,10.448 1.22929032,10.4388387 0.941032258,10.2089032 C1.03070968,10.2985806 1.12464516,10.3814194 1.22206452,10.4575484 C1.22529032,10.448 1.22929032,10.4388387
1.23251613,10.4292903`).attr({ 1.23251613,10.4292903`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': '#5698C6', fill: '#5698C6',
'stroke-width': this.strokeWidth 'stroke-width': this.strokeWidth
}); });
path1.transform('T' + startX + ',' + startY); path1.transform('T' + startX + ',' + startY);
@@ -152,8 +152,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
7.54722581,3.20090323 7.54722581,4.58890323 L7.54722581,4.59612903M10.1385806,5.29819355 L8.444,6.99290323 L8.444,4.71522581 7.54722581,3.20090323 7.54722581,4.58890323 L7.54722581,4.59612903M10.1385806,5.29819355 L8.444,6.99290323 L8.444,4.71522581
L8.44129032,4.58606452 C8.44129032,3.19896774 9.37341935,2.02954839 10.6454194,1.67019355 C11.2925161,2.82412903 L8.44129032,4.58606452 C8.44129032,3.19896774 9.37341935,2.02954839 10.6454194,1.67019355 C11.2925161,2.82412903
11.1251613,4.3116129 10.1436129,5.29316129 L10.1385806,5.29819355`).attr({ 11.1251613,4.3116129 10.1436129,5.29316129 L10.1385806,5.29819355`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': '#446BA5', fill: '#446BA5',
'stroke-width': this.strokeWidth 'stroke-width': this.strokeWidth
}); });
path1.transform('T' + startX + ',' + startY); path1.transform('T' + startX + ',' + startY);
@@ -161,8 +161,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
path1 = this.paper.path(`M11.4548387,7.61677419 L9.05832258,7.61677419 L10.6689032,6.00619355 L10.7583226,5.91303226 path1 = this.paper.path(`M11.4548387,7.61677419 L9.05832258,7.61677419 L10.6689032,6.00619355 L10.7583226,5.91303226
C11.7390968,4.93212903 13.2251613,4.7643871 14.3787097,5.40967742 C14.0202581,6.68322581 12.8500645,7.61677419 C11.7390968,4.93212903 13.2251613,4.7643871 14.3787097,5.40967742 C14.0202581,6.68322581 12.8500645,7.61677419
11.4620645,7.61677419 L11.4548387,7.61677419`).attr({ 11.4620645,7.61677419 L11.4548387,7.61677419`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': '#FFF101', fill: '#FFF101',
'stroke-width': this.strokeWidth 'stroke-width': this.strokeWidth
}); });
path1.transform('T' + startX + ',' + startY); path1.transform('T' + startX + ',' + startY);
@@ -176,8 +176,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
5.85690323,10.8347097 L5.86193548,10.8296774M4.53251613,8.50993548 L6.92903226,8.50993548 L5.31845161,10.1205161 5.85690323,10.8347097 L5.86193548,10.8296774M4.53251613,8.50993548 L6.92903226,8.50993548 L5.31845161,10.1205161
L5.22903226,10.2136774 C4.24812903,11.1945806 2.76219355,11.3623226 1.60851613,10.7170323 C1.96709677,9.44335484 L5.22903226,10.2136774 C4.24812903,11.1945806 2.76219355,11.3623226 1.60851613,10.7170323 C1.96709677,9.44335484
3.13716129,8.50993548 4.52529032,8.50993548 L4.53251613,8.50993548`).attr({ 3.13716129,8.50993548 4.52529032,8.50993548 L4.53251613,8.50993548`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': '#45AB47', fill: '#45AB47',
'stroke-width': this.strokeWidth 'stroke-width': this.strokeWidth
}); });
path1.transform('T' + startX + ',' + startY); path1.transform('T' + startX + ',' + startY);

View File

@@ -56,21 +56,19 @@ export class RaphaelIconBoxPublishDirective extends RaphaelBase implements OnIni
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const image = this.paper.image(); const image = this.paper.image();
image.attr({'x': position.x}); image.attr({x: position.x});
image.attr({'y': position.y}); image.attr({y: position.y});
image.attr({'id': 'image3398'}); image.attr({id: 'image3398'});
image.attr({'preserveAspectRatio': 'none'}); image.attr({preserveAspectRatio: 'none'});
image.attr({'height': '16'}); image.attr({height: '16'});
image.attr({'width': '17'}); image.attr({width: '17'});
image.attr({'src': `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAjCAYAAADxG9hnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAA7DAAAO image.attr({src: `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAjCAYAAADxG9hnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAA7DAAAO
wwHHb6hkAAAAB3RJTUUH3wQXDxwCFNe28AAACsdJREFUWMOVmGmMXtV5x3/POfe+ y2yeGc/mwbMZG9tDMGBTKC5GCU4pbYmSRlmowlIFJWnUprSiy4dI/UA/9EsVifZDmy wwHHb6hkAAAAB3RJTUUH3wQXDxwCFNe28AAACsdJREFUWMOVmGmMXtV5x3/POfe+ y2yeGc/mwbMZG9tDMGBTKC5GCU4pbYmSRlmowlIFJWnUprSiy4dI/UA/9EsVifZDmy
ZIxEpo1Cql UKICqbABG+x4X4M9iz2bxzOefXnfee+95zz9cN9Z7NqVeqSje3XPec/5n/Ns//8rAAd6xvj0lmYA VJWTI9fN2d5BikslrDEYY0ABIX0aUBUUUJS1TZB0HZS ZIxEpo1Cql UKICqbABG+x4X4M9iz2bxzOefXnfee+95zz9cN9Z7NqVeqSje3XPec/5n/Ns//8rAAd6xvj0lmYA VJWTI9fN2d5BikslrDEYY0ABIX0aUBUUUJS1TZB0HZS
lUsz8fBHF09neKnFU0t964B5trcoqwA8O fsI3HtmW/u7Hx3p5+oHNqCr7DpzLX3dh1+xC4Z7p2dnGKE7UGmOsNTYFIuXtUlQqsgJkGSdrgBRL 8dLCYlRUUTa1NrYXiqWZ lUsz8fBHF09neKnFU0t964B5trcoqwA8O fsI3HtmW/u7Hx3p5+oHNqCr7DpzLX3dh1+xC4Z7p2dnGKE7UGmOsNTYFIuXtUlQqsgJkGSdrgBRL 8dLCYlRUUTa1NrYXiqWZ

View File

@@ -63,8 +63,8 @@ export class RaphaelIconBusinessRuleDirective extends RaphaelBase implements OnI
const path1 = this.paper.path(`m 1,2 0,14 16,0 0,-14 z m 1.45458,5.6000386 2.90906,0 0,2.7999224 -2.90906,0 z m 4.36364,0 8.72718,0 const path1 = this.paper.path(`m 1,2 0,14 16,0 0,-14 z m 1.45458,5.6000386 2.90906,0 0,2.7999224 -2.90906,0 z m 4.36364,0 8.72718,0
0,2.7999224 -8.72718,0 z m -4.36364,4.1998844 2.90906,0 0,2.800116 -2.90906,0 z m 0,2.7999224 -8.72718,0 z m -4.36364,4.1998844 2.90906,0 0,2.800116 -2.90906,0 z m
4.36364,0 8.72718,0 0,2.800116 -8.72718,0 z`).attr({ 4.36364,0 8.72718,0 0,2.800116 -8.72718,0 z`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,11 +55,10 @@ export class RaphaelIconCamelDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`m 8.1878027,15.383782 c -0.824818,-0.3427 0.375093,-1.1925 0.404055,-1.7743 0.230509,-0.8159 const path1 = this.paper.path(`m 8.1878027,15.383782 c -0.824818,-0.3427 0.375093,-1.1925 0.404055,-1.7743 0.230509,-0.8159
-0.217173,-1.5329 -0.550642,-2.2283 -0.106244,-0.5273 -0.03299,-1.8886005 -0.747194,-1.7818005 -0.712355,0.3776 -0.9225,1.2309005 -0.217173,-1.5329 -0.550642,-2.2283 -0.106244,-0.5273 -0.03299,-1.8886005 -0.747194,-1.7818005 -0.712355,0.3776 -0.9225,1.2309005
-1.253911,1.9055005 -0.175574,1.0874 -0.630353,2.114 -0.775834,3.2123 -0.244009,0.4224 -1.741203,0.3888 -1.554386,-0.1397 -1.253911,1.9055005 -0.175574,1.0874 -0.630353,2.114 -0.775834,3.2123 -0.244009,0.4224 -1.741203,0.3888 -1.554386,-0.1397
@@ -80,8 +79,8 @@ export class RaphaelIconCamelDirective extends RaphaelBase implements OnInit {
0.152396,1.3997 0.157345,2.1104 0.07947,0.7464 0.171287,1.4944 0.238271,2.2351 0.237411,1.0076 -0.687542,1.1488 -1.414811,0.8598 0.152396,1.3997 0.157345,2.1104 0.07947,0.7464 0.171287,1.4944 0.238271,2.2351 0.237411,1.0076 -0.687542,1.1488 -1.414811,0.8598
z m 6.8675483,-1.8379 c 0.114364,-0.3658 0.206751,-1.2704 -0.114466,-1.3553 -0.152626,0.5835 -0.225018,1.1888 -0.227537,1.7919 z m 6.8675483,-1.8379 c 0.114364,-0.3658 0.206751,-1.2704 -0.114466,-1.3553 -0.152626,0.5835 -0.225018,1.1888 -0.227537,1.7919
0.147087,-0.1166 0.265559,-0.2643 0.342003,-0.4366 z`).attr({ 0.147087,-0.1166 0.265559,-0.2643 0.342003,-0.4366 z`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,16 +55,15 @@ export class RaphaelIconErrorDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`M 22.820839,11.171502 L 19.36734,24.58992 L 13.54138,14.281819 L 9.3386512,20.071607 const path1 = this.paper.path(`M 22.820839,11.171502 L 19.36734,24.58992 L 13.54138,14.281819 L 9.3386512,20.071607
L 13.048949,6.8323057 L 18.996148,16.132659 L 22.820839,11.171502 z`).attr({ L 13.048949,6.8323057 L 18.996148,16.132659 L 22.820839,11.171502 z`).attr({
'opacity': 1, opacity: 1,
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,21 +55,19 @@ export class RaphaelIconGoogleDrivePublishDirective extends RaphaelBase implemen
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const image = this.paper.image(); const image = this.paper.image();
image.attr({'x': position.x}); image.attr({x: position.x});
image.attr({'y': position.y}); image.attr({y: position.y});
image.attr({'id': 'image3398'}); image.attr({id: 'image3398'});
image.attr({'preserveAspectRatio': 'none'}); image.attr({preserveAspectRatio: 'none'});
image.attr({'height': '16'}); image.attr({height: '16'});
image.attr({'width': '17'}); image.attr({width: '17'});
image.attr({'src': `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBA image.attr({src: `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBA
JqcGAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIHSURBVDiNpVI7a1RREP7mzLl3d+9mScxaiBLFwohxQcXCwjwao/gqFAQhRGOphQgmgs9oGxaV JqcGAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIHSURBVDiNpVI7a1RREP7mzLl3d+9mScxaiBLFwohxQcXCwjwao/gqFAQhRGOphQgmgs9oGxaV
gFhpYPUPGMFCCzEqCgETg0uK4CuFoLhZyWNf994zFrqy9xJWwQ+mOB8z33wzZ4D/BIWJppG+plstc+mjK9yttbzALHExcoDaRxdqeRUWcFkGBz7G1s152CCQ7dUAqNOLuZf gFhpYPUPGMFCCzEqCgETg0uK4CuFoLhZyWNf994zFrqy9xJWwQ+mOB8z33wzZ4D/BIWJppG+plstc+mjK9yttbzALHExcoDaRxdqeRUWcFkGBz7G1s152CCQ7dUAqNOLuZf
qOmi439MmhifF86e6uLj4MFXoCuVXWPkp2vZkZlkHYvRNAJYwtz79oXdMLfFMSMD2Dd9YdoSGTO9hQLoBQBESQvLpUNaZD1sGsN8d390dFBjpiwooHVBW6tvXCr2H4EFo6L qOmi439MmhifF86e6uLj4MFXoCuVXWPkp2vZkZlkHYvRNAJYwtz79oXdMLfFMSMD2Dd9YdoSGTO9hQLoBQBESQvLpUNaZD1sGsN8d390dFBjpiwooHVBW6tvXCr2H4EFo6L

View File

@@ -55,11 +55,10 @@ export class RaphaelIconManualDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`m 17,9.3290326 c -0.0069,0.5512461 -0.455166,1.0455894 -0.940778,1.0376604 l -5.792746,0 c const path1 = this.paper.path(`m 17,9.3290326 c -0.0069,0.5512461 -0.455166,1.0455894 -0.940778,1.0376604 l -5.792746,0 c
0.0053,0.119381 0.0026,0.237107 0.0061,0.355965 l 5.154918,0 c 0.482032,-0.0096 0.925529,0.49051 0.919525,1.037574 -0.0078,0.537128 0.0053,0.119381 0.0026,0.237107 0.0061,0.355965 l 5.154918,0 c 0.482032,-0.0096 0.925529,0.49051 0.919525,1.037574 -0.0078,0.537128
-0.446283,1.017531 -0.919521,1.007683 l -5.245273,0 c -0.01507,0.104484 -0.03389,0.204081 -0.05316,0.301591 l 2.630175,0 -0.446283,1.017531 -0.919521,1.007683 l -5.245273,0 c -0.01507,0.104484 -0.03389,0.204081 -0.05316,0.301591 l 2.630175,0
@@ -70,9 +69,9 @@ export class RaphaelIconManualDirective extends RaphaelBase implements OnInit {
8.507351,5.7996113 8.4370292,5.7936859 l 6.3569748,-0.00871 c 0.497046,-0.00958 0.952273,0.5097676 0.94612,1.0738232 8.507351,5.7996113 8.4370292,5.7936859 l 6.3569748,-0.00871 c 0.497046,-0.00958 0.952273,0.5097676 0.94612,1.0738232
-0.0053,0.556126 -0.456176,1.0566566 -0.94612,1.0496854 l -4.72435,0 c 0.01307,0.1149374 0.0244,0.2281319 0.03721,0.3498661 -0.0053,0.556126 -0.456176,1.0566566 -0.94612,1.0496854 l -4.72435,0 c 0.01307,0.1149374 0.0244,0.2281319 0.03721,0.3498661
l 5.952195,0 c 0.494517,-0.00871 0.947906,0.5066305 0.940795,1.0679848 z`).attr({ l 5.952195,0 c 0.494517,-0.00871 0.947906,0.5066305 0.940795,1.0679848 z`).attr({
'opacity': 1, opacity: 1,
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,17 +55,16 @@ export class RaphaelIconMessageDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15 const path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15
L 17 15 L 12 10 L 9 13 L 6 10 z`).attr({ L 17 15 L 12 10 L 9 13 L 6 10 z`).attr({
'opacity': this.fillOpacity, opacity: this.fillOpacity,
'stroke': this.stroke, stroke: this.stroke,
'strokeWidth': this.strokeWidth, strokeWidth: this.strokeWidth,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,19 +55,18 @@ export class RaphaelIconMuleDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`M 8,0 C 3.581722,0 0,3.5817 0,8 c 0,4.4183 3.581722,8 8,8 4.418278,0 8,-3.5817 8,-8 L 16,7.6562 const path1 = this.paper.path(`M 8,0 C 3.581722,0 0,3.5817 0,8 c 0,4.4183 3.581722,8 8,8 4.418278,0 8,-3.5817 8,-8 L 16,7.6562
C 15.813571,3.3775 12.282847,0 8,0 z M 5.1875,2.7812 8,7.3437 10.8125,2.7812 c 1.323522,0.4299 2.329453,1.5645 2.8125,2.8438 C 15.813571,3.3775 12.282847,0 8,0 z M 5.1875,2.7812 8,7.3437 10.8125,2.7812 c 1.323522,0.4299 2.329453,1.5645 2.8125,2.8438
1.136151,2.8609 -0.380702,6.4569 -3.25,7.5937 -0.217837,-0.6102 -0.438416,-1.2022 -0.65625,-1.8125 0.701032,-0.2274 1.136151,2.8609 -0.380702,6.4569 -3.25,7.5937 -0.217837,-0.6102 -0.438416,-1.2022 -0.65625,-1.8125 0.701032,-0.2274
1.313373,-0.6949 1.71875,-1.3125 0.73624,-1.2317 0.939877,-2.6305 -0.03125,-4.3125 l -2.75,4.0625 -0.65625,0 -0.65625,0 -2.75,-4 1.313373,-0.6949 1.71875,-1.3125 0.73624,-1.2317 0.939877,-2.6305 -0.03125,-4.3125 l -2.75,4.0625 -0.65625,0 -0.65625,0 -2.75,-4
C 3.5268433,7.6916 3.82626,8.862 4.5625,10.0937 4.967877,10.7113 5.580218,11.1788 6.28125,11.4062 6.063416,12.0165 5.842837,12.6085 C 3.5268433,7.6916 3.82626,8.862 4.5625,10.0937 4.967877,10.7113 5.580218,11.1788 6.28125,11.4062 6.063416,12.0165 5.842837,12.6085
5.625,13.2187 2.755702,12.0819 1.238849,8.4858 2.375,5.625 2.858047,4.3457 3.863978,3.2112 5.1875,2.7812 z`).attr({ 5.625,13.2187 2.755702,12.0819 1.238849,8.4858 2.375,5.625 2.858047,4.3457 3.863978,3.2112 5.1875,2.7812 z`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,15 +55,14 @@ export class RaphaelIconReceiveDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`m 0.5,2.5 0,13 17,0 0,-13 z M 2,4 6.5,8.5 2,13 z M 4,4 14,4 9,9 z m 12,0 0,9 -4.5,-4.5 z const path1 = this.paper.path(`m 0.5,2.5 0,13 17,0 0,-13 z M 2,4 6.5,8.5 2,13 z M 4,4 14,4 9,9 z m 12,0 0,9 -4.5,-4.5 z
M 7.5,9.5 9,11 10.5,9.5 15,14 3,14 z`).attr({ M 7.5,9.5 9,11 10.5,9.5 15,14 3,14 z`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -70,8 +70,8 @@ export class RaphaelIconRestCallDirective extends RaphaelBase implements OnInit
0.349146,0.04476 l 3.437744,-2.005351 q 0.125335,-0.08953 0.143239,-0.232763 l 0.17905,-3.392986 q 1.02058,-0.859435 0.349146,0.04476 l 3.437744,-2.005351 q 0.125335,-0.08953 0.143239,-0.232763 l 0.17905,-3.392986 q 1.02058,-0.859435
1.745729,-1.575629 1.67411,-1.6830612 2.309735,-3.2049805 0.635625,-1.5219191 0.635625,-3.8585111 0,-0.1253369 -0.08505,-0.2148575 1.745729,-1.575629 1.67411,-1.6830612 2.309735,-3.2049805 0.635625,-1.5219191 0.635625,-3.8585111 0,-0.1253369 -0.08505,-0.2148575
-0.08505,-0.089526 -0.201431,-0.089526 z`).attr({ -0.08505,-0.089526 -0.201431,-0.089526 z`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,16 +55,15 @@ export class RaphaelIconScriptDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`m 5,2 0,0.094 c 0.23706,0.064 0.53189,0.1645 0.8125,0.375 0.5582,0.4186 1.05109,1.228 1.15625,2.5312 const path1 = this.paper.path(`m 5,2 0,0.094 c 0.23706,0.064 0.53189,0.1645 0.8125,0.375 0.5582,0.4186 1.05109,1.228 1.15625,2.5312
l 8.03125,0 1,0 1,0 c 0,-3 -2,-3 -2,-3 l -10,0 z M 4,3 4,13 2,13 c 0,3 2,3 2,3 l 9,0 c 0,0 2,0 2,-3 L 15,6 6,6 6,5.5 C 6,4.1111 l 8.03125,0 1,0 1,0 c 0,-3 -2,-3 -2,-3 l -10,0 z M 4,3 4,13 2,13 c 0,3 2,3 2,3 l 9,0 c 0,0 2,0 2,-3 L 15,6 6,6 6,5.5 C 6,4.1111
5.5595,3.529 5.1875,3.25 4.8155,2.971 4.5,3 4.5,3 L 4,3 z`).attr({ 5.5595,3.529 5.1875,3.25 4.8155,2.971 4.5,3 4.5,3 L 4,3 z`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,15 +55,14 @@ export class RaphaelIconSendDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15 const path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15
L 17 15 L 12 10 L 9 13 L 6 10 z`).attr({ L 17 15 L 12 10 L 9 13 L 6 10 z`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,11 +55,10 @@ export class RaphaelIconServiceDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path('M 8,1 7.5,2.875 c 0,0 -0.02438,0.250763 -0.40625,0.4375 C 7.05724,3.330353 7.04387,3.358818 7,3.375' + const path1 = this.paper.path('M 8,1 7.5,2.875 c 0,0 -0.02438,0.250763 -0.40625,0.4375 C 7.05724,3.330353 7.04387,3.358818 7,3.375' +
' 6.6676654,3.4929791 6.3336971,3.6092802 6.03125,3.78125 6.02349,3.78566 6.007733,3.77681 6,3.78125 5.8811373,3.761018' + ' 6.6676654,3.4929791 6.3336971,3.6092802 6.03125,3.78125 6.02349,3.78566 6.007733,3.77681 6,3.78125 5.8811373,3.761018' +
' 5.8125,3.71875 5.8125,3.71875 l -1.6875,-1 -1.40625,1.4375 0.96875,1.65625 c 0,0 0.065705,0.068637 0.09375,0.1875' + ' 5.8125,3.71875 5.8125,3.71875 l -1.6875,-1 -1.40625,1.4375 0.96875,1.65625 c 0,0 0.065705,0.068637 0.09375,0.1875' +
@@ -78,9 +77,9 @@ export class RaphaelIconServiceDirective extends RaphaelBase implements OnInit {
' 11.405359,3.5035185 11.198648,3.4455201 11,3.375 10.95613,3.3588185 10.942759,3.3303534 10.90625,3.3125 10.524382,3.125763' + ' 11.405359,3.5035185 11.198648,3.4455201 11,3.375 10.95613,3.3588185 10.942759,3.3303534 10.90625,3.3125 10.524382,3.125763' +
' 10.5,2.875 10.5,2.875 L 10,1 8,1 z m 1,5 c 1.656854,0 3,1.3431458 3,3 0,1.656854 -1.343146,3 -3,3 C 7.3431458,12' + ' 10.5,2.875 10.5,2.875 L 10,1 8,1 z m 1,5 c 1.656854,0 3,1.3431458 3,3 0,1.656854 -1.343146,3 -3,3 C 7.3431458,12' +
' 6,10.656854 6,9 6,7.3431458 7.3431458,6 9,6 z').attr({ ' 6,10.656854 6,9 6,7.3431458 7.3431458,6 9,6 z').attr({
'opacity': 1, opacity: 1,
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -61,10 +61,10 @@ export class RaphaelIconSignalDirective extends RaphaelBase implements OnInit {
public draw(position: Point) { public draw(position: Point) {
const path1 = this.paper.path(`M 8.7124971,21.247342 L 23.333334,21.247342 L 16.022915,8.5759512 L 8.7124971,21.247342 z`).attr({ const path1 = this.paper.path(`M 8.7124971,21.247342 L 23.333334,21.247342 L 16.022915,8.5759512 L 8.7124971,21.247342 z`).attr({
'opacity': this.fillOpacity, opacity: this.fillOpacity,
'stroke': this.stroke, stroke: this.stroke,
'strokeWidth': this.strokeWidth, strokeWidth: this.strokeWidth,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,11 +55,10 @@ export class RaphaelIconTimerDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`M 10 0 C 4.4771525 0 0 4.4771525 0 10 C 0 15.522847 4.4771525 20 10 20 C 15.522847 20 20 15.522847 20 const path1 = this.paper.path(`M 10 0 C 4.4771525 0 0 4.4771525 0 10 C 0 15.522847 4.4771525 20 10 20 C 15.522847 20 20 15.522847 20
10 C 20 4.4771525 15.522847 1.1842379e-15 10 0 z M 9.09375 1.03125 C 9.2292164 1.0174926 9.362825 1.0389311 9.5 1.03125 L 9.5 3.5 10 C 20 4.4771525 15.522847 1.1842379e-15 10 0 z M 9.09375 1.03125 C 9.2292164 1.0174926 9.362825 1.0389311 9.5 1.03125 L 9.5 3.5
L 10.5 3.5 L 10.5 1.03125 C 15.063526 1.2867831 18.713217 4.9364738 18.96875 9.5 L 16.5 9.5 L 16.5 10.5 L 18.96875 10.5 C 18.713217 L 10.5 3.5 L 10.5 1.03125 C 15.063526 1.2867831 18.713217 4.9364738 18.96875 9.5 L 16.5 9.5 L 16.5 10.5 L 18.96875 10.5 C 18.713217
@@ -67,8 +66,8 @@ export class RaphaelIconTimerDirective extends RaphaelBase implements OnInit {
10.5 L 3.5 10.5 L 3.5 9.5 L 1.03125 9.5 C 1.279102 5.0736488 4.7225326 1.4751713 9.09375 1.03125 z M 9.5 5 L 9.5 8.0625 C 8.6373007 10.5 L 3.5 10.5 L 3.5 9.5 L 1.03125 9.5 C 1.279102 5.0736488 4.7225326 1.4751713 9.09375 1.03125 z M 9.5 5 L 9.5 8.0625 C 8.6373007
8.2844627 8 9.0680195 8 10 C 8 11.104569 8.8954305 12 10 12 C 10.931981 12 11.715537 11.362699 11.9375 10.5 L 14 10.5 L 14 9.5 8.2844627 8 9.0680195 8 10 C 8 11.104569 8.8954305 12 10 12 C 10.931981 12 11.715537 11.362699 11.9375 10.5 L 14 10.5 L 14 9.5
L 11.9375 9.5 C 11.756642 8.7970599 11.20294 8.2433585 10.5 8.0625 L 10.5 5 L 9.5 5 z`).attr({ L 11.9375 9.5 C 11.756642 8.7970599 11.20294 8.2433585 10.5 8.0625 L 10.5 5 L 9.5 5 z`).attr({
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -55,17 +55,16 @@ export class RaphaelIconUserDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.draw(this.position); this.draw(this.position);
} }
public draw(position: Point) { draw(position: Point) {
const path1 = this.paper.path(`m 1,17 16,0 0,-1.7778 -5.333332,-3.5555 0,-1.7778 c 1.244444,0 1.244444,-2.3111 1.244444,-2.3111 const path1 = this.paper.path(`m 1,17 16,0 0,-1.7778 -5.333332,-3.5555 0,-1.7778 c 1.244444,0 1.244444,-2.3111 1.244444,-2.3111
l 0,-3.0222 C 12.555557,0.8221 9.0000001,1.0001 9.0000001,1.0001 c 0,0 -3.5555556,-0.178 -3.9111111,3.5555 l 0,3.0222 c l 0,-3.0222 C 12.555557,0.8221 9.0000001,1.0001 9.0000001,1.0001 c 0,0 -3.5555556,-0.178 -3.9111111,3.5555 l 0,3.0222 c
0,0 0,2.3111 1.2444443,2.3111 l 0,1.7778 L 1,15.2222 1,17 17,17`).attr({ 0,0 0,2.3111 1.2444443,2.3111 l 0,1.7778 L 1,15.2222 1,17 17,17`).attr({
'opacity': 1, opacity: 1,
'stroke': this.stroke, stroke: this.stroke,
'fill': this.fillColors fill: this.fillColors
}); });
return path1.transform('T' + position.x + ',' + position.y); return path1.transform('T' + position.x + ',' + position.y);
} }

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { Anchor } from './anchor'; import { Anchor, ANCHOR_TYPE } from './anchor';
/* eslint-disable */ /* eslint-disable */
export class Polyline { export class Polyline {
@@ -70,14 +70,14 @@ export class Polyline {
// create anchors // create anchors
this.pushAnchor(Anchor.ANCHOR_TYPE.first, this.getLine(0).x1, this.getLine(0).y1); this.pushAnchor(ANCHOR_TYPE.first, this.getLine(0).x1, this.getLine(0).y1);
for (var i = 1; i < linesCount; i++) { for (var i = 1; i < linesCount; i++) {
var line1 = this.getLine(i - 1); var line1 = this.getLine(i - 1);
this.pushAnchor(Anchor.ANCHOR_TYPE.main, line1.x2, line1.y2); this.pushAnchor(ANCHOR_TYPE.main, line1.x2, line1.y2);
} }
this.pushAnchor(Anchor.ANCHOR_TYPE.last, this.getLine(linesCount - 1).x2, this.getLine(linesCount - 1).y2); this.pushAnchor(ANCHOR_TYPE.last, this.getLine(linesCount - 1).x2, this.getLine(linesCount - 1).y2);
this.rebuildPath(); this.rebuildPath();
} }
@@ -149,9 +149,9 @@ export class Polyline {
pushAnchor(type, x, y) { pushAnchor(type, x, y) {
var index; var index;
if (type === Anchor.ANCHOR_TYPE.first) { if (type === ANCHOR_TYPE.first) {
index = 0; index = 0;
} else if (type === Anchor.ANCHOR_TYPE.last) { } else if (type === ANCHOR_TYPE.last) {
index = this.getAnchorsCount(); index = this.getAnchorsCount();
} else if (!index) { } else if (!index) {
index = this.anchors.length; index = this.anchors.length;
@@ -165,7 +165,7 @@ export class Polyline {
} }
} }
var anchor: any = new Anchor(this.id, Anchor.ANCHOR_TYPE.main, x, y); var anchor: any = new Anchor(this.id, ANCHOR_TYPE.main, x, y);
this.anchors.push(anchor); this.anchors.push(anchor);
} }
@@ -175,10 +175,10 @@ export class Polyline {
} }
getAnchorByType(type, position) { getAnchorByType(type, position) {
if (type === Anchor.ANCHOR_TYPE.first) { if (type === ANCHOR_TYPE.first) {
return this.anchors[0]; return this.anchors[0];
} }
if (type === Anchor.ANCHOR_TYPE.last) { if (type === ANCHOR_TYPE.last) {
return this.anchors[this.getAnchorsCount() - 1]; return this.anchors[this.getAnchorsCount() - 1];
} }
for (var i = 0; i < this.getAnchorsCount(); i++) { for (var i = 0; i < this.getAnchorsCount(); i++) {

View File

@@ -58,13 +58,17 @@ export class RaphaelCircleDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
const opts = {
const opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity}; 'stroke-width': this.strokeWidth,
fill: this.fillColors,
stroke: this.stroke,
'fill-opacity': this.fillOpacity
};
const drawElement = this.draw(this.center, this.radius, opts); const drawElement = this.draw(this.center, this.radius, opts);
drawElement.node.id = this.elementId; drawElement.node.id = this.elementId;
} }
public draw(center: Point, radius: number, opts: any) { draw(center: Point, radius: number, opts: any) {
const circle = this.paper.circle(center.x, center.y, radius).attr(opts); const circle = this.paper.circle(center.x, center.y, radius).attr(opts);
return circle; return circle;
} }

View File

@@ -55,12 +55,16 @@ export class RaphaelCrossDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
const opts = {
const opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity}; 'stroke-width': this.strokeWidth,
fill: this.fillColors,
stroke: this.stroke,
'fill-opacity': this.fillOpacity
};
this.draw(this.center, this.width, this.height, opts); this.draw(this.center, this.width, this.height, opts);
} }
public draw(center: Point, width: number, height: number, opts?: any) { draw(center: Point, width: number, height: number, opts?: any) {
const quarterWidth = width / 4; const quarterWidth = width / 4;
const quarterHeight = height / 4; const quarterHeight = height / 4;

View File

@@ -20,8 +20,12 @@ import { Polyline } from './polyline';
import { RaphaelBase } from './raphael-base'; import { RaphaelBase } from './raphael-base';
import { RaphaelService } from './raphael.service'; import { RaphaelService } from './raphael.service';
// eslint-disable-next-line @typescript-eslint/naming-convention
declare let Raphael: any; declare let Raphael: any;
const ARROW_WIDTH = 4;
const SEQUENCE_FLOW_STROKE = 1.5;
/** /**
* Directive selectors without adf- prefix will be deprecated on 3.0.0 * Directive selectors without adf- prefix will be deprecated on 3.0.0
*/ */
@@ -36,29 +40,25 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
@Output() @Output()
error = new EventEmitter(); error = new EventEmitter();
ARROW_WIDTH = 4;
SEQUENCE_FLOW_STROKE = 1.5;
constructor(public elementRef: ElementRef, constructor(public elementRef: ElementRef,
raphaelService: RaphaelService) { raphaelService: RaphaelService) {
super(elementRef, raphaelService); super(elementRef, raphaelService);
} }
ngOnInit() { ngOnInit() {
this.draw(this.flow); this.draw(this.flow);
} }
public draw(flow: any) { draw(flow: any) {
const line = this.drawLine(flow); const line = this.drawLine(flow);
this.drawArrow(line); this.drawArrow(line);
} }
public drawLine(flow: any) { drawLine(flow: any) {
const polyline = new Polyline(flow.id, flow.waypoints, this.SEQUENCE_FLOW_STROKE, this.paper); const polyline = new Polyline(flow.id, flow.waypoints, SEQUENCE_FLOW_STROKE, this.paper);
polyline.element = this.paper.path(polyline.path); polyline.element = this.paper.path(polyline.path);
polyline.element.attr({'stroke-width': this.SEQUENCE_FLOW_STROKE}); polyline.element.attr({'stroke-width': SEQUENCE_FLOW_STROKE});
polyline.element.attr({'stroke': '#585858'}); polyline.element.attr({stroke: '#585858'});
polyline.element.node.id = this.flow.id; polyline.element.node.id = this.flow.id;
@@ -67,9 +67,9 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
return line; return line;
} }
public drawArrow(line: any) { drawArrow(line: any) {
const doubleArrowWidth = 2 * this.ARROW_WIDTH; const doubleArrowWidth = 2 * ARROW_WIDTH;
const width = this.ARROW_WIDTH / 2 + .5; const width = ARROW_WIDTH / 2 + .5;
const arrowHead: any = this.paper.path('M0 0L-' + width + '-' + doubleArrowWidth + 'L' + width + ' -' + doubleArrowWidth + 'z'); const arrowHead: any = this.paper.path('M0 0L-' + width + '-' + doubleArrowWidth + 'L' + width + ' -' + doubleArrowWidth + 'z');
arrowHead.transform('t' + line.x2 + ',' + line.y2); arrowHead.transform('t' + line.x2 + ',' + line.y2);
@@ -78,8 +78,7 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
arrowHead.attr('fill', '#585858'); arrowHead.attr('fill', '#585858');
arrowHead.attr('stroke-width', this.SEQUENCE_FLOW_STROKE); arrowHead.attr('stroke-width', SEQUENCE_FLOW_STROKE);
arrowHead.attr('stroke', '#585858'); arrowHead.attr('stroke', '#585858');
} }
} }

View File

@@ -20,6 +20,8 @@ import { Point } from './models/point';
import { RaphaelBase } from './raphael-base'; import { RaphaelBase } from './raphael-base';
import { RaphaelService } from './raphael.service'; import { RaphaelService } from './raphael.service';
const TEXT_PADDING = 3;
/** /**
* Directive selectors without adf- prefix will be deprecated on 3.0.0 * Directive selectors without adf- prefix will be deprecated on 3.0.0
*/ */
@@ -43,8 +45,6 @@ export class RaphaelMultilineTextDirective extends RaphaelBase implements OnInit
@Output() @Output()
error = new EventEmitter(); error = new EventEmitter();
TEXT_PADDING = 3;
constructor(public elementRef: ElementRef, constructor(public elementRef: ElementRef,
raphaelService: RaphaelService) { raphaelService: RaphaelService) {
super(elementRef, raphaelService); super(elementRef, raphaelService);
@@ -58,16 +58,16 @@ export class RaphaelMultilineTextDirective extends RaphaelBase implements OnInit
} }
draw(position: Point, text: string) { draw(position: Point, text: string) {
const textPaper = this.paper.text(position.x + this.TEXT_PADDING, position.y + this.TEXT_PADDING, text).attr({ const textPaper = this.paper.text(position.x + TEXT_PADDING, position.y + TEXT_PADDING, text).attr({
'text-anchor': 'middle', 'text-anchor': 'middle',
'font-family': 'Arial', 'font-family': 'Arial',
'font-size': '11', 'font-size': '11',
'fill': '#373e48' fill: '#373e48'
}); });
const formattedText = this.formatText(textPaper, text, this.elementWidth); const formattedText = this.formatText(textPaper, text, this.elementWidth);
textPaper.attr({ textPaper.attr({
'text': formattedText text: formattedText
}); });
textPaper.transform(this.transform); textPaper.transform(this.transform);
return textPaper; return textPaper;
@@ -76,7 +76,7 @@ export class RaphaelMultilineTextDirective extends RaphaelBase implements OnInit
private formatText(textPaper, text, elementWidth) { private formatText(textPaper, text, elementWidth) {
const pText = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; const pText = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
textPaper.attr({ textPaper.attr({
'text': pText text: pText
}); });
const letterWidth = textPaper.getBBox().width / text.length; const letterWidth = textPaper.getBBox().width / text.length;
const removedLineBreaks = text.split('\n'); const removedLineBreaks = text.split('\n');

View File

@@ -52,18 +52,17 @@ export class RaphaelPentagonDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
const opts = { const opts = {
'stroke-width': this.strokeWidth, 'stroke-width': this.strokeWidth,
'fill': this.fillColors, fill: this.fillColors,
'stroke': this.stroke, stroke: this.stroke,
'fill-opacity': this.fillOpacity, 'fill-opacity': this.fillOpacity,
'stroke-linejoin': 'bevel' 'stroke-linejoin': 'bevel'
}; };
this.draw(this.center, opts); this.draw(this.center, opts);
} }
public draw(center: Point, opts?: any) { draw(center: Point, opts?: any) {
const shape = this.paper.path('M 20.327514,22.344972 L 11.259248,22.344216 L 8.4577203,13.719549' + const shape = this.paper.path('M 20.327514,22.344972 L 11.259248,22.344216 L 8.4577203,13.719549' +
' L 15.794545,8.389969 L 23.130481,13.720774 L 20.327514,22.344972 z').attr(opts); ' L 15.794545,8.389969 L 23.130481,13.720774 L 20.327514,22.344972 z').attr(opts);
shape.transform('T' + (center.x + 4) + ',' + (center.y + 4)); shape.transform('T' + (center.x + 4) + ',' + (center.y + 4));

View File

@@ -49,11 +49,16 @@ export class RaphaelPlusDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
const opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity}; const opts = {
'stroke-width': this.strokeWidth,
fill: this.fillColors,
stroke: this.stroke,
'fill-opacity': this.fillOpacity
};
this.draw(this.center, opts); this.draw(this.center, opts);
} }
public draw(center: Point, opts?: any) { draw(center: Point, opts?: any) {
const path = this.paper.path('M 6.75,16 L 25.75,16 M 16,6.75 L 16,25.75').attr(opts); const path = this.paper.path('M 6.75,16 L 25.75,16 M 16,6.75 L 16,25.75').attr(opts);
return path.transform('T' + (center.x + 4) + ',' + (center.y + 4)); return path.transform('T' + (center.x + 4) + ',' + (center.y + 4));
} }

View File

@@ -64,18 +64,17 @@ export class RaphaelRectDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
const opts = { const opts = {
'stroke-width': this.strokeWidth, 'stroke-width': this.strokeWidth,
'fill': this.fillColors, fill: this.fillColors,
'stroke': this.stroke, stroke: this.stroke,
'fill-opacity': this.fillOpacity 'fill-opacity': this.fillOpacity
}; };
const elementDraw = this.draw(this.leftCorner, this.width, this.height, this.radius, opts); const elementDraw = this.draw(this.leftCorner, this.width, this.height, this.radius, opts);
elementDraw.node.id = this.elementId; elementDraw.node.id = this.elementId;
} }
public draw(leftCorner: Point, width: number, height: number, radius: number, opts: any) { draw(leftCorner: Point, width: number, height: number, radius: number, opts: any) {
return this.paper.rect(leftCorner.x, leftCorner.y, width, height, radius).attr(opts); return this.paper.rect(leftCorner.x, leftCorner.y, width, height, radius).attr(opts);
} }
} }

View File

@@ -58,13 +58,17 @@ export class RaphaelRhombusDirective extends RaphaelBase implements OnInit {
} }
ngOnInit() { ngOnInit() {
const opts = {
const opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity}; 'stroke-width': this.strokeWidth,
fill: this.fillColors,
stroke: this.stroke,
'fill-opacity': this.fillOpacity
};
const elementDraw = this.draw(this.center, this.width, this.height, opts); const elementDraw = this.draw(this.center, this.width, this.height, opts);
elementDraw.node.id = this.elementId; elementDraw.node.id = this.elementId;
} }
public draw(center: Point, width: number, height: number, opts?: any) { draw(center: Point, width: number, height: number, opts?: any) {
return this.paper.path('M' + center.x + ' ' + (center.y + (height / 2)) + return this.paper.path('M' + center.x + ' ' + (center.y + (height / 2)) +
'L' + (center.x + (width / 2)) + ' ' + (center.y + height) + 'L' + (center.x + (width / 2)) + ' ' + (center.y + height) +
'L' + (center.x + width) + ' ' + (center.y + (height / 2)) + 'L' + (center.x + width) + ' ' + (center.y + (height / 2)) +

View File

@@ -58,7 +58,7 @@ export class RaphaelTextDirective extends RaphaelBase implements OnInit {
'text-anchor' : 'middle', 'text-anchor' : 'middle',
'font-family' : 'Arial', 'font-family' : 'Arial',
'font-size' : '11', 'font-size' : '11',
'fill' : '#373e48' fill : '#373e48'
}); });
textPaper.transform(this.transform); textPaper.transform(this.transform);

View File

@@ -17,20 +17,17 @@
import { Injectable , OnDestroy } from '@angular/core'; import { Injectable , OnDestroy } from '@angular/core';
// eslint-disable-next-line @typescript-eslint/naming-convention
declare let Raphael: any; declare let Raphael: any;
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class RaphaelService implements OnDestroy { export class RaphaelService implements OnDestroy {
paper: any; paper: any;
width: number = 300; width: number = 300;
height: number = 400; height: number = 400;
private ctx: any; private ctx: any;
constructor() { getInstance(element: any): any {
}
public getInstance(element: any): any {
if (!this.paper) { if (!this.paper) {
this.ctx = element.nativeElement; this.ctx = element.nativeElement;
this.refresh(); this.refresh();
@@ -38,12 +35,7 @@ export class RaphaelService implements OnDestroy {
return this.paper; return this.paper;
} }
private refresh(): any { getPaperBuilder(ctx: any): any {
this.ngOnDestroy();
this.paper = this.getPaperBuilder(this.ctx);
}
public getPaperBuilder(ctx: any): any {
if (typeof Raphael === 'undefined') { if (typeof Raphael === 'undefined') {
throw new Error('insights configuration issue: Embedding Chart.js lib is mandatory'); throw new Error('insights configuration issue: Embedding Chart.js lib is mandatory');
} }
@@ -51,19 +43,24 @@ export class RaphaelService implements OnDestroy {
return paper; return paper;
} }
public ngOnDestroy(): any { ngOnDestroy(): any {
if (this.paper) { if (this.paper) {
this.paper.clear(); this.paper.clear();
this.paper = void 0; this.paper = void 0;
} }
} }
public setting(width: number, height: number): void { setting(width: number, height: number): void {
this.width = width; this.width = width;
this.height = height; this.height = height;
} }
public reset(): any { reset(): any {
this.ngOnDestroy(); this.ngOnDestroy();
} }
private refresh(): any {
this.ngOnDestroy();
this.paper = this.getPaperBuilder(this.ctx);
}
} }

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -46,7 +47,7 @@ export class DiagramEventSubprocessComponent implements OnInit {
this.height = this.data.height; this.height = this.data.height;
this.options.fillColors = 'none'; this.options.fillColors = 'none';
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.strokeWidth = 1; this.options.strokeWidth = 1;
} }
} }

View File

@@ -18,6 +18,7 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MAIN_STROKE_COLOR } from '../../constants/diagram-colors';
import { DiagramColorService } from '../../services/diagram-color.service'; import { DiagramColorService } from '../../services/diagram-color.service';
@Component({ @Component({
@@ -46,7 +47,7 @@ export class DiagramSubprocessComponent implements OnInit {
this.height = this.data.height; this.height = this.data.height;
this.options.fillColors = 'none'; this.options.fillColors = 'none';
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR); this.options.stroke = this.diagramColorService.getBpmnColor(this.data, MAIN_STROKE_COLOR);
this.options.strokeWidth = 1; this.options.strokeWidth = 1;
} }
} }

View File

@@ -18,8 +18,9 @@
/* eslint-disable @angular-eslint/component-selector */ /* eslint-disable @angular-eslint/component-selector */
import { AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild } from '@angular/core'; import { AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild } from '@angular/core';
const POSITION = { BOTTOM: 'bottom', LEFT: 'left', RIGHT: 'right', TOP: 'top' };
const STRATEGY = { CURSOR: 'cursor', ELEMENT: 'element' }; const POSITION = { bottom: 'bottom', left: 'left', right: 'right', top: 'top' };
const STRATEGY = { cursor: 'cursor', element: 'element' };
const IS_ACTIVE_CLASS = 'adf-is-active'; const IS_ACTIVE_CLASS = 'adf-is-active';
@Component({ @Component({
@@ -28,27 +29,27 @@ const IS_ACTIVE_CLASS = 'adf-is-active';
styleUrls: ['./diagram-tooltip.component.scss'] styleUrls: ['./diagram-tooltip.component.scss']
}) })
export class DiagramTooltipComponent implements AfterViewInit, OnDestroy { export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
@ViewChild('tooltipContent', { static: true })
tooltipContent: ElementRef;
@Input()
data: any;
@Input()
position = POSITION.bottom;
@Input()
strategy = STRATEGY.cursor;
private tooltipElement: any; private tooltipElement: any;
private targetElement: any; private targetElement: any;
private boundMouseEnterHandler: EventListenerObject; private boundMouseEnterHandler: EventListenerObject;
private boundMouseLeaveAndScrollHandler: EventListenerObject; private boundMouseLeaveAndScrollHandler: EventListenerObject;
@ViewChild('tooltipContent', { static: true }) tooltipContent: ElementRef;
@Input()
data: any;
@Input()
position: string = 'bottom';
@Input()
strategy: string = 'cursor';
/** /**
* Set up event listeners for the target element (defined in the data.id) * Set up event listeners for the target element (defined in the data.id)
*/ */
public ngAfterViewInit() { ngAfterViewInit() {
this.tooltipElement = this.tooltipContent.nativeElement; this.tooltipElement = this.tooltipContent.nativeElement;
if (this.data.id) { if (this.data.id) {
@@ -100,7 +101,7 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
private handleMouseEnter(event): void { private handleMouseEnter(event): void {
let props; let props;
if (this.strategy === STRATEGY.ELEMENT) { if (this.strategy === STRATEGY.element) {
props = event.target.getBoundingClientRect(); props = event.target.getBoundingClientRect();
} else { } else {
props = { top: (event.pageY - 150), left: event.pageX, width: event.layerX, height: 50 }; props = { top: (event.pageY - 150), left: event.pageX, width: event.layerX, height: 50 };
@@ -111,7 +112,7 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
const marginTop = -1 * (this.tooltipElement.offsetHeight / 2); const marginTop = -1 * (this.tooltipElement.offsetHeight / 2);
let left = props.left + (props.width / 2); let left = props.left + (props.width / 2);
if (this.position === POSITION.LEFT || this.position === POSITION.RIGHT) { if (this.position === POSITION.left || this.position === POSITION.right) {
left = (props.width / 2); left = (props.width / 2);
if (top + marginTop < 0) { if (top + marginTop < 0) {
this.tooltipElement.style.top = '0'; this.tooltipElement.style.top = '0';
@@ -130,11 +131,11 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
} }
} }
if (this.position === POSITION.TOP) { if (this.position === POSITION.top) {
this.tooltipElement.style.top = props.top - this.tooltipElement.offsetHeight - 10 + 'px'; this.tooltipElement.style.top = props.top - this.tooltipElement.offsetHeight - 10 + 'px';
} else if (this.position === POSITION.RIGHT) { } else if (this.position === POSITION.right) {
this.tooltipElement.style.left = props.left + props.width + 10 + 'px'; this.tooltipElement.style.left = props.left + props.width + 10 + 'px';
} else if (this.position === POSITION.LEFT) { } else if (this.position === POSITION.left) {
this.tooltipElement.style.left = props.left - this.tooltipElement.offsetWidth - 10 + 'px'; this.tooltipElement.style.left = props.left - this.tooltipElement.offsetWidth - 10 + 'px';
} else { } else {
this.tooltipElement.style.top = props.top + props.height + 10 + 'px'; this.tooltipElement.style.top = props.top + props.height + 10 + 'px';

View File

@@ -0,0 +1,22 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const CURRENT_COLOR = '#017501';
export const COMPLETED_COLOR = '#2632aa';
export const ACTIVITY_STROKE_COLOR = '#bbbbbb';
export const ACTIVITY_FILL_COLOR = '#f9f9f9';
export const MAIN_STROKE_COLOR = '#585858';

View File

@@ -65,8 +65,8 @@ export class BarChart extends Chart {
} }
} }
xAxisTickFormatFunction = function (xAxisType) { xAxisTickFormatFunction(xAxisType) {
return function (value) { return (value) => {
if (xAxisType !== null && xAxisType !== undefined) { if (xAxisType !== null && xAxisType !== undefined) {
if ('date_day' === xAxisType) { if ('date_day' === xAxisType) {
return moment(new Date(value)).format('DD'); return moment(new Date(value)).format('DD');
@@ -80,8 +80,8 @@ export class BarChart extends Chart {
}; };
}; };
yAxisTickFormatFunction = function (yAxisType) { yAxisTickFormatFunction(yAxisType) {
return function (value) { return (value) => {
if (yAxisType !== null && yAxisType !== undefined) { if (yAxisType !== null && yAxisType !== undefined) {
if ('count' === yAxisType) { if ('count' === yAxisType) {
const label = '' + value; const label = '' + value;

View File

@@ -45,6 +45,34 @@ export class Chart {
} }
} }
hasData(): boolean {
return this.data && this.data.length > 0;
}
hasDatasets(): boolean {
return this.datasets && this.datasets.length > 0;
}
hasDetailsTable(): boolean {
return !!this.detailsTable;
}
hasZeroValues(): boolean {
let isZeroValues = false;
if (this.hasData()) {
isZeroValues = true;
this.data.forEach((value) => {
if (value.toString() !== '0') {
isZeroValues = false;
}
});
}
return isZeroValues;
}
private convertType(type: string) { private convertType(type: string) {
let chartType = ''; let chartType = '';
switch (type) { switch (type) {
@@ -106,32 +134,4 @@ export class Chart {
} }
return typeIcon; return typeIcon;
} }
hasData(): boolean {
return this.data && this.data.length > 0;
}
hasDatasets(): boolean {
return this.datasets && this.datasets.length > 0;
}
hasDetailsTable(): boolean {
return !!this.detailsTable;
}
hasZeroValues(): boolean {
let isZeroValues = false;
if (this.hasData()) {
isZeroValues = true;
this.data.forEach((value) => {
if (value.toString() !== '0') {
isZeroValues = false;
}
});
}
return isZeroValues;
}
} }

View File

@@ -28,9 +28,7 @@ export class ReportDefinitionModel {
} }
findParam(name: string): ReportParameterDetailsModel { findParam(name: string): ReportParameterDetailsModel {
this.parameters.forEach((param) => { this.parameters.forEach((param) => param.type === name ? param : null);
return param.type === name ? param : null;
});
return null; return null;
} }
} }

View File

@@ -16,24 +16,16 @@
*/ */
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { ACTIVITY_FILL_COLOR, COMPLETED_COLOR, CURRENT_COLOR } from '../constants/diagram-colors';
const TASK_STROKE = 1;
const TASK_HIGHLIGHT_STROKE = 2;
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class DiagramColorService { export class DiagramColorService {
static CURRENT_COLOR = '#017501';
static COMPLETED_COLOR = '#2632aa';
static ACTIVITY_STROKE_COLOR = '#bbbbbb';
static MAIN_STROKE_COLOR = '#585858';
static ACTIVITY_FILL_COLOR = '#f9f9f9';
static TASK_STROKE = 1;
static TASK_HIGHLIGHT_STROKE = 2;
static CALL_ACTIVITY_STROKE = 2;
totalColors: any; totalColors: any;
setTotalColors(totalColors) { setTotalColors(totalColors: any) {
this.totalColors = totalColors; this.totalColors = totalColors;
} }
@@ -46,25 +38,25 @@ export class DiagramColorService {
const colorPercentage = this.totalColors[key]; const colorPercentage = this.totalColors[key];
return this.convertColorToHsb(colorPercentage); return this.convertColorToHsb(colorPercentage);
} else { } else {
return DiagramColorService.ACTIVITY_FILL_COLOR; return ACTIVITY_FILL_COLOR;
} }
} }
getBpmnColor(data, defaultColor) { getBpmnColor(data: any, defaultColor: any) {
if (data.current) { if (data.current) {
return DiagramColorService.CURRENT_COLOR; return CURRENT_COLOR;
} else if (data.completed) { } else if (data.completed) {
return DiagramColorService.COMPLETED_COLOR; return COMPLETED_COLOR;
} else { } else {
return defaultColor; return defaultColor;
} }
} }
getBpmnStrokeWidth(data) { getBpmnStrokeWidth(data: any) {
if (data.current || data.completed) { if (data.current || data.completed) {
return DiagramColorService.TASK_HIGHLIGHT_STROKE; return TASK_HIGHLIGHT_STROKE;
} else { } else {
return DiagramColorService.TASK_STROKE; return TASK_STROKE;
} }
} }

View File

@@ -15,46 +15,46 @@
* limitations under the License. * limitations under the License.
*/ */
export let chartProcessDefOverview = { export const chartProcessDefOverview = {
'elements': [{ elements: [{
'id': 'id1585876275153', id: 'id1585876275153',
'type': 'table', type: 'table',
'rows': [ rows: [
['__KEY_REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.GENERAL-TABLE-TOTAL-PROCESS-DEFINITIONS', '9'], ['__KEY_REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.GENERAL-TABLE-TOTAL-PROCESS-DEFINITIONS', '9'],
['__KEY_REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.GENERAL-TABLE-TOTAL-PROCESS-INSTANCES', '41'], ['__KEY_REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.GENERAL-TABLE-TOTAL-PROCESS-INSTANCES', '41'],
['__KEY_REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.GENERAL-TABLE-ACTIVE-PROCESS-INSTANCES', '3'], ['__KEY_REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.GENERAL-TABLE-ACTIVE-PROCESS-INSTANCES', '3'],
['__KEY_REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.GENERAL-TABLE-COMPLETED-PROCESS-INSTANCES', '38'] ['__KEY_REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.GENERAL-TABLE-COMPLETED-PROCESS-INSTANCES', '38']
] ]
}, { }, {
'id': 'id1585876413072', id: 'id1585876413072',
'type': 'pieChart', type: 'pieChart',
'title': 'Total process instances overview', title: 'Total process instances overview',
'titleKey': 'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.PROC-INST-CHART-TITLE', titleKey: 'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.PROC-INST-CHART-TITLE',
'values': [{ values: [{
'key': 'Second Process', key: 'Second Process',
'y': 4, y: 4,
'keyAndValue': ['Second Process', '4'] keyAndValue: ['Second Process', '4']
}, { }, {
'key': 'Simple process', key: 'Simple process',
'y': 30, y: 30,
'keyAndValue': ['Simple process', '30'] keyAndValue: ['Simple process', '30']
}, { }, {
'key': 'Third Process', key: 'Third Process',
'y': 7, y: 7,
'keyAndValue': ['Third Process', '7'] keyAndValue: ['Third Process', '7']
}] }]
}, { }, {
'id': 'id1585877659181', id: 'id1585877659181',
'type': 'table', type: 'table',
'title': 'Process definition details', title: 'Process definition details',
'titleKey': 'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE', titleKey: 'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE',
'columnNames': ['Process definition', 'Total', 'Active', 'Completed'], columnNames: ['Process definition', 'Total', 'Active', 'Completed'],
'columnNameKeys': ['REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE-PROCESS', columnNameKeys: ['REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE-PROCESS',
'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE-TOTAL', 'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE-TOTAL',
'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE-ACTIVE', 'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE-ACTIVE',
'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE-COMPLETED'], 'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE-COMPLETED'],
'columnsCentered': [false, false, false, false], columnsCentered: [false, false, false, false],
'rows': [ rows: [
['Second Process', '4', '0', '4'], ['Second Process', '4', '0', '4'],
['Simple process', '30', '3', '27'], ['Simple process', '30', '3', '27'],
['Third Process', '7', '0', '7'] ['Third Process', '7', '0', '7']
@@ -62,26 +62,26 @@ export let chartProcessDefOverview = {
}] }]
}; };
export let chartTaskOverview = { export const chartTaskOverview = {
'elements': [{ elements: [{
'id': 'id792351752194', id: 'id792351752194',
'type': 'barChart', type: 'barChart',
'title': 'title', title: 'title',
'titleKey': 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.TASK-HISTOGRAM-TITLE', titleKey: 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.TASK-HISTOGRAM-TITLE',
'values': [{ values: [{
'key': 'series1', key: 'series1',
'values': [['2016-09-30T00:00:00.000+0000', 3], ['2016-10-04T00:00:00.000+0000', 1]] values: [['2016-09-30T00:00:00.000+0000', 3], ['2016-10-04T00:00:00.000+0000', 1]]
}], }],
'xAxisType': 'date_month', xAxisType: 'date_month',
'yAxisType': 'count' yAxisType: 'count'
}, { }, {
'id': 'id792349721129', id: 'id792349721129',
'type': 'masterDetailTable', type: 'masterDetailTable',
'title': 'Detailed task statistics', title: 'Detailed task statistics',
'titleKey': 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TITLE', titleKey: 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TITLE',
/* cspell:disable-next-line */ /* cspell:disable-next-line */
'columnNames': ['Task', 'Count', 'Sum', 'Min duration', 'Max duration', 'Average duration', 'Stddev duration'], columnNames: ['Task', 'Count', 'Sum', 'Min duration', 'Max duration', 'Average duration', 'Stddev duration'],
'columnNameKeys': [ columnNameKeys: [
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TASK', 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TASK',
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.COUNT', 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.COUNT',
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.SUM', 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.SUM',
@@ -90,26 +90,26 @@ export let chartTaskOverview = {
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.AVERAGE', 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.AVERAGE',
/* cspell:disable-next-line */ /* cspell:disable-next-line */
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.STDDE'], 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.STDDE'],
'columnsCentered': [false, false, false, false], columnsCentered: [false, false, false, false],
'rows': [ rows: [
['fake 1 user task', '1', '2.0', '3.0', '4.0', '5.0', '6.0'], ['fake 1 user task', '1', '2.0', '3.0', '4.0', '5.0', '6.0'],
['fake 2 user task', '1', '2.0', '3.0', '4.0', '5.0', '6.0'] ['fake 2 user task', '1', '2.0', '3.0', '4.0', '5.0', '6.0']
] ]
}, { }, {
'id': 'id10931125229538', id: 'id10931125229538',
'type': 'multiBarChart', type: 'multiBarChart',
'title': 'Task duration', title: 'Task duration',
'titleKey': 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.TASK-DURATIONS-TITLE', titleKey: 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.TASK-DURATIONS-TITLE',
'values': [{ values: [{
'key': 'averages', key: 'averages',
'values': [[1, 0], [2, 5], [3, 2]] values: [[1, 0], [2, 5], [3, 2]]
}, { }, {
'key': 'minima', key: 'minima',
'values': [[1, 0], [2, 0], [3, 0]] values: [[1, 0], [2, 0], [3, 0]]
}, { }, {
'key': 'maxima', key: 'maxima',
'values': [[1, 0], [2, 29], [3, 29]] values: [[1, 0], [2, 29], [3, 29]]
}], }],
'yAxisType': 'count' yAxisType: 'count'
}] }]
}; };

View File

@@ -17,138 +17,138 @@
import { ReportParameterDetailsModel } from '../../diagram/models/report/report-parameter-details.model'; import { ReportParameterDetailsModel } from '../../diagram/models/report/report-parameter-details.model';
export let reportDefParamStatus = { export const reportDefParamStatus = {
'id': 2005, id: 2005,
'name': 'Fake Task overview status', name: 'Fake Task overview status',
'created': '2016-10-05T15:39:40.222+0000', created: '2016-10-05T15:39:40.222+0000',
'definition': '{ "parameters" :[{"id":"status","name":null,"nameKey":null,"type":"status","value":null,"dependsOn":null}]}' definition: '{ "parameters" :[{"id":"status","name":null,"nameKey":null,"type":"status","value":null,"dependsOn":null}]}'
}; };
export let reportDefParamNumber = { export const reportDefParamNumber = {
'id': 2005, id: 2005,
'name': 'Fake Process instances overview', name: 'Fake Process instances overview',
'created': '2016-10-05T15:39:40.222+0000', created: '2016-10-05T15:39:40.222+0000',
'definition': '{ "parameters"' + definition: '{ "parameters"' +
' :[{"id":"slowProcessInstanceInteger","name":null,"nameKey":null,"type":"integer","value":10,"dependsOn":null}]}' ' :[{"id":"slowProcessInstanceInteger","name":null,"nameKey":null,"type":"integer","value":10,"dependsOn":null}]}'
}; };
export let reportDefParamDuration = { export const reportDefParamDuration = {
'id': 2005, id: 2005,
'name': 'Fake Task service level agreement', name: 'Fake Task service level agreement',
'created': '2016-10-05T15:39:40.222+0000', created: '2016-10-05T15:39:40.222+0000',
'definition': '{ "parameters"' + definition: '{ "parameters"' +
' :[{"id":"duration","name":null,"nameKey":null,"type":"duration","value":null,"dependsOn":null}]}' ' :[{"id":"duration","name":null,"nameKey":null,"type":"duration","value":null,"dependsOn":null}]}'
}; };
export let reportDefParamCheck = { export const reportDefParamCheck = {
'id': 2005, id: 2005,
'name': 'Fake Task service level agreement', name: 'Fake Task service level agreement',
'created': '2016-10-05T15:39:40.222+0000', created: '2016-10-05T15:39:40.222+0000',
'definition': '{ "parameters"' + definition: '{ "parameters"' +
' :[{"id":"typeFiltering","name":null,"nameKey":null,"type":"boolean","value":true,"dependsOn":null}]}' ' :[{"id":"typeFiltering","name":null,"nameKey":null,"type":"boolean","value":true,"dependsOn":null}]}'
}; };
export let reportDefParamDateRange = { export const reportDefParamDateRange = {
'id': 2005, id: 2005,
'name': 'Fake Process instances overview', name: 'Fake Process instances overview',
'created': '2016-10-05T15:39:40.222+0000', created: '2016-10-05T15:39:40.222+0000',
'definition': '{ "parameters" :[{"id":"dateRange","name":null,"nameKey":null,"type":"dateRange","value":null,"dependsOn":null}]}' definition: '{ "parameters" :[{"id":"dateRange","name":null,"nameKey":null,"type":"dateRange","value":null,"dependsOn":null}]}'
}; };
export let reportDefParamRangeInterval = { export const reportDefParamRangeInterval = {
'id': 2006, id: 2006,
'name': 'Fake Task overview RangeInterval', name: 'Fake Task overview RangeInterval',
'created': '2016-10-05T15:39:40.222+0000', created: '2016-10-05T15:39:40.222+0000',
'definition': '{ "parameters" :[{"id":"dateRangeInterval","name":null,"nameKey":null,"type":"dateInterval","value":null,"dependsOn":null}]}' definition: '{ "parameters" :[{"id":"dateRangeInterval","name":null,"nameKey":null,"type":"dateInterval","value":null,"dependsOn":null}]}'
}; };
export let reportDefParamProcessDef = { export const reportDefParamProcessDef = {
'id': 2006, id: 2006,
'name': 'Fake Task overview ProcessDefinition', name: 'Fake Task overview ProcessDefinition',
'created': '2016-10-05T15:39:40.222+0000', created: '2016-10-05T15:39:40.222+0000',
'definition': '{ "parameters" :[{"id":"processDefinitionId","name":null,"nameKey":null,"type":"processDefinition","value":null,"dependsOn":null}]}' definition: '{ "parameters" :[{"id":"processDefinitionId","name":null,"nameKey":null,"type":"processDefinition","value":null,"dependsOn":null}]}'
}; };
export let reportDefParamProcessDefOptionsNoApp = [ export const reportDefParamProcessDefOptionsNoApp = [
{ {
'id': 'FakeProcessTest 1:1:1', id: 'FakeProcessTest 1:1:1',
'name': 'Fake Process Test 1 Name ', name: 'Fake Process Test 1 Name ',
'version': 1 version: 1
}, },
{ {
'id': 'FakeProcessTest 1:2:1', id: 'FakeProcessTest 1:2:1',
'name': 'Fake Process Test 1 Name ', name: 'Fake Process Test 1 Name ',
'version': 2 version: 2
}, },
{ {
'id': 'FakeProcessTest 2:1:1', id: 'FakeProcessTest 2:1:1',
'name': 'Fake Process Test 2 Name ', name: 'Fake Process Test 2 Name ',
'version': 1 version: 1
}, },
{ {
'id': 'FakeProcessTest 3:1:1', id: 'FakeProcessTest 3:1:1',
'name': 'Fake Process Test 3 Name ', name: 'Fake Process Test 3 Name ',
'version': 1 version: 1
} }
]; ];
export let reportDefParamProcessDefOptions = { export const reportDefParamProcessDefOptions = {
'size': 4, 'total': 4, 'start': 0, 'data': [ size: 4, total: 4, start: 0, data: [
{ {
'id': 'FakeProcessTest 1:1:1', id: 'FakeProcessTest 1:1:1',
'name': 'Fake Process Test 1 Name ', name: 'Fake Process Test 1 Name ',
'version': 1 version: 1
}, },
{ {
'id': 'FakeProcessTest 1:2:1', id: 'FakeProcessTest 1:2:1',
'name': 'Fake Process Test 1 Name ', name: 'Fake Process Test 1 Name ',
'version': 2 version: 2
}, },
{ {
'id': 'FakeProcessTest 2:1:1', id: 'FakeProcessTest 2:1:1',
'name': 'Fake Process Test 2 Name ', name: 'Fake Process Test 2 Name ',
'version': 1 version: 1
}, },
{ {
'id': 'FakeProcessTest 3:1:1', id: 'FakeProcessTest 3:1:1',
'name': 'Fake Process Test 3 Name ', name: 'Fake Process Test 3 Name ',
'version': 1 version: 1
} }
] ]
}; };
export let reportDefParamProcessDefOptionsApp = { export const reportDefParamProcessDefOptionsApp = {
'size': 2, 'total': 2, 'start': 2, 'data': [ size: 2, total: 2, start: 2, data: [
{ {
'id': 'FakeProcessTest 1:1:1', id: 'FakeProcessTest 1:1:1',
'name': 'Fake Process Test 1 Name ', name: 'Fake Process Test 1 Name ',
'version': 1 version: 1
}, },
{ {
'id': 'FakeProcessTest 1:2:1', id: 'FakeProcessTest 1:2:1',
'name': 'Fake Process Test 1 Name ', name: 'Fake Process Test 1 Name ',
'version': 2 version: 2
} }
] ]
}; };
export let reportDefParamTask = { export const reportDefParamTask = {
'id': 2006, id: 2006,
'name': 'Fake Task service level agreement', name: 'Fake Task service level agreement',
'created': '2016-10-05T15:39:40.222+0000', created: '2016-10-05T15:39:40.222+0000',
'definition': '{ "parameters" :[{"id":"taskName","name":null,"nameKey":null,"type":"task","value":null,"dependsOn":"processDefinitionId"}]}' definition: '{ "parameters" :[{"id":"taskName","name":null,"nameKey":null,"type":"task","value":null,"dependsOn":"processDefinitionId"}]}'
}; };
export let reportNoParameterDefinitions = { export const reportNoParameterDefinitions = {
'id': 2006, id: 2006,
'name': 'Fake Task service level agreement', name: 'Fake Task service level agreement',
'created': '2016-10-05T15:39:40.222+0000', created: '2016-10-05T15:39:40.222+0000',
'definition': '{ "parameters" : []}' definition: '{ "parameters" : []}'
}; };
export let reportDefParamTaskOptions = ['Fake task name 1', 'Fake task name 2']; export const reportDefParamTaskOptions = ['Fake task name 1', 'Fake task name 2'];
export let fieldProcessDef = new ReportParameterDetailsModel( export const fieldProcessDef = new ReportParameterDetailsModel(
{ {
id: 'processDefinitionId', id: 'processDefinitionId',
type: 'processDefinition', type: 'processDefinition',

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let fakeReportList = [ export const fakeReportList = [
{ {
id: '1', id: '1',
name: 'Fake Report 1' name: 'Fake Report 1'

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let userTask = { export const userTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake User task', name: 'Fake User task',
type: 'UserTask', type: 'UserTask',
@@ -26,7 +26,7 @@ export let userTask = {
properties: [{}] properties: [{}]
}; };
export let userTaskActive = { export const userTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -39,7 +39,7 @@ export let userTaskActive = {
properties: [{}] properties: [{}]
}; };
export let userTaskCompleted = { export const userTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -52,7 +52,7 @@ export let userTaskCompleted = {
properties: [{}] properties: [{}]
}; };
export let manualTask = { export const manualTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Manual task', name: 'Fake Manual task',
type: 'ManualTask', type: 'ManualTask',
@@ -63,7 +63,7 @@ export let manualTask = {
properties: [{}] properties: [{}]
}; };
export let manualTaskActive = { export const manualTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -76,7 +76,7 @@ export let manualTaskActive = {
properties: [{}] properties: [{}]
}; };
export let manualTaskCompleted = { export const manualTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -89,7 +89,7 @@ export let manualTaskCompleted = {
properties: [{}] properties: [{}]
}; };
export let serviceTask = { export const serviceTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Service task', name: 'Fake Service task',
type: 'ServiceTask', type: 'ServiceTask',
@@ -100,7 +100,7 @@ export let serviceTask = {
properties: [{}] properties: [{}]
}; };
export let serviceTaskActive = { export const serviceTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -113,7 +113,7 @@ export let serviceTaskActive = {
properties: [{}] properties: [{}]
}; };
export let serviceTaskCompleted = { export const serviceTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -126,7 +126,7 @@ export let serviceTaskCompleted = {
properties: [{}] properties: [{}]
}; };
export let receiveTask = { export const receiveTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Receive task', name: 'Fake Receive task',
type: 'ReceiveTask', type: 'ReceiveTask',
@@ -137,7 +137,7 @@ export let receiveTask = {
properties: [{}] properties: [{}]
}; };
export let receiveTaskActive = { export const receiveTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -150,7 +150,7 @@ export let receiveTaskActive = {
properties: [{}] properties: [{}]
}; };
export let receiveTaskCompleted = { export const receiveTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -163,7 +163,7 @@ export let receiveTaskCompleted = {
properties: [{}] properties: [{}]
}; };
export let scriptTask = { export const scriptTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Script task', name: 'Fake Script task',
type: 'ScriptTask', type: 'ScriptTask',
@@ -174,7 +174,7 @@ export let scriptTask = {
properties: [{}] properties: [{}]
}; };
export let scriptTaskActive = { export const scriptTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -187,7 +187,7 @@ export let scriptTaskActive = {
properties: [{}] properties: [{}]
}; };
export let scriptTaskCompleted = { export const scriptTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -200,7 +200,7 @@ export let scriptTaskCompleted = {
properties: [{}] properties: [{}]
}; };
export let businessRuleTask = { export const businessRuleTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake BusinessRule task', name: 'Fake BusinessRule task',
type: 'BusinessRuleTask', type: 'BusinessRuleTask',
@@ -211,7 +211,7 @@ export let businessRuleTask = {
properties: [{}] properties: [{}]
}; };
export let businessRuleTaskActive = { export const businessRuleTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -224,7 +224,7 @@ export let businessRuleTaskActive = {
properties: [{}] properties: [{}]
}; };
export let businessRuleTaskCompleted = { export const businessRuleTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -237,7 +237,7 @@ export let businessRuleTaskCompleted = {
properties: [{}] properties: [{}]
}; };
export let mailTask = { export const mailTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Mail task', name: 'Fake Mail task',
type: 'ServiceTask', type: 'ServiceTask',
@@ -249,7 +249,7 @@ export let mailTask = {
taskType: 'mail' taskType: 'mail'
}; };
export let mailTaskActive = { export const mailTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -263,7 +263,7 @@ export let mailTaskActive = {
taskType: 'mail' taskType: 'mail'
}; };
export let mailTaskCompleted = { export const mailTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -277,7 +277,7 @@ export let mailTaskCompleted = {
taskType: 'mail' taskType: 'mail'
}; };
export let camelTask = { export const camelTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Camel task', name: 'Fake Camel task',
type: 'ServiceTask', type: 'ServiceTask',
@@ -289,7 +289,7 @@ export let camelTask = {
taskType: 'camel' taskType: 'camel'
}; };
export let camelTaskActive = { export const camelTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -303,7 +303,7 @@ export let camelTaskActive = {
taskType: 'camel' taskType: 'camel'
}; };
export let camelTaskCompleted = { export const camelTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -317,7 +317,7 @@ export let camelTaskCompleted = {
taskType: 'camel' taskType: 'camel'
}; };
export let restCallTask = { export const restCallTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Rest Call task', name: 'Fake Rest Call task',
type: 'ServiceTask', type: 'ServiceTask',
@@ -329,7 +329,7 @@ export let restCallTask = {
taskType: 'rest_call' taskType: 'rest_call'
}; };
export let restCallTaskActive = { export const restCallTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -343,7 +343,7 @@ export let restCallTaskActive = {
taskType: 'rest_call' taskType: 'rest_call'
}; };
export let restCallTaskCompleted = { export const restCallTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -357,7 +357,7 @@ export let restCallTaskCompleted = {
taskType: 'rest_call' taskType: 'rest_call'
}; };
export let muleTask = { export const muleTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Mule task', name: 'Fake Mule task',
type: 'ServiceTask', type: 'ServiceTask',
@@ -369,7 +369,7 @@ export let muleTask = {
taskType: 'mule' taskType: 'mule'
}; };
export let muleTaskActive = { export const muleTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -383,7 +383,7 @@ export let muleTaskActive = {
taskType: 'mule' taskType: 'mule'
}; };
export let muleTaskCompleted = { export const muleTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -397,7 +397,7 @@ export let muleTaskCompleted = {
taskType: 'mule' taskType: 'mule'
}; };
export let alfrescoPublishTask = { export const alfrescoPublishTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Alfresco Publish task', name: 'Fake Alfresco Publish task',
type: 'ServiceTask', type: 'ServiceTask',
@@ -409,7 +409,7 @@ export let alfrescoPublishTask = {
taskType: 'alfresco_publish' taskType: 'alfresco_publish'
}; };
export let alfrescoPublishTaskActive = { export const alfrescoPublishTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -423,7 +423,7 @@ export let alfrescoPublishTaskActive = {
taskType: 'alfresco_publish' taskType: 'alfresco_publish'
}; };
export let alfrescoPublishTaskCompleted = { export const alfrescoPublishTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -437,7 +437,7 @@ export let alfrescoPublishTaskCompleted = {
taskType: 'alfresco_publish' taskType: 'alfresco_publish'
}; };
export let googleDrivePublishTask = { export const googleDrivePublishTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Google Drive Publish task', name: 'Fake Google Drive Publish task',
type: 'ServiceTask', type: 'ServiceTask',
@@ -449,7 +449,7 @@ export let googleDrivePublishTask = {
taskType: 'google_drive_publish' taskType: 'google_drive_publish'
}; };
export let googleDrivePublishTaskActive = { export const googleDrivePublishTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -463,7 +463,7 @@ export let googleDrivePublishTaskActive = {
taskType: 'google_drive_publish' taskType: 'google_drive_publish'
}; };
export let googleDrivePublishTaskCompleted = { export const googleDrivePublishTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -477,7 +477,7 @@ export let googleDrivePublishTaskCompleted = {
taskType: 'google_drive_publish' taskType: 'google_drive_publish'
}; };
export let boxPublishTask = { export const boxPublishTask = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
name: 'Fake Box Publish task', name: 'Fake Box Publish task',
type: 'ServiceTask', type: 'ServiceTask',
@@ -489,7 +489,7 @@ export let boxPublishTask = {
taskType: 'box_publish' taskType: 'box_publish'
}; };
export let boxPublishTaskActive = { export const boxPublishTaskActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -503,7 +503,7 @@ export let boxPublishTaskActive = {
taskType: 'box_publish' taskType: 'box_publish'
}; };
export let boxPublishTaskCompleted = { export const boxPublishTaskCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let boundaryTimeEvent = { export const boundaryTimeEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'BoundaryEvent', type: 'BoundaryEvent',
width: 31, width: 31,
@@ -26,7 +26,7 @@ export let boundaryTimeEvent = {
eventDefinition: {type: 'timer'} eventDefinition: {type: 'timer'}
}; };
export let boundaryTimeEventActive = { export const boundaryTimeEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -39,7 +39,7 @@ export let boundaryTimeEventActive = {
eventDefinition: {type: 'timer'} eventDefinition: {type: 'timer'}
}; };
export let boundaryTimeEventCompleted = { export const boundaryTimeEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -52,7 +52,7 @@ export let boundaryTimeEventCompleted = {
eventDefinition: {type: 'timer'} eventDefinition: {type: 'timer'}
}; };
export let boundaryErrorEvent = { export const boundaryErrorEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'BoundaryEvent', type: 'BoundaryEvent',
width: 31, width: 31,
@@ -63,7 +63,7 @@ export let boundaryErrorEvent = {
eventDefinition: {type: 'error'} eventDefinition: {type: 'error'}
}; };
export let boundaryErrorEventActive = { export const boundaryErrorEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -76,7 +76,7 @@ export let boundaryErrorEventActive = {
eventDefinition: {type: 'error'} eventDefinition: {type: 'error'}
}; };
export let boundaryErrorEventCompleted = { export const boundaryErrorEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -89,7 +89,7 @@ export let boundaryErrorEventCompleted = {
eventDefinition: {type: 'error'} eventDefinition: {type: 'error'}
}; };
export let boundarySignalEvent = { export const boundarySignalEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'BoundaryEvent', type: 'BoundaryEvent',
width: 31, width: 31,
@@ -100,7 +100,7 @@ export let boundarySignalEvent = {
eventDefinition: {type: 'signal'} eventDefinition: {type: 'signal'}
}; };
export let boundarySignalEventActive = { export const boundarySignalEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -113,7 +113,7 @@ export let boundarySignalEventActive = {
eventDefinition: {type: 'signal'} eventDefinition: {type: 'signal'}
}; };
export let boundarySignalEventCompleted = { export const boundarySignalEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -126,7 +126,7 @@ export let boundarySignalEventCompleted = {
eventDefinition: {type: 'signal'} eventDefinition: {type: 'signal'}
}; };
export let boundaryMessageEvent = { export const boundaryMessageEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'BoundaryEvent', type: 'BoundaryEvent',
width: 31, width: 31,
@@ -137,7 +137,7 @@ export let boundaryMessageEvent = {
eventDefinition: {type: 'message'} eventDefinition: {type: 'message'}
}; };
export let boundaryMessageEventActive = { export const boundaryMessageEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -150,7 +150,7 @@ export let boundaryMessageEventActive = {
eventDefinition: {type: 'message'} eventDefinition: {type: 'message'}
}; };
export let boundaryMessageEventCompleted = { export const boundaryMessageEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let startEvent = { export const startEvent = {
id: 'startEvent1', id: 'startEvent1',
type: 'StartEvent', type: 'StartEvent',
width: 30, width: 30,
@@ -25,7 +25,7 @@ export let startEvent = {
properties: [{}] properties: [{}]
}; };
export let startEventActive = { export const startEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'startEvent1', id: 'startEvent1',
@@ -37,7 +37,7 @@ export let startEventActive = {
properties: [{}] properties: [{}]
}; };
export let startEventCompleted = { export const startEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'startEvent1', id: 'startEvent1',
@@ -49,7 +49,7 @@ export let startEventCompleted = {
properties: [{}] properties: [{}]
}; };
export let startTimeEvent = { export const startTimeEvent = {
id: 'startEvent1', id: 'startEvent1',
type: 'StartEvent', type: 'StartEvent',
width: 30, width: 30,
@@ -60,7 +60,7 @@ export let startTimeEvent = {
properties: [{}] properties: [{}]
}; };
export let startTimeEventActive = { export const startTimeEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'startEvent1', id: 'startEvent1',
@@ -73,7 +73,7 @@ export let startTimeEventActive = {
properties: [{}] properties: [{}]
}; };
export let startTimeEventCompleted = { export const startTimeEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'startEvent1', id: 'startEvent1',
@@ -86,7 +86,7 @@ export let startTimeEventCompleted = {
properties: [{}] properties: [{}]
}; };
export let startSignalEvent = { export const startSignalEvent = {
id: 'startEvent1', id: 'startEvent1',
type: 'StartEvent', type: 'StartEvent',
width: 30, width: 30,
@@ -97,7 +97,7 @@ export let startSignalEvent = {
properties: [{}] properties: [{}]
}; };
export let startSignalEventActive = { export const startSignalEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'startEvent1', id: 'startEvent1',
@@ -110,7 +110,7 @@ export let startSignalEventActive = {
properties: [{}] properties: [{}]
}; };
export let startSignalEventCompleted = { export const startSignalEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'startEvent1', id: 'startEvent1',
@@ -123,7 +123,7 @@ export let startSignalEventCompleted = {
properties: [{}] properties: [{}]
}; };
export let startMessageEvent = { export const startMessageEvent = {
id: 'startEvent1', id: 'startEvent1',
type: 'StartEvent', type: 'StartEvent',
width: 30, width: 30,
@@ -134,7 +134,7 @@ export let startMessageEvent = {
properties: [{}] properties: [{}]
}; };
export let startMessageEventActive = { export const startMessageEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'startEvent1', id: 'startEvent1',
@@ -147,7 +147,7 @@ export let startMessageEventActive = {
properties: [{}] properties: [{}]
}; };
export let startMessageEventCompleted = { export const startMessageEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'startEvent1', id: 'startEvent1',
@@ -160,7 +160,7 @@ export let startMessageEventCompleted = {
properties: [{}] properties: [{}]
}; };
export let startErrorEvent = { export const startErrorEvent = {
id: 'startEvent1', id: 'startEvent1',
type: 'StartEvent', type: 'StartEvent',
width: 30, width: 30,
@@ -171,7 +171,7 @@ export let startErrorEvent = {
properties: [{}] properties: [{}]
}; };
export let startErrorEventActive = { export const startErrorEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'startEvent1', id: 'startEvent1',
@@ -184,7 +184,7 @@ export let startErrorEventActive = {
properties: [{}] properties: [{}]
}; };
export let startErrorEventCompleted = { export const startErrorEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'startEvent1', id: 'startEvent1',
@@ -197,7 +197,7 @@ export let startErrorEventCompleted = {
properties: [{}] properties: [{}]
}; };
export let endEvent = { export const endEvent = {
id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E', id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E',
type: 'EndEvent', type: 'EndEvent',
width: 28, width: 28,
@@ -207,7 +207,7 @@ export let endEvent = {
properties: [{}] properties: [{}]
}; };
export let endEventActive = { export const endEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E', id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E',
@@ -219,7 +219,7 @@ export let endEventActive = {
properties: [{}] properties: [{}]
}; };
export let endEventCompleted = { export const endEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E', id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E',
@@ -231,7 +231,7 @@ export let endEventCompleted = {
properties: [{}] properties: [{}]
}; };
export let endErrorEvent = { export const endErrorEvent = {
id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E', id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E',
type: 'EndEvent', type: 'EndEvent',
width: 28, width: 28,
@@ -242,7 +242,7 @@ export let endErrorEvent = {
properties: [{}] properties: [{}]
}; };
export let endErrorEventActive = { export const endErrorEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E', id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E',
@@ -255,7 +255,7 @@ export let endErrorEventActive = {
properties: [{}] properties: [{}]
}; };
export let endErrorEventCompleted = { export const endErrorEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E', id: 'sid-CED2A8DB-47E2-4057-A7B8-3ABBE5CE795E',

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let flow = { export const flow = {
id: 'sid-5BA99724-A3BD-4F8E-B69F-222F9FF66335', id: 'sid-5BA99724-A3BD-4F8E-B69F-222F9FF66335',
sourceRef: 'startEvent1', sourceRef: 'startEvent1',
targetRef: 'sid-811B9223-E72E-4991-AAA5-4E1A01095D08', targetRef: 'sid-811B9223-E72E-4991-AAA5-4E1A01095D08',

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let exclusiveGateway = { export const exclusiveGateway = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'ExclusiveGateway', type: 'ExclusiveGateway',
width: 40, width: 40,
@@ -25,7 +25,7 @@ export let exclusiveGateway = {
properties: [{}] properties: [{}]
}; };
export let exclusiveGatewayActive = { export const exclusiveGatewayActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -37,7 +37,7 @@ export let exclusiveGatewayActive = {
properties: [{}] properties: [{}]
}; };
export let exclusiveGatewayCompleted = { export const exclusiveGatewayCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -49,7 +49,7 @@ export let exclusiveGatewayCompleted = {
properties: [{}] properties: [{}]
}; };
export let inclusiveGateway = { export const inclusiveGateway = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'InclusiveGateway', type: 'InclusiveGateway',
width: 40, width: 40,
@@ -59,7 +59,7 @@ export let inclusiveGateway = {
properties: [{}] properties: [{}]
}; };
export let inclusiveGatewayActive = { export const inclusiveGatewayActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -71,7 +71,7 @@ export let inclusiveGatewayActive = {
properties: [{}] properties: [{}]
}; };
export let inclusiveGatewayCompleted = { export const inclusiveGatewayCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -83,7 +83,7 @@ export let inclusiveGatewayCompleted = {
properties: [{}] properties: [{}]
}; };
export let parallelGateway = { export const parallelGateway = {
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
type: 'ParallelGateway', type: 'ParallelGateway',
width: 40, width: 40,
@@ -93,7 +93,7 @@ export let parallelGateway = {
properties: [{}] properties: [{}]
}; };
export let parallelGatewayActive = { export const parallelGatewayActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
@@ -105,7 +105,7 @@ export let parallelGatewayActive = {
properties: [{}] properties: [{}]
}; };
export let parallelGatewayCompleted = { export const parallelGatewayCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
@@ -117,7 +117,7 @@ export let parallelGatewayCompleted = {
properties: [{}] properties: [{}]
}; };
export let eventGateway = { export const eventGateway = {
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
type: 'EventGateway', type: 'EventGateway',
width: 40, width: 40,
@@ -127,7 +127,7 @@ export let eventGateway = {
properties: [{}] properties: [{}]
}; };
export let eventGatewayActive = { export const eventGatewayActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',
@@ -139,7 +139,7 @@ export let eventGatewayActive = {
properties: [{}] properties: [{}]
}; };
export let eventGatewayCompleted = { export const eventGatewayCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC', id: 'sid-14EE23CE-0731-4E23-80F3-C557DA2A0CFC',

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let intermediateCatchingTimeEvent = { export const intermediateCatchingTimeEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'IntermediateCatchEvent', type: 'IntermediateCatchEvent',
width: 31, width: 31,
@@ -26,7 +26,7 @@ export let intermediateCatchingTimeEvent = {
eventDefinition: {type: 'timer'} eventDefinition: {type: 'timer'}
}; };
export let intermediateCatchingTimeEventActive = { export const intermediateCatchingTimeEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -39,7 +39,7 @@ export let intermediateCatchingTimeEventActive = {
eventDefinition: {type: 'timer'} eventDefinition: {type: 'timer'}
}; };
export let intermediateCatchingTimeEventCompleted = { export const intermediateCatchingTimeEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -52,7 +52,7 @@ export let intermediateCatchingTimeEventCompleted = {
eventDefinition: {type: 'timer'} eventDefinition: {type: 'timer'}
}; };
export let intermediateCatchingErrorEvent = { export const intermediateCatchingErrorEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'IntermediateCatchEvent', type: 'IntermediateCatchEvent',
width: 31, width: 31,
@@ -63,7 +63,7 @@ export let intermediateCatchingErrorEvent = {
eventDefinition: {type: 'error'} eventDefinition: {type: 'error'}
}; };
export let intermediateCatchingErrorEventActive = { export const intermediateCatchingErrorEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -76,7 +76,7 @@ export let intermediateCatchingErrorEventActive = {
eventDefinition: {type: 'error'} eventDefinition: {type: 'error'}
}; };
export let intermediateCatchingErrorEventCompleted = { export const intermediateCatchingErrorEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -89,7 +89,7 @@ export let intermediateCatchingErrorEventCompleted = {
eventDefinition: {type: 'error'} eventDefinition: {type: 'error'}
}; };
export let intermediateCatchingSignalEvent = { export const intermediateCatchingSignalEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'IntermediateCatchEvent', type: 'IntermediateCatchEvent',
width: 31, width: 31,
@@ -100,7 +100,7 @@ export let intermediateCatchingSignalEvent = {
eventDefinition: {type: 'signal'} eventDefinition: {type: 'signal'}
}; };
export let intermediateCatchingSignalEventActive = { export const intermediateCatchingSignalEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -113,7 +113,7 @@ export let intermediateCatchingSignalEventActive = {
eventDefinition: {type: 'signal'} eventDefinition: {type: 'signal'}
}; };
export let intermediateCatchingSignalEventCompleted = { export const intermediateCatchingSignalEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -126,7 +126,7 @@ export let intermediateCatchingSignalEventCompleted = {
eventDefinition: {type: 'signal'} eventDefinition: {type: 'signal'}
}; };
export let intermediateCatchingMessageEvent = { export const intermediateCatchingMessageEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'IntermediateCatchEvent', type: 'IntermediateCatchEvent',
width: 31, width: 31,
@@ -137,7 +137,7 @@ export let intermediateCatchingMessageEvent = {
eventDefinition: {type: 'message'} eventDefinition: {type: 'message'}
}; };
export let intermediateCatchingMessageEventActive = { export const intermediateCatchingMessageEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -150,7 +150,7 @@ export let intermediateCatchingMessageEventActive = {
eventDefinition: {type: 'message'} eventDefinition: {type: 'message'}
}; };
export let intermediateCatchingMessageEventCompleted = { export const intermediateCatchingMessageEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let subProcess = { export const subProcess = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'SubProcess', type: 'SubProcess',
width: 300, width: 300,
@@ -25,7 +25,7 @@ export let subProcess = {
properties: [{}] properties: [{}]
}; };
export let subProcessActive = { export const subProcessActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -37,7 +37,7 @@ export let subProcessActive = {
properties: [{}] properties: [{}]
}; };
export let subProcessCompleted = { export const subProcessCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -49,7 +49,7 @@ export let subProcessCompleted = {
properties: [{}] properties: [{}]
}; };
export let eventSubProcess = { export const eventSubProcess = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'EventSubProcess', type: 'EventSubProcess',
width: 300, width: 300,
@@ -59,7 +59,7 @@ export let eventSubProcess = {
properties: [{}] properties: [{}]
}; };
export let eventSubProcessActive = { export const eventSubProcessActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -71,7 +71,7 @@ export let eventSubProcessActive = {
properties: [{}] properties: [{}]
}; };
export let eventSubProcessCompleted = { export const eventSubProcessCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let pool = { export const pool = {
id: 'sid-0FF10DA3-E2BD-4E6A-9013-6D66FC8A4716', id: 'sid-0FF10DA3-E2BD-4E6A-9013-6D66FC8A4716',
name: 'Activiti', name: 'Activiti',
width: 600, width: 600,
@@ -25,7 +25,7 @@ export let pool = {
properties: [{}] properties: [{}]
}; };
export let poolLanes = { export const poolLanes = {
id: 'sid-0FF10DA3-E2BD-4E6A-9013-6D66FC8A4716', id: 'sid-0FF10DA3-E2BD-4E6A-9013-6D66FC8A4716',
name: 'Activiti', name: 'Activiti',
width: 600, width: 600,

View File

@@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export let throwTimeEvent = { export const throwTimeEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'ThrowEvent', type: 'ThrowEvent',
width: 31, width: 31,
@@ -26,7 +26,7 @@ export let throwTimeEvent = {
eventDefinition: {type: 'timer'} eventDefinition: {type: 'timer'}
}; };
export let throwTimeEventActive = { export const throwTimeEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -39,7 +39,7 @@ export let throwTimeEventActive = {
eventDefinition: {type: 'timer'} eventDefinition: {type: 'timer'}
}; };
export let throwTimeEventCompleted = { export const throwTimeEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -52,7 +52,7 @@ export let throwTimeEventCompleted = {
eventDefinition: {type: 'timer'} eventDefinition: {type: 'timer'}
}; };
export let throwErrorEvent = { export const throwErrorEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'ThrowEvent', type: 'ThrowEvent',
width: 31, width: 31,
@@ -63,7 +63,7 @@ export let throwErrorEvent = {
eventDefinition: {type: 'error'} eventDefinition: {type: 'error'}
}; };
export let throwErrorEventActive = { export const throwErrorEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -76,7 +76,7 @@ export let throwErrorEventActive = {
eventDefinition: {type: 'error'} eventDefinition: {type: 'error'}
}; };
export let throwErrorEventCompleted = { export const throwErrorEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -89,7 +89,7 @@ export let throwErrorEventCompleted = {
eventDefinition: {type: 'error'} eventDefinition: {type: 'error'}
}; };
export let throwSignalEvent = { export const throwSignalEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'ThrowEvent', type: 'ThrowEvent',
width: 31, width: 31,
@@ -100,7 +100,7 @@ export let throwSignalEvent = {
eventDefinition: {type: 'signal'} eventDefinition: {type: 'signal'}
}; };
export let throwSignalEventActive = { export const throwSignalEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -113,7 +113,7 @@ export let throwSignalEventActive = {
eventDefinition: {type: 'signal'} eventDefinition: {type: 'signal'}
}; };
export let throwSignalEventCompleted = { export const throwSignalEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -126,7 +126,7 @@ export let throwSignalEventCompleted = {
eventDefinition: {type: 'signal'} eventDefinition: {type: 'signal'}
}; };
export let throwMessageEvent = { export const throwMessageEvent = {
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
type: 'ThrowEvent', type: 'ThrowEvent',
width: 31, width: 31,
@@ -137,7 +137,7 @@ export let throwMessageEvent = {
eventDefinition: {type: 'message'} eventDefinition: {type: 'message'}
}; };
export let throwMessageEventActive = { export const throwMessageEventActive = {
completed: false, completed: false,
current: true, current: true,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',
@@ -150,7 +150,7 @@ export let throwMessageEventActive = {
eventDefinition: {type: 'message'} eventDefinition: {type: 'message'}
}; };
export let throwMessageEventCompleted = { export const throwMessageEventCompleted = {
completed: true, completed: true,
current: false, current: false,
id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7', id: 'sid-C05B7CB7-1CFD-4AE4-9E01-C2C91E35E5A7',