mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Fix Diagrams demo
This commit is contained in:
parent
3cbcc3d6cc
commit
b3c2e4d72c
@ -2,7 +2,8 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Angular 2 Activiti Analitics - Demo</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Alfresco Angular 2 Activiti Diagrams - Demo</title>
|
||||
<base href="./">
|
||||
|
||||
<!-- Google Material Design Lite -->
|
||||
@ -20,6 +21,7 @@
|
||||
|
||||
<script src="node_modules/alfresco-js-api/dist/alfresco-js-api.js"></script>
|
||||
<script src="node_modules/raphael/raphael.min.js"></script>
|
||||
<script src="assets/Polyline.js"></script>
|
||||
|
||||
<script src="systemjs.config.js"></script>
|
||||
<script>
|
||||
@ -27,12 +29,9 @@
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<style> .chart {display: block; width: 100%;} </style>
|
||||
|
||||
|
||||
<body>
|
||||
|
||||
<activiti-analytics-demo></activiti-analytics-demo>
|
||||
<activiti-diagrams-demo></activiti-diagrams-demo>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -9,73 +9,58 @@
|
||||
"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",
|
||||
"build": "npm run tslint && rimraf dist && tsc",
|
||||
"build:w": "npm run tslint && rimraf dist && tsc -w",
|
||||
"tsc": "tsc",
|
||||
"tsc:w": "tsc -w",
|
||||
"tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Maurizio Vitale",
|
||||
"email": "maurizio.vitale@alfresco.com"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"ng2",
|
||||
"angular",
|
||||
"angular2",
|
||||
"activiti",
|
||||
"activiti-diagrams"
|
||||
],
|
||||
"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",
|
||||
"@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",
|
||||
"core-js": "^2.4.1",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"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",
|
||||
"zone.js": "^0.6.23",
|
||||
"md-date-time-picker": "^2.2.0",
|
||||
"raphael": "^2.2.6",
|
||||
"material-design-icons": "2.2.3",
|
||||
"material-design-lite": "1.1.3",
|
||||
"ng2-translate": "2.2.2",
|
||||
"material-design-lite": "1.2.1",
|
||||
"ng2-translate": "2.5.0",
|
||||
"alfresco-js-api": "^0.3.0",
|
||||
"ng2-alfresco-core": "^0.3.0",
|
||||
"ng2-activiti-diagrams": "^0.3.0",
|
||||
"raphael": "^2.2.6"
|
||||
"ng2-activiti-diagrams": "^0.3.0"
|
||||
},
|
||||
"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",
|
||||
"tslint": "^3.8.1",
|
||||
"typescript": "^2.0.3",
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
@ -15,19 +15,35 @@
|
||||
* 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';
|
||||
import { NgModule, Component } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { CoreModule } from 'ng2-alfresco-core';
|
||||
import { DiagramsModule } from 'ng2-activiti-diagrams';
|
||||
|
||||
@Component({
|
||||
selector: 'activiti-diagrams-demo',
|
||||
template: `<activiti-diagrams></activiti-diagrams>`,
|
||||
directives: [DiagramsComponent]
|
||||
template: `
|
||||
<label for="processDefinitionId"><b>Insert the ProcessDefinitionId:</b></label><br>
|
||||
<input id="processDefinitionId" size="70" type="text" [(ngModel)]="processDefinitionId">
|
||||
<activiti-diagram [processDefinitionId]="processDefinitionId"></activiti-diagram>`
|
||||
})
|
||||
class ActivitiDiagramsDemo {
|
||||
|
||||
export class DiagramDemoComponent {
|
||||
|
||||
private processDefinitionId: string = 'ThirdProcess:1:15053';
|
||||
}
|
||||
|
||||
bootstrap(ActivitiDiagramsDemo, [
|
||||
ALFRESCO_CORE_PROVIDERS]
|
||||
);
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
CoreModule.forRoot(),
|
||||
DiagramsModule
|
||||
],
|
||||
declarations: [ DiagramDemoComponent ],
|
||||
bootstrap: [ DiagramDemoComponent ]
|
||||
})
|
||||
export class AppModule { }
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
|
@ -2,54 +2,46 @@
|
||||
* 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);
|
||||
(function (global) {
|
||||
System.config({
|
||||
paths: {
|
||||
// paths serve as alias
|
||||
'npm:': 'node_modules/'
|
||||
},
|
||||
// map tells the System loader where to look for things
|
||||
map: {
|
||||
// our app is within the app folder
|
||||
app: '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',
|
||||
// other libraries
|
||||
'rxjs': 'npm:rxjs',
|
||||
'raphael': 'npm:raphael',
|
||||
'ng2-translate': 'npm:ng2-translate',
|
||||
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||
'ng2-alfresco-core': 'npm:ng2-alfresco-core/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: {
|
||||
app: {
|
||||
main: './main.js',
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
rxjs: {
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'ng2-translate': { defaultExtension: 'js' },
|
||||
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
|
||||
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||
'ng2-activiti-diagrams': { main: './index.js', defaultExtension: 'js'}
|
||||
}
|
||||
});
|
||||
})(this);
|
||||
|
@ -26,7 +26,7 @@
|
||||
"label-undefined": true,
|
||||
"max-line-length": [
|
||||
true,
|
||||
140
|
||||
180
|
||||
],
|
||||
"member-ordering": [
|
||||
true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user