change tsconfig,module name ,karma.conf,karma-tst-shim and #749

This commit is contained in:
Eugenio Romano 2016-10-06 11:56:07 +01:00
parent 0bf41768a7
commit 12914e0680
74 changed files with 412 additions and 528 deletions

View File

@ -15,4 +15,36 @@
* limitations under the License. * limitations under the License.
*/ */
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CoreModule } from 'ng2-alfresco-core';
import { AnalyticsComponent } from './src/components/analytics.component';
import { CHART_DIRECTIVES } from 'ng2-charts/ng2-charts';
export * from './src/components/analytics.component'; export * from './src/components/analytics.component';
export const ANALYTICS_DIRECTIVES: any[] = [
AnalyticsComponent
];
@NgModule({
imports: [
CoreModule
],
declarations: [
...ANALYTICS_DIRECTIVES,
CHART_DIRECTIVES
],
exports: [
...ANALYTICS_DIRECTIVES
]
})
export class AnalyticsModule {
static forRoot(): ModuleWithProviders {
return {
ngModule: AnalyticsModule,
providers: [
...ANALYTICS_DIRECTIVES
]
};
}
}

View File

@ -5,105 +5,103 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
__karma__.loaded = function() {}; __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 = { var map = {
'app': 'base/dist', 'app': 'base/dist',
'rxjs': 'base/node_modules/rxjs', // angular bundles
'@angular': 'base/node_modules/@angular', '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'ng2-translate' : '/base/node_modules/ng2-translate', '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'ng2-charts' : '/base/node_modules/ng2-charts', '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'ng2-alfresco-core': '/base/node_modules/ng2-alfresco-core/dist' '@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',
'ng2-charts' : 'npm:ng2-charts',
'alfresco-js-api': 'npm:alfresco-js-api/dist',
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist'
}; };
var packages = { var packages = {
'app': { main: 'main.js', defaultExtension: 'js' }, 'app': { main: 'main.js', defaultExtension: 'js' },
'rxjs': { defaultExtension: 'js' }, 'rxjs': { defaultExtension: 'js' },
'ng2-translate': { defaultExtension: 'js' }, 'ng2-translate': { defaultExtension: 'js' },
'ng2-charts': { defaultExtension: 'js' },
'ng2-alfresco-core': { main: 'index.js', defaultExtension: 'js' }
};
var packageNames = [ 'ng2-charts' : '/base/node_modules/ng2-charts',
'@angular/common', 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
'@angular/compiler', 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}
'@angular/core',
'@angular/http',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
'@angular/router',
'@angular/router-deprecated',
'@angular/testing',
'@angular/upgrade'
];
packageNames.forEach(function(pkgName) {
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
});
packages['base/dist'] = {
defaultExtension: 'js',
format: 'register',
map: Object.keys(window.__karma__.files).filter(onlyAppFiles).reduce(createPathRecords, {})
}; };
var config = { var config = {
paths: paths,
map: map, map: map,
packages: packages packages: packages
}; };
System.config(config); System.config(config);
System.import('@angular/platform-browser/src/browser/browser_adapter') System.import('@angular/core/testing')
.then(function(browser_adapter) { browser_adapter.BrowserDomAdapter.makeCurrent(); }) .then(initTestBed)
.then(function () { .then(initTesting);
return Promise.all([
function initTestBed(){
return Promise.all([
System.import('@angular/core/testing'), System.import('@angular/core/testing'),
System.import('@angular/platform-browser-dynamic/testing') System.import('@angular/platform-browser-dynamic/testing')
]) ])
}) .then(function (providers) {
.then(function (providers) { var coreTesting = providers[0];
var testing = providers[0]; var browserTesting = providers[1];
var testingBrowser = providers[1];
testing.setBaseTestProviders( coreTesting.TestBed.initTestEnvironment(
testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, browserTesting.BrowserDynamicTestingModule,
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS); browserTesting.platformBrowserDynamicTesting());
})
})
.then(function() { return Promise.all(resolveTestFiles()); })
.then(
function() {
__karma__.start();
},
function(error) {
if(typeof __karma__.error == 'function') {
__karma__.error(error.stack || error);
}else{
console.error(error);
}
}
);
function createPathRecords(pathsMapping, appPath) {
var pathParts = appPath.split('/');
var moduleName = './' + pathParts.slice(Math.max(pathParts.length - 2, 1)).join('/');
moduleName = moduleName.replace(/\.js$/, '');
pathsMapping[moduleName] = appPath + '?' + window.__karma__.files[appPath];
return pathsMapping;
} }
function onlyAppFiles(filePath) { // Import all spec files and start karma
return /\/base\/dist\/(?!.*\.spec\.js$).*\.js$/.test(filePath); function initTesting () {
} return Promise.all(
allSpecFiles.map(function (moduleName) {
function onlySpecFiles(path) {
return /\.spec\.js$/.test(path);
}
function resolveTestFiles() {
return Object.keys(window.__karma__.files) // All files served by Karma.
.filter(onlySpecFiles)
.map(function(moduleName) {
// loads all spec files via their global module names (e.g.
// 'base/dist/vg-player/vg-player.spec')
return System.import(moduleName); return System.import(moduleName);
}); })
)
.then(__karma__.start, __karma__.error);
} }

View File

@ -7,26 +7,47 @@ module.exports = function (config) {
frameworks: ['jasmine-ajax', 'jasmine'], frameworks: ['jasmine-ajax', 'jasmine'],
files: [ files: [
// paths loaded by Karma // System.js for module loading
{pattern: 'node_modules/reflect-metadata/Reflect.js', included: true, watched: true}, 'node_modules/systemjs/dist/system.src.js',
{pattern: 'node_modules/systemjs/dist/system.src.js', included: true, watched: false},
{pattern: 'node_modules/zone.js/dist/zone.js', included: true, watched: true},
{pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false},
{pattern: 'node_modules/rxjs/**/*.map', included: false, watched: false},
{pattern: 'node_modules/@angular/**/*.js', included: false, watched: false},
{pattern: 'node_modules/@angular/**/*.map', included: false, watched: false},
{pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false},
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, served: true, watched: false},
{pattern: 'node_modules/ng2-charts/**/*.js', included: false, served: true, watched: false},
{pattern: 'node_modules/alfresco-js-api/dist/alfresco-js-api.js', included: true, watched: false},
{pattern: 'karma-test-shim.js', included: true, watched: true}, // 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',
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, watched: false},
{pattern: 'node_modules/ng2-translate/**/*.js.map', included: false, watched: false},
'karma-test-shim.js',
// paths loaded via module imports // paths loaded via module imports
{pattern: 'dist/**/*.js', included: false, watched: true}, {pattern: 'dist/**/*.js', included: false, watched: true},
{pattern: 'dist/**/*.html', included: true, served: true, watched: true}, {pattern: 'dist/**/*.html', included: true, served: true, watched: true},
{pattern: 'dist/**/*.css', 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},
{pattern: 'node_modules/ng2-charts/**/*.js', included: false, served: true, watched: false},
// paths to support debugging with source maps in dev tools // paths to support debugging with source maps in dev tools
{pattern: 'src/**/*.ts', included: false, watched: false}, {pattern: 'src/**/*.ts', included: false, watched: false},
{pattern: 'dist/**/*.js.map', included: false, watched: false} {pattern: 'dist/**/*.js.map', included: false, watched: false}
@ -77,10 +98,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -41,29 +41,31 @@
"ng2", "ng2",
"angular", "angular",
"angular2", "angular2",
"analytics",
"alfresco-component",
"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", "@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", "systemjs": "0.19.27",
"core-js": "2.4.0", "zone.js": "^0.6.23",
"reflect-metadata": "0.1.3", "ng2-translate": "2.5.0",
"rxjs": "5.0.0-beta.6", "alfresco-js-api": "^0.3.0",
"zone.js": "0.6.12",
"chart.js": "^2.1.4",
"ng2-charts": "1.1.0",
"ng2-translate": "2.2.2",
"ng2-alfresco-core": "0.3.2", "ng2-alfresco-core": "0.3.2",
"alfresco-js-api": "^0.3.0" "ng2-charts": "1.1.0",
"chart.js": "^2.1.4"
}, },
"devDependencies": { "devDependencies": {
"@types/core-js": "^0.9.32", "@types/core-js": "^0.9.32",
@ -83,7 +85,7 @@
"remap-istanbul": "0.6.3", "remap-istanbul": "0.6.3",
"traceur": "0.0.91", "traceur": "0.0.91",
"tslint": "3.8.1", "tslint": "3.8.1",
"typescript": "^2.0.2", "typescript": "^2.0.3",
"wsrv": "^0.1.5" "wsrv": "^0.1.5"
}, },
"license-check-config": { "license-check-config": {
@ -94,5 +96,6 @@
"blocking": true, "blocking": true,
"logInfo": false, "logInfo": false,
"logError": true "logError": true
} },
"license": "Apache-2.0"
} }

View File

@ -15,17 +15,47 @@
* limitations under the License. * limitations under the License.
*/ */
import { describe, expect, it, inject } from '@angular/core/testing'; import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/compiler/testing';
import { AnalyticsComponent } from './analytics.component'; import { AnalyticsComponent } from './analytics.component';
import { DebugElement } from '@angular/core';
import {
AlfrescoAuthenticationService,
AlfrescoSettingsService,
AlfrescoApiService,
CoreModule
} from 'ng2-alfresco-core';
describe('Show component HTML', () => { describe('Test ng2-alfresco-analytics analytics component ', () => {
it('Display component tag base-chart', inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb let component: any;
.createAsync(AnalyticsComponent) let fixture: ComponentFixture<AnalyticsComponent>;
.then((fixture) => { let debug: DebugElement;
let element = fixture.nativeElement; let element: HTMLElement;
expect(element.getElementsByTagName('base-chart')[0].innerHTML).toBeDefined();
}); beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
CoreModule
],
declarations: [AnalyticsComponent],
providers: [
AlfrescoSettingsService,
AlfrescoAuthenticationService,
AlfrescoApiService
]
}).compileComponents();
})); }));
beforeEach(() => {
fixture = TestBed.createComponent(AnalyticsComponent);
debug = fixture.debugElement;
element = fixture.nativeElement;
component = fixture.componentInstance;
fixture.detectChanges();
});
xit('No test', () => {
});
}); });

View File

@ -16,17 +16,11 @@
*/ */
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass } from '@angular/common';
import { CHART_DIRECTIVES } from 'ng2-charts/ng2-charts';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'activiti-analytics', selector: 'activiti-analytics',
templateUrl: './analytics.component.html', templateUrl: './analytics.component.html'
directives: [CHART_DIRECTIVES, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES]
}) })
export class AnalyticsComponent { export class AnalyticsComponent {

View File

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "system", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
@ -16,7 +16,7 @@
"noImplicitUseStrict": false, "noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"outDir": "dist", "outDir": "dist",
"types": ["core-js", "jasmine"] "types": ["core-js", "jasmine", "node"]
}, },
"exclude": [ "exclude": [
"demo", "demo",

View File

@ -54,18 +54,7 @@ var map = {
'ng2-translate': 'npm:ng2-translate', 'ng2-translate': 'npm:ng2-translate',
'alfresco-js-api': 'npm:alfresco-js-api/dist', 'alfresco-js-api': 'npm:alfresco-js-api/dist',
'ng2-activiti-form': 'npm:ng2-activiti-form/dist', 'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist'
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
'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-tag': 'npm:ng2-alfresco-tag/dist',
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist'
}; };
var packages = { var packages = {
@ -74,18 +63,7 @@ var packages = {
'ng2-translate': { defaultExtension: 'js' }, 'ng2-translate': { defaultExtension: 'js' },
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'}, 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'}
}; };
var config = { var config = {

View File

@ -44,18 +44,7 @@ module.exports = function (config) {
{pattern: 'dist/**/*.css', included: true, served: true, watched: true}, {pattern: 'dist/**/*.css', included: true, served: true, watched: true},
// ng2-components // ng2-components
{ pattern: 'node_modules/ng2-activiti-form/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-processlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-documentlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-login/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-search/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-tag/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-upload/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-viewer/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-webscript/dist/**/*.js', included: false, served: true, watched: false },
// paths to support debugging with source maps in dev tools // paths to support debugging with source maps in dev tools
{pattern: 'src/**/*.ts', included: false, watched: false}, {pattern: 'src/**/*.ts', included: false, watched: false},
@ -107,10 +96,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
// 'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -54,6 +54,7 @@
"@angular/platform-browser-dynamic": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0", "@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0", "@angular/upgrade": "2.0.0",
"@types/node": "^6.0.42",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"reflect-metadata": "^0.1.3", "reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12", "rxjs": "5.0.0-beta.12",

View File

@ -28,7 +28,6 @@ import { FormService } from './../services/form.service';
import { NodeService } from './../services/node.service'; import { NodeService } from './../services/node.service';
import { FormModel, FormOutcomeModel, FormValues, FormFieldModel, FormOutcomeEvent } from './widgets/core/index'; import { FormModel, FormOutcomeModel, FormValues, FormFieldModel, FormOutcomeEvent } from './widgets/core/index';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
import { WidgetVisibilityService } from './../services/widget-visibility.service'; import { WidgetVisibilityService } from './../services/widget-visibility.service';
@ -76,7 +75,7 @@ import { WidgetVisibilityService } from './../services/widget-visibility.servic
* @returns {ActivitiForm} . * @returns {ActivitiForm} .
*/ */
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'activiti-form', selector: 'activiti-form',
templateUrl: './activiti-form.component.html', templateUrl: './activiti-form.component.html',
styleUrls: ['./activiti-form.component.css'] styleUrls: ['./activiti-form.component.css']

View File

@ -18,10 +18,8 @@
import { Component, ElementRef, OnInit } from '@angular/core'; import { Component, ElementRef, OnInit } from '@angular/core';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'amount-widget', selector: 'amount-widget',
templateUrl: './amount.widget.html', templateUrl: './amount.widget.html',
styleUrls: ['./amount.widget.css'] styleUrls: ['./amount.widget.css']

View File

@ -22,11 +22,10 @@ import { ExternalContent } from '../core/external-content';
import { ExternalContentLink } from '../core/external-content-link'; import { ExternalContentLink } from '../core/external-content-link';
import { FormFieldModel } from '../core/form-field.model'; import { FormFieldModel } from '../core/form-field.model';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'attach-widget', selector: 'attach-widget',
templateUrl: './attach.widget.html', templateUrl: './attach.widget.html',
styleUrls: ['./attach.widget.css'] styleUrls: ['./attach.widget.css']

View File

@ -18,11 +18,10 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'checkbox-widget', selector: 'checkbox-widget',
templateUrl: './checkbox.widget.html' templateUrl: './checkbox.widget.html'
}) })

View File

@ -18,11 +18,10 @@
import { Component, Input, AfterViewInit, Output, EventEmitter } from '@angular/core'; import { Component, Input, AfterViewInit, Output, EventEmitter } from '@angular/core';
import { ContainerModel, FormFieldModel } from './../core/index'; import { ContainerModel, FormFieldModel } from './../core/index';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'container-widget', selector: 'container-widget',
templateUrl: './container.widget.html', templateUrl: './container.widget.html',
styleUrls: ['./container.widget.css'] styleUrls: ['./container.widget.css']

View File

@ -18,10 +18,8 @@
import { Component, ElementRef } from '@angular/core'; import { Component, ElementRef } from '@angular/core';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'date-widget', selector: 'date-widget',
templateUrl: './date.widget.html', templateUrl: './date.widget.html',
styleUrls: ['./date.widget.css'] styleUrls: ['./date.widget.css']

View File

@ -18,11 +18,10 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'display-text-widget', selector: 'display-text-widget',
templateUrl: './display-text.widget.html', templateUrl: './display-text.widget.html',
styleUrls: ['./display-text.widget.css'] styleUrls: ['./display-text.widget.css']

View File

@ -21,11 +21,10 @@ import { FormFieldTypes } from '../core/form-field-types';
import { FormService } from '../../../services/form.service'; import { FormService } from '../../../services/form.service';
import { FormFieldOption } from './../core/form-field-option'; import { FormFieldOption } from './../core/form-field-option';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'display-value-widget', selector: 'display-value-widget',
templateUrl: './display-value.widget.html', templateUrl: './display-value.widget.html',
styleUrls: ['./display-value.widget.css'] styleUrls: ['./display-value.widget.css']

View File

@ -20,10 +20,8 @@ import { FormService } from '../../../services/form.service';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
import { FormFieldOption } from './../core/form-field-option'; import { FormFieldOption } from './../core/form-field-option';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'dropdown-widget', selector: 'dropdown-widget',
templateUrl: './dropdown.widget.html', templateUrl: './dropdown.widget.html',
styleUrls: ['./dropdown.widget.css'] styleUrls: ['./dropdown.widget.css']

View File

@ -20,10 +20,8 @@ import { WidgetComponent } from './../widget.component';
import { FormService } from '../../../services/form.service'; import { FormService } from '../../../services/form.service';
import { GroupModel } from './../core/group.model'; import { GroupModel } from './../core/group.model';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'functional-group-widget', selector: 'functional-group-widget',
templateUrl: './functional-group.widget.html', templateUrl: './functional-group.widget.html',
styleUrls: ['./functional-group.widget.css'] styleUrls: ['./functional-group.widget.css']

View File

@ -18,11 +18,10 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'hyperlink-widget', selector: 'hyperlink-widget',
templateUrl: './hyperlink.widget.html', templateUrl: './hyperlink.widget.html',
styleUrls: ['./hyperlink.widget.css'] styleUrls: ['./hyperlink.widget.css']

View File

@ -18,10 +18,8 @@
import { Component, ElementRef } from '@angular/core'; import { Component, ElementRef } from '@angular/core';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'multiline-text-widget', selector: 'multiline-text-widget',
templateUrl: './multiline-text.widget.html', templateUrl: './multiline-text.widget.html',
styleUrls: ['./multiline-text.widget.css'] styleUrls: ['./multiline-text.widget.css']

View File

@ -18,10 +18,8 @@
import { Component, ElementRef } from '@angular/core'; import { Component, ElementRef } from '@angular/core';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'number-widget', selector: 'number-widget',
templateUrl: './number.widget.html', templateUrl: './number.widget.html',
styleUrls: ['./number.widget.css'] styleUrls: ['./number.widget.css']

View File

@ -21,10 +21,8 @@ import { FormService } from '../../../services/form.service';
import { GroupModel } from '../core/group.model'; import { GroupModel } from '../core/group.model';
import { GroupUserModel } from '../core/group-user.model'; import { GroupUserModel } from '../core/group-user.model';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'people-widget', selector: 'people-widget',
templateUrl: './people.widget.html', templateUrl: './people.widget.html',
styleUrls: ['./people.widget.css'] styleUrls: ['./people.widget.css']

View File

@ -20,11 +20,10 @@ import { WidgetComponent } from './../widget.component';
import { FormService } from '../../../services/form.service'; import { FormService } from '../../../services/form.service';
import { FormFieldOption } from './../core/form-field-option'; import { FormFieldOption } from './../core/form-field-option';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'radio-buttons-widget', selector: 'radio-buttons-widget',
templateUrl: './radio-buttons.widget.html', templateUrl: './radio-buttons.widget.html',
styleUrls: ['./radio-buttons.widget.css'] styleUrls: ['./radio-buttons.widget.css']

View File

@ -18,11 +18,10 @@
import { Component, Input, AfterViewInit } from '@angular/core'; import { Component, Input, AfterViewInit } from '@angular/core';
import { TabModel } from './../core/index'; import { TabModel } from './../core/index';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'tabs-widget', selector: 'tabs-widget',
templateUrl: './tabs.widget.html' templateUrl: './tabs.widget.html'
}) })

View File

@ -18,10 +18,8 @@
import { Component, ElementRef } from '@angular/core'; import { Component, ElementRef } from '@angular/core';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'text-widget', selector: 'text-widget',
templateUrl: './text.widget.html', templateUrl: './text.widget.html',
styleUrls: ['./text.widget.css'] styleUrls: ['./text.widget.css']

View File

@ -20,11 +20,10 @@ import { FormService } from './../../../services/form.service';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
import { FormFieldOption } from './../core/form-field-option'; import { FormFieldOption } from './../core/form-field-option';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'typeahead-widget', selector: 'typeahead-widget',
templateUrl: './typeahead.widget.html', templateUrl: './typeahead.widget.html',
styleUrls: ['./typeahead.widget.css'] styleUrls: ['./typeahead.widget.css']

View File

@ -19,11 +19,10 @@ import { Component, OnInit } from '@angular/core';
import { WidgetComponent } from './../widget.component'; import { WidgetComponent } from './../widget.component';
import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core'; import { AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core';
declare let __moduleName: string;
declare var componentHandler; declare var componentHandler;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'upload-widget', selector: 'upload-widget',
templateUrl: './upload.widget.html', templateUrl: './upload.widget.html',
styleUrls: ['./upload.widget.css'] styleUrls: ['./upload.widget.css']

View File

@ -1,19 +1,25 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "system", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"sourceMap": true, "sourceMap": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"noLib": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"outDir": "dist", "outDir": "dist",
"types": ["core-js", "jasmine"] "types": ["core-js", "jasmine", "node"]
}, },
"exclude": [ "exclude": [
"demo", "demo",
"dist",
"node_modules", "node_modules",
"dist" "dist"
] ]

View File

@ -39,7 +39,9 @@ module.exports = function (config) {
'karma-test-shim.js', 'karma-test-shim.js',
// paths loaded via module imports // paths loaded via module imports
{pattern: 'dist/**/*.*', included: false, watched: true}, {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 // ng2-components
{pattern: 'node_modules/ng2-activiti-form/dist/**/*.*', included: false, served: true, watched: false}, {pattern: 'node_modules/ng2-activiti-form/dist/**/*.*', included: false, served: true, watched: false},
@ -96,10 +98,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -23,7 +23,6 @@ import { User } from '../models/user.model';
import { FormModel, FormService } from 'ng2-activiti-form'; import { FormModel, FormService } from 'ng2-activiti-form';
import { TaskQueryRequestRepresentationModel } from '../models/filter.model'; import { TaskQueryRequestRepresentationModel } from '../models/filter.model';
declare let componentHandler: any; declare let componentHandler: any;
@Component({ @Component({

View File

@ -93,10 +93,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -54,38 +54,16 @@ var map = {
'ng2-translate': 'npm:ng2-translate', 'ng2-translate': 'npm:ng2-translate',
'alfresco-js-api': 'npm:alfresco-js-api/dist', 'alfresco-js-api': 'npm:alfresco-js-api/dist',
'ng2-activiti-form': 'npm:ng2-activiti-form/dist', 'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist'
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
'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-tag': 'npm:ng2-alfresco-tag/dist',
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist'
}; };
var packages = { var packages = {
'app': { main: 'index.js', defaultExtension: 'js', format: 'register' }, 'app': { main: 'main.js', defaultExtension: 'js' },
'rxjs': { defaultExtension: 'js' }, 'rxjs': { defaultExtension: 'js' },
'ng2-translate': { defaultExtension: 'js' }, 'ng2-translate': { defaultExtension: 'js' },
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'}, 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'}
}; };
var config = { var config = {
@ -96,7 +74,7 @@ var config = {
System.config(config); System.config(config);
System.import('app') System.import('@angular/core/testing')
.then(initTestBed) .then(initTestBed)
.then(initTesting); .then(initTesting);

View File

@ -44,18 +44,7 @@ module.exports = function (config) {
{pattern: 'dist/**/*.css', included: true, served: true, watched: true}, {pattern: 'dist/**/*.css', included: true, served: true, watched: true},
// ng2-components // ng2-components
{ pattern: 'node_modules/ng2-activiti-form/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-processlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-documentlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-login/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-search/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-tag/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-upload/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-viewer/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-webscript/dist/**/*.js', included: false, served: true, watched: false },
// paths to support debugging with source maps in dev tools // paths to support debugging with source maps in dev tools
{pattern: 'src/**/*.ts', included: false, watched: false}, {pattern: 'src/**/*.ts', included: false, watched: false},
@ -107,10 +96,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -53,6 +53,7 @@
"@angular/platform-browser-dynamic": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0", "@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0", "@angular/upgrade": "2.0.0",
"@types/node": "^6.0.42",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"reflect-metadata": "^0.1.3", "reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12", "rxjs": "5.0.0-beta.12",
@ -91,5 +92,6 @@
"blocking": true, "blocking": true,
"logInfo": false, "logInfo": false,
"logError": true "logError": true
} },
"license": "Apache-2.0"
} }

View File

@ -35,10 +35,9 @@ import {
} from '../../data/index'; } from '../../data/index';
declare var componentHandler; declare var componentHandler;
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'alfresco-datatable', selector: 'alfresco-datatable',
styleUrls: ['./datatable.component.css'], styleUrls: ['./datatable.component.css'],
templateUrl: './datatable.component.html' templateUrl: './datatable.component.html'

View File

@ -16,13 +16,10 @@
*/ */
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { PaginationProvider } from './pagination-provider'; import { PaginationProvider } from './pagination-provider';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'alfresco-pagination', selector: 'alfresco-pagination',
templateUrl: './pagination.component.html', templateUrl: './pagination.component.html',
styleUrls: ['./pagination.component.css'] styleUrls: ['./pagination.component.css']

View File

@ -1,19 +1,25 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "system", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"sourceMap": true, "sourceMap": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"noLib": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"outDir": "dist", "outDir": "dist",
"types": ["core-js", "jasmine"] "types": ["core-js", "jasmine", "node"]
}, },
"exclude": [ "exclude": [
"demo", "demo",
"dist",
"node_modules", "node_modules",
"dist" "dist"
] ]

View File

@ -38,8 +38,10 @@ module.exports = function (config) {
'karma-test-shim.js', 'karma-test-shim.js',
// paths loaded via module imports // paths loaded via module imports
// paths loaded via module imports {pattern: 'dist/**/*.js', included: false, watched: true},
{pattern: 'dist/**/*.*', included: false, watched: true}, {pattern: 'dist/**/*.html', included: true, served: true, watched: true},
{pattern: 'dist/**/*.css', included: true, served: true, watched: true},
// ng2-components // ng2-components
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false },
@ -95,10 +97,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -62,6 +62,7 @@
"@angular/router": "3.0.0", "@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0", "@angular/upgrade": "2.0.0",
"@types/node": "^6.0.42", "@types/node": "^6.0.42",
"@types/node": "^6.0.42",
"alfresco-js-api": "^0.3.1", "alfresco-js-api": "^0.3.1",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"ng2-alfresco-core": "0.3.2", "ng2-alfresco-core": "0.3.2",

View File

@ -54,18 +54,7 @@ var map = {
'ng2-translate': 'npm:ng2-translate', 'ng2-translate': 'npm:ng2-translate',
'alfresco-js-api': 'npm:alfresco-js-api/dist', 'alfresco-js-api': 'npm:alfresco-js-api/dist',
'ng2-activiti-form': 'npm:ng2-activiti-form/dist', 'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist'
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
'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-tag': 'npm:ng2-alfresco-tag/dist',
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist'
}; };
var packages = { var packages = {
@ -74,18 +63,7 @@ var packages = {
'ng2-translate': { defaultExtension: 'js' }, 'ng2-translate': { defaultExtension: 'js' },
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'}, 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'}
}; };
var config = { var config = {

View File

@ -44,18 +44,7 @@ module.exports = function (config) {
{pattern: 'dist/**/*.css', included: true, served: true, watched: true}, {pattern: 'dist/**/*.css', included: true, served: true, watched: true},
// ng2-components // ng2-components
{ pattern: 'node_modules/ng2-activiti-form/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-processlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-documentlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-login/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-search/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-tag/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-upload/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-viewer/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-webscript/dist/**/*.js', included: false, served: true, watched: false },
// paths to support debugging with source maps in dev tools // paths to support debugging with source maps in dev tools
{pattern: 'src/**/*.ts', included: false, watched: false}, {pattern: 'src/**/*.ts', included: false, watched: false},
@ -107,10 +96,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -65,6 +65,7 @@
"@angular/platform-browser-dynamic": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0", "@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0", "@angular/upgrade": "2.0.0",
"@types/node": "^6.0.42",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"reflect-metadata": "^0.1.3", "reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12", "rxjs": "5.0.0-beta.12",

View File

@ -25,17 +25,16 @@ import {
import { FormSubmitEvent } from '../models/form-submit-event.model'; import { FormSubmitEvent } from '../models/form-submit-event.model';
declare let componentHandler: any; declare let componentHandler: any;
declare let __moduleName: string;
@Component({ @Component({
selector: 'alfresco-login', selector: 'alfresco-login',
moduleId: __moduleName, moduleId: module.id,
templateUrl: './alfresco-login.component.html', templateUrl: './alfresco-login.component.html',
styleUrls: ['./alfresco-login.component.css'] styleUrls: ['./alfresco-login.component.css']
}) })
export class AlfrescoLoginComponent implements OnInit { export class AlfrescoLoginComponent implements OnInit {
baseComponentPath = __moduleName.replace('/alfresco-login.component.js', ''); baseComponentPath = module.id.replace('/alfresco-login.component.js', '');
isPasswordShow: boolean = false; isPasswordShow: boolean = false;

View File

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "system", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
@ -16,7 +16,7 @@
"noImplicitUseStrict": false, "noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"outDir": "dist", "outDir": "dist",
"types": ["core-js", "jasmine"] "types": ["core-js", "jasmine", "node"]
}, },
"exclude": [ "exclude": [
"demo", "demo",

View File

@ -96,10 +96,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
// 'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -61,6 +61,7 @@
"@angular/platform-browser-dynamic": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0", "@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0", "@angular/upgrade": "2.0.0",
"@types/node": "^6.0.42",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"reflect-metadata": "^0.1.3", "reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12", "rxjs": "5.0.0-beta.12",

View File

@ -20,17 +20,16 @@ import { AlfrescoSearchService } from './../services/alfresco-search.service';
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service'; import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
import { AlfrescoTranslationService } from 'ng2-alfresco-core'; import { AlfrescoTranslationService } from 'ng2-alfresco-core';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'alfresco-search-autocomplete', selector: 'alfresco-search-autocomplete',
templateUrl: './alfresco-search-autocomplete.component.html', templateUrl: './alfresco-search-autocomplete.component.html',
styleUrls: ['./alfresco-search-autocomplete.component.css'] styleUrls: ['./alfresco-search-autocomplete.component.css']
}) })
export class AlfrescoSearchAutocompleteComponent implements OnInit, OnChanges { export class AlfrescoSearchAutocompleteComponent implements OnInit, OnChanges {
baseComponentPath = __moduleName.replace('/components/alfresco-search-autocomplete.component.js', ''); baseComponentPath = module.id.replace('/components/alfresco-search-autocomplete.component.js', '');
@Input() @Input()
searchTerm: string = ''; searchTerm: string = '';

View File

@ -20,10 +20,9 @@ import { Component, Input, Output, OnInit, ElementRef, EventEmitter, ViewChild }
import { AlfrescoTranslationService } from 'ng2-alfresco-core'; import { AlfrescoTranslationService } from 'ng2-alfresco-core';
import { SearchTermValidator } from './../forms/search-term-validator'; import { SearchTermValidator } from './../forms/search-term-validator';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'alfresco-search-control', selector: 'alfresco-search-control',
templateUrl: './alfresco-search-control.component.html', templateUrl: './alfresco-search-control.component.html',
styleUrls: ['./alfresco-search-control.component.css'] styleUrls: ['./alfresco-search-control.component.css']

View File

@ -21,17 +21,15 @@ import { AlfrescoSearchService } from './../services/alfresco-search.service';
import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service'; import { AlfrescoThumbnailService } from './../services/alfresco-thumbnail.service';
import { AlfrescoTranslationService } from 'ng2-alfresco-core'; import { AlfrescoTranslationService } from 'ng2-alfresco-core';
declare let __moduleName: string;
@Component({ @Component({
moduleId: __moduleName, moduleId: module.id,
selector: 'alfresco-search', selector: 'alfresco-search',
styleUrls: ['./alfresco-search.component.css'], styleUrls: ['./alfresco-search.component.css'],
templateUrl: './alfresco-search.component.html' templateUrl: './alfresco-search.component.html'
}) })
export class AlfrescoSearchComponent implements OnChanges, OnInit { export class AlfrescoSearchComponent implements OnChanges, OnInit {
baseComponentPath = __moduleName.replace('/components/alfresco-search.component.js', ''); baseComponentPath = module.id.replace('/components/alfresco-search.component.js', '');
@Input() @Input()
searchTerm: string = ''; searchTerm: string = '';

View File

@ -1,15 +1,22 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "system", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"sourceMap": true, "sourceMap": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"noLib": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"outDir": "dist", "outDir": "dist",
"types": ["core-js", "jasmine"] "types": ["core-js", "jasmine", "node"]
}, },
"exclude": [ "exclude": [
"demo", "demo",

View File

@ -63,8 +63,7 @@ var packages = {
'ng2-translate': { defaultExtension: 'js' }, 'ng2-translate': { defaultExtension: 'js' },
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}, 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'}
}; };
var config = { var config = {

View File

@ -39,7 +39,9 @@ module.exports = function (config) {
'karma-test-shim.js', 'karma-test-shim.js',
// paths loaded via module imports // paths loaded via module imports
{pattern: 'dist/**/*.*', included: false, watched: true}, {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 // ng2-components
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false },
@ -94,10 +96,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -1,26 +1,26 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"sourceMap": true, "sourceMap": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"noLib": false, "noLib": false,
"allowUnreachableCode": false, "allowUnreachableCode": false,
"allowUnusedLabels": false, "allowUnusedLabels": false,
"noImplicitAny": false, "noImplicitAny": false,
"noImplicitReturns": false, "noImplicitReturns": false,
"noImplicitUseStrict": false, "noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"outDir": "dist", "outDir": "dist",
"types": ["core-js", "jasmine", "node"] "types": ["core-js", "jasmine", "node"]
}, },
"exclude": [ "exclude": [
"demo", "demo",
"node_modules", "node_modules",
"dist" "dist"
] ]
} }

View File

@ -54,18 +54,7 @@ var map = {
'ng2-translate': 'npm:ng2-translate', 'ng2-translate': 'npm:ng2-translate',
'alfresco-js-api': 'npm:alfresco-js-api/dist', 'alfresco-js-api': 'npm:alfresco-js-api/dist',
'ng2-activiti-form': 'npm:ng2-activiti-form/dist', 'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist'
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
'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-tag': 'npm:ng2-alfresco-tag/dist',
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist'
}; };
var packages = { var packages = {
@ -74,18 +63,7 @@ var packages = {
'ng2-translate': { defaultExtension: 'js' }, 'ng2-translate': { defaultExtension: 'js' },
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'}, 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'}
}; };
var config = { var config = {

View File

@ -44,18 +44,7 @@ module.exports = function (config) {
{pattern: 'dist/**/*.css', included: true, served: true, watched: true}, {pattern: 'dist/**/*.css', included: true, served: true, watched: true},
// ng2-components // ng2-components
{ pattern: 'node_modules/ng2-activiti-form/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-processlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-documentlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-login/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-search/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-tag/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-upload/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-viewer/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-webscript/dist/**/*.js', included: false, served: true, watched: false },
// paths to support debugging with source maps in dev tools // paths to support debugging with source maps in dev tools
{pattern: 'src/**/*.ts', included: false, watched: false}, {pattern: 'src/**/*.ts', included: false, watched: false},
@ -107,10 +96,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
// 'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -62,6 +62,7 @@
"@angular/platform-browser-dynamic": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0", "@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0", "@angular/upgrade": "2.0.0",
"@types/node": "^6.0.42",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"reflect-metadata": "^0.1.3", "reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12", "rxjs": "5.0.0-beta.12",

View File

@ -20,8 +20,6 @@ import { FileModel } from '../models/file.model';
import { AlfrescoTranslationService } from 'ng2-alfresco-core'; import { AlfrescoTranslationService } from 'ng2-alfresco-core';
import { UploadService } from '../services/upload.service'; import { UploadService } from '../services/upload.service';
declare let __moduleName: string;
/** /**
* <file-uploading-dialog [filesUploadingList]="FileModel[]" ></file-uploading-dialog> * <file-uploading-dialog [filesUploadingList]="FileModel[]" ></file-uploading-dialog>
* *
@ -35,7 +33,7 @@ declare let __moduleName: string;
*/ */
@Component({ @Component({
selector: 'file-uploading-dialog', selector: 'file-uploading-dialog',
moduleId: __moduleName, moduleId: module.id,
templateUrl: './file-uploading-dialog.component.html', templateUrl: './file-uploading-dialog.component.html',
styleUrls: ['./file-uploading-dialog.component.css'], styleUrls: ['./file-uploading-dialog.component.css'],
host: {'[class.dialog-show]': 'toggleShowDialog'} host: {'[class.dialog-show]': 'toggleShowDialog'}

View File

@ -19,8 +19,6 @@
import { Component, ElementRef, Input } from '@angular/core'; import { Component, ElementRef, Input } from '@angular/core';
import { FileModel } from '../models/file.model'; import { FileModel } from '../models/file.model';
declare let __moduleName: string;
/** /**
* <alfresco-file-uploading-list [filesUploadingList]="FileModel[]" ></alfresco-file-uploading-list> * <alfresco-file-uploading-list [filesUploadingList]="FileModel[]" ></alfresco-file-uploading-list>
* *
@ -33,7 +31,7 @@ declare let __moduleName: string;
*/ */
@Component({ @Component({
selector: 'alfresco-file-uploading-list', selector: 'alfresco-file-uploading-list',
moduleId: __moduleName, moduleId: module.id,
templateUrl: './file-uploading-list.component.html', templateUrl: './file-uploading-list.component.html',
styleUrls: ['./file-uploading-list.component.css'] styleUrls: ['./file-uploading-list.component.css']
}) })

View File

@ -23,7 +23,6 @@ import { AlfrescoTranslationService } from 'ng2-alfresco-core';
import 'rxjs/Rx'; import 'rxjs/Rx';
declare let componentHandler: any; declare let componentHandler: any;
declare let __moduleName: string;
const ERROR_FOLDER_ALREADY_EXIST = 409; const ERROR_FOLDER_ALREADY_EXIST = 409;
@ -49,7 +48,7 @@ const ERROR_FOLDER_ALREADY_EXIST = 409;
*/ */
@Component({ @Component({
selector: 'alfresco-upload-button', selector: 'alfresco-upload-button',
moduleId: __moduleName, moduleId: module.id,
templateUrl: './upload-button.component.html', templateUrl: './upload-button.component.html',
styleUrls: ['./upload-button.component.css'] styleUrls: ['./upload-button.component.css']
}) })

View File

@ -20,7 +20,6 @@ import { UploadService } from '../services/upload.service';
import { AlfrescoTranslationService } from 'ng2-alfresco-core'; import { AlfrescoTranslationService } from 'ng2-alfresco-core';
import { FileModel } from '../models/file.model'; import { FileModel } from '../models/file.model';
declare let __moduleName: string;
declare let componentHandler: any; declare let componentHandler: any;
const ERROR_FOLDER_ALREADY_EXIST = 409; const ERROR_FOLDER_ALREADY_EXIST = 409;
@ -36,7 +35,7 @@ const ERROR_FOLDER_ALREADY_EXIST = 409;
*/ */
@Component({ @Component({
selector: 'alfresco-upload-drag-area', selector: 'alfresco-upload-drag-area',
moduleId: __moduleName, moduleId: module.id,
templateUrl: './upload-drag-area.component.html', templateUrl: './upload-drag-area.component.html',
styleUrls: ['./upload-drag-area.component.css'] styleUrls: ['./upload-drag-area.component.css']
}) })

View File

@ -1,7 +1,7 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "system", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
@ -16,7 +16,7 @@
"noImplicitUseStrict": false, "noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"outDir": "dist", "outDir": "dist",
"types": ["core-js", "jasmine"] "types": ["core-js", "jasmine", "node"]
}, },
"exclude": [ "exclude": [
"demo", "demo",

View File

@ -54,19 +54,7 @@ var map = {
'ng2-translate': 'npm:ng2-translate', 'ng2-translate': 'npm:ng2-translate',
'alfresco-js-api': 'npm:alfresco-js-api/dist', 'alfresco-js-api': 'npm:alfresco-js-api/dist',
'ng2-activiti-form': 'npm:ng2-activiti-form/dist', 'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist'
'ng2-activiti-processlist': 'npm:ng2-activiti-processlist/dist',
'ng2-activiti-tasklist': 'npm:ng2-activiti-tasklist/dist',
'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-tag': 'npm:ng2-alfresco-tag/dist',
'ng2-alfresco-upload': 'npm:ng2-alfresco-upload/dist',
'ng2-alfresco-viewer': 'npm:ng2-alfresco-viewer/dist',
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist',
'ng2-alfresco-userinfo': 'npm:ng2-alfresco-userinfo/dist'
}; };
var packages = { var packages = {
@ -75,19 +63,7 @@ var packages = {
'ng2-translate': { defaultExtension: 'js' }, 'ng2-translate': { defaultExtension: 'js' },
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
'ng2-activiti-form': { main: './index.js', defaultExtension: 'js'}, 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}
'ng2-activiti-processlist': { main: './index.js', defaultExtension: 'js'},
'ng2-activiti-tasklist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-documentlist': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-login': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-search': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-tag': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-upload': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-viewer': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-userinfo': { main: './index.js', defaultExtension: 'js'}
}; };
var config = { var config = {

View File

@ -44,19 +44,7 @@ module.exports = function (config) {
{pattern: 'dist/**/*.css', included: true, served: true, watched: true}, {pattern: 'dist/**/*.css', included: true, served: true, watched: true},
// ng2-components // ng2-components
{ pattern: 'node_modules/ng2-activiti-form/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-processlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-activiti-tasklist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-datatable/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-documentlist/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-login/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-search/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-tag/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-upload/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-viewer/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-webscript/dist/**/*.js', included: false, served: true, watched: false },
{ pattern: 'node_modules/ng2-alfresco-userinfo/dist/**/*.js', included: false, served: true, watched: false },
// paths to support debugging with source maps in dev tools // paths to support debugging with source maps in dev tools
{pattern: 'src/**/*.ts', included: false, watched: false}, {pattern: 'src/**/*.ts', included: false, watched: false},
@ -108,10 +96,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
// 'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -40,6 +40,7 @@
"@angular/platform-browser-dynamic": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0", "@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0", "@angular/upgrade": "2.0.0",
"@types/node": "^6.0.42",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"reflect-metadata": "^0.1.3", "reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12", "rxjs": "5.0.0-beta.12",

View File

@ -22,18 +22,16 @@ import { EcmUserService } from './../services/ecm-user.service';
import { BpmUserService } from './../services/bpm-user.service'; import { BpmUserService } from './../services/bpm-user.service';
import { AlfrescoAuthenticationService } from 'ng2-alfresco-core'; import { AlfrescoAuthenticationService } from 'ng2-alfresco-core';
declare let __moduleName: string;
@Component({ @Component({
selector: 'ng2-alfresco-userinfo', selector: 'ng2-alfresco-userinfo',
moduleId: __moduleName, moduleId: module.id,
styleUrls: ['./user-info.component.css'], styleUrls: ['./user-info.component.css'],
templateUrl: './user-info.component.html' templateUrl: './user-info.component.html'
}) })
export class UserInfoComponent implements OnInit { export class UserInfoComponent implements OnInit {
private baseComponentPath = __moduleName.replace('components/user-info.component.js', ''); private baseComponentPath = module.id.replace('components/user-info.component.js', '');
ecmUser: EcmUserModel; ecmUser: EcmUserModel;
bpmUser: BpmUserModel; bpmUser: BpmUserModel;

View File

@ -1,26 +1,26 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "system", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"sourceMap": true, "sourceMap": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"noLib": false, "noLib": false,
"allowUnreachableCode": false, "allowUnreachableCode": false,
"allowUnusedLabels": false, "allowUnusedLabels": false,
"noImplicitAny": false, "noImplicitAny": false,
"noImplicitReturns": false, "noImplicitReturns": false,
"noImplicitUseStrict": false, "noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"outDir": "dist", "outDir": "dist",
"types": ["core-js", "jasmine"] "types": ["core-js", "jasmine", "node"]
}, },
"exclude": [ "exclude": [
"demo", "demo",
"node_modules", "node_modules",
"dist" "dist"
] ]
} }

View File

@ -39,7 +39,9 @@ module.exports = function (config) {
'karma-test-shim.js', 'karma-test-shim.js',
// paths loaded via module imports // paths loaded via module imports
{pattern: 'dist/**/*.*', included: false, watched: true}, {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 // ng2-components
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false },
@ -100,10 +102,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -1,29 +0,0 @@
/*!
* @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 PDFJSmock {
getDocument(url: string) {
return new Promise((resolve) => {
resolve({numPages: '10'});
});
}
getPage(numberPage: number) {
}
}

View File

@ -55,8 +55,7 @@ var map = {
'alfresco-js-api': 'npm:alfresco-js-api/dist', 'alfresco-js-api': 'npm:alfresco-js-api/dist',
'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist', 'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist',
'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist', 'ng2-alfresco-datatable': 'npm:ng2-alfresco-datatable/dist'
'ng2-alfresco-webscript': 'npm:ng2-alfresco-webscript/dist'
}; };
var packages = { var packages = {
@ -66,8 +65,7 @@ var packages = {
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'}, 'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}, 'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'}, 'ng2-alfresco-datatable': { main: './index.js', defaultExtension: 'js'}
'ng2-alfresco-webscript': { main: './index.js', defaultExtension: 'js'}
}; };
var config = { var config = {

View File

@ -39,7 +39,9 @@ module.exports = function (config) {
'karma-test-shim.js', 'karma-test-shim.js',
// paths loaded via module imports // paths loaded via module imports
{pattern: 'dist/**/*.*', included: false, watched: true}, {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 // ng2-components
{ pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false }, { pattern: 'node_modules/ng2-alfresco-core/dist/**/*.*', included: false, served: true, watched: false },
@ -95,10 +97,11 @@ module.exports = function (config) {
// Source files that you wanna generate coverage for. // Source files that you wanna generate coverage for.
// Do not include tests or libraries (these files will be instrumented by Istanbul) // Do not include tests or libraries (these files will be instrumented by Istanbul)
preprocessors: { preprocessors: {
'dist/**/!(*spec).js': ['coverage'] 'dist/**/!(*spec|index|*mock|*model).js': 'coverage'
}, },
coverageReporter: { coverageReporter: {
includeAllSources: true,
dir: 'coverage/', dir: 'coverage/',
subdir: 'report', subdir: 'report',
reporters: [ reporters: [

View File

@ -40,6 +40,7 @@
"@angular/platform-browser-dynamic": "2.0.0", "@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0", "@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0", "@angular/upgrade": "2.0.0",
"@types/node": "^6.0.42",
"core-js": "^2.4.1", "core-js": "^2.4.1",
"reflect-metadata": "^0.1.3", "reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12", "rxjs": "5.0.0-beta.12",

View File

@ -1,26 +1,26 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"sourceMap": true, "sourceMap": true,
"removeComments": true, "removeComments": true,
"declaration": true, "declaration": true,
"noLib": false, "noLib": false,
"allowUnreachableCode": false, "allowUnreachableCode": false,
"allowUnusedLabels": false, "allowUnusedLabels": false,
"noImplicitAny": false, "noImplicitAny": false,
"noImplicitReturns": false, "noImplicitReturns": false,
"noImplicitUseStrict": false, "noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,
"outDir": "dist", "outDir": "dist",
"types": ["core-js", "jasmine"] "types": ["core-js", "jasmine", "node"]
}, },
"exclude": [ "exclude": [
"demo", "demo",
"node_modules", "node_modules",
"dist" "dist"
] ]
} }