mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Upgrade ng2-alfresco-login/demo
This commit is contained in:
parent
af1d70db13
commit
30a1951ee6
@ -45,29 +45,28 @@
|
|||||||
"alfresco"
|
"alfresco"
|
||||||
],
|
],
|
||||||
"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/forms": "0.1.1",
|
"@angular/forms": "2.0.0",
|
||||||
"@angular/http": "2.0.0-rc.3",
|
"@angular/http": "2.0.0",
|
||||||
"@angular/platform-browser": "2.0.0-rc.3",
|
"@angular/platform-browser": "2.0.0",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
|
"@angular/platform-browser-dynamic": "2.0.0",
|
||||||
"@angular/router": "3.0.0-alpha.7",
|
"@angular/router": "3.0.0",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/upgrade": "2.0.0",
|
||||||
"@angular/upgrade": "2.0.0-rc.3",
|
"core-js": "^2.4.1",
|
||||||
|
"reflect-metadata": "^0.1.3",
|
||||||
|
"rxjs": "5.0.0-beta.12",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"core-js": "2.4.0",
|
"zone.js": "^0.6.23",
|
||||||
"reflect-metadata": "0.1.3",
|
|
||||||
"rxjs": "5.0.0-beta.6",
|
|
||||||
"zone.js": "0.6.12",
|
|
||||||
|
|
||||||
"material-design-icons": "2.2.3",
|
"material-design-icons": "2.2.3",
|
||||||
"material-design-lite": "1.1.3",
|
"material-design-lite": "1.2.1",
|
||||||
"ng2-translate": "2.2.2",
|
"ng2-translate": "2.5.0",
|
||||||
|
|
||||||
"alfresco-js-api": "^0.3.0",
|
"alfresco-js-api": "^0.3.0",
|
||||||
"ng2-alfresco-core": "^0.3.0",
|
"ng2-alfresco-core": "^0.3.0",
|
||||||
"ng2-alfresco-login": "file:../"
|
"ng2-alfresco-login": "^0.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/core-js": "^0.9.32",
|
"@types/core-js": "^0.9.32",
|
||||||
@ -75,7 +74,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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,16 +15,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component } from '@angular/core';
|
import { NgModule, Component } from '@angular/core';
|
||||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { AlfrescoLoginComponent } from 'ng2-alfresco-login';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { HTTP_PROVIDERS } from '@angular/http';
|
|
||||||
import {
|
|
||||||
ALFRESCO_CORE_PROVIDERS,
|
|
||||||
AlfrescoSettingsService,
|
|
||||||
AlfrescoAuthenticationService
|
|
||||||
} from 'ng2-alfresco-core';
|
|
||||||
|
|
||||||
|
import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
|
||||||
|
import { LoginModule } from 'ng2-alfresco-login';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
@ -51,8 +47,7 @@ import {
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<alfresco-login [providers]="providers" (onSuccess)="mySuccessMethod($event)"
|
<alfresco-login [providers]="providers" (onSuccess)="mySuccessMethod($event)"
|
||||||
(onError)="myErrorMethod($event)"></alfresco-login>`,
|
(onError)="myErrorMethod($event)"></alfresco-login>`
|
||||||
directives: [AlfrescoLoginComponent]
|
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
||||||
@ -104,7 +99,15 @@ export class AppComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap(AppComponent, [
|
@NgModule({
|
||||||
HTTP_PROVIDERS,
|
imports: [
|
||||||
ALFRESCO_CORE_PROVIDERS
|
BrowserModule,
|
||||||
]);
|
CoreModule.forRoot(),
|
||||||
|
LoginModule
|
||||||
|
],
|
||||||
|
declarations: [ AppComponent ],
|
||||||
|
bootstrap: [ AppComponent ]
|
||||||
|
})
|
||||||
|
export class AppModule { }
|
||||||
|
|
||||||
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
@ -2,54 +2,66 @@
|
|||||||
* System configuration for Angular 2 samples
|
* System configuration for Angular 2 samples
|
||||||
* Adjust as necessary for your application needs.
|
* Adjust as necessary for your application needs.
|
||||||
*/
|
*/
|
||||||
(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 tells the System loader where to look for things
|
||||||
var map = {
|
map: {
|
||||||
'app': 'dist', // 'dist',
|
// our app is within the app folder
|
||||||
'@angular': 'node_modules/@angular',
|
app: 'dist',
|
||||||
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
|
// angular bundles
|
||||||
'rxjs': 'node_modules/rxjs',
|
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||||
|
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||||
'ng2-translate': 'node_modules/ng2-translate',
|
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core/dist',
|
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||||
'ng2-alfresco-login': 'node_modules/ng2-alfresco-login/dist'
|
'@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 tells the System loader how to load when no filename and/or no extension
|
||||||
var packages = {
|
packages: {
|
||||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
app: {
|
||||||
'rxjs': { defaultExtension: 'js' },
|
main: './main.js',
|
||||||
'angular2-in-memory-web-api': { main: 'index.js', defaultExtension: 'js' },
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
|
rxjs: {
|
||||||
|
defaultExtension: 'js'
|
||||||
|
},
|
||||||
'ng2-translate': { defaultExtension: 'js' },
|
'ng2-translate': { defaultExtension: 'js' },
|
||||||
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' },
|
|
||||||
'ng2-alfresco-login': { main: 'index.js', defaultExtension: 'js' }
|
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||||
};
|
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
|
||||||
var ngPackageNames = [
|
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'common',
|
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
|
||||||
'compiler',
|
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
|
||||||
'core',
|
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
|
||||||
'http',
|
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
|
||||||
'platform-browser',
|
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'},
|
||||||
'platform-browser-dynamic',
|
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'router',
|
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
|
||||||
'router-deprecated',
|
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'},
|
||||||
'upgrade'
|
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
|
||||||
];
|
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}
|
||||||
// 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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user