mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Upgrade Demo App to angular 2.0.0-rc.1
This commit is contained in:
parent
a81378bcda
commit
bcff692a7b
@ -49,8 +49,8 @@
|
||||
<main class="mdl-layout__content">
|
||||
<div class="page-content">
|
||||
<alfresco-login method="{{methodName}}"></alfresco-login>
|
||||
<!--<router-outlet></router-outlet>-->
|
||||
<auth-router-outlet></auth-router-outlet>
|
||||
<router-outlet></router-outlet>
|
||||
<!--<auth-router-outlet></auth-router-outlet>-->
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from 'angular2/core';
|
||||
import { Router, RouteConfig, ROUTER_DIRECTIVES } from 'angular2/router';
|
||||
import { Component } from '@angular/core';
|
||||
import { Router, RouteConfig, ROUTER_DIRECTIVES } from '@angular/router-deprecated';
|
||||
import { MDL } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
import { FilesComponent } from './components/files/files.component';
|
||||
import { AuthRouterOutlet } from './components/router/AuthRouterOutlet';
|
||||
|
||||
import {
|
||||
AlfrescoSettingsService,
|
||||
AlfrescoTranslationService,
|
||||
@ -39,7 +39,7 @@ declare var document: any;
|
||||
selector: 'alfresco-app',
|
||||
templateUrl: 'app/app.component.html',
|
||||
styleUrls: ['app/app.component.css'],
|
||||
directives: [SearchBarComponent, ROUTER_DIRECTIVES, AuthRouterOutlet, MDL],
|
||||
directives: [SearchBarComponent, ROUTER_DIRECTIVES, MDL],
|
||||
pipes: [AlfrescoPipeTranslate]
|
||||
})
|
||||
@RouteConfig([
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from 'angular2/core';
|
||||
import { Component } from '@angular/core';
|
||||
import {
|
||||
ALFRESCO_DATATABLE_DIRECTIVES,
|
||||
ObjectDataTableAdapter,
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from 'angular2/core';
|
||||
import { Component } from '@angular/core';
|
||||
import {
|
||||
DOCUMENT_LIST_DIRECTIVES,
|
||||
DOCUMENT_LIST_PROVIDERS,
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from 'angular2/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { AlfrescoLoginComponent } from 'ng2-alfresco-login/dist/ng2-alfresco-login';
|
||||
|
||||
declare let __moduleName: string;
|
||||
|
@ -15,8 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ElementRef, DynamicComponentLoader, Directive, Attribute } from 'angular2/core';
|
||||
import { Router, RouterOutlet, ComponentInstruction } from 'angular2/router';
|
||||
/*
|
||||
import { ElementRef, DynamicComponentLoader, Directive, Attribute } from '@angular/core';
|
||||
import { Router, RouterOutlet, ComponentInstruction } from '@angular/router-deprecated';
|
||||
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
|
||||
@Directive({selector: 'auth-router-outlet'})
|
||||
@ -49,3 +50,4 @@ export class AuthRouterOutlet extends RouterOutlet {
|
||||
|| this.authentication.isLoggedIn();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from 'angular2/core';
|
||||
import { Router } from 'angular2/router';
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router-deprecated';
|
||||
import { ALFRESCO_SEARCH_DIRECTIVES } from 'ng2-alfresco-search/dist/ng2-alfresco-search';
|
||||
import { VIEWERCOMPONENT } from 'ng2-alfresco-viewer/dist/ng2-alfresco-viewer';
|
||||
import {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from 'angular2/core';
|
||||
import { Component } from '@angular/core';
|
||||
import { ALFRESCO_SEARCH_DIRECTIVES } from 'ng2-alfresco-search/dist/ng2-alfresco-search';
|
||||
|
||||
declare let __moduleName: string;
|
||||
|
@ -15,8 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Injectable } from 'angular2/core';
|
||||
import { Http, Headers, RequestOptions, Response } from 'angular2/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Http, Headers, RequestOptions, Response } from '@angular/http';
|
||||
// import { Observable } from 'rxjs/Rx';
|
||||
|
||||
@Injectable()
|
||||
export class ActivitiService {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, OnInit } from 'angular2/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivitiService } from './activiti.service';
|
||||
import {
|
||||
ALFRESCO_DATATABLE_DIRECTIVES,
|
||||
|
@ -15,12 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { bootstrap } from 'angular2/platform/browser';
|
||||
import { AppComponent } from './app.component';
|
||||
import { ROUTER_PROVIDERS } from 'angular2/router';
|
||||
import { HTTP_PROVIDERS } from 'angular2/http';
|
||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
||||
import { ROUTER_PROVIDERS } from '@angular/router-deprecated';
|
||||
import { HTTP_PROVIDERS } from '@angular/http';
|
||||
import { ALFRESCO_CORE_PROVIDERS } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||
import { UploadService } from 'ng2-alfresco-upload/dist/ng2-alfresco-upload';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
bootstrap(AppComponent, [
|
||||
ROUTER_PROVIDERS,
|
||||
|
@ -16,17 +16,14 @@
|
||||
<link href="node_modules/flag-icon-css/css/flag-icon.min.css" rel="stylesheet">
|
||||
|
||||
<!-- 1. Load libraries -->
|
||||
<!-- IE required polyfills, in this exact order -->
|
||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
||||
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
||||
<!-- Polyfill(s) for older browsers -->
|
||||
<script src="node_modules/core-js/client/shim.min.js"></script>
|
||||
|
||||
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||
|
||||
<script src="node_modules/alfresco-js-api/bundle.js"></script>
|
||||
<script src="/app/js/xml2json.js"></script>
|
||||
<script src="node_modules/alfresco-js-api/bundle.js"></script>
|
||||
|
||||
@ -37,7 +34,7 @@
|
||||
<!-- 2. Configure SystemJS -->
|
||||
<script src="systemjs.config.js"></script>
|
||||
<script>
|
||||
System.import('app/main').catch(function(err){ console.error(err); });
|
||||
System.import('app').catch(function(err){ console.error(err); });
|
||||
</script>
|
||||
</head>
|
||||
<!-- 3. Display the application -->
|
||||
|
@ -8,7 +8,7 @@
|
||||
"tsc": "tsc",
|
||||
"tsc:w": "tsc -w",
|
||||
"serve": "node browser-sync-config.js",
|
||||
"typings": "typings",
|
||||
"typings": "typings install",
|
||||
"tslint": "npm run tslint-src && npm run tslint-root",
|
||||
"tslint-src": "tslint -c tslint.json app/**/*.ts",
|
||||
"tslint-root": "tslint -c tslint.json *.ts",
|
||||
@ -51,23 +51,35 @@
|
||||
"alfresco"
|
||||
],
|
||||
"dependencies": {
|
||||
"alfresco-js-api": "^0.1.0",
|
||||
"angular2": "2.0.0-beta.15",
|
||||
"es6-shim": "^0.35.0",
|
||||
"@angular/common": "2.0.0-rc.1",
|
||||
"@angular/compiler": "2.0.0-rc.1",
|
||||
"@angular/core": "2.0.0-rc.1",
|
||||
"@angular/http": "2.0.0-rc.1",
|
||||
"@angular/platform-browser": "2.0.0-rc.1",
|
||||
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
||||
"@angular/router": "2.0.0-rc.1",
|
||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
||||
"@angular/upgrade": "2.0.0-rc.1",
|
||||
"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",
|
||||
"angular2-in-memory-web-api": "0.0.11",
|
||||
|
||||
"material-design-icons": "^2.2.3",
|
||||
"material-design-lite": "^1.1.3",
|
||||
"ng2-translate": "2.1.0",
|
||||
"pdfjs-dist": "^1.5.258",
|
||||
|
||||
"alfresco-js-api": "^0.1.0",
|
||||
"ng2-alfresco-core": "^0.1.0",
|
||||
"ng2-alfresco-datatable": "^0.1.0",
|
||||
"ng2-alfresco-documentlist": "^0.1.0",
|
||||
"ng2-alfresco-login": "^0.1.0",
|
||||
"ng2-alfresco-search": "^0.1.9",
|
||||
"ng2-alfresco-upload": "^0.1.0",
|
||||
"ng2-alfresco-viewer": "^0.1.13",
|
||||
"reflect-metadata": "0.1.2",
|
||||
"rxjs": "5.0.0-beta.2",
|
||||
"systemjs": "0.19.26",
|
||||
"zone.js": "0.6.10",
|
||||
"ng2-translate": "1.11.1"
|
||||
"ng2-alfresco-viewer": "^0.1.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browser-sync": "^2.10.0",
|
||||
@ -78,7 +90,7 @@
|
||||
"license-check": "^1.0.4",
|
||||
"tslint": "^3.8.1",
|
||||
"typescript": "^1.8.10",
|
||||
"typings": "^0.7.12"
|
||||
"typings": "^1.0.4"
|
||||
},
|
||||
"license-check-config": {
|
||||
"src": [
|
||||
|
@ -1,57 +1,65 @@
|
||||
/**
|
||||
* @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.
|
||||
* 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': 'app', // 'dist',
|
||||
'@angular': 'node_modules/@angular',
|
||||
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
||||
'rxjs': 'node_modules/rxjs',
|
||||
|
||||
'ng2-translate': 'node_modules/ng2-translate',
|
||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
|
||||
'ng2-alfresco-datatable': 'node_modules/ng2-alfresco-datatable',
|
||||
'ng2-alfresco-documentlist': 'node_modules/ng2-alfresco-documentlist',
|
||||
'ng2-alfresco-login': 'node_modules/ng2-alfresco-login',
|
||||
'ng2-alfresco-search': 'node_modules/ng2-alfresco-search',
|
||||
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload',
|
||||
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer',
|
||||
'rxjs': 'node_modules/rxjs',
|
||||
'ng2-translate': 'node_modules/ng2-translate'
|
||||
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer'
|
||||
};
|
||||
|
||||
// packages tells the System loader how to load when no filename and/or no extension
|
||||
var packages = {
|
||||
app: {
|
||||
format: 'register',
|
||||
defaultExtension: 'js'
|
||||
},
|
||||
'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': {defaultExtension: 'js'},
|
||||
'ng2-alfresco-datatable': {defaultExtension: 'js'},
|
||||
'ng2-alfresco-documentlist': {defaultExtension: 'js'},
|
||||
'ng2-alfresco-login': {defaultExtension: 'js'},
|
||||
'ng2-alfresco-search': {defaultExtension: 'js'},
|
||||
'ng2-alfresco-upload': {defaultExtension: 'js'},
|
||||
'ng2-alfresco-viewer': {defaultExtension: 'js'},
|
||||
'rxjs': {defaultExtension: 'js'},
|
||||
'ng2-translate': {defaultExtension: 'js'}
|
||||
'ng2-alfresco-viewer': {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: 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);
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"ambientDependencies": {
|
||||
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c",
|
||||
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#d594ef506d1efe2fea15f8f39099d19b39436b71"
|
||||
}
|
||||
"globalDependencies": {
|
||||
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
|
||||
"jasmine": "registry:dt/jasmine#2.2.0+20160505161446",
|
||||
"node": "registry:dt/node#4.0.0+20160509154515"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user