mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Upgrade ng2-activiti-processlist/demo
This commit is contained in:
@@ -1,10 +1,19 @@
|
|||||||
|
# http://editorconfig.org
|
||||||
|
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[{src,scripts}/**.{ts,json,js}]
|
[*]
|
||||||
end_of_line = crlf
|
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[package.json]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
@@ -23,24 +23,29 @@
|
|||||||
"demo"
|
"demo"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.3",
|
"@angular/common": "2.0.0",
|
||||||
"@angular/compiler": "2.0.0-rc.3",
|
"@angular/compiler": "2.0.0",
|
||||||
"@angular/core": "2.0.0-rc.3",
|
"@angular/core": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"@angular/upgrade": "2.0.0",
|
||||||
"alfresco-js-api": "^0.3.0",
|
"core-js": "^2.4.1",
|
||||||
"systemjs": "0.19.27",
|
|
||||||
"core-js": "^2.4.0",
|
|
||||||
"reflect-metadata": "^0.1.3",
|
"reflect-metadata": "^0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.12",
|
||||||
"zone.js": "^0.6.12",
|
"systemjs": "0.19.27",
|
||||||
|
"zone.js": "^0.6.23",
|
||||||
|
|
||||||
|
"material-design-icons": "2.2.3",
|
||||||
|
"material-design-lite": "1.2.1",
|
||||||
|
|
||||||
|
"alfresco-js-api": "^0.3.0",
|
||||||
|
"ng2-alfresco-core": "0.3.2",
|
||||||
|
"ng2-alfresco-datatable": "0.3.2",
|
||||||
"ng2-activiti-processlist": "^0.3.0",
|
"ng2-activiti-processlist": "^0.3.0",
|
||||||
"material-design-icons": "^2.2.3",
|
"ng2-activiti-tasklist": "0.3.3"
|
||||||
"material-design-lite": "^1.1.3"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/core-js": "^0.9.32",
|
"@types/core-js": "^0.9.32",
|
||||||
@@ -48,10 +53,7 @@
|
|||||||
"concurrently": "^2.2.0",
|
"concurrently": "^2.2.0",
|
||||||
"rimraf": "2.5.2",
|
"rimraf": "2.5.2",
|
||||||
"tslint": "^3.8.1",
|
"tslint": "^3.8.1",
|
||||||
"typescript": "^2.0.2",
|
"typescript": "^2.0.3",
|
||||||
"wsrv": "^0.1.5"
|
"wsrv": "^0.1.5"
|
||||||
},
|
|
||||||
"publishConfig": {
|
|
||||||
"registry": "http://devproducts.alfresco.me:4873/"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,21 +14,18 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { Component, OnInit, Injectable, provide } from '@angular/core';
|
|
||||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
import { NgModule, Component, OnInit } from '@angular/core';
|
||||||
import {
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
ACTIVITI_PROCESSLIST_PROVIDERS,
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
ACTIVITI_PROCESSLIST_DIRECTIVES
|
|
||||||
} from 'ng2-activiti-processlist/dist/ng2-activiti-processlist';
|
import { CoreModule } from 'ng2-alfresco-core';
|
||||||
import {
|
import { ActivitiProcessListModule } from 'ng2-activiti-processlist';
|
||||||
AlfrescoAuthenticationService,
|
import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core';
|
||||||
AlfrescoSettingsService,
|
|
||||||
ALFRESCO_CORE_PROVIDERS
|
|
||||||
} from 'ng2-alfresco-core';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: `label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
template: `<label for="token"><b>Insert a valid access token / ticket:</b></label><br>
|
||||||
<input id="token" type="text" size="48" (change)="updateToken();documentList.reload()" [(ngModel)]="token"><br>
|
<input id="token" type="text" size="48" (change)="updateToken();documentList.reload()" [(ngModel)]="token"><br>
|
||||||
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
<label for="token"><b>Insert the ip of your Alfresco instance:</b></label><br>
|
||||||
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="bpmHost"><br><br>
|
<input id="token" type="text" size="48" (change)="updateHost();documentList.reload()" [(ngModel)]="bpmHost"><br><br>
|
||||||
@@ -45,14 +42,12 @@ import {
|
|||||||
<input id="token" type="text" size="48" [(ngModel)]="servicePath"><br>
|
<input id="token" type="text" size="48" [(ngModel)]="servicePath"><br>
|
||||||
<div class="container" *ngIf="authenticated">
|
<div class="container" *ngIf="authenticated">
|
||||||
<activiti-process-instance-list></activiti-process-instance-list>
|
<activiti-process-instance-list></activiti-process-instance-list>
|
||||||
</div>`,
|
</div>`
|
||||||
providers: [ACTIVITI_PROCESSLIST_PROVIDERS],
|
|
||||||
directives: [ACTIVITI_PROCESSLIST_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
class MyDemoApp implements OnInit {
|
class MyDemoApp implements OnInit {
|
||||||
|
|
||||||
authenticated: boolean;
|
authenticated: boolean;
|
||||||
ecmHost: string = 'http://127.0.0.1:9999';
|
bpmHost: string = 'http://127.0.0.1:9999';
|
||||||
token: string;
|
token: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -64,8 +59,8 @@ class MyDemoApp implements OnInit {
|
|||||||
settingsService.setProviders('BPM');
|
settingsService.setProviders('BPM');
|
||||||
settingsService.bpmHost = this.bpmHost;
|
settingsService.bpmHost = this.bpmHost;
|
||||||
|
|
||||||
if (this.authService.getTicket()) {
|
if (this.authService.getTicketBpm()) {
|
||||||
this.token = this.authService.getTicket();
|
this.token = this.authService.getTicketBpm();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,7 +73,7 @@ class MyDemoApp implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public updateHost(): void {
|
public updateHost(): void {
|
||||||
this.settingsService.ecmHost = this.ecmHost;
|
this.settingsService.bpmHost = this.bpmHost;
|
||||||
this.login();
|
this.login();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,6 +91,15 @@ class MyDemoApp implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap(MyDemoApp, [
|
@NgModule({
|
||||||
ALFRESCO_CORE_PROVIDERS
|
imports: [
|
||||||
]);
|
BrowserModule,
|
||||||
|
CoreModule.forRoot(),
|
||||||
|
ActivitiProcessListModule
|
||||||
|
],
|
||||||
|
declarations: [ MyDemoApp ],
|
||||||
|
bootstrap: [ MyDemoApp ]
|
||||||
|
})
|
||||||
|
export class AppModule { }
|
||||||
|
|
||||||
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
@@ -1,71 +1,67 @@
|
|||||||
/**
|
/**
|
||||||
* @license
|
* System configuration for Angular 2 samples
|
||||||
* Copyright 2016 Alfresco Software, Ltd.
|
* Adjust as necessary for your application needs.
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function (global) {
|
(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',
|
||||||
|
'ng2-translate': 'npm:ng2-translate',
|
||||||
|
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
|
||||||
|
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist',
|
||||||
|
'ng2-alfresco-documentlist': 'npm:ng2-alfresco-documentlist/dist',
|
||||||
|
'ng2-alfresco-login': 'npm:ng2-alfresco-login/dist',
|
||||||
|
'ng2-alfresco-search': 'npm:ng2-alfresco-search/dist',
|
||||||
|
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
|
||||||
|
'ng2-activiti-form': 'npm:ng2-activiti-form/dist',
|
||||||
|
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
|
||||||
|
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist',
|
||||||
|
'ng2-alfresco-tag': 'npm:ng2-alfresco-tag/dist',
|
||||||
|
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
|
||||||
|
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||||
|
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/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' },
|
||||||
|
|
||||||
// map tells the System loader where to look for things
|
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||||
var map = {
|
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
|
||||||
'app': 'dist',
|
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'@angular': 'node_modules/@angular',
|
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
|
||||||
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
|
||||||
'rxjs': 'node_modules/rxjs',
|
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-translate': 'node_modules/ng2-translate',
|
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-activiti-processlist': 'node_modules/ng2-activiti-processlist',
|
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core/dist',
|
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'ng2-alfresco-datatable': 'node_modules/ng2-alfresco-datatable/dist'
|
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
|
||||||
};
|
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'},
|
||||||
|
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
|
||||||
// packages tells the System loader how to load when no filename and/or no extension
|
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}
|
||||||
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-activiti-processlist': { main: 'index.js', defaultExtension: 'js' },
|
|
||||||
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' },
|
|
||||||
'ng2-alfresco-datatable': { main: 'index.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);
|
})(this);
|
||||||
|
Reference in New Issue
Block a user