mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Decouple the analytics component from the diagrams component
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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 var chartProcessDefOverview = {
|
||||
'elements': [{
|
||||
'id': 'id1585876275153',
|
||||
'type': 'table',
|
||||
'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-INSTANCES', '41'],
|
||||
['__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']
|
||||
]
|
||||
}, {
|
||||
'id': 'id1585876413072',
|
||||
'type': 'pieChart',
|
||||
'title': 'Total process instances overview',
|
||||
'titleKey': 'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.PROC-INST-CHART-TITLE',
|
||||
'values': [{
|
||||
'key': 'Second Process',
|
||||
'y': 4,
|
||||
'keyAndValue': ['Second Process', '4']
|
||||
}, {
|
||||
'key': 'Simple process',
|
||||
'y': 30,
|
||||
'keyAndValue': ['Simple process', '30']
|
||||
}, {
|
||||
'key': 'Third Process',
|
||||
'y': 7,
|
||||
'keyAndValue': ['Third Process', '7']
|
||||
}]
|
||||
}, {
|
||||
'id': 'id1585877659181',
|
||||
'type': 'table',
|
||||
'title': 'Process definition details',
|
||||
'titleKey': 'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE',
|
||||
'columnNames': ['Process definition', 'Total', 'Active', 'Completed'],
|
||||
'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-ACTIVE',
|
||||
'REPORTING.DEFAULT-REPORTS.PROCESS-DEFINITION-OVERVIEW.DETAIL-TABLE-COMPLETED'],
|
||||
'columnsCentered': [false, false, false, false],
|
||||
'rows': [
|
||||
['Second Process', '4', '0', '4'],
|
||||
['Simple process', '30', '3', '27'],
|
||||
['Third Process', '7', '0', '7']
|
||||
]
|
||||
}]
|
||||
};
|
||||
|
||||
export var chartTaskOverview = {
|
||||
'elements': [{
|
||||
'id': 'id792351752194',
|
||||
'type': 'barChart',
|
||||
'title': 'title',
|
||||
'titleKey': 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.TASK-HISTOGRAM-TITLE',
|
||||
'values': [{
|
||||
'key': 'series1',
|
||||
'values': [['2016-09-30T00:00:00.000+0000', 3], ['2016-10-04T00:00:00.000+0000', 1]]
|
||||
}],
|
||||
'xAxisType': 'date_month',
|
||||
'yAxisType': 'count'
|
||||
}, {
|
||||
'id': 'id792349721129',
|
||||
'type': 'masterDetailTable',
|
||||
'title': 'Detailed task statistics',
|
||||
'titleKey': 'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TITLE',
|
||||
'columnNames': ['Task', 'Count', 'Sum', 'Min duration', 'Max duration', 'Average duration', 'Stddev duration'],
|
||||
'columnNameKeys': [
|
||||
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.DETAILED-TASK-STATS-TASK',
|
||||
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.COUNT',
|
||||
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.SUM',
|
||||
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.MIN-DURATION',
|
||||
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.MAX-DURATION',
|
||||
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.AVERAGE',
|
||||
'REPORTING.DEFAULT-REPORTS.TASK-OVERVIEW.STDDE'],
|
||||
'columnsCentered': [false, false, false, false],
|
||||
'rows': [
|
||||
['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']
|
||||
]
|
||||
}]
|
||||
};
|
@@ -0,0 +1,127 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { ReportParameterDetailsModel } from '../models/report.model';
|
||||
|
||||
export var reportDefParamStatus = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Task overview status',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"status","name":null,"nameKey":null,"type":"status","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamNumber = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Process instances overview',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters"' +
|
||||
' :[{"id":"slowProcessInstanceInteger","name":null,"nameKey":null,"type":"integer","value":10,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamDuration = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Task service level agreement',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters"' +
|
||||
' :[{"id":"duration","name":null,"nameKey":null,"type":"duration","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamCheck = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Task service level agreement',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters"' +
|
||||
' :[{"id":"typeFiltering","name":null,"nameKey":null,"type":"boolean","value":true,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamDateRange = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Process instances overview',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"dateRange","name":null,"nameKey":null,"type":"dateRange","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamRangeInterval = {
|
||||
'id': 2006,
|
||||
'name': 'Fake Task overview RangeInterval',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"dateRangeInterval","name":null,"nameKey":null,"type":"dateInterval","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamProcessDef = {
|
||||
'id': 2006,
|
||||
'name': 'Fake Task overview ProcessDefinition',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"processDefinitionId","name":null,"nameKey":null,"type":"processDefinition","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamProcessDefOptions = {
|
||||
'size': 4, 'total': 4, 'start': 0, 'data': [
|
||||
{
|
||||
'id': 'FakeProcessTest 1:1:1',
|
||||
'name': 'Fake Process Test 1 Name ',
|
||||
'version': 1
|
||||
},
|
||||
{
|
||||
'id': 'FakeProcessTest 1:2:1',
|
||||
'name': 'Fake Process Test 1 Name ',
|
||||
'version': 2
|
||||
},
|
||||
{
|
||||
'id': 'FakeProcessTest 2:1:1',
|
||||
'name': 'Fake Process Test 2 Name ',
|
||||
'version': 1
|
||||
},
|
||||
{
|
||||
'id': 'FakeProcessTest 3:1:1',
|
||||
'name': 'Fake Process Test 3 Name ',
|
||||
'version': 1
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export var reportDefParamProcessDefOptionsApp = {
|
||||
'size': 2, 'total': 2, 'start': 2, 'data': [
|
||||
{
|
||||
'id': 'FakeProcessTest 1:1:1',
|
||||
'name': 'Fake Process Test 1 Name ',
|
||||
'version': 1
|
||||
},
|
||||
{
|
||||
'id': 'FakeProcessTest 1:2:1',
|
||||
'name': 'Fake Process Test 1 Name ',
|
||||
'version': 2
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export var reportDefParamTask = {
|
||||
'id': 2006,
|
||||
'name': 'Fake Task service level agreement',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"taskName","name":null,"nameKey":null,"type":"task","value":null,"dependsOn":"processDefinitionId"}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamTaskOptions = ['Fake task name 1', 'Fake task name 2'];
|
||||
|
||||
export var fieldProcessDef = new ReportParameterDetailsModel(
|
||||
{
|
||||
id: 'processDefinitionId',
|
||||
type: 'processDefinition',
|
||||
value: 'fake-process-name:1:15027'
|
||||
}
|
||||
);
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-alfresco-publish-task [data]="data"></diagram-icon-alfresco-publish-task>
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-alfresco-publish-task',
|
||||
templateUrl: './diagram-alfresco-publish-task.component.html',
|
||||
styleUrls: ['./diagram-alfresco-publish-task.component.css']
|
||||
})
|
||||
export class DiagramAlfrescoPublishTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-box-publish-task [data]="data"></diagram-icon-box-publish-task>
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-box-publish-task',
|
||||
templateUrl: './diagram-box-publish-task.component.html',
|
||||
styleUrls: ['./diagram-box-publish-task.component.css']
|
||||
})
|
||||
export class DiagramBoxPublishTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-business-rule-task [data]="data"></diagram-icon-business-rule-task>
|
@@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-business-rule-task',
|
||||
templateUrl: './diagram-business-rule-task.component.html',
|
||||
styleUrls: ['./diagram-business-rule-task.component.css']
|
||||
})
|
||||
export class DiagramBusinessRuleTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-camel-task [data]="data"></diagram-icon-camel-task>
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-camel-task',
|
||||
templateUrl: './diagram-camel-task.component.html',
|
||||
styleUrls: ['./diagram-camel-task.component.css']
|
||||
})
|
||||
export class DiagramCamelTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
<div [ngSwitch]="data.taskType">
|
||||
<div *ngSwitchCase="'mail'">
|
||||
<diagram-send-task [data]="data"></diagram-send-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'camel'">
|
||||
<diagram-camel-task [data]="data"></diagram-camel-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'mule'">
|
||||
<diagram-mule-task [data]="data"></diagram-mule-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'alfresco_publish'">
|
||||
<diagram-alfresco-publish-task [data]="data"></diagram-alfresco-publish-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'rest_call'">
|
||||
<diagram-rest-call-task [data]="data"></diagram-rest-call-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'google_drive_publish'">
|
||||
<diagram-google-drive-publish-task [data]="data"></diagram-google-drive-publish-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'box_publish'">
|
||||
<diagram-box-publish-task [data]="data"></diagram-box-publish-task>
|
||||
</div>
|
||||
<div *ngSwitchDefault>
|
||||
<diagram-service-task [data]="data"></diagram-service-task>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-container-service-task',
|
||||
templateUrl: './diagram-container-service-task.component.html',
|
||||
styleUrls: ['./diagram-container-service-task.component.css']
|
||||
})
|
||||
export class DiagramContainerServiceTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-google-drive-publish-task [data]="data"></diagram-icon-google-drive-publish-task>
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-google-drive-publish-task',
|
||||
templateUrl: './diagram-google-drive-publish-task.component.html',
|
||||
styleUrls: ['./diagram-google-drive-publish-task.component.css']
|
||||
})
|
||||
export class DiagramGoogleDrivePublishTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-manual-task [data]="data"></diagram-icon-manual-task>
|
@@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-manual-task',
|
||||
templateUrl: './diagram-manual-task.component.html',
|
||||
styleUrls: ['./diagram-manual-task.component.css']
|
||||
})
|
||||
export class DiagramManualTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-mule-task [data]="data"></diagram-icon-mule-task>
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-mule-task',
|
||||
templateUrl: './diagram-mule-task.component.html',
|
||||
styleUrls: ['./diagram-mule-task.component.css']
|
||||
})
|
||||
export class DiagramMuleTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-receive-task [data]="data"></diagram-icon-receive-task>
|
@@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-receive-task',
|
||||
templateUrl: './diagram-receive-task.component.html',
|
||||
styleUrls: ['./diagram-receive-task.component.css']
|
||||
})
|
||||
export class DiagramReceiveTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-rest-call-task [data]="data"></diagram-icon-rest-call-task>
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-rest-call-task',
|
||||
templateUrl: './diagram-rest-call-task.component.html',
|
||||
styleUrls: ['./diagram-rest-call-task.component.css']
|
||||
})
|
||||
export class DiagramRestCallTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-script-task [data]="data"></diagram-icon-script-task>
|
@@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-script-task',
|
||||
templateUrl: './diagram-script-task.component.html',
|
||||
styleUrls: ['./diagram-script-task.component.css']
|
||||
})
|
||||
export class DiagramScriptTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-send-task [data]="data"></diagram-icon-send-task>
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-send-task',
|
||||
templateUrl: './diagram-send-task.component.html',
|
||||
styleUrls: ['./diagram-send-task.component.css']
|
||||
})
|
||||
export class DiagramSendTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-service-task [data]="data"></diagram-icon-service-task>
|
@@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-service-task',
|
||||
templateUrl: './diagram-service-task.component.html',
|
||||
styleUrls: ['./diagram-service-task.component.css']
|
||||
})
|
||||
export class DiagramServiceTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
<raphael-rect [leftCorner]="rectLeftCorner" [width]="data.width" [height]="data.height" [radius]="options.radius"
|
||||
[stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-rect>
|
||||
<raphael-text [text]="data.name" [position]="textPosition"></raphael-text>
|
@@ -0,0 +1,50 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-task',
|
||||
templateUrl: './diagram-task.component.html',
|
||||
styleUrls: ['./diagram-task.component.css']
|
||||
})
|
||||
export class DiagramTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
rectLeftCorner: any;
|
||||
textPosition: any;
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: '', radius: 4};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.rectLeftCorner = {x: this.data.x, y: this.data.y};
|
||||
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.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.ACTIVITY_STROKE_COLOR);
|
||||
this.options.strokeWidth = this.diagramColorService.getBpmnStrokeWidth(this.data);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<diagram-task [data]="data"></diagram-task>
|
||||
<diagram-icon-user-task [data]="data"></diagram-icon-user-task>
|
@@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-user-task',
|
||||
templateUrl: './diagram-user-task.component.html',
|
||||
styleUrls: ['./diagram-user-task.component.css']
|
||||
})
|
||||
export class DiagramUserTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,67 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { DiagramContainerServiceTaskComponent } from './diagram-container-service-task.component';
|
||||
import { DiagramTaskComponent } from './diagram-task.component';
|
||||
import { DiagramServiceTaskComponent } from './diagram-service-task.component';
|
||||
import { DiagramSendTaskComponent } from './diagram-send-task.component';
|
||||
import { DiagramUserTaskComponent } from './diagram-user-task.component';
|
||||
import { DiagramManualTaskComponent } from './diagram-manual-task.component';
|
||||
import { DiagramCamelTaskComponent } from './diagram-camel-task.component';
|
||||
import { DiagramMuleTaskComponent } from './diagram-mule-task.component';
|
||||
import { DiagramAlfrescoPublishTaskComponent } from './diagram-alfresco-publish-task.component';
|
||||
import { DiagramRestCallTaskComponent } from './diagram-rest-call-task.component';
|
||||
import { DiagramGoogleDrivePublishTaskComponent } from './diagram-google-drive-publish-task.component';
|
||||
import { DiagramBoxPublishTaskComponent } from './diagram-box-publish-task.component';
|
||||
import { DiagramReceiveTaskComponent } from './diagram-receive-task.component';
|
||||
import { DiagramScriptTaskComponent } from './diagram-script-task.component';
|
||||
import { DiagramBusinessRuleTaskComponent } from './diagram-business-rule-task.component';
|
||||
|
||||
// primitives
|
||||
export * from './diagram-container-service-task.component';
|
||||
export * from './diagram-task.component';
|
||||
export * from './diagram-service-task.component';
|
||||
export * from './diagram-send-task.component';
|
||||
export * from './diagram-user-task.component';
|
||||
export * from './diagram-manual-task.component';
|
||||
export * from './diagram-camel-task.component';
|
||||
export * from './diagram-mule-task.component';
|
||||
export * from './diagram-alfresco-publish-task.component';
|
||||
export * from './diagram-rest-call-task.component';
|
||||
export * from './diagram-google-drive-publish-task.component';
|
||||
export * from './diagram-box-publish-task.component';
|
||||
export * from './diagram-receive-task.component';
|
||||
export * from './diagram-script-task.component';
|
||||
export * from './diagram-business-rule-task.component';
|
||||
|
||||
export const DIAGRAM_ACTIVITIES_DIRECTIVES: any[] = [
|
||||
DiagramContainerServiceTaskComponent,
|
||||
DiagramTaskComponent,
|
||||
DiagramServiceTaskComponent,
|
||||
DiagramSendTaskComponent,
|
||||
DiagramUserTaskComponent,
|
||||
DiagramManualTaskComponent,
|
||||
DiagramCamelTaskComponent,
|
||||
DiagramMuleTaskComponent,
|
||||
DiagramAlfrescoPublishTaskComponent,
|
||||
DiagramRestCallTaskComponent,
|
||||
DiagramGoogleDrivePublishTaskComponent,
|
||||
DiagramBoxPublishTaskComponent,
|
||||
DiagramReceiveTaskComponent,
|
||||
DiagramScriptTaskComponent,
|
||||
DiagramBusinessRuleTaskComponent
|
||||
];
|
@@ -0,0 +1,5 @@
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusInner" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusOuter" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<diagram-container-icon-event [data]="data" [type]="data.eventDefinition.type" [fillColor]="signalFillColor"></diagram-container-icon-event>
|
@@ -0,0 +1,58 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-boundary-event',
|
||||
templateUrl: './diagram-boundary-event.component.html',
|
||||
styleUrls: ['./diagram-boundary-event.component.css']
|
||||
})
|
||||
export class DiagramBoundaryEventComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 1};
|
||||
|
||||
signalFillColor: string;
|
||||
|
||||
circleRadiusInner: number;
|
||||
circleRadiusOuter: number;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x + (this.data.width / 2);
|
||||
this.center.y = this.data.y + (this.data.height / 2);
|
||||
|
||||
this.circleRadiusInner = 12;
|
||||
this.circleRadiusOuter = 15;
|
||||
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
|
||||
this.signalFillColor = 'none';
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusInner" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusOuter" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<diagram-container-icon-event [data]="data" [type]="data.eventDefinition && data.eventDefinition.type"
|
||||
[fillColor]="signalFillColor"></diagram-container-icon-event>
|
@@ -0,0 +1,58 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-throw-event',
|
||||
templateUrl: './diagram-throw-event.component.html',
|
||||
styleUrls: ['./diagram-throw-event.component.css']
|
||||
})
|
||||
export class DiagramThrowEventComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 1};
|
||||
|
||||
signalFillColor: string;
|
||||
|
||||
circleRadiusInner: number;
|
||||
circleRadiusOuter: number;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x + (this.data.width / 2);
|
||||
this.center.y = this.data.y + (this.data.height / 2);
|
||||
|
||||
this.circleRadiusInner = 12;
|
||||
this.circleRadiusOuter = 15;
|
||||
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
|
||||
this.signalFillColor = 'black';
|
||||
}
|
||||
}
|
@@ -0,0 +1,28 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { DiagramBoundaryEventComponent } from './diagram-boundary-event.component';
|
||||
import { DiagramThrowEventComponent } from './diagram-throw-event.component';
|
||||
|
||||
// primitives
|
||||
export * from './diagram-boundary-event.component';
|
||||
export * from './diagram-throw-event.component';
|
||||
|
||||
export const DIAGRAM_BOUNDARY_EVENTS_DIRECTIVES: any[] = [
|
||||
DiagramBoundaryEventComponent,
|
||||
DiagramThrowEventComponent
|
||||
];
|
@@ -0,0 +1 @@
|
||||
<raphael-flow-arrow [flow]="flow"></raphael-flow-arrow>
|
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-sequence-flow',
|
||||
templateUrl: './diagram-sequence-flow.component.html',
|
||||
styleUrls: ['./diagram-sequence-flow.component.css']
|
||||
})
|
||||
export class DiagramSequenceFlowComponent {
|
||||
@Input()
|
||||
flow: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef) {}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.elementRef);
|
||||
}
|
||||
}
|
@@ -0,0 +1,64 @@
|
||||
<div *ngIf="diagram">
|
||||
<div *ngFor="let element of diagram.elements">
|
||||
<div [ngSwitch]="element.type">
|
||||
<div *ngSwitchCase="'StartEvent'">
|
||||
<diagram-start-event [data]="element"></diagram-start-event>
|
||||
</div>
|
||||
<div *ngSwitchCase="'ExclusiveGateway'">
|
||||
<diagram-exclusive-gateway [data]="element"></diagram-exclusive-gateway>
|
||||
</div>
|
||||
<div *ngSwitchCase="'InclusiveGateway'">
|
||||
<diagram-inclusive-gateway [data]="element"></diagram-inclusive-gateway>
|
||||
</div>
|
||||
<div *ngSwitchCase="'EventGateway'">
|
||||
<diagram-event-gateway [data]="element"></diagram-event-gateway>
|
||||
</div>
|
||||
<div *ngSwitchCase="'ParallelGateway'">
|
||||
<diagram-parallel-gateway [data]="element"></diagram-parallel-gateway>
|
||||
</div>
|
||||
<div *ngSwitchCase="'EndEvent'">
|
||||
<diagram-end-event [data]="element"></diagram-end-event>
|
||||
</div>
|
||||
<div *ngSwitchCase="'UserTask'">
|
||||
<diagram-user-task [data]="element"></diagram-user-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'ManualTask'">
|
||||
<diagram-manual-task [data]="element"></diagram-manual-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'ServiceTask'">
|
||||
<diagram-container-service-task [data]="element"></diagram-container-service-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'ReceiveTask'">
|
||||
<diagram-receive-task [data]="element"></diagram-receive-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'ScriptTask'">
|
||||
<diagram-script-task [data]="element"></diagram-script-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'BusinessRuleTask'">
|
||||
<diagram-business-rule-task [data]="element"></diagram-business-rule-task>
|
||||
</div>
|
||||
<div *ngSwitchCase="'BoundaryEvent'">
|
||||
<diagram-boundary-event [data]="element"></diagram-boundary-event>
|
||||
</div>
|
||||
<div *ngSwitchCase="'ThrowEvent'">
|
||||
<diagram-throw-event [data]="element"></diagram-throw-event>
|
||||
</div>
|
||||
<div *ngSwitchCase="'IntermediateCatchEvent'">
|
||||
<diagram-intermediate-catching-event [data]="element"></diagram-intermediate-catching-event>
|
||||
</div>
|
||||
<div *ngSwitchCase="'SubProcess'">
|
||||
<diagram-subprocess [data]="element"></diagram-subprocess>
|
||||
</div>
|
||||
<div *ngSwitchCase="'EventSubProcess'">
|
||||
<diagram-event-subprocess [data]="element"></diagram-event-subprocess>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngFor="let flow of diagram.flows">
|
||||
<div [ngSwitch]="flow.type">
|
||||
<div *ngSwitchCase="'sequenceFlow'">
|
||||
<diagram-sequence-flow [flow]="flow"></diagram-sequence-flow>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,85 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter, SimpleChanges } from '@angular/core';
|
||||
import { AlfrescoTranslationService } from 'ng2-alfresco-core';
|
||||
import { DiagramsService } from '../services/diagrams.service';
|
||||
import { DiagramColorService } from '../services/diagram-color.service';
|
||||
import { RaphaelService } from './raphael/raphael.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'activiti-diagram',
|
||||
templateUrl: './diagram.component.html',
|
||||
styleUrls: ['./diagram.component.css']
|
||||
})
|
||||
export class DiagramComponent {
|
||||
@Input()
|
||||
processDefinitionId: any;
|
||||
|
||||
@Input()
|
||||
metricPercentages: any;
|
||||
|
||||
@Input()
|
||||
width: number = 1000;
|
||||
|
||||
@Input()
|
||||
height: number = 500;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
private diagram: any;
|
||||
private elementRef: ElementRef;
|
||||
|
||||
constructor(elementRef: ElementRef,
|
||||
private translate: AlfrescoTranslationService,
|
||||
private diagramColorService: DiagramColorService,
|
||||
private raphaelService: RaphaelService,
|
||||
private diagramsService: DiagramsService) {
|
||||
if (translate) {
|
||||
translate.addTranslationFolder('node_modules/ng2-activiti-analytics/src');
|
||||
}
|
||||
this.elementRef = elementRef;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.raphaelService.setting(this.width, this.height);
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
this.reset();
|
||||
this.diagramColorService.setTotalColors(this.metricPercentages);
|
||||
this.getProcessDefinitionModel(this.processDefinitionId);
|
||||
}
|
||||
|
||||
getProcessDefinitionModel(processDefinitionId: string) {
|
||||
this.diagramsService.getProcessDefinitionModel(processDefinitionId).subscribe(
|
||||
(res: any) => {
|
||||
this.diagram = res;
|
||||
},
|
||||
(err: any) => {
|
||||
this.onError.emit(err);
|
||||
console.log(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.raphaelService.reset();
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
<diagram-event [data]="data" [options]="options" [iconFillColor]="iconFillColor"></diagram-event>
|
@@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-end-event',
|
||||
templateUrl: './diagram-end-event.component.html',
|
||||
styleUrls: ['./diagram-end-event.component.css']
|
||||
})
|
||||
export class DiagramEndEventComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: '', radius: ''};
|
||||
iconFillColor: any;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.elementRef);
|
||||
|
||||
this.options.radius = 14;
|
||||
this.options.strokeWidth = 4;
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
|
||||
this.iconFillColor = 'black';
|
||||
}
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
<raphael-circle [center]="center" [radius]="options.radius" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<diagram-container-icon-event [data]="data" [type]="data.eventDefinition && data.eventDefinition.type"
|
||||
[fillColor]="iconFillColor"></diagram-container-icon-event>
|
@@ -0,0 +1,50 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-event',
|
||||
templateUrl: './diagram-event.component.html',
|
||||
styleUrls: ['./diagram-event.component.css']
|
||||
})
|
||||
export class DiagramEventComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Input()
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: '', radius: ''};
|
||||
|
||||
@Input()
|
||||
iconFillColor: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.elementRef);
|
||||
this.center.x = this.data.x + (this.data.width / 2);
|
||||
this.center.y = this.data.y + (this.data.height / 2);
|
||||
}
|
||||
}
|
@@ -0,0 +1 @@
|
||||
<diagram-event [data]="data" [options]="options" [iconFillColor]="iconFillColor"></diagram-event>
|
@@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-start-event',
|
||||
templateUrl: './diagram-start-event.component.html',
|
||||
styleUrls: ['./diagram-start-event.component.css']
|
||||
})
|
||||
export class DiagramStartEventComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: '', radius: ''};
|
||||
iconFillColor: any;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.elementRef);
|
||||
|
||||
this.options.radius = 15;
|
||||
this.options.strokeWidth = 1;
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
|
||||
this.iconFillColor = 'none';
|
||||
}
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { DiagramEventComponent } from './diagram-event.component';
|
||||
import { DiagramStartEventComponent } from './diagram-start-event.component';
|
||||
import { DiagramEndEventComponent } from './diagram-end-event.component';
|
||||
|
||||
// primitives
|
||||
export * from './diagram-event.component';
|
||||
export * from './diagram-start-event.component';
|
||||
export * from './diagram-end-event.component';
|
||||
|
||||
export const DIAGRAM_EVENTS_DIRECTIVES: any[] = [
|
||||
DiagramEventComponent,
|
||||
DiagramStartEventComponent,
|
||||
DiagramEndEventComponent
|
||||
];
|
@@ -0,0 +1,7 @@
|
||||
<diagram-gateway [data]="data"></diagram-gateway>
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusInner" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusOuter" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<raphael-pentagon [center]="centerPentagon" [strokeWidth]="pentaStrokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-pentagon>
|
@@ -0,0 +1,56 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-event-gateway',
|
||||
templateUrl: './diagram-event-gateway.component.html',
|
||||
styleUrls: ['./diagram-event-gateway.component.css']
|
||||
})
|
||||
export class DiagramEventGatewayComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
centerPentagon: any = {};
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 0.5};
|
||||
|
||||
circleRadiusInner = 10.4;
|
||||
circleRadiusOuter = 11.7;
|
||||
|
||||
pentaStrokeWidth = 1.39999998;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x + (this.data.width / 2);
|
||||
this.center.y = this.data.y + (this.data.height / 2);
|
||||
this.centerPentagon.x = this.data.x;
|
||||
this.centerPentagon.y = this.data.y;
|
||||
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
<diagram-gateway [data]="data"></diagram-gateway>
|
||||
<raphael-cross [center]="center" [width]="width" [height]="height" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-cross>
|
@@ -0,0 +1,52 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-exclusive-gateway',
|
||||
templateUrl: './diagram-exclusive-gateway.component.html',
|
||||
styleUrls: ['./diagram-exclusive-gateway.component.css']
|
||||
})
|
||||
export class DiagramExclusiveGatewayComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
width: any;
|
||||
height: any;
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 3};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x;
|
||||
this.center.y = this.data.y;
|
||||
this.width = this.data.width;
|
||||
this.height = this.data.height;
|
||||
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-rhombus [center]="center" [width]="width" [height]="height" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-rhombus>
|
@@ -0,0 +1,52 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-gateway',
|
||||
templateUrl: './diagram-gateway.component.html',
|
||||
styleUrls: ['./diagram-gateway.component.css']
|
||||
})
|
||||
export class DiagramGatewayComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
width: any;
|
||||
height: any;
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 2};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x;
|
||||
this.center.y = this.data.y;
|
||||
this.width = this.data.width;
|
||||
this.height = this.data.height;
|
||||
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
<diagram-gateway [data]="data"></diagram-gateway>
|
||||
<raphael-circle [center]="center" [radius]="options.radius" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
@@ -0,0 +1,50 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-inclusive-gateway',
|
||||
templateUrl: './diagram-inclusive-gateway.component.html',
|
||||
styleUrls: ['./diagram-inclusive-gateway.component.css']
|
||||
})
|
||||
export class DiagramInclusiveGatewayComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
width: any;
|
||||
height: any;
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 2.5, radius: 9.75};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x + (this.data.width / 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.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
<diagram-gateway [data]="data"></diagram-gateway>
|
||||
<raphael-plus [center]="center" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-plus>
|
@@ -0,0 +1,52 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-parallel-gateway',
|
||||
templateUrl: './diagram-parallel-gateway.component.html',
|
||||
styleUrls: ['./diagram-parallel-gateway.component.css']
|
||||
})
|
||||
export class DiagramParallelGatewayComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
width: any;
|
||||
height: any;
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 3};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x;
|
||||
this.center.y = this.data.y;
|
||||
this.width = this.data.width;
|
||||
this.height = this.data.height;
|
||||
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
}
|
||||
}
|
@@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { DiagramGatewayComponent } from './diagram-gateway.component';
|
||||
import { DiagramExclusiveGatewayComponent } from './diagram-exclusive-gateway.component';
|
||||
import { DiagramInclusiveGatewayComponent } from './diagram-inclusive-gateway.component';
|
||||
import { DiagramParallelGatewayComponent } from './diagram-parallel-gateway.component';
|
||||
import { DiagramEventGatewayComponent } from './diagram-event-gateway.component';
|
||||
|
||||
// primitives
|
||||
export * from './diagram-gateway.component';
|
||||
export * from './diagram-exclusive-gateway.component';
|
||||
export * from './diagram-inclusive-gateway.component';
|
||||
export * from './diagram-parallel-gateway.component';
|
||||
export * from './diagram-event-gateway.component';
|
||||
|
||||
export const DIAGRAM_GATEWAY_DIRECTIVES: any[] = [
|
||||
DiagramGatewayComponent,
|
||||
DiagramExclusiveGatewayComponent,
|
||||
DiagramInclusiveGatewayComponent,
|
||||
DiagramParallelGatewayComponent,
|
||||
DiagramEventGatewayComponent
|
||||
];
|
@@ -0,0 +1,14 @@
|
||||
<div [ngSwitch]="type">
|
||||
<div *ngSwitchCase="'timer'">
|
||||
<diagram-icon-timer [data]="data"></diagram-icon-timer>
|
||||
</div>
|
||||
<div *ngSwitchCase="'error'">
|
||||
<diagram-icon-error [data]="data" [fillColor]="fillColor"></diagram-icon-error>
|
||||
</div>
|
||||
<div *ngSwitchCase="'signal'">
|
||||
<diagram-icon-signal [data]="data" [fillColor]="fillColor"></diagram-icon-signal>
|
||||
</div>
|
||||
<div *ngSwitchCase="'message'">
|
||||
<diagram-icon-message [data]="data"></diagram-icon-message>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,45 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-container-icon-event',
|
||||
templateUrl: './diagram-container-icon-event.component.html',
|
||||
styleUrls: ['./diagram-container-icon-event.component.css']
|
||||
})
|
||||
export class DiagramContainerIconEventTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Input()
|
||||
type: string;
|
||||
|
||||
@Input()
|
||||
fillColor: string;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-alfresco-publish [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-alfresco-publish>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-alfresco-publish-task',
|
||||
templateUrl: './diagram-icon-alfresco-publish-task.component.html',
|
||||
styleUrls: ['./diagram-icon-alfresco-publish-task.component.css']
|
||||
})
|
||||
export class DiagramIconAlfrescoPublishTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#87C040' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-box-publish [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-box-publish>
|
@@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-box-publish-task',
|
||||
templateUrl: './diagram-icon-box-publish-task.component.html',
|
||||
styleUrls: ['./diagram-icon-box-publish-task.component.css']
|
||||
})
|
||||
export class DiagramIconBoxPublishTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 6, y: this.data.y + 6};
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-business-rule [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-business-rule>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-business-rule-task',
|
||||
templateUrl: './diagram-icon-business-rule-task.component.html',
|
||||
styleUrls: ['./diagram-icon-business-rule-task.component.css']
|
||||
})
|
||||
export class DiagramIconBusinessRuleTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#72a7d0' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-camel [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-camel>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-camel-task',
|
||||
templateUrl: './diagram-icon-camel-task.component.html',
|
||||
styleUrls: ['./diagram-icon-camel-task.component.css']
|
||||
})
|
||||
export class DiagramIconCamelTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 8, y: this.data.y + 6};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#bd4848' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-error [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-error>
|
@@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-error',
|
||||
templateUrl: './diagram-icon-error.component.html',
|
||||
styleUrls: ['./diagram-icon-error.component.css']
|
||||
})
|
||||
export class DiagramIconErrorComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Input()
|
||||
fillColor: string;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x - 1, y: this.data.y - 1};
|
||||
|
||||
this.options.stroke = 'black';
|
||||
this.options.fillColors = this.fillColor;
|
||||
this.options.strokeWidth = 1;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-google-drive-publish [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-google-drive-publish>
|
@@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-google-drive-publish-task',
|
||||
templateUrl: './diagram-icon-google-drive-publish-task.component.html',
|
||||
styleUrls: ['./diagram-icon-google-drive-publish-task.component.css']
|
||||
})
|
||||
export class DiagramIconGoogleDrivePublishTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 6, y: this.data.y + 6};
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-manual [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-manual>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-manual-task',
|
||||
templateUrl: './diagram-icon-manual-task.component.html',
|
||||
styleUrls: ['./diagram-icon-manual-task.component.css']
|
||||
})
|
||||
export class DiagramIconManualTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#d1b575' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-message [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-message>
|
@@ -0,0 +1,48 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-message',
|
||||
templateUrl: './diagram-icon-message.component.html',
|
||||
styleUrls: ['./diagram-icon-message.component.css']
|
||||
})
|
||||
export class DiagramIconMessageComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 6, y: this.data.y + 6};
|
||||
|
||||
this.options.stroke = 'none';
|
||||
this.options.fillColors = '#585858';
|
||||
this.options.strokeWidth = 1;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-mule [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-mule>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-mule-task',
|
||||
templateUrl: './diagram-icon-mule-task.component.html',
|
||||
styleUrls: ['./diagram-icon-mule-task.component.css']
|
||||
})
|
||||
export class DiagramIconMuleTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 2, y: this.data.y + 2};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#bd4848' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-receive [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-receive>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-receive-task',
|
||||
templateUrl: './diagram-icon-receive-task.component.html',
|
||||
styleUrls: ['./diagram-icon-receive-task.component.css']
|
||||
})
|
||||
export class DiagramIconReceiveTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 4, y: this.data.y + 2};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#16964d' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-rest-call [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-rest-call>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-rest-call-task',
|
||||
templateUrl: './diagram-icon-rest-call-task.component.html',
|
||||
styleUrls: ['./diagram-icon-rest-call-task.component.css']
|
||||
})
|
||||
export class DiagramIconRestCallTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 2, y: this.data.y + 2};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#bd4848' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-script [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-script>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-script-task',
|
||||
templateUrl: './diagram-icon-script-task.component.html',
|
||||
styleUrls: ['./diagram-icon-script-task.component.css']
|
||||
})
|
||||
export class DiagramIconScriptTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#72a7d0' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-send [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-send>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-send-task',
|
||||
templateUrl: './diagram-icon-send-task.component.html',
|
||||
styleUrls: ['./diagram-icon-send-task.component.css']
|
||||
})
|
||||
export class DiagramIconSendTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#16964d' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-service [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-service>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-service-task',
|
||||
templateUrl: './diagram-icon-service-task.component.html',
|
||||
styleUrls: ['./diagram-icon-service-task.component.css']
|
||||
})
|
||||
export class DiagramIconServiceTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#72a7d0' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-signal [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-signal>
|
@@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-signal',
|
||||
templateUrl: './diagram-icon-signal.component.html',
|
||||
styleUrls: ['./diagram-icon-signal.component.css']
|
||||
})
|
||||
export class DiagramIconSignalComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Input()
|
||||
fillColor: string;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x - 1, y: this.data.y - 1};
|
||||
|
||||
this.options.stroke = 'black';
|
||||
this.options.fillColors = this.fillColor;
|
||||
this.options.strokeWidth = 1;
|
||||
}
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
<raphael-circle [center]="center" [radius]="circleRadius" [strokeWidth]="circleOptions.strokeWidth" [stroke]="circleOptions.stroke"
|
||||
[fillColors]="circleOptions.fillColors" [fillOpacity]="circleOptions.fillOpacity"></raphael-circle>
|
||||
<raphael-icon-timer [position]="position" [stroke]="timerOptions.stroke" [strokeWidth]="timerOptions.strokeWidth"
|
||||
[fillColors]="timerOptions.fillColors" [fillOpacity]="timerOptions.fillOpacity"></raphael-icon-timer>
|
@@ -0,0 +1,56 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-timer',
|
||||
templateUrl: './diagram-icon-timer.component.html',
|
||||
styleUrls: ['./diagram-icon-timer.component.css']
|
||||
})
|
||||
export class DiagramIconTimerComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
position: any;
|
||||
|
||||
circleRadius: number;
|
||||
|
||||
circleOptions: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
timerOptions: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x + (this.data.width / 2);
|
||||
this.center.y = this.data.y + (this.data.height / 2);
|
||||
this.circleRadius = 10;
|
||||
this.position = {x: this.data.x + 5, y: this.data.y + 5};
|
||||
|
||||
this.circleOptions.stroke = 'black' ;
|
||||
this.circleOptions.fillColors = 'none' ;
|
||||
this.timerOptions.stroke = 'none' ;
|
||||
this.timerOptions.fillColors = '#585858' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,2 @@
|
||||
<raphael-icon-user [position]="position" [stroke]="options.stroke" [strokeWidth]="options.strokeWidth"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-icon-user>
|
@@ -0,0 +1,46 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-user-task',
|
||||
templateUrl: './diagram-icon-user-task.component.html',
|
||||
styleUrls: ['./diagram-icon-user-task.component.css']
|
||||
})
|
||||
export class DiagramIconUserTaskComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
position: any;
|
||||
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: ''};
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.position = {x: this.data.x + 4, y: this.data.y + 4};
|
||||
this.options.stroke = 'none' ;
|
||||
this.options.fillColors = '#d1b575' ;
|
||||
}
|
||||
}
|
@@ -0,0 +1,76 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { DiagramIconServiceTaskComponent } from './diagram-icon-service-task.component';
|
||||
import { DiagramIconSendTaskComponent } from './diagram-icon-send-task.component';
|
||||
import { DiagramIconUserTaskComponent } from './diagram-icon-user-task.component';
|
||||
import { DiagramIconManualTaskComponent } from './diagram-icon-manual-task.component';
|
||||
import { DiagramIconCamelTaskComponent } from './diagram-icon-camel-task.component';
|
||||
import { DiagramIconMuleTaskComponent } from './diagram-icon-mule-task.component';
|
||||
import { DiagramIconAlfrescoPublishTaskComponent } from './diagram-icon-alfresco-publish-task.component';
|
||||
import { DiagramIconRestCallTaskComponent } from './diagram-icon-rest-call-task.component';
|
||||
import { DiagramIconGoogleDrivePublishTaskComponent } from './diagram-icon-google-drive-publish-task.component';
|
||||
import { DiagramIconBoxPublishTaskComponent } from './diagram-icon-box-publish-task.component';
|
||||
import { DiagramIconReceiveTaskComponent } from './diagram-icon-receive-task.component';
|
||||
import { DiagramIconScriptTaskComponent } from './diagram-icon-script-task.component';
|
||||
import { DiagramIconBusinessRuleTaskComponent } from './diagram-icon-business-rule-task.component';
|
||||
import { DiagramContainerIconEventTaskComponent } from './diagram-container-icon-event.component';
|
||||
import { DiagramIconTimerComponent } from './diagram-icon-timer.component';
|
||||
import { DiagramIconErrorComponent } from './diagram-icon-error.component';
|
||||
import { DiagramIconSignalComponent } from './diagram-icon-signal.component';
|
||||
import { DiagramIconMessageComponent } from './diagram-icon-message.component';
|
||||
|
||||
// primitives
|
||||
export * from './diagram-icon-service-task.component';
|
||||
export * from './diagram-icon-send-task.component';
|
||||
export * from './diagram-icon-user-task.component';
|
||||
export * from './diagram-icon-manual-task.component';
|
||||
export * from './diagram-icon-camel-task.component';
|
||||
export * from './diagram-icon-mule-task.component';
|
||||
export * from './diagram-icon-alfresco-publish-task.component';
|
||||
export * from './diagram-icon-rest-call-task.component';
|
||||
export * from './diagram-icon-google-drive-publish-task.component';
|
||||
export * from './diagram-icon-box-publish-task.component';
|
||||
export * from './diagram-icon-receive-task.component';
|
||||
export * from './diagram-icon-script-task.component';
|
||||
export * from './diagram-icon-business-rule-task.component';
|
||||
export * from './diagram-container-icon-event.component';
|
||||
export * from './diagram-icon-timer.component';
|
||||
export * from './diagram-icon-error.component';
|
||||
export * from './diagram-icon-signal.component';
|
||||
export * from './diagram-icon-message.component';
|
||||
|
||||
export const DIAGRAM_ICONS_DIRECTIVES: any[] = [
|
||||
DiagramIconServiceTaskComponent,
|
||||
DiagramIconSendTaskComponent,
|
||||
DiagramIconUserTaskComponent,
|
||||
DiagramIconManualTaskComponent,
|
||||
DiagramIconCamelTaskComponent,
|
||||
DiagramIconMuleTaskComponent,
|
||||
DiagramIconAlfrescoPublishTaskComponent,
|
||||
DiagramIconRestCallTaskComponent,
|
||||
DiagramIconGoogleDrivePublishTaskComponent,
|
||||
DiagramIconBoxPublishTaskComponent,
|
||||
DiagramIconReceiveTaskComponent,
|
||||
DiagramIconScriptTaskComponent,
|
||||
DiagramIconBusinessRuleTaskComponent,
|
||||
DiagramContainerIconEventTaskComponent,
|
||||
DiagramIconTimerComponent,
|
||||
DiagramIconErrorComponent,
|
||||
DiagramIconSignalComponent,
|
||||
DiagramIconMessageComponent
|
||||
];
|
48
ng2-components/ng2-activiti-diagrams/src/components/index.ts
Normal file
48
ng2-components/ng2-activiti-diagrams/src/components/index.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { DiagramSequenceFlowComponent } from './diagram-sequence-flow.component';
|
||||
import { DIAGRAM_ACTIVITIES_DIRECTIVES } from './activities/index';
|
||||
import { DIAGRAM_EVENTS_DIRECTIVES } from './events/index';
|
||||
import { DIAGRAM_GATEWAY_DIRECTIVES } from './gateways/index';
|
||||
import { DIAGRAM_ICONS_DIRECTIVES } from './icons/index';
|
||||
import { DIAGRAM_BOUNDARY_EVENTS_DIRECTIVES } from './boundary-events/index';
|
||||
import { DIAGRAM_INTERMEDIATE_EVENTS_DIRECTIVES } from './intermediate-catching-events/index';
|
||||
import { DIAGRAM_STRUCTURAL_DIRECTIVES } from './structural/index';
|
||||
|
||||
// primitives
|
||||
export * from './diagram.component';
|
||||
export * from './events/index';
|
||||
export * from './activities/index';
|
||||
export * from './icons/index';
|
||||
export * from './diagram-sequence-flow.component';
|
||||
export * from './boundary-events/index';
|
||||
export * from './intermediate-catching-events/index';
|
||||
export * from './structural/index';
|
||||
|
||||
export const DIAGRAM_DIRECTIVES: any[] = [
|
||||
DiagramComponent,
|
||||
DIAGRAM_EVENTS_DIRECTIVES,
|
||||
DIAGRAM_ACTIVITIES_DIRECTIVES,
|
||||
DiagramSequenceFlowComponent,
|
||||
DIAGRAM_GATEWAY_DIRECTIVES,
|
||||
DIAGRAM_ICONS_DIRECTIVES,
|
||||
DIAGRAM_BOUNDARY_EVENTS_DIRECTIVES,
|
||||
DIAGRAM_INTERMEDIATE_EVENTS_DIRECTIVES,
|
||||
DIAGRAM_STRUCTURAL_DIRECTIVES
|
||||
];
|
@@ -0,0 +1,5 @@
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusInner" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<raphael-circle [center]="center" [radius]="circleRadiusOuter" [strokeWidth]="options.strokeWidth" [stroke]="options.stroke"
|
||||
[fillColors]="options.fillColors" [fillOpacity]="options.fillOpacity"></raphael-circle>
|
||||
<diagram-container-icon-event [data]="data" [type]="data.eventDefinition.type"></diagram-container-icon-event>
|
@@ -0,0 +1,54 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 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.
|
||||
*/
|
||||
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-intermediate-catching-event',
|
||||
templateUrl: './diagram-intermediate-catching-event.component.html',
|
||||
styleUrls: ['./diagram-intermediate-catching-event.component.css']
|
||||
})
|
||||
export class DiagramIntermediateCatchingEventComponent {
|
||||
@Input()
|
||||
data: any;
|
||||
|
||||
@Output()
|
||||
onError = new EventEmitter();
|
||||
|
||||
center: any = {};
|
||||
options: any = {stroke: '', fillColors: '', fillOpacity: '', strokeWidth: 1};
|
||||
|
||||
circleRadiusInner: number;
|
||||
circleRadiusOuter: number;
|
||||
|
||||
constructor(public elementRef: ElementRef,
|
||||
private diagramColorService: DiagramColorService) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.center.x = this.data.x + (this.data.width / 2);
|
||||
this.center.y = this.data.y + (this.data.height / 2);
|
||||
|
||||
this.circleRadiusInner = 12;
|
||||
this.circleRadiusOuter = 15;
|
||||
|
||||
this.options.stroke = this.diagramColorService.getBpmnColor(this.data, DiagramColorService.MAIN_STROKE_COLOR);
|
||||
this.options.fillColors = this.diagramColorService.getFillColour(this.data.id);
|
||||
this.options.fillOpacity = this.diagramColorService.getFillOpacity();
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user