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 567081dc50..73d36446ab 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 @@ -14,6 +14,9 @@
+
+ +
diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-google-drive-publish-task.component.html b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-google-drive-publish-task.component.html new file mode 100644 index 0000000000..953f75733a --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-google-drive-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-google-drive-publish-task.component.ts b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-google-drive-publish-task.component.ts new file mode 100644 index 0000000000..a0991455a1 --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-google-drive-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-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() { + + } +} 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 5cbb435c7b..c991d63a94 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 @@ -25,6 +25,7 @@ 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'; // primitives export * from './diagram-container-service-task.component'; @@ -37,6 +38,7 @@ 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 const DIAGRAM_ACTIVITIES_DIRECTIVES: any[] = [ DiagramContainerServiceTaskComponent, @@ -48,5 +50,6 @@ export const DIAGRAM_ACTIVITIES_DIRECTIVES: any[] = [ DiagramCamelTaskComponent, DiagramMuleTaskComponent, DiagramAlfrescoPublishTaskComponent, - DiagramRestCallTaskComponent + DiagramRestCallTaskComponent, + DiagramGoogleDrivePublishTaskComponent ]; diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-google-drive-publish-task.component.html b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-google-drive-publish-task.component.html new file mode 100644 index 0000000000..93776ac4d7 --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-google-drive-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-google-drive-publish-task.component.ts b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-google-drive-publish-task.component.ts new file mode 100644 index 0000000000..3e60d20a07 --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-google-drive-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-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}; + } +} 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 d8c5aa6292..343bec6a40 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 @@ -23,6 +23,7 @@ import { DiagramIconCamelTaskComponent } from './diagram-icon-camel-task.compone 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'; // primitives export * from './diagram-icon-service-task.component'; @@ -33,6 +34,7 @@ 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 const DIAGRAM_ICONS_DIRECTIVES: any[] = [ DiagramIconServiceTaskComponent, @@ -42,5 +44,6 @@ export const DIAGRAM_ICONS_DIRECTIVES: any[] = [ DiagramIconCamelTaskComponent, DiagramIconMuleTaskComponent, DiagramIconAlfrescoPublishTaskComponent, - DiagramIconRestCallTaskComponent + DiagramIconRestCallTaskComponent, + DiagramIconGoogleDrivePublishTaskComponent ]; diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/index.ts b/ng2-components/ng2-activiti-analytics/src/components/raphael/index.ts index ba9a5b36f5..f61ba9bcfc 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/raphael/index.ts +++ b/ng2-components/ng2-activiti-analytics/src/components/raphael/index.ts @@ -33,6 +33,7 @@ import { RaphaelIconCamelDirective } from './raphael-icon-camel.component'; 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'; // primitives export * from './raphael-circle.component'; @@ -52,6 +53,7 @@ export * from './raphael-icon-camel.component'; 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 const RAPHAEL_DIRECTIVES: any[] = [ RaphaelCircleDirective, @@ -69,5 +71,6 @@ export const RAPHAEL_DIRECTIVES: any[] = [ RaphaelIconCamelDirective, RaphaelIconMuleDirective, RaphaelIconAlfrescoPublishDirective, - RaphaelIconRestCallDirective + RaphaelIconRestCallDirective, + RaphaelIconGoogleDrivePublishDirective ]; diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-icon-google-drive-publish.component.ts b/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-icon-google-drive-publish.component.ts new file mode 100644 index 0000000000..ae9998e22e --- /dev/null +++ b/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-icon-google-drive-publish.component.ts @@ -0,0 +1,77 @@ +/*! + * @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-google-drive-publish'}) +export class RaphaelIconGoogleDrivePublishDirective 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,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBA + JqcGAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIHSURBVDiNpVI7a1RREP7mzLl3d+9mScxaiBLFwohxQcXCwjwao/gqFAQhRGOphQgmgs9oGxaV + gFhpYPUPGMFCCzEqCgETg0uK4CuFoLhZyWNf994zFrqy9xJWwQ+mOB8z33wzZ4D/BIWJppG+plstc+mjK9yttbzALHExcoDaRxdqeRUWcFkGBz7G1s152CCQ7dUAqNOLuZf + qOmi439MmhifF86e6uLj4MFXoCuVXWPkp2vZkZlkHYvRNAJYwtz79oXdMLfFMSMD2Dd9YdoSGTO9hQLoBQBESQvLpUNaZD1sGsN8d390dFBjpiwooHVBW6tvXCr2H4EFo6L + wR97pkj9h/BByWfgDrA4lRTWDvHIPOAihVaWO8txCkygu50wBAsbsnWpT2pwHEA/sgXC30Zq4BwJfHHRdY0R4nxp5mbFGEJIB5l2SjVtoMhYsBfC5EikPVh7Z4uFyqnKq43 + hoQFrXCIydCjZbWlyl+79gzCDprq1dPnnyhS8nNZDmvRVmbAIDhKyL5/e2kjKi4pbwxLQZniDAOgAHAybW90aXmncp2xoSsvdVDMWBAAi69sqsvqsLxzARB7vxaMHvJDwcT + ZCVeClnhIwqC5Pb08Kp3CgBUxT4PINc4u+u54uY8FLfXLQa+sx0dRNV2eXSi6OzryK2c7Wkl0msB5OuG0JVsOvnqL03+DT8BxkC5RkIpSlIAAAAASUVORK5CYII=`}); + } +}