diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.html b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.html new file mode 100644 index 0000000000..6b60f0a5a5 --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.ts b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.ts new file mode 100644 index 0000000000..8202d7f6cf --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.ts @@ -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() { + + } +} diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-container-service-task.component.html b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-container-service-task.component.html index 73d36446ab..ffca2963c4 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-container-service-task.component.html +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-container-service-task.component.html @@ -17,6 +17,9 @@
+
+ +
diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/index.ts b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/index.ts index c991d63a94..8914dbb10a 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/index.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/index.ts @@ -26,6 +26,7 @@ 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'; // primitives export * from './diagram-container-service-task.component'; @@ -39,6 +40,7 @@ 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 const DIAGRAM_ACTIVITIES_DIRECTIVES: any[] = [ DiagramContainerServiceTaskComponent, @@ -51,5 +53,6 @@ export const DIAGRAM_ACTIVITIES_DIRECTIVES: any[] = [ DiagramMuleTaskComponent, DiagramAlfrescoPublishTaskComponent, DiagramRestCallTaskComponent, - DiagramGoogleDrivePublishTaskComponent + DiagramGoogleDrivePublishTaskComponent, + DiagramBoxPublishTaskComponent ]; diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.html b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.html new file mode 100644 index 0000000000..61548c14e2 --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.html @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.ts b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.ts new file mode 100644 index 0000000000..87817a26b0 --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.ts @@ -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}; + } +} diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/index.ts b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/index.ts index 343bec6a40..d23a1b8476 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/index.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/index.ts @@ -24,6 +24,7 @@ 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'; // primitives export * from './diagram-icon-service-task.component'; @@ -35,6 +36,7 @@ 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 const DIAGRAM_ICONS_DIRECTIVES: any[] = [ DiagramIconServiceTaskComponent, @@ -45,5 +47,6 @@ export const DIAGRAM_ICONS_DIRECTIVES: any[] = [ DiagramIconMuleTaskComponent, DiagramIconAlfrescoPublishTaskComponent, DiagramIconRestCallTaskComponent, - DiagramIconGoogleDrivePublishTaskComponent + DiagramIconGoogleDrivePublishTaskComponent, + DiagramIconBoxPublishTaskComponent ]; diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/index.ts b/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/index.ts index 932543567b..830f014404 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/index.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/index.ts @@ -24,6 +24,7 @@ import { RaphaelIconMuleDirective } from './raphael-icon-mule.component'; import { RaphaelIconAlfrescoPublishDirective } from './raphael-icon-alfresco-publish.component'; import { RaphaelIconRestCallDirective } from './raphael-icon-rest-call.component'; import { RaphaelIconGoogleDrivePublishDirective } from './raphael-icon-google-drive-publish.component'; +import { RaphaelIconBoxPublishDirective } from './raphael-icon-box-publish.component'; // primitives export * from './raphael-icon-service.component'; @@ -35,6 +36,7 @@ export * from './raphael-icon-mule.component'; export * from './raphael-icon-alfresco-publish.component'; export * from './raphael-icon-rest-call.component'; export * from './raphael-icon-google-drive-publish.component'; +export * from './raphael-icon-box-publish.component'; export const RAPHAEL_ICONS_DIRECTIVES: any[] = [ RaphaelIconServiceDirective, @@ -45,5 +47,6 @@ export const RAPHAEL_ICONS_DIRECTIVES: any[] = [ RaphaelIconMuleDirective, RaphaelIconAlfrescoPublishDirective, RaphaelIconRestCallDirective, - RaphaelIconGoogleDrivePublishDirective + RaphaelIconGoogleDrivePublishDirective, + RaphaelIconBoxPublishDirective ]; diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-box-publish.component.ts b/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-box-publish.component.ts new file mode 100644 index 0000000000..545d4b0c63 --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-box-publish.component.ts @@ -0,0 +1,100 @@ +/*! + * @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 { Directive, OnInit, ElementRef, Input, Output, EventEmitter } from '@angular/core'; +import { Point } from './../models/point'; +import { RaphaelBase } from './../raphael-base'; +import { RaphaelService } from './../raphael.service'; + +@Directive({selector: 'raphael-icon-box-publish'}) +export class RaphaelIconBoxPublishDirective extends RaphaelBase implements OnInit { + @Input() + paper: any; + + @Input() + position: Point; + + @Input() + text: string; + + @Output() + onError = new EventEmitter(); + + @Input() + strokeWidth: number; + + @Input() + fillColors: any; + + @Input() + stroke: any; + + @Input() + fillOpacity: any; + + constructor(public elementRef: ElementRef, + raphaelService: RaphaelService) { + super(elementRef, raphaelService); + } + + ngOnInit() { + console.log(this.elementRef); + this.draw(this.position); + } + + public draw(position: Point) { + + let image = this.paper.image(); + + image.attr({'x': position.x}); + image.attr({'y': position.y}); + image.attr({'id': 'image3398'}); + image.attr({'preserveAspectRatio': 'none'}); + image.attr({'height': '16'}); + image.attr({'width': '17'}); + image.attr({'src': `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAjCAYAAADxG9hnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAA7DAAAO + wwHHb6hkAAAAB3RJTUUH3wQXDxwCFNe28AAACsdJREFUWMOVmGmMXtV5x3/POfe+ y2yeGc/mwbMZG9tDMGBTKC5GCU4pbYmSRlmowlIFJWnUprSiy4dI/UA/9EsVifZDmy + ZIxEpo1Cql UKICqbABG+x4X4M9iz2bxzOefXnfee+95zz9cN9Z7NqVeqSje3XPec/5n/Ns//8rAAd6xvj0lmYA VJWTI9fN2d5BikslrDEYY0ABIX0aUBUUUJS1TZB0HZS + lUsz8fBHF09neKnFU0t964B5trcoqwA8O fsI3HtmW/u7Hx3p5+oHNqCr7DpzLX3dh1+xC4Z7p2dnGKE7UGmOsNTYFIuXtUlQqsgJkGSdrgBRL 8dLCYlRUUTa1NrYXiqWZ + jqb6q/vPDHz43S/vXHika0Phr984yUufv5/llfnJ0f473z9/7c+P9E8+ 3zdRCAuJR8SU1zUpBhFWL0BATAqhvIqIlCEIqK65JfDOIHgqpUT3HesW9mxreOWejfUvPfPrm6 + de fu8Sgary2sm+5v84NvT9d85P7Z1zhkwmTyZD+dSAKFI2jyAgqQEMkoJFQR1ZC1W5gMowxAgkzlOI HPMlh3ceFUtCjuPXtap3cuSFL9ybdKrq10RkMfi7Nz42g/P+2YP + 9i3sjm6E6a8snS0+ogBcwIki5 g2AkPXGAsqk+z/YNVWxuyLBxXZ66XIbQQimOmSgkDM9G9IwVODda5OpcEc0YYs3xbs/C73z39VMv Ai8FP/rlqG1vafjLGZenusKn121W + 7jr1TxFE0tsQI/iyibbVBTzZvZ6H22vY1lJDQ0WW27Vrs4uc G5vj/d453jw7yWQxomQqwiODs59T1X1yaHh+17dfPXxswuXAWlTBiCcbQmANiVOiRMBabGgJ8YiB xzqre + W5nM/e31pALLKjiEXTVZW5oxnjAML2UcGJoin86PMbxy9Osr8n3/enu9q8HxVLc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