diff --git a/demo-shell-ng2/systemjs.config.js b/demo-shell-ng2/systemjs.config.js index 73016570b9..94daf63400 100644 --- a/demo-shell-ng2/systemjs.config.js +++ b/demo-shell-ng2/systemjs.config.js @@ -40,7 +40,8 @@ 'alfresco-js-api': 'npm:alfresco-js-api/dist', 'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist', 'ng2-alfresco-userinfo': 'npm:ng2-alfresco-userinfo/dist', - 'ng2-activiti-analytics': 'npm:ng2-activiti-analytics/dist' + 'ng2-activiti-analytics': 'npm:ng2-activiti-analytics/dist', + 'ng2-activiti-diagrams': 'npm:ng2-activiti-diagrams/dist' }, // packages tells the System loader how to load when no filename and/or no extension packages: { @@ -68,7 +69,8 @@ 'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'}, 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, 'ng2-alfresco-userinfo': { main: './index.js', defaultExtension: 'js'}, - 'ng2-activiti-analytics': { main: './index.js', defaultExtension: 'js'} + 'ng2-activiti-analytics': { main: './index.js', defaultExtension: 'js'}, + 'ng2-activiti-diagrams': { main: './index.js', defaultExtension: 'js'} } }); })(this); diff --git a/ng2-components/ng2-activiti-analytics/index.ts b/ng2-components/ng2-activiti-analytics/index.ts index dd371a3c3d..c56527241d 100644 --- a/ng2-components/ng2-activiti-analytics/index.ts +++ b/ng2-components/ng2-activiti-analytics/index.ts @@ -17,6 +17,7 @@ import { NgModule, ModuleWithProviders } from '@angular/core'; import { CoreModule } from 'ng2-alfresco-core'; +import { DiagramsModule } from 'ng2-activiti-diagrams'; import { AnalyticsReportListComponent } from './src/components/analytics-report-list.component'; import { AnalyticsReportParametersComponent } from './src/components/analytics-report-parameters.component'; @@ -26,27 +27,19 @@ import { AnalyticsService } from './src/services/analytics.service'; import { CHART_DIRECTIVES } from 'ng2-charts/ng2-charts'; import { WIDGET_DIRECTIVES } from './src/components/widgets/index'; -import { RAPHAEL_DIRECTIVES } from './src/components/raphael/index'; -import { DIAGRAM_DIRECTIVES } from './src/components/diagrams/index'; -import { DIAGRAM_PROVIDERS } from './src/components/diagrams/index'; -import { RAPHAEL_PROVIDERS } from './src/components/raphael/index'; export * from './src/components/analytics.component'; export * from './src/components/analytics-report-list.component'; export * from './src/components/analytics-report-parameters.component'; export * from './src/services/analytics.service'; export * from './src/components/widgets/index'; -export * from './src/components/raphael/index'; -export * from './src/components/diagrams/index'; export const ANALYTICS_DIRECTIVES: any[] = [ AnalyticsComponent, AnalyticsReportListComponent, AnalyticsReportParametersComponent, AnalyticsReportHeatMapComponent, - WIDGET_DIRECTIVES, - RAPHAEL_DIRECTIVES, - DIAGRAM_DIRECTIVES + WIDGET_DIRECTIVES ]; export const ANALYTICS_PROVIDERS: any[] = [ @@ -55,16 +48,15 @@ export const ANALYTICS_PROVIDERS: any[] = [ @NgModule({ imports: [ - CoreModule + CoreModule, + DiagramsModule ], declarations: [ ...ANALYTICS_DIRECTIVES, ...CHART_DIRECTIVES ], providers: [ - ...ANALYTICS_PROVIDERS, - ...DIAGRAM_PROVIDERS, - ...RAPHAEL_PROVIDERS + ...ANALYTICS_PROVIDERS ], exports: [ ...ANALYTICS_DIRECTIVES @@ -75,9 +67,7 @@ export class AnalyticsModule { return { ngModule: AnalyticsModule, providers: [ - ...ANALYTICS_PROVIDERS, - ...DIAGRAM_PROVIDERS, - ...RAPHAEL_PROVIDERS + ...ANALYTICS_PROVIDERS ] }; } diff --git a/ng2-components/ng2-activiti-analytics/karma-test-shim.js b/ng2-components/ng2-activiti-analytics/karma-test-shim.js index e109df798c..3b4258d80a 100644 --- a/ng2-components/ng2-activiti-analytics/karma-test-shim.js +++ b/ng2-components/ng2-activiti-analytics/karma-test-shim.js @@ -58,6 +58,7 @@ var map = { 'alfresco-js-api': 'npm:alfresco-js-api/dist', 'ng2-activiti-analytics': 'npm:ng2-activiti-analytics/dist', + 'ng2-activiti-diagrams': 'npm:ng2-activiti-diagrams/dist', 'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist' }; @@ -71,6 +72,7 @@ var packages = { 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, 'ng2-activiti-analytics': { main: './index.js', defaultExtension: 'js'}, + 'ng2-activiti-diagrams': { main: './index.js', defaultExtension: 'js'}, 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'} }; diff --git a/ng2-components/ng2-activiti-analytics/karma.conf.js b/ng2-components/ng2-activiti-analytics/karma.conf.js index e6e3024303..496c6a6e9b 100644 --- a/ng2-components/ng2-activiti-analytics/karma.conf.js +++ b/ng2-components/ng2-activiti-analytics/karma.conf.js @@ -36,7 +36,6 @@ module.exports = function (config) { 'node_modules/moment/min/moment.min.js', 'node_modules/md-date-time-picker/dist/js/mdDateTimePicker.js', 'node_modules/chart.js/dist/Chart.bundle.min.js', - 'node_modules/raphael/raphael.min.js', {pattern: 'node_modules/ng2-translate/**/*.js', included: false, watched: false}, 'karma-test-shim.js', @@ -48,6 +47,7 @@ module.exports = function (config) { // ng2-components { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false }, + { pattern: 'node_modules/ng2-activiti-diagrams/dist/**/*.*', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-charts/**/*.js', included: false, served: true, watched: false }, { pattern: 'node_modules/md-date-time-picker/**/*.js', included: false, served: true, watched: false }, { pattern: 'node_modules/moment/**/*.js', included: false, served: true, watched: false }, diff --git a/ng2-components/ng2-activiti-analytics/package.json b/ng2-components/ng2-activiti-analytics/package.json index 96a1becad1..6107f4f185 100644 --- a/ng2-components/ng2-activiti-analytics/package.json +++ b/ng2-components/ng2-activiti-analytics/package.json @@ -56,9 +56,9 @@ "core-js": "^2.4.1", "md-date-time-picker": "^2.2.0", "ng2-alfresco-core": "0.3.2", + "ng2-activiti-diagrams": "0.3.3", "ng2-charts": "1.1.0", "ng2-translate": "2.5.0", - "raphael": "^2.2.6", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", "systemjs": "0.19.27", diff --git a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.html b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.html index c5a6e653f3..e9c271f63f 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.html +++ b/ng2-components/ng2-activiti-analytics/src/components/analytics-report-heat-map.component.html @@ -4,6 +4,6 @@ - +
No metric found
\ No newline at end of file diff --git a/ng2-components/ng2-activiti-diagrams/.editorconfig b/ng2-components/ng2-activiti-diagrams/.editorconfig new file mode 100644 index 0000000000..75a2477db7 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/.editorconfig @@ -0,0 +1,23 @@ +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[package.json] +indent_style = space +indent_size = 2 + +[karma.conf.js] +indent_style = space +indent_size = 2 + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/ng2-components/ng2-activiti-diagrams/.gitignore b/ng2-components/ng2-activiti-diagrams/.gitignore new file mode 100644 index 0000000000..fe20e77f42 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/.gitignore @@ -0,0 +1,15 @@ +npm-debug.log +node_modules +.idea +typings +coverage +dist +src/**/*.js +src/**/*.js.map + +demo/**/*.js +demo/**/*.js.map +demo/**/*.d.ts +index.js +index.js.map +!systemjs.config.js diff --git a/ng2-components/ng2-activiti-diagrams/.npmignore b/ng2-components/ng2-activiti-diagrams/.npmignore new file mode 100644 index 0000000000..16ba3e61e5 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/.npmignore @@ -0,0 +1,16 @@ +npm-debug.log +.idea + +assets/ +coverage/ +node_modules +typings/ +fonts/ + +/.editorconfig +/.travis.yml +/*.js +/*.json +/*.ts +/*.js.map +/.npmignore diff --git a/ng2-components/ng2-activiti-diagrams/LICENSE b/ng2-components/ng2-activiti-diagrams/LICENSE new file mode 100644 index 0000000000..430d42bbea --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/ng2-components/ng2-activiti-diagrams/README.md b/ng2-components/ng2-activiti-diagrams/README.md new file mode 100644 index 0000000000..ac208e5422 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/README.md @@ -0,0 +1,90 @@ +# Activiti Analytics Component for Angular 2 + +## Prerequisites + +Before you start using this development framework, make sure you have installed all required software and done all the +necessary configuration, see this [page](https://github.com/Alfresco/alfresco-ng2-components/blob/master/PREREQUISITES.md). + +## Install + +```sh +npm install --save ng2-activiti-analytics +``` + +#### Ng2-Charts + +```sh +npm install ng2-charts chart.js --save +``` + +Also make sure you include these dependencies in your `index.html` file: + +```html + +``` + +#### Material Design Lite + +The style of this component is based on [material design](https://getmdl.io/), so if you want to visualize it correctly you have to add the material +design dependency to your project: + +```sh +npm install --save material-design-icons material-design-lite +``` + +Also make sure you include these dependencies in your `index.html` file: + +```html + + + + +``` + +## Basic usage example Activiti Analytics + +```html + +``` + +#### Events + + +#### Options + + +## Build from sources + +Alternatively you can build component from sources with the following commands: + +```sh +npm install +npm run build +``` + +### Build the files and keep watching for changes + +```sh +$ npm run build:w +``` + +### Running unit tests + +```sh +npm test +``` + +### Running unit tests in browser + +```sh +npm test-browser +``` + +This task rebuilds all the code, runs tslint, license checks and other quality check tools +before performing unit testing. + +### Code coverage + +```sh +npm run coverage +``` diff --git a/ng2-components/ng2-activiti-diagrams/assets/license_header.txt b/ng2-components/ng2-activiti-diagrams/assets/license_header.txt new file mode 100644 index 0000000000..83fd1531a3 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/assets/license_header.txt @@ -0,0 +1,16 @@ +/*! + * @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. + */ \ No newline at end of file diff --git a/ng2-components/ng2-activiti-diagrams/demo/.gitignore b/ng2-components/ng2-activiti-diagrams/demo/.gitignore new file mode 100644 index 0000000000..25beca4c27 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/demo/.gitignore @@ -0,0 +1,6 @@ +node_modules +.idea +coverage +dist +typings +!systemjs.config.js diff --git a/ng2-components/ng2-activiti-diagrams/demo/.npmignore b/ng2-components/ng2-activiti-diagrams/demo/.npmignore new file mode 100644 index 0000000000..c51c008259 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/demo/.npmignore @@ -0,0 +1,3 @@ +node_modules +dist +typings \ No newline at end of file diff --git a/ng2-components/ng2-activiti-diagrams/demo/README.md b/ng2-components/ng2-activiti-diagrams/demo/README.md new file mode 100644 index 0000000000..6c99417ed4 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/demo/README.md @@ -0,0 +1,13 @@ +# Activiti Diagrams demo + +Install: + +``` +npm install +``` + +Run the project: + +``` +npm start +``` \ No newline at end of file diff --git a/ng2-components/ng2-activiti-diagrams/demo/index.html b/ng2-components/ng2-activiti-diagrams/demo/index.html new file mode 100644 index 0000000000..0eaffcea6b --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/demo/index.html @@ -0,0 +1,38 @@ + + + + + Angular 2 Activiti Analitics - Demo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ng2-components/ng2-activiti-diagrams/demo/package.json b/ng2-components/ng2-activiti-diagrams/demo/package.json new file mode 100644 index 0000000000..6687b8e7c9 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/demo/package.json @@ -0,0 +1,81 @@ +{ + "name": "ng2-activiti-diagrams-demo", + "description": "Alfresco Angular2 Diagrams Component - Demo", + "version": "0.1.0", + "author": "Alfresco Software, Ltd.", + "main": "index.js", + "scripts": { + "clean": "npm install rimraf && rimraf dist node_modules typings dist", + "postinstall": "npm run build", + "start": "npm run build && concurrently \"npm run tsc:w\" \"npm run server\" ", + "server": "wsrv -o -s -l", + "build": "npm run tslint && rimraf dist && npm run tsc", + "tsc": "tsc", + "tsc:w": "tsc -w", + "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts" + }, + "license": "Apache-2.0", + "dependencies": { + "@angular/common": "2.0.0-rc.3", + "@angular/compiler": "2.0.0-rc.3", + "@angular/core": "2.0.0-rc.3", + "@angular/forms": "0.1.1", + "@angular/http": "2.0.0-rc.3", + "@angular/platform-browser": "2.0.0-rc.3", + "@angular/platform-browser-dynamic": "2.0.0-rc.3", + "@angular/router": "3.0.0-alpha.7", + "@angular/router-deprecated": "2.0.0-rc.2", + "@angular/upgrade": "2.0.0-rc.3", + "systemjs": "0.19.27", + "core-js": "2.4.0", + "reflect-metadata": "0.1.3", + "rxjs": "5.0.0-beta.6", + "zone.js": "0.6.12", + "license-check": "1.1.5", + "material-design-icons": "2.2.3", + "material-design-lite": "1.1.3", + "ng2-translate": "2.2.2", + "alfresco-js-api": "^0.3.0", + "ng2-alfresco-core": "^0.3.0", + "ng2-activiti-diagrams": "^0.3.0", + "raphael": "^2.2.6" + }, + "devDependencies": { + "@types/core-js": "^0.9.32", + "@types/jasmine": "^2.2.33", + "concurrently": "^2.2.0", + "rimraf": "2.5.2", + "tslint": "3.15.1", + "typescript": "^2.0.2", + "wsrv": "^0.1.5" + }, + "keywords": [ + "angular2", + "typescript" + ], + "license-check-config": { + "src": [ + "**/*.js", + "**/*.ts", + "!/**/coverage/**/*", + "!/**/demo/**/*", + "!/**/node_modules/**/*", + "!/**/typings/**/*", + "!*.js" + ], + "contributors": [ + { + "name": "Maurizio Vitale", + "email": "maurizio.vitale84@gmail.com" + }, + { + "name": "Eugenio Romano", + "email": "eugenio.romano@alfresco.com" + } + ], + "path": "assets/license_header.txt", + "blocking": true, + "logInfo": false, + "logError": true + } +} diff --git a/ng2-components/ng2-activiti-diagrams/demo/src/main.ts b/ng2-components/ng2-activiti-diagrams/demo/src/main.ts new file mode 100644 index 0000000000..42fbc88a47 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/demo/src/main.ts @@ -0,0 +1,33 @@ +/*! + * @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 { bootstrap } from '@angular/platform-browser-dynamic'; +import { Component } from '@angular/core'; +import { ALFRESCO_CORE_PROVIDERS } from 'ng2-alfresco-core'; +import { } from 'ng2-activiti-diagrams'; + +@Component({ + selector: 'activiti-diagrams-demo', + template: ``, + directives: [DiagramsComponent] +}) +class ActivitiDiagramsDemo { +} + +bootstrap(ActivitiDiagramsDemo, [ + ALFRESCO_CORE_PROVIDERS] +); diff --git a/ng2-components/ng2-activiti-diagrams/demo/systemjs.config.js b/ng2-components/ng2-activiti-diagrams/demo/systemjs.config.js new file mode 100644 index 0000000000..5e6a23744f --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/demo/systemjs.config.js @@ -0,0 +1,55 @@ +/** + * System configuration for Angular 2 samples + * Adjust as necessary for your application needs. + */ +(function(global) { + // map tells the System loader where to look for things + var map = { + 'app': 'dist', // 'dist', + '@angular': 'node_modules/@angular', + 'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api', + 'rxjs': 'node_modules/rxjs', + 'raphael': 'node_modules/raphael', + 'ng2-translate': 'node_modules/ng2-translate', + 'ng2-alfresco-core': 'node_modules/ng2-alfresco-core/dist', + 'ng2-activiti-diagrams': 'node_modules/ng2-activiti-diagrams/dist' + }; + // packages tells the System loader how to load when no filename and/or no extension + var packages = { + 'app': { main: 'main.js', defaultExtension: 'js' }, + 'rxjs': { defaultExtension: 'js' }, + 'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' }, + 'ng2-translate': { defaultExtension: 'js' }, + 'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' }, + 'ng2-activiti-diagrams': { main: 'index.js', defaultExtension: 'js' }, + 'raphael': { main: 'raphael.js', defaultExtension: 'js'} + }; + var ngPackageNames = [ + 'common', + 'compiler', + 'core', + 'http', + 'platform-browser', + 'platform-browser-dynamic', + 'router', + 'router-deprecated', + 'upgrade' + ]; + // Individual files (~300 requests): + function packIndex(pkgName) { + packages['@angular/'+pkgName] = { main: 'index.js', defaultExtension: 'js' }; + } + // Bundled (~40 requests): + function packUmd(pkgName) { + packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' }; + } + // Most environments should use UMD; some (Karma) need the individual index files + var setPackageConfig = System.packageWithIndex ? packIndex : packUmd; + // Add package entries for angular packages + ngPackageNames.forEach(setPackageConfig); + var config = { + map: map, + packages: packages + }; + System.config(config); +})(this); diff --git a/ng2-components/ng2-activiti-diagrams/demo/tsconfig.json b/ng2-components/ng2-activiti-diagrams/demo/tsconfig.json new file mode 100644 index 0000000000..7be35bfec8 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/demo/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "sourceMap": true, + "removeComments": true, + "declaration": true, + "noLib": false, + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "noImplicitAny": false, + "noImplicitReturns": false, + "noImplicitUseStrict": false, + "noFallthroughCasesInSwitch": true, + "outDir": "dist", + "types": ["core-js", "jasmine", "node"] + }, + "exclude": [ + "demo", + "node_modules", + "dist" + ] +} diff --git a/ng2-components/ng2-activiti-diagrams/demo/tslint.json b/ng2-components/ng2-activiti-diagrams/demo/tslint.json new file mode 100644 index 0000000000..55c0f8a666 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/demo/tslint.json @@ -0,0 +1,124 @@ +{ + "rules": { + "align": [ + true, + "parameters", + "arguments", + "statements" + ], + "ban": false, + "class-name": true, + "comment-format": [ + true, + "check-space", + "check-lowercase" + ], + "curly": true, + "eofline": true, + "forin": true, + "indent": [ + true, + "spaces" + ], + "interface-name": false, + "jsdoc-format": true, + "label-position": true, + "label-undefined": true, + "max-line-length": [ + true, + 140 + ], + "member-ordering": [ + true, + "public-before-private", + "static-before-instance", + "variables-before-functions" + ], + "no-any": false, + "no-arg": true, + "no-bitwise": true, + "no-conditional-assignment": true, + "no-consecutive-blank-lines": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-constructor-vars": false, + "no-debugger": true, + "no-duplicate-key": true, + "no-duplicate-variable": true, + "no-empty": true, + "no-eval": true, + "no-inferrable-types": false, + "no-internal-module": true, + "no-require-imports": true, + "no-shadowed-variable": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unreachable": true, + "no-unused-expression": true, + "no-unused-variable": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "no-var-requires": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "quotemark": [ + true, + "single", + "avoid-escape" + ], + "radix": true, + "semicolon": true, + "switch-default": true, + "trailing-comma": [ + true, + { + "multiline": "never", + "singleline": "never" + } + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef": false, + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "use-strict": false, + "variable-name": [ + true, + "check-format", + "allow-leading-underscore", + "ban-keywords" + ], + "whitespace": [ + true, + "check-branch", + "check-operator", + "check-separator", + "check-type", + "check-module", + "check-decl" + ] + } +} diff --git a/ng2-components/ng2-activiti-diagrams/index.ts b/ng2-components/ng2-activiti-diagrams/index.ts new file mode 100644 index 0000000000..75c5358549 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/index.ts @@ -0,0 +1,63 @@ +/*! + * @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 { NgModule, ModuleWithProviders } from '@angular/core'; +import { CoreModule } from 'ng2-alfresco-core'; + +import { DIAGRAM_DIRECTIVES } from './src/components/index'; +import { DiagramColorService } from './src/services/diagram-color.service'; +import { DiagramsService } from './src/services/diagrams.service'; + +import { RAPHAEL_DIRECTIVES } from './src/components/raphael/index'; +import { RAPHAEL_PROVIDERS } from './src/components/raphael/index'; + +// primitives +export * from './src/components/index'; +export * from './src/components/raphael/index'; + +export const DIAGRAM_PROVIDERS: any[] = [ + DiagramsService, + DiagramColorService +]; + +@NgModule({ + imports: [ + CoreModule + ], + declarations: [ + ...DIAGRAM_DIRECTIVES, + ...RAPHAEL_DIRECTIVES + ], + providers: [ + ...DIAGRAM_PROVIDERS, + ...RAPHAEL_PROVIDERS + ], + exports: [ + ...DIAGRAM_DIRECTIVES + ] +}) +export class DiagramsModule { + static forRoot(): ModuleWithProviders { + return { + ngModule: DiagramsModule, + providers: [ + ...DIAGRAM_PROVIDERS, + ...RAPHAEL_PROVIDERS + ] + }; + } +} diff --git a/ng2-components/ng2-activiti-diagrams/karma-test-shim.js b/ng2-components/ng2-activiti-diagrams/karma-test-shim.js new file mode 100644 index 0000000000..47e3d71f55 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/karma-test-shim.js @@ -0,0 +1,104 @@ +// Tun on full stack traces in errors to help debugging +Error.stackTraceLimit = Infinity; + +jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; + +__karma__.loaded = function() {}; + +var builtPath = '/base/dist/'; + +function isJsFile(path) { + return path.slice(-3) == '.js'; +} + +function isSpecFile(path) { + return /\.spec\.(.*\.)?js$/.test(path); +} + +function isBuiltFile(path) { + return isJsFile(path) && (path.substr(0, builtPath.length) == builtPath); +} + +var allSpecFiles = Object.keys(window.__karma__.files) + .filter(isSpecFile) + .filter(isBuiltFile); + +var paths = { + // paths serve as alias + 'npm:': 'base/node_modules/' +}; + +var map = { + 'app': 'base/dist', + // angular bundles + '@angular/core': 'npm:@angular/core/bundles/core.umd.js', + '@angular/common': 'npm:@angular/common/bundles/common.umd.js', + '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js', + '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js', + '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', + '@angular/http': 'npm:@angular/http/bundles/http.umd.js', + '@angular/router': 'npm:@angular/router/bundles/router.umd.js', + '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js', + // testing + '@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js', + '@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js', + '@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js', + '@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js', + '@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js', + '@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js', + '@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js', + '@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js', + + // other libraries + 'rxjs': 'npm:rxjs', + 'ng2-translate': 'npm:ng2-translate', + 'alfresco-js-api': 'npm:alfresco-js-api/dist', + 'ng2-activiti-diagrams': 'npm:ng2-activiti-diagrams/dist', + 'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist' +}; + +var packages = { + 'app': { main: 'main.js', defaultExtension: 'js' }, + 'rxjs': { defaultExtension: 'js' }, + 'ng2-translate': { defaultExtension: 'js' }, + 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, + 'ng2-activiti-diagrams': { main: './index.js', defaultExtension: 'js'}, + 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'} +}; + +var config = { + paths: paths, + map: map, + packages: packages +}; + +System.config(config); + +System.import('@angular/core/testing') + .then(initTestBed) + .then(initTesting); + +function initTestBed(){ + return Promise.all([ + System.import('@angular/core/testing'), + System.import('@angular/platform-browser-dynamic/testing') + ]) + .then(function (providers) { + var coreTesting = providers[0]; + var browserTesting = providers[1]; + + coreTesting.TestBed.initTestEnvironment( + browserTesting.BrowserDynamicTestingModule, + browserTesting.platformBrowserDynamicTesting()); + }) +} + +// Import all spec files and start karma +function initTesting () { + return Promise.all( + allSpecFiles.map(function (moduleName) { + return System.import(moduleName); + }) + ) + .then(__karma__.start, __karma__.error); +} diff --git a/ng2-components/ng2-activiti-diagrams/karma.conf.js b/ng2-components/ng2-activiti-diagrams/karma.conf.js new file mode 100644 index 0000000000..5b088f0af2 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/karma.conf.js @@ -0,0 +1,120 @@ +'use strict'; + +module.exports = function (config) { + var configuration = { + basePath: '.', + + frameworks: ['jasmine-ajax', 'jasmine'], + + files: [ + // System.js for module loading + 'node_modules/systemjs/dist/system.src.js', + + // Polyfills + 'node_modules/core-js/client/shim.js', + 'node_modules/reflect-metadata/Reflect.js', + + // zone.js + 'node_modules/zone.js/dist/zone.js', + 'node_modules/zone.js/dist/long-stack-trace-zone.js', + 'node_modules/zone.js/dist/proxy.js', + 'node_modules/zone.js/dist/sync-test.js', + 'node_modules/zone.js/dist/jasmine-patch.js', + 'node_modules/zone.js/dist/async-test.js', + 'node_modules/zone.js/dist/fake-async-test.js', + + // RxJs + {pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false}, + {pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false}, + + // Paths loaded via module imports: + // Angular itself + {pattern: 'node_modules/@angular/**/*.js', included: false, watched: false}, + {pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false}, + + 'node_modules/alfresco-js-api/dist/alfresco-js-api.js', + 'node_modules/raphael/raphael.min.js', + {pattern: 'node_modules/ng2-translate/**/*.js', included: false, watched: false}, + + 'karma-test-shim.js', + + // paths loaded via module imports + {pattern: 'dist/**/*.js', included: false, watched: true}, + {pattern: 'dist/**/*.html', included: true, served: true, watched: true}, + {pattern: 'dist/**/*.css', included: true, served: true, watched: true}, + + // ng2-components + { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false }, + + // paths to support debugging with source maps in dev tools + {pattern: 'src/**/*.ts', included: false, watched: false}, + {pattern: 'dist/**/*.js.map', included: false, watched: false} + ], + + exclude: [ + 'node_modules/**/*spec.js' + ], + + // proxied base paths + proxies: { + // required for component assets fetched by Angular's compiler + '/src/': '/base/src/' + }, + + port: 9876, + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + colors: true, + + autoWatch: true, + + browsers: ['Chrome'], + + customLaunchers: { + Chrome_travis_ci: { + base: 'Chrome', + flags: ['--no-sandbox'] + } + }, + + // Karma plugins loaded + plugins: [ + 'karma-jasmine', + 'karma-coverage', + 'karma-jasmine-ajax', + 'karma-chrome-launcher', + 'karma-mocha-reporter', + 'karma-jasmine-html-reporter' + ], + + // Coverage reporter generates the coverage + reporters: ['mocha', 'coverage', 'kjhtml'], + + // Source files that you wanna generate coverage for. + // Do not include tests or libraries (these files will be instrumented by Istanbul) + preprocessors: { + 'dist/**/!(*spec|index|*mock|*model).js': 'coverage' + }, + + coverageReporter: { + includeAllSources: true, + dir: 'coverage/', + subdir: 'report', + reporters: [ + {type: 'text'}, + {type: 'json', file: 'coverage-final.json'}, + {type: 'html'}, + {type: 'lcov'} + ] + } + }; + + if (process.env.TRAVIS) { + configuration.browsers = ['Chrome_travis_ci']; + } + + config.set(configuration) +}; diff --git a/ng2-components/ng2-activiti-diagrams/package.json b/ng2-components/ng2-activiti-diagrams/package.json new file mode 100644 index 0000000000..857e879bcb --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/package.json @@ -0,0 +1,97 @@ +{ + "name": "ng2-activiti-diagrams", + "description": "Activiti Angular2 Diagrams Component", + "version": "0.3.3", + "author": "Alfresco Software, Ltd.", + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "clean": "npm install rimraf && rimraf dist node_modules typings", + "build": "npm run tslint && rimraf dist && tsc && npm run copy-dist && license-check", + "build:w": "npm run tslint && rimraf dist && npm run watch-task", + "watch-task": "concurrently \"npm run tsc:w\" \"npm run copy-dist:w\" \"license-check\"", + "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json 'src/{,**/}**.ts'", + "copy-dist": "cpx \"./src/**/*.{html,css,json,png,jpg,gif,svg}\" ./dist/src", + "copy-dist:w": "cpx \"./src/**/*.{html,css,json,png,jpg,gif,svg}\" ./dist/src -w", + "tsc": "tsc", + "tsc:w": "tsc -w", + "pretest": "npm run build", + "test": "karma start karma.conf.js --reporters mocha,coverage --single-run", + "test-browser": "concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"", + "posttest": "node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html && node_modules/.bin/remap-istanbul -i coverage/report/coverage-final.json -o coverage/report/coverage-final.json", + "coverage": "npm run test && wsrv -o -p 9875 ./coverage/report", + "prepublish": "npm run build", + "travis": "echo 'placeholder'" + }, + "contributors": [ + { + "name": "Maurizio Vitale", + "email": "maurizio.vitale84@gmail.com" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/Alfresco/alfresco-ng2-components.git" + }, + "bugs": { + "url": "https://github.com/Alfresco/alfresco-ng2-components/issues" + }, + "dependencies": { + "@angular/common": "2.0.0", + "@angular/compiler": "2.0.0", + "@angular/core": "2.0.0", + "@angular/forms": "2.0.0", + "@angular/http": "2.0.0", + "@angular/platform-browser": "2.0.0", + "@angular/platform-browser-dynamic": "2.0.0", + "@angular/router": "3.0.0", + "@angular/upgrade": "2.0.0", + "@types/node": "^6.0.42", + "alfresco-js-api": "^0.3.0", + "core-js": "^2.4.1", + "ng2-alfresco-core": "0.3.2", + "ng2-translate": "2.5.0", + "raphael": "^2.2.6", + "reflect-metadata": "^0.1.3", + "rxjs": "5.0.0-beta.12", + "systemjs": "0.19.27", + "zone.js": "^0.6.23" + }, + "devDependencies": { + "@types/core-js": "^0.9.32", + "@types/jasmine": "^2.2.33", + "concurrently": "^2.2.0", + "cpx": "^1.3.1", + "jasmine-ajax": "^3.2.0", + "jasmine-core": "2.4.1", + "karma": "~0.13.22", + "karma-chrome-launcher": "~1.0.1", + "karma-coverage": "^1.0.0", + "karma-jasmine": "~1.0.2", + "karma-jasmine-ajax": "^0.1.13", + "karma-jasmine-html-reporter": "^0.2.0", + "karma-mocha-reporter": "^2.0.3", + "license-check": "^1.0.4", + "remap-istanbul": "^0.6.3", + "rimraf": "2.5.2", + "traceur": "^0.0.91", + "tslint": "^3.8.1", + "typescript": "^2.0.3", + "wsrv": "^0.1.5" + }, + "keywords": [ + "tag", + "alfresco-analytics", + "alfresco-diagrams" + ], + "license-check-config": { + "src": [ + "./dist/**/*.js" + ], + "path": "assets/license_header.txt", + "blocking": true, + "logInfo": false, + "logError": true + }, + "license": "Apache-2.0" +} diff --git a/ng2-components/ng2-activiti-diagrams/src/assets/analyticsComponent.mock.ts b/ng2-components/ng2-activiti-diagrams/src/assets/analyticsComponent.mock.ts new file mode 100644 index 0000000000..79b185cf0f --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/src/assets/analyticsComponent.mock.ts @@ -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'] + ] + }] +}; diff --git a/ng2-components/ng2-activiti-diagrams/src/assets/analyticsParamsReportComponent.mock.ts b/ng2-components/ng2-activiti-diagrams/src/assets/analyticsParamsReportComponent.mock.ts new file mode 100644 index 0000000000..626996af3b --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/src/assets/analyticsParamsReportComponent.mock.ts @@ -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' + } +); diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-alfresco-publish-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-alfresco-publish-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-alfresco-publish-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-alfresco-publish-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-alfresco-publish-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-alfresco-publish-task.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-alfresco-publish-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-alfresco-publish-task.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-box-publish-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-box-publish-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-box-publish-task.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-box-publish-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-box-publish-task.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-business-rule-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-business-rule-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-business-rule-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-business-rule-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-business-rule-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-business-rule-task.component.ts similarity index 93% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-business-rule-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-business-rule-task.component.ts index 1484e02044..020bcc934e 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-business-rule-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-business-rule-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-camel-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-camel-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-camel-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-camel-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-camel-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-camel-task.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-camel-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-camel-task.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-container-service-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-container-service-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-container-service-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-container-service-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-container-service-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-container-service-task.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-container-service-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-container-service-task.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-google-drive-publish-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-google-drive-publish-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-google-drive-publish-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-google-drive-publish-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-google-drive-publish-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-google-drive-publish-task.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-google-drive-publish-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-google-drive-publish-task.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-manual-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-manual-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-manual-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-manual-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-manual-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-manual-task.component.ts similarity index 93% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-manual-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-manual-task.component.ts index 5ed71e9ab5..63a2b62ba5 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-manual-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-manual-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-mule-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-mule-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-mule-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-mule-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-mule-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-mule-task.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-mule-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-mule-task.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-receive-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-receive-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-receive-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-receive-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-receive-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-receive-task.component.ts similarity index 93% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-receive-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-receive-task.component.ts index 629b6629de..444d0ef067 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-receive-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-receive-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-rest-call-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-rest-call-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-rest-call-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-rest-call-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-rest-call-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-rest-call-task.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-rest-call-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-rest-call-task.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-script-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-script-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-script-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-script-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-script-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-script-task.component.ts similarity index 93% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-script-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-script-task.component.ts index f30752b07f..a1b0132a42 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-script-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-script-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-send-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-send-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-send-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-send-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-send-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-send-task.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-send-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-send-task.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-service-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-service-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-service-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-service-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-service-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-service-task.component.ts similarity index 93% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-service-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-service-task.component.ts index bfc704966d..030a2d213f 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-service-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-service-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-task.component.ts similarity index 96% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-task.component.ts index ca76d87bb4..003f881761 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-user-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-user-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-user-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-user-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-user-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-user-task.component.ts similarity index 93% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-user-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-user-task.component.ts index 52d30f0147..c6337d2865 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/diagram-user-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/activities/diagram-user-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/activities/index.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/activities/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/activities/index.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-boundary-event.component.html b/ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-boundary-event.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-boundary-event.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-boundary-event.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-boundary-event.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-boundary-event.component.ts similarity index 96% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-boundary-event.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-boundary-event.component.ts index cb8bb1b687..f1800fc668 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-boundary-event.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-boundary-event.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-throw-event.component.html b/ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-throw-event.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-throw-event.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-throw-event.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-throw-event.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-throw-event.component.ts similarity index 96% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-throw-event.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-throw-event.component.ts index 3d95ea9e94..1157746144 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/diagram-throw-event.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/boundary-events/diagram-throw-event.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/boundary-events/index.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/boundary-events/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/boundary-events/index.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/diagram-sequence-flow.component.html b/ng2-components/ng2-activiti-diagrams/src/components/diagram-sequence-flow.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/diagram-sequence-flow.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/diagram-sequence-flow.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/diagram-sequence-flow.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/diagram-sequence-flow.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/diagram-sequence-flow.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/diagram-sequence-flow.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/diagram.component.html b/ng2-components/ng2-activiti-diagrams/src/components/diagram.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/diagram.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/diagram.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/diagram.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/diagram.component.ts similarity index 85% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/diagram.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/diagram.component.ts index 3c5964bfa7..3bd43b5170 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/diagram.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/diagram.component.ts @@ -17,13 +17,13 @@ import { Component, ElementRef, Input, Output, EventEmitter, SimpleChanges } from '@angular/core'; import { AlfrescoTranslationService } from 'ng2-alfresco-core'; -import { AnalyticsService } from '../../services/analytics.service'; -import { DiagramColorService } from './services/diagram-color.service'; -import { RaphaelService } from './../raphael/raphael.service'; +import { DiagramsService } from '../services/diagrams.service'; +import { DiagramColorService } from '../services/diagram-color.service'; +import { RaphaelService } from './raphael/raphael.service'; @Component({ moduleId: module.id, - selector: 'diagram', + selector: 'activiti-diagram', templateUrl: './diagram.component.html', styleUrls: ['./diagram.component.css'] }) @@ -50,7 +50,7 @@ export class DiagramComponent { private translate: AlfrescoTranslationService, private diagramColorService: DiagramColorService, private raphaelService: RaphaelService, - private analyticsService: AnalyticsService) { + private diagramsService: DiagramsService) { if (translate) { translate.addTranslationFolder('node_modules/ng2-activiti-analytics/src'); } @@ -68,7 +68,7 @@ export class DiagramComponent { } getProcessDefinitionModel(processDefinitionId: string) { - this.analyticsService.getProcessDefinitionModel(processDefinitionId).subscribe( + this.diagramsService.getProcessDefinitionModel(processDefinitionId).subscribe( (res: any) => { this.diagram = res; }, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-end-event.component.html b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-end-event.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-end-event.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/events/diagram-end-event.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-end-event.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-end-event.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-end-event.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/events/diagram-end-event.component.ts index cbd7d2213c..c5ffc26099 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-end-event.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-end-event.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-event.component.html b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-event.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-event.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/events/diagram-event.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-event.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-event.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-event.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/events/diagram-event.component.ts index 63682a4366..160e5692cf 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-event.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-event.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-start-event.component.html b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-start-event.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-start-event.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/events/diagram-start-event.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-start-event.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-start-event.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-start-event.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/events/diagram-start-event.component.ts index 09dcaaa231..ad81d2c7a4 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/diagram-start-event.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/events/diagram-start-event.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/events/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/events/index.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/events/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/events/index.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-event-gateway.component.html b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-event-gateway.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-event-gateway.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-event-gateway.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-event-gateway.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-event-gateway.component.ts similarity index 96% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-event-gateway.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-event-gateway.component.ts index 8d8bb108fb..b5e3ce6072 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-event-gateway.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-event-gateway.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-exclusive-gateway.component.html b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-exclusive-gateway.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-exclusive-gateway.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-exclusive-gateway.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-exclusive-gateway.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-exclusive-gateway.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-exclusive-gateway.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-exclusive-gateway.component.ts index d38da7d125..20910cf3f1 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-exclusive-gateway.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-exclusive-gateway.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-gateway.component.html b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-gateway.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-gateway.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-gateway.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-gateway.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-gateway.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-gateway.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-gateway.component.ts index a2c275586a..aefc89828e 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-gateway.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-gateway.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-inclusive-gateway.component.html b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-inclusive-gateway.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-inclusive-gateway.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-inclusive-gateway.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-inclusive-gateway.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-inclusive-gateway.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-inclusive-gateway.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-inclusive-gateway.component.ts index 51a421d2c9..6efdd85207 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-inclusive-gateway.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-inclusive-gateway.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-parallel-gateway.component.html b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-parallel-gateway.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-parallel-gateway.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-parallel-gateway.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-parallel-gateway.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-parallel-gateway.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-parallel-gateway.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-parallel-gateway.component.ts index 9d344b34d1..f6ae87a1cd 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/diagram-parallel-gateway.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/gateways/diagram-parallel-gateway.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/gateways/index.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/gateways/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/gateways/index.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-container-icon-event.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-container-icon-event.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-container-icon-event.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-container-icon-event.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-container-icon-event.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-container-icon-event.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-container-icon-event.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-container-icon-event.component.ts index b77cb4af71..6a422c13fa 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-container-icon-event.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-container-icon-event.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-alfresco-publish-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-alfresco-publish-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-alfresco-publish-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-alfresco-publish-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-alfresco-publish-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-alfresco-publish-task.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-alfresco-publish-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-alfresco-publish-task.component.ts index 4ea09ba1e1..a330335575 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-alfresco-publish-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-alfresco-publish-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-box-publish-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-box-publish-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-box-publish-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-box-publish-task.component.ts index 87817a26b0..e890703d06 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-box-publish-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-box-publish-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-business-rule-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-business-rule-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-business-rule-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-business-rule-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-business-rule-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-business-rule-task.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-business-rule-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-business-rule-task.component.ts index 53b946dfaa..c7372aa3f0 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-business-rule-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-business-rule-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-camel-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-camel-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-camel-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-camel-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-camel-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-camel-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-camel-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-camel-task.component.ts index 7a223c7c1a..9a08758fc5 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-camel-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-camel-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-error.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-error.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-error.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-error.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-error.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-error.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-error.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-error.component.ts index c735603187..77a4a8bd9a 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-error.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-error.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, 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-diagrams/src/components/icons/diagram-icon-google-drive-publish-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-google-drive-publish-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-google-drive-publish-task.component.html 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-diagrams/src/components/icons/diagram-icon-google-drive-publish-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-google-drive-publish-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-google-drive-publish-task.component.ts index 3e60d20a07..5cbd889b87 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-google-drive-publish-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-google-drive-publish-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-manual-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-manual-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-manual-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-manual-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-manual-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-manual-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-manual-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-manual-task.component.ts index 39de990bb9..dde03313a8 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-manual-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-manual-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-message.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-message.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-message.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-message.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-message.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-message.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-message.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-message.component.ts index 14e4a3506c..e5f2cf7ec6 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-message.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-message.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-mule-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-mule-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-mule-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-mule-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-mule-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-mule-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-mule-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-mule-task.component.ts index b3c9ec96a9..c920d4a3b7 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-mule-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-mule-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-receive-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-receive-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-receive-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-receive-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-receive-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-receive-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-receive-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-receive-task.component.ts index b786d89e0e..e50230ff18 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-receive-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-receive-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-rest-call-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-rest-call-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-rest-call-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-rest-call-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-rest-call-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-rest-call-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-rest-call-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-rest-call-task.component.ts index d49b1f8cd8..b2da83242c 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-rest-call-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-rest-call-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-script-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-script-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-script-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-script-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-script-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-script-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-script-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-script-task.component.ts index 3b034af4ab..f088711a0b 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-script-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-script-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-send-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-send-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-send-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-send-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-send-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-send-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-send-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-send-task.component.ts index 4571b4de60..94f64bf471 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-send-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-send-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-service-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-service-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-service-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-service-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-service-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-service-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-service-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-service-task.component.ts index 3562a03862..fe93df6745 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-service-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-service-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-signal.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-signal.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-signal.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-signal.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-signal.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-signal.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-signal.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-signal.component.ts index 154b0b7c98..099307a229 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-signal.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-signal.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-timer.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-timer.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-timer.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-timer.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-timer.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-timer.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-timer.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-timer.component.ts index 4c3ad4b014..015a2b1216 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-timer.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-timer.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-user-task.component.html b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-user-task.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-user-task.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-user-task.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-user-task.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-user-task.component.ts similarity index 94% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-user-task.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-user-task.component.ts index 7ad6801a30..ac11a61f95 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/diagram-icon-user-task.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/icons/diagram-icon-user-task.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/icons/index.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/icons/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/icons/index.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/index.ts similarity index 93% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/index.ts index 59656b5e75..244c024e94 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/index.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/index.ts @@ -25,8 +25,6 @@ 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'; -import { DiagramColorService } from './services/diagram-color.service'; - // primitives export * from './diagram.component'; export * from './events/index'; @@ -48,7 +46,3 @@ export const DIAGRAM_DIRECTIVES: any[] = [ DIAGRAM_INTERMEDIATE_EVENTS_DIRECTIVES, DIAGRAM_STRUCTURAL_DIRECTIVES ]; - -export const DIAGRAM_PROVIDERS: any[] = [ - DiagramColorService -]; diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/intermediate-catching-events/diagram-intermediate-catching-event.component.html b/ng2-components/ng2-activiti-diagrams/src/components/intermediate-catching-events/diagram-intermediate-catching-event.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/intermediate-catching-events/diagram-intermediate-catching-event.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/intermediate-catching-events/diagram-intermediate-catching-event.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/intermediate-catching-events/diagram-intermediate-catching-event.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/intermediate-catching-events/diagram-intermediate-catching-event.component.ts similarity index 96% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/intermediate-catching-events/diagram-intermediate-catching-event.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/intermediate-catching-events/diagram-intermediate-catching-event.component.ts index 96cb9bfc2d..f86b983a07 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/intermediate-catching-events/diagram-intermediate-catching-event.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/intermediate-catching-events/diagram-intermediate-catching-event.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/intermediate-catching-events/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/intermediate-catching-events/index.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/intermediate-catching-events/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/intermediate-catching-events/index.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/declarations.d.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/declarations.d.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/declarations.d.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/declarations.d.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/index.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/index.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-alfresco-publish.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-alfresco-publish.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-alfresco-publish.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-alfresco-publish.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-box-publish.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-box-publish.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-box-publish.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-box-publish.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-business-rule.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-business-rule.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-business-rule.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-business-rule.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-camel.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-camel.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-camel.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-camel.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-error.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-error.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-error.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-error.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-google-drive-publish.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-google-drive-publish.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-google-drive-publish.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-google-drive-publish.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-manual.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-manual.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-manual.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-manual.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-message.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-message.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-message.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-message.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-mule.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-mule.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-mule.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-mule.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-receive.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-receive.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-receive.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-receive.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-rest-call.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-rest-call.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-rest-call.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-rest-call.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-script.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-script.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-script.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-script.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-send.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-send.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-send.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-send.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-service.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-service.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-service.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-service.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-signal.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-signal.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-signal.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-signal.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-timer.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-timer.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-timer.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-timer.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-user.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-user.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/icons/raphael-icon-user.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/icons/raphael-icon-user.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/index.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/index.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/models/point.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/models/point.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/models/point.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/models/point.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-base.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-base.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-base.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-base.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-circle.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-circle.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-circle.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-circle.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-cross.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-cross.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-cross.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-cross.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-flow-arrow.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-flow-arrow.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-flow-arrow.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-flow-arrow.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-pentagon.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-pentagon.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-pentagon.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-pentagon.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-plus.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-plus.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-plus.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-plus.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-rect.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-rect.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-rect.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-rect.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-rhombus.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-rhombus.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-rhombus.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-rhombus.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-text.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-text.component.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael-text.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael-text.component.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/raphael/raphael.service.ts b/ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael.service.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/raphael/raphael.service.ts rename to ng2-components/ng2-activiti-diagrams/src/components/raphael/raphael.service.ts diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-event-subprocess.component.html b/ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-event-subprocess.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-event-subprocess.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-event-subprocess.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-event-subprocess.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-event-subprocess.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-event-subprocess.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-event-subprocess.component.ts index 7d7b451e20..296040651f 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-event-subprocess.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-event-subprocess.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-subprocess.component.html b/ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-subprocess.component.html similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-subprocess.component.html rename to ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-subprocess.component.html diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-subprocess.component.ts b/ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-subprocess.component.ts similarity index 95% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-subprocess.component.ts rename to ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-subprocess.component.ts index 50bf2e8ab7..c73fa22058 100644 --- a/ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/diagram-subprocess.component.ts +++ b/ng2-components/ng2-activiti-diagrams/src/components/structural/diagram-subprocess.component.ts @@ -16,7 +16,7 @@ */ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core'; -import { DiagramColorService } from './../services/diagram-color.service'; +import { DiagramColorService } from '../../services/diagram-color.service'; @Component({ moduleId: module.id, diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/index.ts b/ng2-components/ng2-activiti-diagrams/src/components/structural/index.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/structural/index.ts rename to ng2-components/ng2-activiti-diagrams/src/components/structural/index.ts diff --git a/ng2-components/ng2-activiti-diagrams/src/declarations.d.ts b/ng2-components/ng2-activiti-diagrams/src/declarations.d.ts new file mode 100644 index 0000000000..e1b5a9e9fc --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/src/declarations.d.ts @@ -0,0 +1,19 @@ +/*! + * @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. + */ + +// MDL +declare let componentHandler: any; diff --git a/ng2-components/ng2-activiti-diagrams/src/i18n/en.json b/ng2-components/ng2-activiti-diagrams/src/i18n/en.json new file mode 100644 index 0000000000..1dce1a9c60 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/src/i18n/en.json @@ -0,0 +1,45 @@ +{ + "ANALYTICS": { + "TTILE": "ANALYTICS", + "MESSAGES": { + "UNKNOWN-WIDGET-TYPE": "UNKNOWN WIDGET TYPE", + "FILL-PARAMETER": "Fill in the parameters to generate your report", + "NO-DATA-FOUND": "No data found" + } + }, + "__KEY_REPORTING": { + "DEFAULT-REPORTS": { + "PROCESS-DEFINITION-OVERVIEW": { + "GENERAL-TABLE-TOTAL-PROCESS-DEFINITIONS": "Total number of process definitions", + "GENERAL-TABLE-TOTAL-PROCESS-INSTANCES": "Total number of process instances", + "GENERAL-TABLE-ACTIVE-PROCESS-INSTANCES": "Total number of active process instances", + "GENERAL-TABLE-COMPLETED-PROCESS-INSTANCES": "Total number of completed process instances" + } + } + }, + "REPORTING": { + "DEFAULT-REPORTS": { + "PROCESS-HEAT-MAP": { + "TYPE-FILTERING": "Include all process steps (Unchecking this, will remove pass through steps like start events, gateways, etc.)?" + }, + "PROCESS-INSTANCES-OVERVIEW": { + "PROCESS-DEFINITION": "Process definition", + "DATE-RANGE": "Date range", + "SLOW-PROC-INST-NUMBER": "How many of the slowest process instances should be displayed?" + }, + "TASK-OVERVIEW": { + "PROCESS-DEFINITION": "Process definition", + "DATE-RANGE": "Date range", + "DATE-RANGE-INTERVAL": "Aggregate dates by" + }, + "TASK-SLA": { + "TASK": "Task", + "PROCESS-DEFINITION": "Process definition", + "DATE-RANGE": "Date range", + "SLA-DURATION": "What is the time this task needs to be completed in to be within the SLA?" + } + }, + "PROCESS-STATUS": "Process status", + "TASK-STATUS": "Task status" + } +} diff --git a/ng2-components/ng2-activiti-diagrams/src/i18n/it.json b/ng2-components/ng2-activiti-diagrams/src/i18n/it.json new file mode 100644 index 0000000000..15c05b6832 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/src/i18n/it.json @@ -0,0 +1,5 @@ +{ + "ANALYTICS": { + "TTILE": "ANALYTICS" + } +} diff --git a/ng2-components/ng2-activiti-diagrams/src/models/chart.model.ts b/ng2-components/ng2-activiti-diagrams/src/models/chart.model.ts new file mode 100644 index 0000000000..bba431596e --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/src/models/chart.model.ts @@ -0,0 +1,185 @@ +/*! + * @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 class Chart { + id: string; + type: string; + + constructor(obj?: any) { + this.id = obj && obj.id || null; + if (obj && obj.type) { + this.type = this.convertType(obj.type); + } + } + + private convertType(type: string) { + let chartType = ''; + switch (type) { + case 'pieChart': + chartType = 'pie'; + break; + case 'table': + chartType = 'table'; + break; + case 'line': + chartType = 'line'; + break; + case 'barChart': + chartType = 'bar'; + break; + case 'processDefinitionHeatMap': + chartType = 'HeatMap'; + break; + default: + chartType = 'table'; + break; + } + return chartType; + } +} + +export class LineChart extends Chart { + title: string; + titleKey: string; + labels: string[] = []; + datasets: any[] = []; + + constructor(obj?: any) { + super(obj); + this.title = obj && obj.title || null; + this.titleKey = obj && obj.titleKey || null; + this.labels = obj && obj.columnNames.slice(1, obj.columnNames.length); + + obj.rows.forEach((value: any) => { + this.datasets.push({data: value.slice(1, value.length), label: value[0]}); + }); + } +} + +export class BarChart extends Chart { + title: string; + titleKey: string; + labels: string[] = []; + datasets: any[] = []; + data: any[] = []; + options: any = { + scales: { + yAxes: [{ + ticks: { + beginAtZero: true, + stepSize: 1 + } + }] + } + }; + + constructor(obj?: any) { + super(obj); + this.title = obj && obj.title || null; + this.titleKey = obj && obj.titleKey || null; + obj.values.forEach((params: any) => { + let dataValue = []; + params.values.forEach((info: any) => { + info.forEach((value: any, index: any) => { + if (index % 2 === 0) { + this.labels.push(value); + } else { + dataValue.push(value); + } + }); + }); + if (dataValue && dataValue.length > 0) { + this.datasets.push({data: dataValue, label: params.key}); + } + }); + } + + hasDatasets() { + return this.datasets && this.datasets.length > 0 ? true : false; + } +} + +export class TableChart extends Chart { + title: string; + titleKey: string; + labels: string[] = []; + datasets: any[] = []; + + constructor(obj?: any) { + super(obj); + this.title = obj && obj.title || null; + this.titleKey = obj && obj.titleKey || null; + this.labels = obj && obj.columnNames; + if (obj.rows) { + this.datasets = obj && obj.rows; + } + } + + hasDatasets() { + return this.datasets && this.datasets.length > 0 ? true : false; + } +} + +export class HeatMapChart extends Chart { + avgTimePercentages: string; + avgTimeValues: string; + processDefinitionId: string; + titleKey: string; + totalCountValues: string; + totalCountsPercentages: string; + totalTimePercentages: string; + totalTimeValues: string; + + constructor(obj?: any) { + super(obj); + this.avgTimePercentages = obj && obj.avgTimePercentages || null; + this.avgTimeValues = obj && obj.avgTimeValues || null; + this.processDefinitionId = obj && obj.processDefinitionId || null; + this.totalCountValues = obj && obj.totalCountValues || null; + this.titleKey = obj && obj.titleKey || null; + this.totalCountsPercentages = obj && obj.totalCountsPercentages || null; + this.totalTimePercentages = obj && obj.totalTimePercentages || null; + this.totalTimeValues = obj && obj.totalTimeValues || null; + } +} + +export class PieChart extends Chart { + title: string; + titleKey: string; + labels: string[] = []; + data: string[] = []; + + constructor(obj?: any) { + super(obj); + this.title = obj && obj.title || null; + this.titleKey = obj && obj.titleKey || null; + if (obj.values) { + obj.values.forEach((value: any) => { + this.add(value.key, value.y); + }); + } + } + + add(label: string, data: string) { + this.labels.push(label); + this.data.push(data); + } + + hasData() { + return this.data && this.data.length > 0 ? true : false; + } +} diff --git a/ng2-components/ng2-activiti-diagrams/src/models/report.model.ts b/ng2-components/ng2-activiti-diagrams/src/models/report.model.ts new file mode 100644 index 0000000000..549f841add --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/src/models/report.model.ts @@ -0,0 +1,139 @@ +/*! + * @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. + */ + +/** + * + * This object represent the report definition. + * + * + * @returns {ReportParametersModel} . + */ +export class ReportParametersModel { + id: number; + name: string; + definition: ReportDefinitionModel; + created: string; + + constructor(obj?: any) { + this.id = obj && obj.id; + this.name = obj && obj.name || null; + if (obj && obj.definition) { + this.definition = new ReportDefinitionModel(JSON.parse(obj.definition)); + } + this.created = obj && obj.created || null; + } + + hasParameters() { + return (this.definition && this.definition.parameters) ? true : false; + } +} + +export class ReportDefinitionModel { + parameters: ReportParameterDetailsModel[] = []; + + constructor(obj?: any) { + obj.parameters.forEach((params: any) => { + let reportParamsModel = new ReportParameterDetailsModel(params); + this.parameters.push(reportParamsModel); + }); + } + + findParam(name: string): ReportParameterDetailsModel { + this.parameters.forEach((param) => { + return param.type === name ? param : null; + }); + return null; + } +} + +/** + * + * This object represent the report parameter definition. + * + * + * @returns {ReportParameterDetailsModel} . + */ +export class ReportParameterDetailsModel { + id: string; + name: string; + nameKey: string; + type: string; + value: string; + options: ParameterValueModel[]; + dependsOn: string; + + constructor(obj?: any) { + this.id = obj && obj.id; + this.name = obj && obj.name || null; + this.nameKey = obj && obj.nameKey || null; + this.type = obj && obj.type || null; + this.value = obj && obj.value || null; + this.options = obj && obj.options || null; + this.dependsOn = obj && obj.dependsOn || null; + } +} + +export class ParameterValueModel { + id: string; + name: string; + version: string; + value: string; + + constructor(obj?: any) { + this.id = obj && obj.id; + this.name = obj && obj.name || null; + this.value = obj && obj.value || null; + this.version = obj && obj.version || null; + } + + get label () { + return this.version ? `${this.name} (v ${this.version}) ` : this.name; + } +} + +export class ReportQuery { + processDefinitionId: string; + status: string; + taskName: string; + typeFiltering: boolean; + dateRange: ReportDateRange; + dateRangeInterval: string; + slowProcessInstanceInteger: number; + duration: number; + + constructor(obj?: any) { + this.processDefinitionId = obj && obj.processDefinitionId || null; + this.status = obj && obj.status || null; + this.taskName = obj && obj.taskName || null; + this.dateRangeInterval = obj && obj.dateRangeInterval || null; + this.typeFiltering = obj && obj.typeFiltering || true; + this.slowProcessInstanceInteger = obj && obj.slowProcessInstanceInteger || 0; + this.duration = obj && obj.duration || 0; + this.dateRange = new ReportDateRange(obj); + } +} + +export class ReportDateRange { + startDate: string; + endDate: string; + + constructor(obj?: any) { + this.startDate = obj && obj.startDate || null; + this.endDate = obj && obj.endDate || null; + } + +} diff --git a/ng2-components/ng2-activiti-analytics/src/components/diagrams/services/diagram-color.service.ts b/ng2-components/ng2-activiti-diagrams/src/services/diagram-color.service.ts similarity index 100% rename from ng2-components/ng2-activiti-analytics/src/components/diagrams/services/diagram-color.service.ts rename to ng2-components/ng2-activiti-diagrams/src/services/diagram-color.service.ts diff --git a/ng2-components/ng2-activiti-diagrams/src/services/diagrams.service.ts b/ng2-components/ng2-activiti-diagrams/src/services/diagrams.service.ts new file mode 100644 index 0000000000..d2d9201b4d --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/src/services/diagrams.service.ts @@ -0,0 +1,59 @@ +/*! + * @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 { Injectable } from '@angular/core'; +import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; +import { Observable } from 'rxjs/Rx'; +import { Response, Http, Headers, RequestOptions } from '@angular/http'; + +@Injectable() +export class DiagramsService { + + constructor(private authService: AlfrescoAuthenticationService, + private http: Http, + private alfrescoSettingsService: AlfrescoSettingsService) { + } + + getProcessDefinitionModel(processDefinitionId: string): Observable { + let url = `${this.alfrescoSettingsService.getBPMApiBaseUrl()}/app/rest/process-definitions/${processDefinitionId}/model-json`; + let options = this.getRequestOptions(); + return this.http + .get(url, options) + .map((res: any) => { + let body = res.json(); + return body; + }).catch(this.handleError); + } + + public getHeaders(): Headers { + return new Headers({ + 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Authorization': this.authService.getTicketBpm() + }); + } + + public getRequestOptions(param?: any): RequestOptions { + let headers = this.getHeaders(); + return new RequestOptions({headers: headers, withCredentials: true, search: param}); + } + + private handleError(error: Response) { + console.error(error); + return Observable.throw(error.json().error || 'Server error'); + } +} diff --git a/ng2-components/ng2-activiti-diagrams/tsconfig.json b/ng2-components/ng2-activiti-diagrams/tsconfig.json new file mode 100644 index 0000000000..7be35bfec8 --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "sourceMap": true, + "removeComments": true, + "declaration": true, + "noLib": false, + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "noImplicitAny": false, + "noImplicitReturns": false, + "noImplicitUseStrict": false, + "noFallthroughCasesInSwitch": true, + "outDir": "dist", + "types": ["core-js", "jasmine", "node"] + }, + "exclude": [ + "demo", + "node_modules", + "dist" + ] +} diff --git a/ng2-components/ng2-activiti-diagrams/tslint.json b/ng2-components/ng2-activiti-diagrams/tslint.json new file mode 100644 index 0000000000..27e0dd81da --- /dev/null +++ b/ng2-components/ng2-activiti-diagrams/tslint.json @@ -0,0 +1,121 @@ +{ + "rules": { + "align": [ + true, + "parameters", + "statements" + ], + "ban": false, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "eofline": true, + "forin": true, + "indent": [ + true, + "spaces" + ], + "interface-name": false, + "jsdoc-format": true, + "label-position": true, + "label-undefined": true, + "max-line-length": [ + true, + 180 + ], + "member-ordering": [ + true, + "static-before-instance", + "variables-before-functions" + ], + "no-any": false, + "no-arg": true, + "no-bitwise": false, + "no-conditional-assignment": true, + "no-consecutive-blank-lines": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-constructor-vars": false, + "no-debugger": true, + "no-duplicate-key": true, + "no-duplicate-variable": true, + "no-empty": false, + "no-eval": true, + "no-inferrable-types": false, + "no-internal-module": true, + "no-require-imports": true, + "no-shadowed-variable": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unreachable": true, + "no-unused-expression": true, + "no-unused-variable": true, + "no-use-before-declare": true, + "no-var-keyword": true, + "no-var-requires": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "quotemark": [ + true, + "single", + "avoid-escape" + ], + "radix": true, + "semicolon": true, + "switch-default": true, + "trailing-comma": [ + true, + { + "multiline": "never", + "singleline": "never" + } + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef": false, + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "use-strict": false, + "variable-name": [ + true, + "check-format", + "allow-leading-underscore", + "ban-keywords" + ], + "whitespace": [ + true, + "check-branch", + "check-operator", + "check-separator", + "check-type", + "check-module", + "check-decl" + ] + } +}