mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
committed by
Eugenio Romano
parent
8959476941
commit
0b246b8211
@@ -0,0 +1,14 @@
|
||||
@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.
|
||||
-3
@@ -21,7 +21,6 @@
|
||||
"interface-name": false,
|
||||
"jsdoc-format": true,
|
||||
"label-position": true,
|
||||
"label-undefined": true,
|
||||
"max-line-length": [
|
||||
true,
|
||||
180
|
||||
@@ -47,7 +46,6 @@
|
||||
"no-construct": true,
|
||||
"no-constructor-vars": false,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-key": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": false,
|
||||
"no-eval": true,
|
||||
@@ -57,7 +55,6 @@
|
||||
"no-shadowed-variable": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-unreachable": true,
|
||||
"no-unused-expression": true,
|
||||
"no-unused-variable": true,
|
||||
"no-use-before-declare": true,
|
||||
@@ -0,0 +1,70 @@
|
||||
var path = require('path');
|
||||
var loaderUtils = require('loader-utils');
|
||||
|
||||
module.exports = function(content) {
|
||||
this.cacheable && this.cacheable();
|
||||
if(!this.emitFile) throw new Error('emitFile is required from module system');
|
||||
|
||||
var query = loaderUtils.getOptions(this) || {};
|
||||
var configKey = query.config || 'multiFileLoader';
|
||||
var options = this.options[configKey] || {};
|
||||
var config = {
|
||||
publicPath: false,
|
||||
useRelativePath: false,
|
||||
name: '[hash].[ext]'
|
||||
};
|
||||
|
||||
// options takes precedence over config
|
||||
Object.keys(options).forEach(function(attr) {
|
||||
config[attr] = options[attr];
|
||||
});
|
||||
|
||||
// query takes precedence over config and options
|
||||
Object.keys(query).forEach(function(attr) {
|
||||
config[attr] = query[attr];
|
||||
});
|
||||
|
||||
var context = config.context || this.options.context;
|
||||
var url = loaderUtils.interpolateName(this, config.name, {
|
||||
context: context,
|
||||
content: content,
|
||||
regExp: config.regExp
|
||||
});
|
||||
var path = loaderUtils.interpolateName(this, '[path]', {
|
||||
context: context,
|
||||
content: content,
|
||||
regExp: config.regExp
|
||||
});
|
||||
|
||||
var outputPath = '';
|
||||
|
||||
if (config.outputPath) {
|
||||
outputPath = (
|
||||
typeof config.outputPath === 'function'
|
||||
? config.outputPath(url, path)
|
||||
: config.outputPath + url
|
||||
);
|
||||
} else {
|
||||
outputPath = url;
|
||||
}
|
||||
|
||||
var publicPath = JSON.stringify(url);
|
||||
|
||||
if (config.publicPath) {
|
||||
publicPath = JSON.stringify(
|
||||
typeof config.publicPath === 'function'
|
||||
? config.publicPath(url, path)
|
||||
: config.publicPath + url
|
||||
);
|
||||
}
|
||||
|
||||
publicPath = '__webpack_public_path__ + ' + publicPath;
|
||||
|
||||
if (query.emitFile === undefined || query.emitFile) {
|
||||
this.emitFile(outputPath, content);
|
||||
}
|
||||
|
||||
return 'module.exports = ' + publicPath + ';';
|
||||
};
|
||||
|
||||
module.exports.raw = true;
|
||||
@@ -0,0 +1,10 @@
|
||||
var path = require('path');
|
||||
|
||||
var _root = path.resolve(__dirname, '..');
|
||||
|
||||
function root(args) {
|
||||
args = Array.prototype.slice.call(arguments, 0);
|
||||
return path.join.apply(path, [_root].concat(args));
|
||||
}
|
||||
|
||||
exports.root = root;
|
||||
@@ -0,0 +1,114 @@
|
||||
var webpackConfig = require('./webpack.test');
|
||||
|
||||
module.exports = function (config) {
|
||||
var _config = {
|
||||
basePath: '../' + config.component,
|
||||
|
||||
frameworks: ['jasmine-ajax', 'jasmine'],
|
||||
|
||||
files: [
|
||||
'../node_modules/hammerjs/hammer.js',
|
||||
|
||||
//diagrams
|
||||
'../node_modules/chart.js/dist/Chart.js',
|
||||
'../node_modules/alfresco-js-api/dist/alfresco-js-api.js',
|
||||
'../node_modules/raphael/raphael.js',
|
||||
'../node_modules/moment/min/moment.min.js',
|
||||
'../node_modules/md-date-time-picker/dist/js/mdDateTimePicker.js',
|
||||
|
||||
{pattern: '../node_modules/ng2-translate/**/*.js', included: false, watched: false},
|
||||
{pattern: '../node_modules/ng2-charts/**/*.js', included: false, served: true, watched: false},
|
||||
{pattern: '../node_modules/md-date-time-picker/**/*.js', included: false, served: true, watched: false},
|
||||
{pattern: '../node_modules/moment/**/*.js', included: false, served: true, watched: false},
|
||||
|
||||
// pdf-js
|
||||
'../node_modules/pdfjs-dist/build/pdf.js',
|
||||
'../node_modules/pdfjs-dist/build/pdf.worker.js',
|
||||
'../node_modules/pdfjs-dist/web/pdf_viewer.js',
|
||||
|
||||
{pattern: 'karma-test-shim.js', watched: false},
|
||||
{pattern: './src/assets/**/*.*', included: false, served: true, watched: false},
|
||||
{pattern: './src/i18n/**/*.*', included: false, served: true, watched: false},
|
||||
{pattern: './dist/**/*.js', included: false, served: true, watched: false},
|
||||
{pattern: './dist/**/*.js.map', included: false, served: true, watched: false},
|
||||
{pattern: './src/**/*.ts', included: false, served: true, watched: false}
|
||||
],
|
||||
|
||||
client: {
|
||||
component: config.component
|
||||
},
|
||||
|
||||
webpack: webpackConfig,
|
||||
|
||||
webpackMiddleware: {
|
||||
stats: 'errors-only'
|
||||
},
|
||||
|
||||
port: 9876,
|
||||
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
colors: true,
|
||||
|
||||
autoWatch: true,
|
||||
|
||||
captureTimeout: 180000,
|
||||
browserDisconnectTimeout: 180000,
|
||||
browserDisconnectTolerance: 3,
|
||||
browserNoActivityTimeout: 300000,
|
||||
|
||||
browsers: ['Chrome'],
|
||||
|
||||
customLaunchers: {
|
||||
Chrome_travis_ci: {
|
||||
base: 'Chrome',
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
},
|
||||
|
||||
// Karma plugins loaded
|
||||
plugins: [
|
||||
require('../node_modules/karma-jasmine'),
|
||||
require('../node_modules/karma-coverage'),
|
||||
require('../node_modules/karma-sourcemap-loader'),
|
||||
require('../node_modules/karma-jasmine-ajax'),
|
||||
require('../node_modules/karma-chrome-launcher'),
|
||||
require('../node_modules/karma-mocha-reporter'),
|
||||
require('../node_modules/karma-webpack'),
|
||||
require('../node_modules/karma-jasmine-html-reporter')
|
||||
],
|
||||
|
||||
webpackServer: {
|
||||
noInfo: true
|
||||
},
|
||||
|
||||
// Coverage reporter generates the coverage
|
||||
reporters: ['mocha', 'coverage', 'kjhtml'],
|
||||
|
||||
preprocessors: {
|
||||
'karma-test-shim.js': ['webpack', 'sourcemap'],
|
||||
'./src/**/!(*spec|index|*mock|*model|*event).js': 'coverage'
|
||||
},
|
||||
|
||||
coverageReporter: {
|
||||
includeAllSources: true,
|
||||
dir: '../' + config.component + '/coverage/',
|
||||
subdir: 'report',
|
||||
reporters: [
|
||||
{type: 'text'},
|
||||
{type: 'text-summary'},
|
||||
{type: 'json', file: 'coverage-final.json'},
|
||||
{type: 'html'},
|
||||
{type: 'lcov'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.TRAVIS) {
|
||||
config.browsers = ['Chrome_travis_ci'];
|
||||
}
|
||||
|
||||
config.set(_config);
|
||||
};
|
||||
@@ -0,0 +1,49 @@
|
||||
const webpack = require("webpack");
|
||||
const webpackMerge = require('webpack-merge');
|
||||
const commonConfig = require('./webpack.common.js');
|
||||
|
||||
module.exports = webpackMerge(commonConfig, {
|
||||
|
||||
output: {
|
||||
filename: '[name]/bundles/[name].js',
|
||||
library: '[name]',
|
||||
libraryTarget: 'umd',
|
||||
chunkFilename: '[id].chunk.js'
|
||||
},
|
||||
|
||||
entry: {
|
||||
"ng2-alfresco-core": "./ng2-alfresco-core/index.ts",
|
||||
"ng2-alfresco-datatable": "./ng2-alfresco-datatable/index.ts",
|
||||
"ng2-activiti-diagrams": "./ng2-activiti-diagrams/index.ts",
|
||||
"ng2-activiti-analytics": "./ng2-activiti-analytics/index.ts",
|
||||
"ng2-activiti-form": "./ng2-activiti-form/index.ts",
|
||||
"ng2-activiti-tasklist": "./ng2-activiti-tasklist/index.ts",
|
||||
"ng2-activiti-processlist": "./ng2-activiti-processlist/index.ts",
|
||||
"ng2-alfresco-documentlist": "./ng2-alfresco-documentlist/index.ts",
|
||||
"ng2-alfresco-login": "./ng2-alfresco-login/index.ts",
|
||||
"ng2-alfresco-search": "./ng2-alfresco-search/index.ts",
|
||||
"ng2-alfresco-social": "./ng2-alfresco-social/index.ts",
|
||||
"ng2-alfresco-tag": "./ng2-alfresco-tag/index.ts",
|
||||
"ng2-alfresco-upload": "./ng2-alfresco-upload/index.ts",
|
||||
"ng2-alfresco-viewer": "./ng2-alfresco-viewer/index.ts",
|
||||
"ng2-alfresco-webscript": "./ng2-alfresco-webscript/index.ts",
|
||||
"ng2-alfresco-userinfo": "./ng2-alfresco-userinfo/index.ts"
|
||||
},
|
||||
|
||||
plugins: [
|
||||
|
||||
//new webpack.optimize.UglifyJsPlugin({
|
||||
// mangle: {
|
||||
// keep_fnames: true
|
||||
// },
|
||||
// compress: {
|
||||
// warnings: false
|
||||
// },
|
||||
// output: {
|
||||
// comments: false
|
||||
// },
|
||||
// sourceMap: true
|
||||
//})
|
||||
|
||||
]
|
||||
});
|
||||
@@ -0,0 +1,122 @@
|
||||
const webpack = require('webpack');
|
||||
const helpers = require('./helpers');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
|
||||
resolveLoader: {
|
||||
alias: {
|
||||
"file-multi-loader": path.resolve(__dirname, "./custom-loaders/file-loader-multi")
|
||||
}
|
||||
},
|
||||
|
||||
// require those dependencies but don't bundle them
|
||||
externals: [
|
||||
/^\@angular\//,
|
||||
/^rxjs\//,
|
||||
'moment',
|
||||
'ng2-charts',
|
||||
'alfresco-js-api',
|
||||
'ng2-alfresco-core',
|
||||
'ng2-alfresco-datatable',
|
||||
'ng2-activiti-analytics',
|
||||
'ng2-activiti-diagrams',
|
||||
'ng2-activiti-form',
|
||||
"ng2-activiti-tasklist",
|
||||
'ng2-alfresco-documentlist'
|
||||
],
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
enforce: 'pre',
|
||||
test: /\.js$/,
|
||||
loader: 'source-map-loader',
|
||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||
},
|
||||
{
|
||||
enforce: 'pre',
|
||||
test: /\.ts$/,
|
||||
loader: 'tslint-loader',
|
||||
options: {
|
||||
emitErrors: true,
|
||||
configFile: path.resolve(__dirname, './assets/tslint.json')
|
||||
},
|
||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||
},
|
||||
{
|
||||
enforce: 'pre',
|
||||
test: /\.ts$/,
|
||||
use: 'source-map-loader',
|
||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||
},
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: ['ts-loader', 'angular2-template-loader'],
|
||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||
},
|
||||
{
|
||||
test: /\.html$/,
|
||||
loader: 'html-loader',
|
||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
loader: ['to-string-loader', 'css-loader'],
|
||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
|
||||
loader: 'file-multi-loader',
|
||||
query: {
|
||||
name: '[name].[hash].[ext]',
|
||||
outputPath: (url, resourcePath)=> {
|
||||
return resourcePath.replace('src', 'bundles') + url;
|
||||
},
|
||||
publicPath: (url, resourcePath)=> {
|
||||
var component = resourcePath.substring(0, resourcePath.indexOf('src'));
|
||||
var path = resourcePath.replace(component, '').replace('src', 'bundles');
|
||||
return './' + path + url;
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
symlinks: false,
|
||||
modules: [
|
||||
'../ng2-components', 'node_modules'
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
|
||||
new webpack.BannerPlugin(fs.readFileSync(path.resolve(__dirname, './assets/license_header.txt'), 'utf8')),
|
||||
|
||||
// Workaround for angular/angular#11580
|
||||
new webpack.ContextReplacementPlugin(
|
||||
// The (\\|\/) piece accounts for path separators in *nix and Windows
|
||||
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
|
||||
helpers.root('src'), // location of your src
|
||||
{} // a map of your routes
|
||||
),
|
||||
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
htmlLoader: {
|
||||
minimize: false // workaround for ng2
|
||||
}
|
||||
})
|
||||
|
||||
],
|
||||
|
||||
devtool: 'cheap-module-source-map',
|
||||
|
||||
node: {
|
||||
fs: 'empty',
|
||||
module: false
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,85 @@
|
||||
const webpack = require('webpack');
|
||||
const helpers = require('./helpers');
|
||||
|
||||
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
|
||||
|
||||
module.exports = {
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
loaders: ['ts-loader', 'angular2-template-loader']
|
||||
},
|
||||
{
|
||||
test: /\.html$/,
|
||||
loader: 'html-loader',
|
||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
loader: ['to-string-loader', 'css-loader'],
|
||||
exclude: [/node_modules/, /bundles/, /dist/, /demo/]
|
||||
},
|
||||
{
|
||||
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico|pdf)$/,
|
||||
loader: 'file-loader',
|
||||
query: {
|
||||
name: '[path][name].[ext]',
|
||||
outputPath: (url)=> {
|
||||
console.log
|
||||
return url.replace('src', 'dist');
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
enforce: 'post',
|
||||
test: /\.ts$/,
|
||||
loader: 'istanbul-instrumenter-loader',
|
||||
exclude: [
|
||||
/node_modules/,
|
||||
/test/,
|
||||
/spec\.ts$/
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
symlinks: false,
|
||||
modules: [
|
||||
'../ng2-components', 'node_modules'
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.NoEmitOnErrorsPlugin(),
|
||||
|
||||
// Workaround for angular/angular#11580
|
||||
new webpack.ContextReplacementPlugin(
|
||||
// The (\\|\/) piece accounts for path separators in *nix and Windows
|
||||
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
|
||||
helpers.root('src'), // location of your src
|
||||
{} // a map of your routes
|
||||
),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
'ENV': JSON.stringify(ENV)
|
||||
}
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
htmlLoader: {
|
||||
minimize: false // workaround for ng2
|
||||
}
|
||||
})
|
||||
|
||||
],
|
||||
|
||||
devtool: 'inline-source-map',
|
||||
|
||||
node: {
|
||||
fs: 'empty',
|
||||
module: false
|
||||
}
|
||||
};
|
||||
@@ -345,7 +345,6 @@ npm start
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| npm run build | Build component |
|
||||
| npm run build:w | Build component and keep watching the changes |
|
||||
| npm run test | Run unit tests in the console |
|
||||
| npm run test-browser | Run unit tests in the browser
|
||||
| npm run coverage | Run unit tests and display code coverage report |
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings dist",
|
||||
"clean": "npm run clean-build && rimraf dist node_modules typings dist",
|
||||
"clean-build" : "rimraf 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts'",
|
||||
"postinstall": "npm run build",
|
||||
"start": "npm run build && concurrently \"npm run tsc:w\" \"npm run server\" ",
|
||||
@@ -32,22 +32,22 @@
|
||||
"activiti-diagrams"
|
||||
],
|
||||
"dependencies": {
|
||||
"@angular/common": "2.2.2",
|
||||
"@angular/compiler": "2.2.2",
|
||||
"@angular/compiler-cli": "2.2.2",
|
||||
"@angular/core": "2.2.2",
|
||||
"@angular/forms": "2.2.2",
|
||||
"@angular/http": "2.2.2",
|
||||
"@angular/platform-browser": "2.2.2",
|
||||
"@angular/platform-browser-dynamic": "2.2.2",
|
||||
"@angular/common": "2.4.7",
|
||||
"@angular/compiler": "2.4.7",
|
||||
"@angular/compiler-cli": "2.4.7",
|
||||
"@angular/core": "2.4.7",
|
||||
"@angular/forms": "2.4.7",
|
||||
"@angular/http": "2.4.7",
|
||||
"@angular/platform-browser": "2.4.7",
|
||||
"@angular/platform-browser-dynamic": "2.4.7",
|
||||
"@angular/material": "2.0.0-beta.1",
|
||||
"@angular/router": "3.2.2",
|
||||
"@angular/upgrade": "2.2.2",
|
||||
"@angular/router": "3.4.7",
|
||||
"@angular/upgrade": "2.4.7",
|
||||
"core-js": "2.4.1",
|
||||
"reflect-metadata": "0.1.10",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"rxjs": "5.1.0",
|
||||
"systemjs": "0.19.27",
|
||||
"zone.js": "0.6.26",
|
||||
"zone.js": "0.7.6",
|
||||
"intl": "1.2.4",
|
||||
"dialog-polyfill": "0.4.7",
|
||||
"element.scrollintoviewifneeded-polyfill": "1.0.1",
|
||||
@@ -58,7 +58,7 @@
|
||||
"ng2-charts": "1.1.0",
|
||||
"moment": "2.15.1",
|
||||
"raphael": "^2.2.6",
|
||||
"ng2-translate": "2.5.0",
|
||||
"ng2-translate": "5.0.0",
|
||||
"alfresco-js-api": "~1.4.0",
|
||||
"ng2-alfresco-core": "1.4.0",
|
||||
"ng2-activiti-diagrams": "1.4.0",
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
'ng2-translate': { defaultExtension: 'js' },
|
||||
'ng2-charts': { main: 'ng2-charts.js', defaultExtension: 'js'},
|
||||
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
|
||||
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||
'ng2-activiti-diagrams': { main: './index.js', defaultExtension: 'js'},
|
||||
'ng2-activiti-analytics': { main: './index.js', defaultExtension: 'js'}
|
||||
'ng2-alfresco-core': { main: './bundles/ng2-alfresco-core.js', defaultExtension: 'js'},
|
||||
'ng2-analytics-diagrams': { main: './bundles/ng2-analytics-diagrams.js', defaultExtension: 'js'},
|
||||
'ng2-analytics-analytics': { main: './bundles/ng2-analytics-analytics.js', defaultExtension: 'js'}
|
||||
}
|
||||
});
|
||||
})(this);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
],
|
||||
"no-any": false,
|
||||
"no-arg": true,
|
||||
"no-bitwise": true,
|
||||
"no-bitwise": false,
|
||||
"no-conditional-assignment": true,
|
||||
"no-consecutive-blank-lines": true,
|
||||
"no-console": [
|
||||
@@ -52,11 +52,11 @@
|
||||
"no-debugger": true,
|
||||
"no-duplicate-key": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": true,
|
||||
"no-empty": false,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": true,
|
||||
"no-require-imports": true,
|
||||
"no-require-imports": false,
|
||||
"no-shadowed-variable": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
|
||||
@@ -1,311 +0,0 @@
|
||||
import * as gulp from 'gulp';
|
||||
import * as util from 'gulp-util';
|
||||
import * as runSequence from 'run-sequence';
|
||||
import * as gulpLoadPlugins from 'gulp-load-plugins';
|
||||
import * as merge from 'merge-stream';
|
||||
import * as rimraf from 'rimraf';
|
||||
import { join } from 'path';
|
||||
import * as Builder from 'systemjs-builder';
|
||||
var autoprefixer = require('autoprefixer');
|
||||
import * as cssnano from 'cssnano';
|
||||
import * as filter from 'gulp-filter';
|
||||
import * as sourcemaps from 'gulp-sourcemaps';
|
||||
|
||||
var APP_SRC = `.`;
|
||||
var CSS_PROD_BUNDLE = 'main.css';
|
||||
var JS_PROD_SHIMS_BUNDLE = 'shims.js';
|
||||
var NG_FACTORY_FILE = 'main-prod';
|
||||
|
||||
const BUILD_TYPES = {
|
||||
DEVELOPMENT: 'dev',
|
||||
PRODUCTION: 'prod'
|
||||
};
|
||||
|
||||
function normalizeDependencies(deps) {
|
||||
deps
|
||||
.filter((d) => !/\*/.test(d.src)) // Skip globs
|
||||
.forEach((d) => d.src = require.resolve(d.src));
|
||||
return deps;
|
||||
}
|
||||
|
||||
function filterDependency(type: string, d): boolean {
|
||||
const t = d.buildType || d.env;
|
||||
d.buildType = t;
|
||||
if (!t) {
|
||||
d.buildType = Object.keys(BUILD_TYPES).map(k => BUILD_TYPES[k]);
|
||||
}
|
||||
if (!(d.buildType instanceof Array)) {
|
||||
(<any>d).env = [d.buildType];
|
||||
}
|
||||
return d.buildType.indexOf(type) >= 0;
|
||||
}
|
||||
|
||||
function getInjectableDependency() {
|
||||
var APP_ASSETS = [
|
||||
{src: `src/css/main.css`, inject: true, vendor: false},
|
||||
];
|
||||
|
||||
var NPM_DEPENDENCIES = [
|
||||
{src: 'zone.js/dist/zone.js', inject: 'libs'},
|
||||
{src: 'core-js/client/shim.min.js', inject: 'shims'},
|
||||
{src: 'systemjs/dist/system.src.js', inject: 'shims', buildType:'dev'}
|
||||
];
|
||||
|
||||
return normalizeDependencies(NPM_DEPENDENCIES.filter(filterDependency.bind(null, 'dev')))
|
||||
.concat(APP_ASSETS.filter(filterDependency.bind(null, 'dev')));
|
||||
}
|
||||
|
||||
const plugins = <any>gulpLoadPlugins();
|
||||
|
||||
let tsProjects: any = {};
|
||||
|
||||
function makeTsProject(options: Object = {}) {
|
||||
let optionsHash = JSON.stringify(options);
|
||||
if (!tsProjects[optionsHash]) {
|
||||
let config = Object.assign({
|
||||
typescript: require('typescript')
|
||||
}, options);
|
||||
tsProjects[optionsHash] =
|
||||
plugins.typescript.createProject('tsconfig.json', config);
|
||||
}
|
||||
return tsProjects[optionsHash];
|
||||
}
|
||||
|
||||
gulp.task('build.html_css', () => {
|
||||
const gulpConcatCssConfig = {
|
||||
targetFile: CSS_PROD_BUNDLE,
|
||||
options: {
|
||||
rebaseUrls: false
|
||||
}
|
||||
};
|
||||
|
||||
const processors = [
|
||||
autoprefixer({
|
||||
browsers: [
|
||||
'ie >= 10',
|
||||
'ie_mob >= 10',
|
||||
'ff >= 30',
|
||||
'chrome >= 34',
|
||||
'safari >= 7',
|
||||
'opera >= 23',
|
||||
'ios >= 7',
|
||||
'android >= 4.4',
|
||||
'bb >= 10'
|
||||
]
|
||||
})
|
||||
];
|
||||
|
||||
const reportPostCssError = (e: any) => util.log(util.colors.red(e.message));
|
||||
|
||||
processors.push(
|
||||
cssnano({
|
||||
discardComments: {removeAll: true},
|
||||
discardUnused: false, // unsafe, see http://goo.gl/RtrzwF
|
||||
zindex: false, // unsafe, see http://goo.gl/vZ4gbQ
|
||||
reduceIdents: false // unsafe, see http://goo.gl/tNOPv0
|
||||
})
|
||||
);
|
||||
|
||||
/**
|
||||
* Processes the CSS files within `src/client` excluding those in `src/client/assets` using `postcss` with the
|
||||
* configured processors
|
||||
* Execute the appropriate component-stylesheet processing method based on user stylesheet preference.
|
||||
*/
|
||||
function processComponentStylesheets() {
|
||||
return gulp.src(join('src/**', '*.css'))
|
||||
.pipe(plugins.cached('process-component-css'))
|
||||
.pipe(plugins.postcss(processors))
|
||||
.on('error', reportPostCssError);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a stream of external css files for subsequent processing.
|
||||
*/
|
||||
function getExternalCssStream() {
|
||||
return gulp.src(getExternalCss())
|
||||
.pipe(plugins.cached('process-external-css'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of filenames referring to all external css stylesheets.
|
||||
*/
|
||||
function getExternalCss() {
|
||||
return getInjectableDependency().filter(dep => /\.css$/.test(dep.src)).map(dep => dep.src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the external CSS files using `postcss` with the configured processors.
|
||||
*/
|
||||
function processExternalCss() {
|
||||
return getExternalCssStream()
|
||||
.pipe(plugins.postcss(processors))
|
||||
.pipe(plugins.concatCss(gulpConcatCssConfig.targetFile, gulpConcatCssConfig.options))
|
||||
.on('error', reportPostCssError);
|
||||
}
|
||||
|
||||
return merge(processComponentStylesheets(), processExternalCss());
|
||||
|
||||
});
|
||||
|
||||
gulp.task('build.bundles.app', (done) => {
|
||||
var BUNDLER_OPTIONS = {
|
||||
format: 'umd',
|
||||
minify: false,
|
||||
mangle: false,
|
||||
sourceMaps: true
|
||||
};
|
||||
var CONFIG_TYPESCRIPT = {
|
||||
baseURL: '.',
|
||||
transpiler: 'typescript',
|
||||
typescriptOptions: {
|
||||
module: 'cjs'
|
||||
},
|
||||
map: {
|
||||
typescript: 'node_modules/typescript/lib/typescript.js',
|
||||
'@angular': 'node_modules/@angular',
|
||||
rxjs: 'node_modules/rxjs',
|
||||
'ng2-translate': 'node_modules/ng2-translate',
|
||||
'alfresco-js-api': 'node_modules/alfresco-js-api/dist/alfresco-js-api',
|
||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core/',
|
||||
'ng2-activiti-diagrams': 'node_modules/ng2-activiti-diagrams/',
|
||||
'ng2-activiti-analytics': 'node_modules/ng2-activiti-analytics/',
|
||||
'ng2-alfresco-datatable': 'node_modules/ng2-alfresco-datatable/',
|
||||
'ng2-alfresco-documentlist': 'node_modules/ng2-alfresco-documentlist/',
|
||||
'ng2-activiti-form': 'node_modules/ng2-activiti-form/',
|
||||
'ng2-alfresco-login': 'node_modules/ng2-alfresco-login/',
|
||||
'ng2-activiti-processlist': 'node_modules/ng2-activiti-processlist/',
|
||||
'ng2-alfresco-search': 'node_modules/ng2-alfresco-search/',
|
||||
'ng2-activiti-tasklist': 'node_modules/ng2-activiti-tasklist/',
|
||||
'ng2-alfresco-tag': 'node_modules/ng2-alfresco-tag/',
|
||||
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload/',
|
||||
'ng2-alfresco-userinfo': 'node_modules/ng2-alfresco-userinfo/',
|
||||
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer/',
|
||||
'ng2-alfresco-webscript': 'node_modules/ng2-alfresco-webscript/',
|
||||
'ng2-charts': 'node_modules/ng2-charts/bundles/ng2-charts.umd',
|
||||
'moment': 'node_modules/moment/min/moment.min'
|
||||
|
||||
},
|
||||
paths: {
|
||||
'*': '*.js'
|
||||
},
|
||||
meta: {
|
||||
'node_modules/@angular/*': {build: false},
|
||||
'node_modules/rxjs/*': {build: false},
|
||||
'node_modules/ng2-translate/*': {build: false},
|
||||
'node_modules/ng2-charts/*': {build: false},
|
||||
'node_modules/ng2-alfresco-core/*': {build: false},
|
||||
'node_modules/ng2-activiti-diagrams/*': {build: false},
|
||||
'node_modules/ng2-activiti-analytics/*': {build: false},
|
||||
'node_modules/ng2-alfresco-datatable/*': {build: false},
|
||||
'node_modules/ng2-alfresco-documentlist/*': {build: false},
|
||||
'node_modules/ng2-activiti-form/*': {build: false},
|
||||
'node_modules/ng2-alfresco-login/*': {build: false},
|
||||
'node_modules/ng2-activiti-processlist/*': {build: false},
|
||||
'node_modules/ng2-alfresco-search/*': {build: false},
|
||||
'node_modules/ng2-activiti-tasklist/*': {build: false},
|
||||
'node_modules/ng2-alfresco-tag/*': {build: false},
|
||||
'node_modules/ng2-alfresco-upload/*': {build: false},
|
||||
'node_modules/ng2-alfresco-userinfo/*': {build: false},
|
||||
'node_modules/ng2-alfresco-viewer/*': {build: false},
|
||||
'node_modules/ng2-alfresco-webscript/*': {build: false}
|
||||
}
|
||||
};
|
||||
|
||||
var pkg = require('./package.json');
|
||||
var namePkg = pkg.name;
|
||||
|
||||
var builder = new Builder(CONFIG_TYPESCRIPT);
|
||||
builder
|
||||
.buildStatic(APP_SRC + "/index", 'bundles/' + namePkg + '.js', BUNDLER_OPTIONS)
|
||||
.then(function () {
|
||||
return done();
|
||||
})
|
||||
.catch(function (err) {
|
||||
return done(err);
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('build.assets.prod', () => {
|
||||
return gulp.src([
|
||||
join('src/**', '*.ts'),
|
||||
'index.ts',
|
||||
join('src/**', '*.css'),
|
||||
join('src/**', '*.html'),
|
||||
'!'+join('*/**', '*.d.ts'),
|
||||
'!'+join('*/**', '*.spec.ts'),
|
||||
'!gulpfile.ts'])
|
||||
|
||||
});
|
||||
|
||||
gulp.task('build.bundles', () => {
|
||||
merge(bundleShims());
|
||||
|
||||
/**
|
||||
* Returns the shim files to be injected.
|
||||
*/
|
||||
function getShims() {
|
||||
let libs = getInjectableDependency()
|
||||
.filter(d => /\.js$/.test(d.src));
|
||||
|
||||
return libs.filter(l => l.inject === 'shims')
|
||||
.concat(libs.filter(l => l.inject === 'libs'))
|
||||
.concat(libs.filter(l => l.inject === true))
|
||||
.map(l => l.src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bundles the shim files.
|
||||
*/
|
||||
function bundleShims() {
|
||||
return gulp.src(getShims())
|
||||
.pipe(plugins.concat(JS_PROD_SHIMS_BUNDLE))
|
||||
// Strip the first (global) 'use strict' added by reflect-metadata, but don't strip any others to avoid unintended scope leaks.
|
||||
.pipe(plugins.replace(/('|")use strict\1;var Reflect;/, 'var Reflect;'))
|
||||
.pipe(gulp.dest('bundles'));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
gulp.task('build.js.prod', () => {
|
||||
const INLINE_OPTIONS = {
|
||||
base: APP_SRC,
|
||||
target: 'es5',
|
||||
useRelativePaths: true,
|
||||
removeLineBreaks: true
|
||||
};
|
||||
|
||||
let tsProject = makeTsProject();
|
||||
let src = [
|
||||
join('src/**/*.ts'),
|
||||
join('!src/**/*.d.ts'),
|
||||
join('!src/**/*.spec.ts'),
|
||||
`!src/**/${NG_FACTORY_FILE}.ts`
|
||||
];
|
||||
|
||||
let result = gulp.src(src)
|
||||
.pipe(plugins.plumber())
|
||||
.pipe(plugins.inlineNg2Template(INLINE_OPTIONS))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(tsProject())
|
||||
.once('error', function (e: any) {
|
||||
this.once('finish', () => process.exit(1));
|
||||
});
|
||||
|
||||
return result.js
|
||||
.pipe(plugins.template())
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('src'))
|
||||
.on('error', (e: any) => {
|
||||
console.log(e);
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('build.prod', (done: any) =>
|
||||
runSequence(
|
||||
'build.assets.prod',
|
||||
'build.html_css',
|
||||
'build.js.prod',
|
||||
'build.bundles',
|
||||
'build.bundles.app',
|
||||
done));
|
||||
@@ -1,122 +1,27 @@
|
||||
// Tun on full stack traces in errors to help debugging
|
||||
Error.stackTraceLimit = Infinity;
|
||||
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 100000;
|
||||
require('core-js/es6');
|
||||
require('core-js/es7/reflect');
|
||||
|
||||
window.componentHandler = {
|
||||
upgradeAllRegistered: function () {
|
||||
},
|
||||
upgradeElement: function () {
|
||||
}
|
||||
};
|
||||
require('zone.js/dist/zone');
|
||||
require('zone.js/dist/long-stack-trace-zone');
|
||||
require('zone.js/dist/proxy');
|
||||
require('zone.js/dist/sync-test');
|
||||
require('zone.js/dist/jasmine-patch');
|
||||
require('zone.js/dist/async-test');
|
||||
require('zone.js/dist/fake-async-test');
|
||||
|
||||
__karma__.loaded = function() {};
|
||||
var path = '../' + __karma__.config.component + '/src';
|
||||
console.log('path appContext '+ path);
|
||||
|
||||
var builtPath = '/base/src/';
|
||||
var appContext;
|
||||
appContext = require.context('../ng2-activiti-analytics/src', true, /\.spec\.ts/);
|
||||
appContext.keys().forEach(appContext);
|
||||
|
||||
function isJsFile(path) {
|
||||
return path.slice(-3) == '.js';
|
||||
}
|
||||
|
||||
function isSpecFile(path) {
|
||||
return /\.spec\.(.*\.)?js$/.test(path);
|
||||
}
|
||||
var testing = require('@angular/core/testing');
|
||||
var browser = require('@angular/platform-browser-dynamic/testing');
|
||||
|
||||
function isBuiltFile(path) {
|
||||
return isJsFile(path) && (path.substr(0, builtPath.length) == builtPath);
|
||||
}
|
||||
testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
|
||||
|
||||
var allSpecFiles = Object.keys(window.__karma__.files)
|
||||
.filter(isSpecFile)
|
||||
.filter(isBuiltFile);
|
||||
|
||||
var paths = {
|
||||
// paths serve as alias
|
||||
'npm:': 'base/node_modules/'
|
||||
};
|
||||
|
||||
var map = {
|
||||
'app': 'base/src',
|
||||
// angular bundles
|
||||
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||
'@angular/material': 'npm:@angular/material/bundles/material.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/bundles/ng2-charts.umd.js',
|
||||
'md-date-time-picker' : 'npm:md-date-time-picker',
|
||||
'moment' : 'npm:moment/min/moment.min.js',
|
||||
'hammerjs': 'npm:hammerjs',
|
||||
|
||||
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||
'ng2-activiti-diagrams': 'npm:ng2-activiti-diagrams',
|
||||
'ng2-alfresco-core': 'npm:ng2-alfresco-core'
|
||||
};
|
||||
|
||||
var packages = {
|
||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' },
|
||||
'ng2-translate': { defaultExtension: 'js' },
|
||||
'md-date-time-picker': { defaultExtension: 'js' },
|
||||
'moment': { defaultExtension: 'js' },
|
||||
'hammerjs': {main: './hammerjs.js', defaultExtension: 'js'},
|
||||
|
||||
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
|
||||
'ng2-activiti-diagrams': { main: './index.js', defaultExtension: 'js'},
|
||||
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}
|
||||
};
|
||||
|
||||
var config = {
|
||||
paths: paths,
|
||||
map: map,
|
||||
packages: packages
|
||||
};
|
||||
|
||||
System.config(config);
|
||||
|
||||
System.import('@angular/core/testing')
|
||||
.then(initTestBed)
|
||||
.then(initTesting);
|
||||
|
||||
function initTestBed(){
|
||||
return Promise.all([
|
||||
System.import('@angular/core/testing'),
|
||||
System.import('@angular/platform-browser-dynamic/testing')
|
||||
])
|
||||
.then(function (providers) {
|
||||
var coreTesting = providers[0];
|
||||
var browserTesting = providers[1];
|
||||
|
||||
coreTesting.TestBed.initTestEnvironment(
|
||||
browserTesting.BrowserDynamicTestingModule,
|
||||
browserTesting.platformBrowserDynamicTesting());
|
||||
})
|
||||
}
|
||||
|
||||
// Import all spec files and start karma
|
||||
function initTesting () {
|
||||
return Promise.all(
|
||||
allSpecFiles.map(function (moduleName) {
|
||||
return System.import(moduleName);
|
||||
})
|
||||
)
|
||||
.then(__karma__.start, __karma__.error);
|
||||
}
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (config) {
|
||||
var configuration = {
|
||||
basePath: '.',
|
||||
|
||||
frameworks: ['jasmine-ajax', 'jasmine'],
|
||||
|
||||
files: [
|
||||
// System.js for module loading
|
||||
'node_modules/systemjs/dist/system.src.js',
|
||||
|
||||
// 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',
|
||||
'node_modules/hammerjs/hammer.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',
|
||||
'node_modules/moment/min/moment.min.js',
|
||||
'node_modules/md-date-time-picker/dist/js/mdDateTimePicker.js',
|
||||
'node_modules/chart.js/dist/Chart.bundle.min.js',
|
||||
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, watched: false},
|
||||
|
||||
'karma-test-shim.js',
|
||||
|
||||
// paths loaded via module imports
|
||||
{pattern: 'src/**/*.js', included: false, watched: true},
|
||||
{pattern: 'src/**/*.html', included: true, served: true, watched: true},
|
||||
{pattern: 'src/**/*.css', included: true, served: true, watched: true},
|
||||
|
||||
// ng2-components
|
||||
{ pattern: 'node_modules/ng2-alfresco-core/src/**/*.*', included: false, served: true, watched: false },
|
||||
{ pattern: 'node_modules/ng2-alfresco-core/index.js', included: false, served: true, watched: false },
|
||||
|
||||
{ pattern: 'node_modules/ng2-activiti-diagrams/src/**/*.*', included: false, served: true, watched: false },
|
||||
{ pattern: 'node_modules/ng2-activiti-diagrams/index.js', included: false, served: true, watched: false },
|
||||
|
||||
{ pattern: 'node_modules/ng2-charts/**/*.js', included: false, served: true, watched: false },
|
||||
{ pattern: 'node_modules/md-date-time-picker/**/*.js', included: false, served: true, watched: false },
|
||||
{ pattern: 'node_modules/moment/**/*.js', included: false, served: true, watched: false },
|
||||
|
||||
// paths to support debugging with source maps in dev tools
|
||||
{pattern: 'src/**/*.ts', included: false, watched: false},
|
||||
{pattern: 'src/**/*.js.map', included: false, watched: false},
|
||||
{pattern: 'src/**/*.json', included: false, watched: false}
|
||||
],
|
||||
|
||||
exclude: [
|
||||
'node_modules/**/*spec.js'
|
||||
],
|
||||
|
||||
// proxied base paths
|
||||
proxies: {
|
||||
// required for component assets fetched by Angular's compiler
|
||||
'/src/': '/base/src/'
|
||||
},
|
||||
|
||||
port: 9876,
|
||||
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
colors: true,
|
||||
|
||||
autoWatch: true,
|
||||
|
||||
captureTimeout: 180000,
|
||||
browserDisconnectTimeout: 180000,
|
||||
browserDisconnectTolerance: 3,
|
||||
browserNoActivityTimeout: 300000,
|
||||
browsers: ['Chrome'],
|
||||
|
||||
customLaunchers: {
|
||||
Chrome_travis_ci: {
|
||||
base: 'Chrome',
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
},
|
||||
|
||||
// Karma plugins loaded
|
||||
plugins: [
|
||||
'karma-jasmine',
|
||||
'karma-coverage',
|
||||
'karma-jasmine-ajax',
|
||||
'karma-chrome-launcher',
|
||||
'karma-mocha-reporter',
|
||||
'karma-jasmine-html-reporter'
|
||||
],
|
||||
|
||||
// Coverage reporter generates the coverage
|
||||
reporters: ['mocha', 'coverage', 'kjhtml'],
|
||||
|
||||
// Source files that you wanna generate coverage for.
|
||||
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
||||
preprocessors: {
|
||||
'src/**/!(*spec|index|*mock|*model|*event).js': 'coverage'
|
||||
},
|
||||
|
||||
coverageReporter: {
|
||||
includeAllSources: true,
|
||||
dir: 'coverage/',
|
||||
subdir: 'report',
|
||||
reporters: [
|
||||
{type: 'text'},
|
||||
{type: 'json', file: 'coverage-final.json'},
|
||||
{type: 'html'},
|
||||
{type: 'lcov'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.TRAVIS) {
|
||||
configuration.browsers = ['Chrome_travis_ci'];
|
||||
}
|
||||
|
||||
config.set(configuration)
|
||||
};
|
||||
@@ -4,27 +4,17 @@
|
||||
"version": "1.4.0",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"scripts": {
|
||||
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings",
|
||||
"clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles",
|
||||
"build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd",
|
||||
"build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd",
|
||||
"tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",
|
||||
"tsc": "tsc",
|
||||
"tsc:w": "tsc -w",
|
||||
"pretest": "npm run build",
|
||||
"test": "karma start karma.conf.js --reporters mocha,coverage --single-run",
|
||||
"test-browser": "npm run build && concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"",
|
||||
"posttest": "remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html && remap-istanbul -i coverage/report/coverage-final.json -o coverage/report/coverage-final.json",
|
||||
"coverage": "npm run test && wsrv -o -p 9875 ./coverage/report",
|
||||
"publish:prod": "npm run test && npm publish",
|
||||
"travis": "npm link ng2-alfresco-core ng2-activiti-diagrams",
|
||||
"gulp": "gulp",
|
||||
"build.umd": "gulp build.prod --color --env-config prod --build-type prod",
|
||||
"reinstall": "npm cache clean && npm install"
|
||||
"clean": "rimraf dist node_modules typings bundles coverage",
|
||||
"build": "license-check && ../node_modules/webpack/bin/webpack.js --config webpack.build.js --progress --profile --bail",
|
||||
"license-check": "license-check",
|
||||
"tslint": "../node_modules/tslint/bin/tslint -c ../config/assets/tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts'",
|
||||
"tsc": "../node_modules/typescript/bin/tsc",
|
||||
"test": "../node_modules/karma/bin/karma start ../config/karma.conf.js --reporters mocha,coverage --single-run --component ng2-activiti-analytics",
|
||||
"test-browser": "../node_modules/karma/bin/karma start ../config/karma.conf.js --reporters kjhtml --component ng2-activiti-analytics",
|
||||
"coverage": "npm run test && ../node_modules/wsrv/bin/wsrv -o -p 9875 ./coverage/report",
|
||||
"publish:prod": "npm run test && npm publish"
|
||||
},
|
||||
"main": "./index.js",
|
||||
"module": "./index.js",
|
||||
"typings": "./index.d.ts",
|
||||
"main": "bundles/ng2-activiti-analytics.js",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Mario Romano",
|
||||
@@ -43,15 +33,15 @@
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/common": "2.2.2",
|
||||
"@angular/compiler": "2.2.2",
|
||||
"@angular/core": "2.2.2",
|
||||
"@angular/forms": "2.2.2",
|
||||
"@angular/http": "2.2.2",
|
||||
"@angular/common": "2.4.7",
|
||||
"@angular/compiler": "2.4.7",
|
||||
"@angular/core": "2.4.7",
|
||||
"@angular/forms": "2.4.7",
|
||||
"@angular/http": "2.4.7",
|
||||
"@angular/material": "2.0.0-beta.1",
|
||||
"@angular/platform-browser": "2.2.2",
|
||||
"@angular/platform-browser-dynamic": "2.2.2",
|
||||
"@angular/router": "3.2.2",
|
||||
"@angular/platform-browser": "2.4.7",
|
||||
"@angular/platform-browser-dynamic": "2.4.7",
|
||||
"@angular/router": "3.4.7",
|
||||
"alfresco-js-api": "~1.4.0",
|
||||
"chart.js": "2.5.0",
|
||||
"core-js": "2.4.1",
|
||||
@@ -61,54 +51,27 @@
|
||||
"ng2-activiti-diagrams": "1.4.0",
|
||||
"ng2-alfresco-core": "1.4.0",
|
||||
"ng2-charts": "1.5.0",
|
||||
"ng2-translate": "2.5.0",
|
||||
"ng2-translate": "5.0.0",
|
||||
"raphael": "2.2.7",
|
||||
"reflect-metadata": "0.1.10",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"rxjs": "5.1.0",
|
||||
"systemjs": "0.19.27",
|
||||
"zone.js": "0.6.26"
|
||||
"zone.js": "0.7.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/hammerjs": "^2.0.34",
|
||||
"@types/jasmine": "2.5.35",
|
||||
"@types/node": "6.0.45",
|
||||
"autoprefixer": "^6.5.4",
|
||||
"concurrently": "^2.2.0",
|
||||
"cpx": "1.3.1",
|
||||
"cssnano": "^3.8.1",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-autoprefixer": "^3.1.1",
|
||||
"gulp-cached": "^1.1.1",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-concat-css": "^2.3.0",
|
||||
"gulp-filter": "^4.0.0",
|
||||
"gulp-inline-ng2-template": "^4.0.0",
|
||||
"gulp-load-plugins": "^1.4.0",
|
||||
"gulp-plumber": "^1.1.0",
|
||||
"gulp-postcss": "^6.2.0",
|
||||
"gulp-replace": "^0.5.4",
|
||||
"gulp-sourcemaps": "^1.9.1",
|
||||
"gulp-template": "^4.0.0",
|
||||
"gulp-typescript": "^3.1.3",
|
||||
"gulp-uglify": "^2.0.0",
|
||||
"gulp-util": "^3.0.7",
|
||||
"jasmine-core": "2.4.1",
|
||||
"karma": "0.13.22",
|
||||
"karma-chrome-launcher": "1.0.1",
|
||||
"karma-coverage": "1.0.0",
|
||||
"karma-jasmine": "1.0.2",
|
||||
"karma-jasmine-ajax": "^0.1.13",
|
||||
"karma-jasmine-html-reporter": "0.2.0",
|
||||
"karma-mocha-reporter": "2.0.3",
|
||||
"license-check": "1.1.5",
|
||||
"cpx": "^1.3.1",
|
||||
"license-check": "^1.0.4",
|
||||
"merge-stream": "^1.0.1",
|
||||
"remap-istanbul": "0.6.3",
|
||||
"rimraf": "2.5.2",
|
||||
"run-sequence": "^1.2.2",
|
||||
"systemjs-builder": "^0.15.34",
|
||||
"traceur": "0.0.91",
|
||||
"traceur": "^0.0.91",
|
||||
"ts-node": "^1.7.0",
|
||||
"tslint": "3.15.1",
|
||||
"tslint": "^3.8.1",
|
||||
"typescript": "^2.0.3",
|
||||
"wsrv": "^0.1.5"
|
||||
},
|
||||
@@ -118,7 +81,7 @@
|
||||
],
|
||||
"license-check-config": {
|
||||
"src": [
|
||||
"./src/**/*.js"
|
||||
"./src/**/*.ts"
|
||||
],
|
||||
"path": "assets/license_header.txt",
|
||||
"blocking": true,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export var chartProcessDefOverview = {
|
||||
export let chartProcessDefOverview = {
|
||||
'elements': [{
|
||||
'id': 'id1585876275153',
|
||||
'type': 'table',
|
||||
@@ -62,7 +62,7 @@ export var chartProcessDefOverview = {
|
||||
}]
|
||||
};
|
||||
|
||||
export var chartTaskOverview = {
|
||||
export let chartTaskOverview = {
|
||||
'elements': [{
|
||||
'id': 'id792351752194',
|
||||
'type': 'barChart',
|
||||
|
||||
+14
-14
@@ -17,14 +17,14 @@
|
||||
|
||||
import { ReportParameterDetailsModel } from '../models/report.model';
|
||||
|
||||
export var reportDefParamStatus = {
|
||||
export let reportDefParamStatus = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Task overview status',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"status","name":null,"nameKey":null,"type":"status","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamNumber = {
|
||||
export let reportDefParamNumber = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Process instances overview',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
@@ -32,7 +32,7 @@ export var reportDefParamNumber = {
|
||||
' :[{"id":"slowProcessInstanceInteger","name":null,"nameKey":null,"type":"integer","value":10,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamDuration = {
|
||||
export let reportDefParamDuration = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Task service level agreement',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
@@ -40,7 +40,7 @@ export var reportDefParamDuration = {
|
||||
' :[{"id":"duration","name":null,"nameKey":null,"type":"duration","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamCheck = {
|
||||
export let reportDefParamCheck = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Task service level agreement',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
@@ -48,28 +48,28 @@ export var reportDefParamCheck = {
|
||||
' :[{"id":"typeFiltering","name":null,"nameKey":null,"type":"boolean","value":true,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamDateRange = {
|
||||
export let reportDefParamDateRange = {
|
||||
'id': 2005,
|
||||
'name': 'Fake Process instances overview',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"dateRange","name":null,"nameKey":null,"type":"dateRange","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamRangeInterval = {
|
||||
export let reportDefParamRangeInterval = {
|
||||
'id': 2006,
|
||||
'name': 'Fake Task overview RangeInterval',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"dateRangeInterval","name":null,"nameKey":null,"type":"dateInterval","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamProcessDef = {
|
||||
export let reportDefParamProcessDef = {
|
||||
'id': 2006,
|
||||
'name': 'Fake Task overview ProcessDefinition',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"processDefinitionId","name":null,"nameKey":null,"type":"processDefinition","value":null,"dependsOn":null}]}'
|
||||
};
|
||||
|
||||
export var reportDefParamProcessDefOptionsNoApp = [
|
||||
export let reportDefParamProcessDefOptionsNoApp = [
|
||||
{
|
||||
'id': 'FakeProcessTest 1:1:1',
|
||||
'name': 'Fake Process Test 1 Name ',
|
||||
@@ -92,7 +92,7 @@ export var reportDefParamProcessDefOptionsNoApp = [
|
||||
}
|
||||
];
|
||||
|
||||
export var reportDefParamProcessDefOptions = {
|
||||
export let reportDefParamProcessDefOptions = {
|
||||
'size': 4, 'total': 4, 'start': 0, 'data': [
|
||||
{
|
||||
'id': 'FakeProcessTest 1:1:1',
|
||||
@@ -117,7 +117,7 @@ export var reportDefParamProcessDefOptions = {
|
||||
]
|
||||
};
|
||||
|
||||
export var reportDefParamProcessDefOptionsApp = {
|
||||
export let reportDefParamProcessDefOptionsApp = {
|
||||
'size': 2, 'total': 2, 'start': 2, 'data': [
|
||||
{
|
||||
'id': 'FakeProcessTest 1:1:1',
|
||||
@@ -132,23 +132,23 @@ export var reportDefParamProcessDefOptionsApp = {
|
||||
]
|
||||
};
|
||||
|
||||
export var reportDefParamTask = {
|
||||
export let reportDefParamTask = {
|
||||
'id': 2006,
|
||||
'name': 'Fake Task service level agreement',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" :[{"id":"taskName","name":null,"nameKey":null,"type":"task","value":null,"dependsOn":"processDefinitionId"}]}'
|
||||
};
|
||||
|
||||
export var reportNoParameterDefinitions = {
|
||||
export let reportNoParameterDefinitions = {
|
||||
'id': 2006,
|
||||
'name': 'Fake Task service level agreement',
|
||||
'created': '2016-10-05T15:39:40.222+0000',
|
||||
'definition': '{ "parameters" : []}'
|
||||
};
|
||||
|
||||
export var reportDefParamTaskOptions = ['Fake task name 1', 'Fake task name 2'];
|
||||
export let reportDefParamTaskOptions = ['Fake task name 1', 'Fake task name 2'];
|
||||
|
||||
export var fieldProcessDef = new ReportParameterDetailsModel(
|
||||
export let fieldProcessDef = new ReportParameterDetailsModel(
|
||||
{
|
||||
id: 'processDefinitionId',
|
||||
type: 'processDefinition',
|
||||
|
||||
@@ -22,7 +22,6 @@ import { ReportQuery } from '../models/report.model';
|
||||
import { Chart } from '../models/chart.model';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'activiti-analytics-generator',
|
||||
templateUrl: './analytics-generator.component.html',
|
||||
styleUrls: ['./analytics-generator.component.css']
|
||||
@@ -94,7 +93,6 @@ export class AnalyticsGeneratorComponent implements OnChanges {
|
||||
},
|
||||
(err: any) => {
|
||||
this.onError.emit(err);
|
||||
this.logService.error(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ declare let jasmine: any;
|
||||
describe('AnalyticsReportHeatMapComponent', () => {
|
||||
|
||||
let componentHandler: any;
|
||||
let component: any;
|
||||
let component: AnalyticsReportHeatMapComponent;
|
||||
let fixture: ComponentFixture<AnalyticsReportHeatMapComponent>;
|
||||
let debug: DebugElement;
|
||||
let element: HTMLElement;
|
||||
|
||||
-1
@@ -21,7 +21,6 @@ import { AnalyticsService } from '../services/analytics.service';
|
||||
import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'analytics-report-heat-map',
|
||||
templateUrl: './analytics-report-heat-map.component.html'
|
||||
})
|
||||
|
||||
-2
@@ -22,7 +22,6 @@ import { AnalyticsService } from '../services/analytics.service';
|
||||
import { ReportParametersModel } from '../models/report.model';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'analytics-report-list',
|
||||
templateUrl: './analytics-report-list.component.html',
|
||||
styleUrls: ['./analytics-report-list.component.css']
|
||||
@@ -96,7 +95,6 @@ export class AnalyticsReportListComponent implements OnInit {
|
||||
},
|
||||
(err: any) => {
|
||||
this.onError.emit(err);
|
||||
this.logService.error(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
+35
-7
@@ -229,6 +229,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
it('Should render a date range components when the definition parameter type is \'dateRange\' ', (done) => {
|
||||
component.onSuccessReportParams.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
|
||||
let today = moment().format('YYYY-MM-DD');
|
||||
|
||||
const startDate: any = element.querySelector('#startDateInput');
|
||||
@@ -480,28 +481,35 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
validForm = true;
|
||||
});
|
||||
|
||||
it('Should be able to change the report title', async(() => {
|
||||
it('Should be able to change the report title', (done) => {
|
||||
|
||||
let title: HTMLElement = element.querySelector('h4');
|
||||
title.click();
|
||||
fixture.detectChanges();
|
||||
|
||||
let reportName: HTMLInputElement = <HTMLInputElement> element.querySelector('#reportName');
|
||||
expect(reportName).not.toBeNull();
|
||||
|
||||
reportName.focus();
|
||||
component.reportParameters.name = 'FAKE_TEST_NAME';
|
||||
reportName.value = 'FAKE_TEST_NAME';
|
||||
reportName.blur();
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
responseText: analyticParamsMock.reportDefParamStatus
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
let titleChanged: HTMLElement = element.querySelector('h4');
|
||||
expect(titleChanged.textContent.trim()).toEqual('FAKE_TEST_NAME');
|
||||
done();
|
||||
});
|
||||
}));
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
responseText: analyticParamsMock.reportDefParamStatus
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
it('Should show a dialog to allowing report save', async(() => {
|
||||
component.saveReportSuccess.subscribe(() => {
|
||||
@@ -515,7 +523,9 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
expect(saveButton).toBeDefined();
|
||||
expect(saveButton).not.toBeNull();
|
||||
saveButton.click();
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
let reportDialogTitle: HTMLElement = <HTMLElement>element.querySelector('#report-dialog-title');
|
||||
@@ -523,11 +533,14 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
let inputSaveName: HTMLInputElement = <HTMLInputElement> element.querySelector('#repName');
|
||||
let performActionButton: HTMLButtonElement = <HTMLButtonElement>element.querySelector('#action-dialog-button');
|
||||
let todayDate = component.getTodayDate();
|
||||
|
||||
expect(reportDialogTitle).not.toBeNull();
|
||||
expect(saveTitleSubMessage).not.toBeNull();
|
||||
expect(inputSaveName.value.trim()).toEqual(analyticParamsMock.reportDefParamStatus.name + ' ( ' + todayDate + ' )');
|
||||
expect(performActionButton).not.toBeNull();
|
||||
|
||||
performActionButton.click();
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json'
|
||||
@@ -539,20 +552,26 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
component.submit(values);
|
||||
fixture.detectChanges();
|
||||
let exportButton: HTMLButtonElement = <HTMLButtonElement>element.querySelector('#export-button');
|
||||
|
||||
expect(exportButton).toBeDefined();
|
||||
expect(exportButton).not.toBeNull();
|
||||
exportButton.click();
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
let reportDialogTitle: HTMLElement = <HTMLElement>element.querySelector('#report-dialog-title');
|
||||
let inputSaveName: HTMLInputElement = <HTMLInputElement> element.querySelector('#repName');
|
||||
let performActionButton: HTMLButtonElement = <HTMLButtonElement>element.querySelector('#action-dialog-button');
|
||||
let todayDate = component.getTodayDate();
|
||||
|
||||
expect(reportDialogTitle).not.toBeNull();
|
||||
expect(inputSaveName.value.trim()).toEqual(analyticParamsMock.reportDefParamStatus.name + ' ( ' + todayDate + ' )');
|
||||
expect(performActionButton).not.toBeNull();
|
||||
|
||||
performActionButton.click();
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json'
|
||||
@@ -568,7 +587,9 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
component.deleteReportSuccess.subscribe((reportId) => {
|
||||
expect(reportId).not.toBeNull();
|
||||
});
|
||||
|
||||
deleteButton.click();
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json'
|
||||
@@ -580,7 +601,9 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
expect(exportButton).toBeDefined();
|
||||
expect(exportButton).not.toBeNull();
|
||||
validForm = false;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
exportButton = <HTMLButtonElement>element.querySelector('#export-button');
|
||||
@@ -593,7 +616,9 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
expect(saveButton).toBeDefined();
|
||||
expect(saveButton).not.toBeNull();
|
||||
validForm = false;
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
saveButton = <HTMLButtonElement>element.querySelector('#save-button');
|
||||
@@ -609,10 +634,13 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
expect(saveButton).toBeNull();
|
||||
expect(exportButton).toBeNull();
|
||||
validForm = true;
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
|
||||
saveButton = <HTMLButtonElement>element.querySelector('#save-button');
|
||||
exportButton = <HTMLButtonElement>element.querySelector('#export-button');
|
||||
|
||||
expect(saveButton).not.toBeNull();
|
||||
expect(saveButton).toBeDefined();
|
||||
expect(exportButton).not.toBeNull();
|
||||
|
||||
+1
-5
@@ -43,7 +43,6 @@ declare var componentHandler;
|
||||
declare let dialogPolyfill: any;
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'analytics-report-parameters',
|
||||
templateUrl: './analytics-report-parameters.component.html',
|
||||
styleUrls: ['./analytics-report-parameters.component.css']
|
||||
@@ -210,7 +209,6 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
}
|
||||
},
|
||||
(err: any) => {
|
||||
this.logService.error(err);
|
||||
this.onError.emit(err);
|
||||
}
|
||||
);
|
||||
@@ -224,7 +222,6 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
this.onSuccessParamOpt.emit(opts);
|
||||
},
|
||||
(err: any) => {
|
||||
this.logService.error(err);
|
||||
this.onError.emit(err);
|
||||
}
|
||||
);
|
||||
@@ -321,7 +318,6 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
this.onEdit.emit(this.reportParameters.name);
|
||||
},
|
||||
(err: any) => {
|
||||
this.logService.error(err);
|
||||
this.onError.emit(err);
|
||||
}
|
||||
);
|
||||
@@ -369,7 +365,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
doExport(paramQuery: ReportQuery) {
|
||||
this.analyticsService.exportReportToCsv(this.reportId, paramQuery).subscribe(
|
||||
(data: any) => {
|
||||
let blob: Blob = new Blob([data], { type: 'text/csv' });
|
||||
let blob: Blob = new Blob([data], {type: 'text/csv'});
|
||||
this.contentService.downloadBlob(blob, paramQuery.reportName + '.csv');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import { ReportQuery } from '../models/report.model';
|
||||
import { AnalyticsGeneratorComponent } from './analytics-generator.component';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'activiti-analytics',
|
||||
templateUrl: './analytics.component.html',
|
||||
styleUrls: ['./analytics.component.css']
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ import { WidgetComponent } from './../widget.component';
|
||||
import { FormGroup } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'checkbox-widget',
|
||||
templateUrl: './checkbox.widget.html'
|
||||
})
|
||||
|
||||
-1
@@ -30,7 +30,6 @@ function dateCheck(c: AbstractControl) {
|
||||
declare let mdDateTimePicker: any;
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'date-range-widget',
|
||||
templateUrl: './date-range.widget.html',
|
||||
styleUrls: ['./date-range.widget.css']
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ import { FormGroup, Validators, FormControl } from '@angular/forms';
|
||||
import { WidgetComponent } from './../widget.component';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'dropdown-widget',
|
||||
templateUrl: './dropdown.widget.html',
|
||||
styleUrls: ['./dropdown.widget.css']
|
||||
|
||||
-1
@@ -21,7 +21,6 @@ import { ReportParameterDetailsModel, ParameterValueModel } from './../../../mod
|
||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'duration-widget',
|
||||
templateUrl: './duration.widget.html',
|
||||
styleUrls: ['./duration.widget.css']
|
||||
|
||||
@@ -20,7 +20,6 @@ import { WidgetComponent } from './../widget.component';
|
||||
import { FormGroup, Validators } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'number-widget',
|
||||
templateUrl: './number.widget.html',
|
||||
styleUrls: ['./number.widget.css']
|
||||
|
||||
@@ -94,9 +94,9 @@ export class AnalyticsService {
|
||||
getProcessStatusValues(): Observable<any> {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
|
||||
paramOptions.push(new ParameterValueModel({ id: 'All', name: 'All' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'Active', name: 'Active' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'Complete', name: 'Complete' }));
|
||||
paramOptions.push(new ParameterValueModel({id: 'All', name: 'All'}));
|
||||
paramOptions.push(new ParameterValueModel({id: 'Active', name: 'Active'}));
|
||||
paramOptions.push(new ParameterValueModel({id: 'Complete', name: 'Complete'}));
|
||||
|
||||
return Observable.create(observer => {
|
||||
observer.next(paramOptions);
|
||||
@@ -107,11 +107,11 @@ export class AnalyticsService {
|
||||
getDateIntervalValues(): Observable<any> {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
|
||||
paramOptions.push(new ParameterValueModel({ id: 'byHour', name: 'By hour' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'byDay', name: 'By day' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'byWeek', name: 'By week' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'byMonth', name: 'By month' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'byYear', name: 'By year' }));
|
||||
paramOptions.push(new ParameterValueModel({id: 'byHour', name: 'By hour'}));
|
||||
paramOptions.push(new ParameterValueModel({id: 'byDay', name: 'By day'}));
|
||||
paramOptions.push(new ParameterValueModel({id: 'byWeek', name: 'By week'}));
|
||||
paramOptions.push(new ParameterValueModel({id: 'byMonth', name: 'By month'}));
|
||||
paramOptions.push(new ParameterValueModel({id: 'byYear', name: 'By year'}));
|
||||
|
||||
return Observable.create(observer => {
|
||||
observer.next(paramOptions);
|
||||
@@ -122,9 +122,9 @@ export class AnalyticsService {
|
||||
getMetricValues(): Observable<any> {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
|
||||
paramOptions.push(new ParameterValueModel({ id: 'totalCount', name: 'Number of times a step is executed' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'totalTime', name: 'Total time spent in a process step' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'avgTime', name: 'Average time spent in a process step' }));
|
||||
paramOptions.push(new ParameterValueModel({id: 'totalCount', name: 'Number of times a step is executed'}));
|
||||
paramOptions.push(new ParameterValueModel({id: 'totalTime', name: 'Total time spent in a process step'}));
|
||||
paramOptions.push(new ParameterValueModel({id: 'avgTime', name: 'Average time spent in a process step'}));
|
||||
|
||||
return Observable.create(observer => {
|
||||
observer.next(paramOptions);
|
||||
@@ -144,7 +144,7 @@ export class AnalyticsService {
|
||||
}
|
||||
|
||||
getProcessDefinitionsValues(appId: string): Observable<any> {
|
||||
let options = { 'appDefinitionId': appId };
|
||||
let options = {'appDefinitionId': appId};
|
||||
return Observable.fromPromise(this.apiService.getInstance().activiti.processDefinitionsApi.getProcessDefinitions(options))
|
||||
.map((res: any) => {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
@@ -160,7 +160,7 @@ export class AnalyticsService {
|
||||
.map((res: any) => {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
res.forEach((opt) => {
|
||||
paramOptions.push(new ParameterValueModel({ id: opt, name: opt }));
|
||||
paramOptions.push(new ParameterValueModel({id: opt, name: opt}));
|
||||
});
|
||||
return paramOptions;
|
||||
}).catch(err => this.handleError(err));
|
||||
@@ -227,7 +227,7 @@ export class AnalyticsService {
|
||||
|
||||
private handleError(error: Response) {
|
||||
this.logService.error(error);
|
||||
return Observable.throw(error.json().error || 'Server error');
|
||||
return Observable.throw(error || 'Server error');
|
||||
}
|
||||
|
||||
toJson(res: any) {
|
||||
|
||||
@@ -16,22 +16,20 @@
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"removeComments": true,
|
||||
"declaration": true,
|
||||
"outDir": "./dist",
|
||||
"lib": [
|
||||
"es2015",
|
||||
"dom"
|
||||
],
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
"../node_modules/@types"
|
||||
],
|
||||
"suppressImplicitAnyIndexErrors": true
|
||||
},
|
||||
"exclude": [
|
||||
"demo",
|
||||
"node_modules",
|
||||
"dist",
|
||||
"tools",
|
||||
"gulpfile.ts",
|
||||
"gulpfile.d.ts"
|
||||
"dist"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"strictMetadataEmit": false,
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
{
|
||||
"rules": {
|
||||
"align": [
|
||||
true,
|
||||
"parameters",
|
||||
"statements"
|
||||
],
|
||||
"ban": false,
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"curly": true,
|
||||
"eofline": true,
|
||||
"forin": true,
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"interface-name": false,
|
||||
"jsdoc-format": true,
|
||||
"label-position": true,
|
||||
"label-undefined": true,
|
||||
"max-line-length": [
|
||||
true,
|
||||
180
|
||||
],
|
||||
"member-ordering": [
|
||||
true,
|
||||
"static-before-instance",
|
||||
"variables-before-functions"
|
||||
],
|
||||
"no-any": false,
|
||||
"no-arg": true,
|
||||
"no-bitwise": false,
|
||||
"no-conditional-assignment": true,
|
||||
"no-consecutive-blank-lines": true,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-construct": true,
|
||||
"no-constructor-vars": false,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-key": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": false,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": true,
|
||||
"no-require-imports": false,
|
||||
"no-shadowed-variable": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-unreachable": true,
|
||||
"no-unused-expression": true,
|
||||
"no-unused-variable": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-keyword": true,
|
||||
"no-var-requires": true,
|
||||
"object-literal-sort-keys": false,
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-whitespace"
|
||||
],
|
||||
"quotemark": [
|
||||
true,
|
||||
"single",
|
||||
"avoid-escape"
|
||||
],
|
||||
"radix": true,
|
||||
"semicolon": true,
|
||||
"switch-default": true,
|
||||
"trailing-comma": [
|
||||
true,
|
||||
{
|
||||
"multiline": "never",
|
||||
"singleline": "never"
|
||||
}
|
||||
],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"typedef": false,
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"use-strict": false,
|
||||
"variable-name": [
|
||||
true,
|
||||
"check-format",
|
||||
"allow-leading-underscore",
|
||||
"ban-keywords"
|
||||
],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type",
|
||||
"check-module",
|
||||
"check-decl"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
const webpack = require("webpack");
|
||||
const webpackMerge = require('webpack-merge');
|
||||
const commonConfig = require('../config/webpack.common.js');
|
||||
|
||||
module.exports = webpackMerge(commonConfig, {
|
||||
|
||||
output: {
|
||||
filename: './bundles/[name].js',
|
||||
library: '[name]',
|
||||
libraryTarget: 'umd',
|
||||
chunkFilename: '[id].chunk.js'
|
||||
},
|
||||
|
||||
entry: {
|
||||
"ng2-activiti-analytics": "./index.ts"
|
||||
}
|
||||
});
|
||||
@@ -219,7 +219,6 @@ npm start
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| npm run build | Build component |
|
||||
| npm run build:w | Build component and keep watching the changes |
|
||||
| npm run test | Run unit tests in the console |
|
||||
| npm run test-browser | Run unit tests in the browser
|
||||
| npm run coverage | Run unit tests and display code coverage report |
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings dist",
|
||||
"clean": "npm run clean-build && rimraf dist node_modules typings dist",
|
||||
"clean-build" : "rimraf 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts'",
|
||||
"postinstall": "npm run build",
|
||||
"start": "npm run build && concurrently \"npm run tsc:w\" \"npm run server\" ",
|
||||
@@ -32,17 +32,17 @@
|
||||
"activiti-diagrams"
|
||||
],
|
||||
"dependencies": {
|
||||
"@angular/common": "2.2.2",
|
||||
"@angular/compiler": "2.2.2",
|
||||
"@angular/compiler-cli": "2.2.2",
|
||||
"@angular/core": "2.2.2",
|
||||
"@angular/forms": "2.2.2",
|
||||
"@angular/http": "2.2.2",
|
||||
"@angular/platform-browser": "2.2.2",
|
||||
"@angular/platform-browser-dynamic": "2.2.2",
|
||||
"@angular/common": "2.4.7",
|
||||
"@angular/compiler": "2.4.7",
|
||||
"@angular/compiler-cli": "2.4.7",
|
||||
"@angular/core": "2.4.7",
|
||||
"@angular/forms": "2.4.7",
|
||||
"@angular/http": "2.4.7",
|
||||
"@angular/platform-browser": "2.4.7",
|
||||
"@angular/platform-browser-dynamic": "2.4.7",
|
||||
"@angular/material": "2.0.0-beta.1",
|
||||
"@angular/router": "3.2.2",
|
||||
"@angular/upgrade": "2.2.2",
|
||||
"@angular/router": "3.4.7",
|
||||
"@angular/upgrade": "2.4.7",
|
||||
"alfresco-js-api": "~1.4.0",
|
||||
"core-js": "2.4.1",
|
||||
"dialog-polyfill": "0.4.7",
|
||||
@@ -52,12 +52,12 @@
|
||||
"material-design-lite": "1.2.1",
|
||||
"ng2-activiti-diagrams": "1.4.0",
|
||||
"ng2-alfresco-core": "1.4.0",
|
||||
"ng2-translate": "2.5.0",
|
||||
"ng2-translate": "5.0.0",
|
||||
"raphael": "^2.2.6",
|
||||
"reflect-metadata": "0.1.10",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"rxjs": "5.1.0",
|
||||
"systemjs": "0.19.27",
|
||||
"zone.js": "0.6.26"
|
||||
"zone.js": "0.7.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jasmine": "^2.2.33",
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
'moment': { defaultExtension: 'js' },
|
||||
'ng2-translate': { defaultExtension: 'js' },
|
||||
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
|
||||
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'},
|
||||
'ng2-activiti-diagrams': { main: './index.js', defaultExtension: 'js'}
|
||||
'ng2-alfresco-core': { main: './bundles/ng2-alfresco-core.js', defaultExtension: 'js'},
|
||||
'ng2-activiti-diagrams': { main: './bundles/ng2-activiti-diagrams.js', defaultExtension: 'js'}
|
||||
}
|
||||
});
|
||||
})(this);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
],
|
||||
"no-any": false,
|
||||
"no-arg": true,
|
||||
"no-bitwise": true,
|
||||
"no-bitwise": false,
|
||||
"no-conditional-assignment": true,
|
||||
"no-consecutive-blank-lines": true,
|
||||
"no-console": [
|
||||
@@ -52,11 +52,11 @@
|
||||
"no-debugger": true,
|
||||
"no-duplicate-key": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": true,
|
||||
"no-empty": false,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": true,
|
||||
"no-require-imports": true,
|
||||
"no-require-imports": false,
|
||||
"no-shadowed-variable": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
|
||||
@@ -1,310 +0,0 @@
|
||||
import * as gulp from 'gulp';
|
||||
import * as util from 'gulp-util';
|
||||
import * as runSequence from 'run-sequence';
|
||||
import * as gulpLoadPlugins from 'gulp-load-plugins';
|
||||
import * as merge from 'merge-stream';
|
||||
import * as rimraf from 'rimraf';
|
||||
import { join } from 'path';
|
||||
import * as Builder from 'systemjs-builder';
|
||||
var autoprefixer = require('autoprefixer');
|
||||
import * as cssnano from 'cssnano';
|
||||
import * as filter from 'gulp-filter';
|
||||
import * as sourcemaps from 'gulp-sourcemaps';
|
||||
|
||||
var APP_SRC = `.`;
|
||||
var CSS_PROD_BUNDLE = 'main.css';
|
||||
var JS_PROD_SHIMS_BUNDLE = 'shims.js';
|
||||
var NG_FACTORY_FILE = 'main-prod';
|
||||
|
||||
const BUILD_TYPES = {
|
||||
DEVELOPMENT: 'dev',
|
||||
PRODUCTION: 'prod'
|
||||
};
|
||||
|
||||
function normalizeDependencies(deps) {
|
||||
deps
|
||||
.filter((d) => !/\*/.test(d.src)) // Skip globs
|
||||
.forEach((d) => d.src = require.resolve(d.src));
|
||||
return deps;
|
||||
}
|
||||
|
||||
function filterDependency(type: string, d): boolean {
|
||||
const t = d.buildType || d.env;
|
||||
d.buildType = t;
|
||||
if (!t) {
|
||||
d.buildType = Object.keys(BUILD_TYPES).map(k => BUILD_TYPES[k]);
|
||||
}
|
||||
if (!(d.buildType instanceof Array)) {
|
||||
(<any>d).env = [d.buildType];
|
||||
}
|
||||
return d.buildType.indexOf(type) >= 0;
|
||||
}
|
||||
|
||||
function getInjectableDependency() {
|
||||
var APP_ASSETS = [
|
||||
{src: `src/css/main.css`, inject: true, vendor: false},
|
||||
];
|
||||
|
||||
var NPM_DEPENDENCIES = [
|
||||
{src: 'zone.js/dist/zone.js', inject: 'libs'},
|
||||
{src: 'core-js/client/shim.min.js', inject: 'shims'},
|
||||
{src: 'systemjs/dist/system.src.js', inject: 'shims', buildType:'dev'}
|
||||
];
|
||||
|
||||
return normalizeDependencies(NPM_DEPENDENCIES.filter(filterDependency.bind(null, 'dev')))
|
||||
.concat(APP_ASSETS.filter(filterDependency.bind(null, 'dev')));
|
||||
}
|
||||
|
||||
const plugins = <any>gulpLoadPlugins();
|
||||
|
||||
let tsProjects: any = {};
|
||||
|
||||
function makeTsProject(options: Object = {}) {
|
||||
let optionsHash = JSON.stringify(options);
|
||||
if (!tsProjects[optionsHash]) {
|
||||
let config = Object.assign({
|
||||
typescript: require('typescript')
|
||||
}, options);
|
||||
tsProjects[optionsHash] =
|
||||
plugins.typescript.createProject('tsconfig.json', config);
|
||||
}
|
||||
return tsProjects[optionsHash];
|
||||
}
|
||||
|
||||
gulp.task('build.html_css', () => {
|
||||
const gulpConcatCssConfig = {
|
||||
targetFile: CSS_PROD_BUNDLE,
|
||||
options: {
|
||||
rebaseUrls: false
|
||||
}
|
||||
};
|
||||
|
||||
const processors = [
|
||||
autoprefixer({
|
||||
browsers: [
|
||||
'ie >= 10',
|
||||
'ie_mob >= 10',
|
||||
'ff >= 30',
|
||||
'chrome >= 34',
|
||||
'safari >= 7',
|
||||
'opera >= 23',
|
||||
'ios >= 7',
|
||||
'android >= 4.4',
|
||||
'bb >= 10'
|
||||
]
|
||||
})
|
||||
];
|
||||
|
||||
const reportPostCssError = (e: any) => util.log(util.colors.red(e.message));
|
||||
|
||||
processors.push(
|
||||
cssnano({
|
||||
discardComments: {removeAll: true},
|
||||
discardUnused: false, // unsafe, see http://goo.gl/RtrzwF
|
||||
zindex: false, // unsafe, see http://goo.gl/vZ4gbQ
|
||||
reduceIdents: false // unsafe, see http://goo.gl/tNOPv0
|
||||
})
|
||||
);
|
||||
|
||||
/**
|
||||
* Processes the CSS files within `src/client` excluding those in `src/client/assets` using `postcss` with the
|
||||
* configured processors
|
||||
* Execute the appropriate component-stylesheet processing method based on user stylesheet preference.
|
||||
*/
|
||||
function processComponentStylesheets() {
|
||||
return gulp.src(join('src/**', '*.css'))
|
||||
.pipe(plugins.cached('process-component-css'))
|
||||
.pipe(plugins.postcss(processors))
|
||||
.on('error', reportPostCssError);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get a stream of external css files for subsequent processing.
|
||||
*/
|
||||
function getExternalCssStream() {
|
||||
return gulp.src(getExternalCss())
|
||||
.pipe(plugins.cached('process-external-css'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of filenames referring to all external css stylesheets.
|
||||
*/
|
||||
function getExternalCss() {
|
||||
return getInjectableDependency().filter(dep => /\.css$/.test(dep.src)).map(dep => dep.src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the external CSS files using `postcss` with the configured processors.
|
||||
*/
|
||||
function processExternalCss() {
|
||||
return getExternalCssStream()
|
||||
.pipe(plugins.postcss(processors))
|
||||
.pipe(plugins.concatCss(gulpConcatCssConfig.targetFile, gulpConcatCssConfig.options))
|
||||
.on('error', reportPostCssError);
|
||||
}
|
||||
|
||||
return merge(processComponentStylesheets(), processExternalCss());
|
||||
|
||||
});
|
||||
|
||||
gulp.task('build.bundles.app', (done) => {
|
||||
var BUNDLER_OPTIONS = {
|
||||
format: 'umd',
|
||||
minify: false,
|
||||
mangle: false,
|
||||
sourceMaps: true
|
||||
};
|
||||
var CONFIG_TYPESCRIPT = {
|
||||
baseURL: '.',
|
||||
transpiler: 'typescript',
|
||||
typescriptOptions: {
|
||||
module: 'cjs'
|
||||
},
|
||||
map: {
|
||||
typescript: 'node_modules/typescript/lib/typescript.js',
|
||||
'@angular': 'node_modules/@angular',
|
||||
rxjs: 'node_modules/rxjs',
|
||||
'ng2-translate': 'node_modules/ng2-translate',
|
||||
'alfresco-js-api': 'node_modules/alfresco-js-api/dist/alfresco-js-api',
|
||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core/',
|
||||
'ng2-activiti-diagrams': 'node_modules/ng2-activiti-diagrams/',
|
||||
'ng2-activiti-analytics': 'node_modules/ng2-activiti-analytics/',
|
||||
'ng2-alfresco-datatable': 'node_modules/ng2-alfresco-datatable/',
|
||||
'ng2-alfresco-documentlist': 'node_modules/ng2-alfresco-documentlist/',
|
||||
'ng2-activiti-form': 'node_modules/ng2-activiti-form/',
|
||||
'ng2-alfresco-login': 'node_modules/ng2-alfresco-login/',
|
||||
'ng2-activiti-processlist': 'node_modules/ng2-activiti-processlist/',
|
||||
'ng2-alfresco-search': 'node_modules/ng2-alfresco-search/',
|
||||
'ng2-activiti-tasklist': 'node_modules/ng2-activiti-tasklist/',
|
||||
'ng2-alfresco-tag': 'node_modules/ng2-alfresco-tag/',
|
||||
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload/',
|
||||
'ng2-alfresco-userinfo': 'node_modules/ng2-alfresco-userinfo/',
|
||||
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer/',
|
||||
'ng2-alfresco-webscript': 'node_modules/ng2-alfresco-webscript/',
|
||||
'ng2-charts' : 'node_modules/ng2-charts',
|
||||
'raphael':'node_modules/raphael/raphael'
|
||||
|
||||
},
|
||||
paths: {
|
||||
'*': '*.js'
|
||||
},
|
||||
meta: {
|
||||
'node_modules/@angular/*': {build: false},
|
||||
'node_modules/rxjs/*': {build: false},
|
||||
'node_modules/ng2-translate/*': {build: false},
|
||||
'node_modules/ng2-alfresco-core/*': {build: false},
|
||||
'node_modules/ng2-activiti-diagrams/*': {build: false},
|
||||
'node_modules/ng2-activiti-analytics/*': {build: false},
|
||||
'node_modules/ng2-alfresco-datatable/*': {build: false},
|
||||
'node_modules/ng2-alfresco-documentlist/*': {build: false},
|
||||
'node_modules/ng2-activiti-form/*': {build: false},
|
||||
'node_modules/ng2-alfresco-login/*': {build: false},
|
||||
'node_modules/ng2-activiti-processlist/*': {build: false},
|
||||
'node_modules/ng2-alfresco-search/*': {build: false},
|
||||
'node_modules/ng2-activiti-tasklist/*': {build: false},
|
||||
'node_modules/ng2-alfresco-tag/*': {build: false},
|
||||
'node_modules/ng2-alfresco-upload/*': {build: false},
|
||||
'node_modules/ng2-alfresco-userinfo/*': {build: false},
|
||||
'node_modules/ng2-alfresco-viewer/*': {build: false},
|
||||
'node_modules/ng2-alfresco-webscript/*': {build: false}
|
||||
}
|
||||
};
|
||||
|
||||
var pkg = require('./package.json');
|
||||
var namePkg = pkg.name;
|
||||
|
||||
var builder = new Builder(CONFIG_TYPESCRIPT);
|
||||
builder
|
||||
.buildStatic(APP_SRC + "/index", 'bundles/' + namePkg + '.js', BUNDLER_OPTIONS)
|
||||
.then(function () {
|
||||
return done();
|
||||
})
|
||||
.catch(function (err) {
|
||||
return done(err);
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('build.assets.prod', () => {
|
||||
return gulp.src([
|
||||
join('src/**', '*.ts'),
|
||||
'index.ts',
|
||||
join('src/**', '*.css'),
|
||||
join('src/**', '*.html'),
|
||||
'!'+join('*/**', '*.d.ts'),
|
||||
'!'+join('*/**', '*.spec.ts'),
|
||||
'!gulpfile.ts'])
|
||||
|
||||
});
|
||||
|
||||
gulp.task('build.bundles', () => {
|
||||
merge(bundleShims());
|
||||
|
||||
/**
|
||||
* Returns the shim files to be injected.
|
||||
*/
|
||||
function getShims() {
|
||||
let libs = getInjectableDependency()
|
||||
.filter(d => /\.js$/.test(d.src));
|
||||
|
||||
return libs.filter(l => l.inject === 'shims')
|
||||
.concat(libs.filter(l => l.inject === 'libs'))
|
||||
.concat(libs.filter(l => l.inject === true))
|
||||
.map(l => l.src);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bundles the shim files.
|
||||
*/
|
||||
function bundleShims() {
|
||||
return gulp.src(getShims())
|
||||
.pipe(plugins.concat(JS_PROD_SHIMS_BUNDLE))
|
||||
// Strip the first (global) 'use strict' added by reflect-metadata, but don't strip any others to avoid unintended scope leaks.
|
||||
.pipe(plugins.replace(/('|")use strict\1;var Reflect;/, 'var Reflect;'))
|
||||
.pipe(gulp.dest('bundles'));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
gulp.task('build.js.prod', () => {
|
||||
const INLINE_OPTIONS = {
|
||||
base: APP_SRC,
|
||||
target: 'es5',
|
||||
useRelativePaths: true,
|
||||
removeLineBreaks: true
|
||||
};
|
||||
|
||||
let tsProject = makeTsProject();
|
||||
let src = [
|
||||
join('src/**/*.ts'),
|
||||
join('!src/**/*.d.ts'),
|
||||
join('!src/**/*.spec.ts'),
|
||||
`!src/**/${NG_FACTORY_FILE}.ts`
|
||||
];
|
||||
|
||||
let result = gulp.src(src)
|
||||
.pipe(plugins.plumber())
|
||||
.pipe(plugins.inlineNg2Template(INLINE_OPTIONS))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(tsProject())
|
||||
.once('error', function (e: any) {
|
||||
this.once('finish', () => process.exit(1));
|
||||
});
|
||||
|
||||
return result.js
|
||||
.pipe(plugins.template())
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest('src'))
|
||||
.on('error', (e: any) => {
|
||||
console.log(e);
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('build.prod', (done: any) =>
|
||||
runSequence(
|
||||
'build.assets.prod',
|
||||
'build.html_css',
|
||||
'build.js.prod',
|
||||
'build.bundles',
|
||||
'build.bundles.app',
|
||||
done));
|
||||
@@ -1,118 +1,27 @@
|
||||
// Tun on full stack traces in errors to help debugging
|
||||
Error.stackTraceLimit = Infinity;
|
||||
|
||||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 100000;
|
||||
require('core-js/es6');
|
||||
require('core-js/es7/reflect');
|
||||
|
||||
window.componentHandler = {
|
||||
upgradeAllRegistered: function () {
|
||||
},
|
||||
upgradeElement: function () {
|
||||
}
|
||||
};
|
||||
require('zone.js/dist/zone');
|
||||
require('zone.js/dist/long-stack-trace-zone');
|
||||
require('zone.js/dist/proxy');
|
||||
require('zone.js/dist/sync-test');
|
||||
require('zone.js/dist/jasmine-patch');
|
||||
require('zone.js/dist/async-test');
|
||||
require('zone.js/dist/fake-async-test');
|
||||
|
||||
__karma__.loaded = function() {};
|
||||
var path = '../' + __karma__.config.component + '/src';
|
||||
console.log('path appContext '+ path);
|
||||
|
||||
var builtPath = '/base/src/';
|
||||
var appContext;
|
||||
appContext = require.context('../ng2-activiti-diagrams/src', true, /\.spec\.ts/);
|
||||
appContext.keys().forEach(appContext);
|
||||
|
||||
function isJsFile(path) {
|
||||
return path.slice(-3) == '.js';
|
||||
}
|
||||
|
||||
function isSpecFile(path) {
|
||||
return /\.spec\.(.*\.)?js$/.test(path);
|
||||
}
|
||||
var testing = require('@angular/core/testing');
|
||||
var browser = require('@angular/platform-browser-dynamic/testing');
|
||||
|
||||
function isBuiltFile(path) {
|
||||
return isJsFile(path) && (path.substr(0, builtPath.length) == builtPath);
|
||||
}
|
||||
testing.TestBed.initTestEnvironment(browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting());
|
||||
|
||||
var allSpecFiles = Object.keys(window.__karma__.files)
|
||||
.filter(isSpecFile)
|
||||
.filter(isBuiltFile);
|
||||
|
||||
var paths = {
|
||||
// paths serve as alias
|
||||
'npm:': 'base/node_modules/'
|
||||
};
|
||||
|
||||
var map = {
|
||||
'app': 'base/src',
|
||||
// angular bundles
|
||||
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
|
||||
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
|
||||
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
|
||||
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
|
||||
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
|
||||
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
|
||||
'@angular/material': 'npm:@angular/material/bundles/material.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',
|
||||
'hammerjs': 'npm:hammerjs',
|
||||
|
||||
'raphael':'npm:raphael/raphael.js',
|
||||
'alfresco-js-api': 'npm:alfresco-js-api/dist',
|
||||
'ng2-alfresco-core': 'npm:ng2-alfresco-core'
|
||||
};
|
||||
|
||||
var packages = {
|
||||
'app': { main: 'main.js', defaultExtension: 'js' },
|
||||
'rxjs': { defaultExtension: 'js' },
|
||||
'ng2-translate': { defaultExtension: 'js' },
|
||||
'ng2-charts': { defaultExtension: 'js' },
|
||||
'hammerjs': {main: './hammerjs.js', defaultExtension: 'js'},
|
||||
|
||||
'alfresco-js-api': { main: './alfresco-js-api.js', defaultExtension: 'js'},
|
||||
'ng2-alfresco-core': { main: './index.js', defaultExtension: 'js'}
|
||||
};
|
||||
|
||||
var config = {
|
||||
paths: paths,
|
||||
map: map,
|
||||
packages: packages
|
||||
};
|
||||
|
||||
System.config(config);
|
||||
|
||||
System.import('@angular/core/testing')
|
||||
.then(initTestBed)
|
||||
.then(initTesting);
|
||||
|
||||
function initTestBed(){
|
||||
return Promise.all([
|
||||
System.import('@angular/core/testing'),
|
||||
System.import('@angular/platform-browser-dynamic/testing')
|
||||
])
|
||||
.then(function (providers) {
|
||||
var coreTesting = providers[0];
|
||||
var browserTesting = providers[1];
|
||||
|
||||
coreTesting.TestBed.initTestEnvironment(
|
||||
browserTesting.BrowserDynamicTestingModule,
|
||||
browserTesting.platformBrowserDynamicTesting());
|
||||
})
|
||||
}
|
||||
|
||||
// Import all spec files and start karma
|
||||
function initTesting () {
|
||||
return Promise.all(
|
||||
allSpecFiles.map(function (moduleName) {
|
||||
return System.import(moduleName);
|
||||
})
|
||||
)
|
||||
.then(__karma__.start, __karma__.error);
|
||||
}
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (config) {
|
||||
var configuration = {
|
||||
basePath: '.',
|
||||
|
||||
frameworks: ['jasmine-ajax', 'jasmine'],
|
||||
|
||||
files: [
|
||||
// System.js for module loading
|
||||
'node_modules/systemjs/dist/system.src.js',
|
||||
|
||||
// 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',
|
||||
'node_modules/hammerjs/hammer.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/chart.js/dist/Chart.js',
|
||||
'node_modules/alfresco-js-api/dist/alfresco-js-api.js',
|
||||
'node_modules/raphael/raphael.js',
|
||||
|
||||
{pattern: 'node_modules/ng2-translate/**/*.js', included: false, watched: false},
|
||||
{pattern: 'node_modules/ng2-charts/**/*.js', included: false, served: true, watched: false},
|
||||
|
||||
'karma-test-shim.js',
|
||||
|
||||
// paths loaded via module imports
|
||||
{pattern: 'src/**/*.js', included: false, watched: true},
|
||||
{pattern: 'src/**/*.html', included: true, served: true, watched: true},
|
||||
{pattern: 'src/**/*.css', included: true, served: true, watched: true},
|
||||
|
||||
// ng2-components
|
||||
{ pattern: 'node_modules/ng2-alfresco-core/src/**/*.*', included: false, served: true, watched: false },
|
||||
{ pattern: 'node_modules/ng2-alfresco-core/index.js', included: false, served: true, watched: false },
|
||||
|
||||
// paths to support debugging with source maps in dev tools
|
||||
{pattern: 'src/**/*.ts', included: false, watched: false},
|
||||
{pattern: 'src/**/*.json', included: false, watched: false},
|
||||
{pattern: 'src/**/*.js.map', included: false, watched: false}
|
||||
],
|
||||
|
||||
exclude: [
|
||||
'node_modules/**/*spec.js'
|
||||
],
|
||||
|
||||
// proxied base paths
|
||||
proxies: {
|
||||
// required for component assets fetched by Angular's compiler
|
||||
'/src/': '/base/src/'
|
||||
},
|
||||
|
||||
port: 9876,
|
||||
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
colors: true,
|
||||
|
||||
autoWatch: true,
|
||||
|
||||
captureTimeout: 180000,
|
||||
browserDisconnectTimeout: 180000,
|
||||
browserDisconnectTolerance: 3,
|
||||
browserNoActivityTimeout: 300000,
|
||||
|
||||
browsers: ['Chrome'],
|
||||
|
||||
customLaunchers: {
|
||||
Chrome_travis_ci: {
|
||||
base: 'Chrome',
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
},
|
||||
|
||||
// Karma plugins loaded
|
||||
plugins: [
|
||||
'karma-jasmine',
|
||||
'karma-coverage',
|
||||
'karma-jasmine-ajax',
|
||||
'karma-chrome-launcher',
|
||||
'karma-mocha-reporter',
|
||||
'karma-jasmine-html-reporter'
|
||||
],
|
||||
|
||||
// Coverage reporter generates the coverage
|
||||
reporters: ['mocha', 'coverage', 'kjhtml'],
|
||||
|
||||
// Source files that you wanna generate coverage for.
|
||||
// Do not include tests or libraries (these files will be instrumented by Istanbul)
|
||||
preprocessors: {
|
||||
'src/**/!(*spec|index|*mock|*model|*event).js': 'coverage'
|
||||
},
|
||||
|
||||
coverageReporter: {
|
||||
includeAllSources: true,
|
||||
dir: 'coverage/',
|
||||
subdir: 'report',
|
||||
reporters: [
|
||||
{type: 'text'},
|
||||
{type: 'json', file: 'coverage-final.json'},
|
||||
{type: 'html'},
|
||||
{type: 'lcov'}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.TRAVIS) {
|
||||
configuration.browsers = ['Chrome_travis_ci'];
|
||||
}
|
||||
|
||||
config.set(configuration)
|
||||
};
|
||||
@@ -4,27 +4,17 @@
|
||||
"version": "1.4.0",
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"scripts": {
|
||||
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings",
|
||||
"clean-build": "rimraf index.js index.js.map index.d.ts 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts' bundles",
|
||||
"build": "npm run clean-build && npm run tslint && tsc && license-check && npm run build.umd",
|
||||
"build:w": "npm run clean-build && npm run tslint && npm run tsc:w && license-check && npm run build.umd",
|
||||
"tslint": "tslint -c tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts' -e './gulpfile.ts'",
|
||||
"tsc": "tsc",
|
||||
"tsc:w": "tsc -w",
|
||||
"pretest": "npm run build",
|
||||
"test": "karma start karma.conf.js --reporters mocha,coverage --single-run",
|
||||
"test-browser": "npm run build && concurrently \"karma start karma.conf.js --reporters kjhtml\" \"npm run watch-task\"",
|
||||
"posttest": "remap-istanbul -i coverage/report/coverage-final.json -o coverage/report -t html && remap-istanbul -i coverage/report/coverage-final.json -o coverage/report/coverage-final.json",
|
||||
"coverage": "npm run test && wsrv -o -p 9875 ./coverage/report",
|
||||
"publish:prod": "npm run test && npm publish",
|
||||
"travis": "npm link ng2-alfresco-core",
|
||||
"gulp": "gulp",
|
||||
"build.umd": "gulp build.prod --color --env-config prod --build-type prod",
|
||||
"reinstall": "npm cache clean && npm install"
|
||||
"clean": "rimraf dist node_modules typings bundles coverage",
|
||||
"build": "license-check && ../node_modules/webpack/bin/webpack.js --config webpack.build.js --progress --profile --bail",
|
||||
"license-check": "license-check",
|
||||
"tslint": "../node_modules/tslint/bin/tslint -c ../config/assets/tslint.json 'src/{,**/}**.ts' 'index.ts' -e '{,**/}**.d.ts'",
|
||||
"tsc": "../node_modules/typescript/bin/tsc",
|
||||
"test": "../node_modules/karma/bin/karma start ../config/karma.conf.js --reporters mocha,coverage --single-run --component ng2-activiti-diagrams",
|
||||
"test-browser": "../node_modules/karma/bin/karma start ../config/karma.conf.js --reporters kjhtml --component ng2-activiti-diagrams",
|
||||
"coverage": "npm run test && ../node_modules/wsrv/bin/wsrv -o -p 9875 ./coverage/report",
|
||||
"publish:prod": "npm run test && npm publish"
|
||||
},
|
||||
"main": "./index.js",
|
||||
"module": "./index.js",
|
||||
"typings": "./index.d.ts",
|
||||
"main": "bundles/ng2-activiti-diagrams.js",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Maurizio Vitale",
|
||||
@@ -39,67 +29,40 @@
|
||||
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/common": "2.2.2",
|
||||
"@angular/compiler": "2.2.2",
|
||||
"@angular/core": "2.2.2",
|
||||
"@angular/forms": "2.2.2",
|
||||
"@angular/http": "2.2.2",
|
||||
"@angular/common": "2.4.7",
|
||||
"@angular/compiler": "2.4.7",
|
||||
"@angular/core": "2.4.7",
|
||||
"@angular/forms": "2.4.7",
|
||||
"@angular/http": "2.4.7",
|
||||
"@angular/material": "2.0.0-beta.1",
|
||||
"@angular/platform-browser": "2.2.2",
|
||||
"@angular/platform-browser-dynamic": "2.2.2",
|
||||
"@angular/router": "3.2.2",
|
||||
"@angular/platform-browser": "2.4.7",
|
||||
"@angular/platform-browser-dynamic": "2.4.7",
|
||||
"@angular/router": "3.4.7",
|
||||
"alfresco-js-api": "~1.4.0",
|
||||
"core-js": "2.4.1",
|
||||
"hammerjs": "2.0.8",
|
||||
"ng2-alfresco-core": "1.4.0",
|
||||
"ng2-translate": "2.5.0",
|
||||
"ng2-translate": "5.0.0",
|
||||
"raphael": "^2.2.6",
|
||||
"reflect-metadata": "0.1.10",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"rxjs": "5.1.0",
|
||||
"systemjs": "0.19.27",
|
||||
"zone.js": "0.6.26"
|
||||
"zone.js": "0.7.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/hammerjs": "^2.0.34",
|
||||
"@types/jasmine": "2.5.35",
|
||||
"@types/node": "6.0.45",
|
||||
"autoprefixer": "^6.5.4",
|
||||
"concurrently": "^2.2.0",
|
||||
"cpx": "1.3.1",
|
||||
"cssnano": "^3.8.1",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-autoprefixer": "^3.1.1",
|
||||
"gulp-cached": "^1.1.1",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-concat-css": "^2.3.0",
|
||||
"gulp-filter": "^4.0.0",
|
||||
"gulp-inline-ng2-template": "^4.0.0",
|
||||
"gulp-load-plugins": "^1.4.0",
|
||||
"gulp-plumber": "^1.1.0",
|
||||
"gulp-postcss": "^6.2.0",
|
||||
"gulp-replace": "^0.5.4",
|
||||
"gulp-sourcemaps": "^1.9.1",
|
||||
"gulp-template": "^4.0.0",
|
||||
"gulp-typescript": "^3.1.3",
|
||||
"gulp-uglify": "^2.0.0",
|
||||
"gulp-util": "^3.0.7",
|
||||
"jasmine-core": "2.4.1",
|
||||
"karma": "0.13.22",
|
||||
"karma-chrome-launcher": "1.0.1",
|
||||
"karma-coverage": "1.0.0",
|
||||
"karma-jasmine": "1.0.2",
|
||||
"karma-jasmine-ajax": "^0.1.13",
|
||||
"karma-jasmine-html-reporter": "0.2.0",
|
||||
"karma-mocha-reporter": "2.0.3",
|
||||
"license-check": "1.1.5",
|
||||
"cpx": "^1.3.1",
|
||||
"license-check": "^1.0.4",
|
||||
"merge-stream": "^1.0.1",
|
||||
"remap-istanbul": "0.6.3",
|
||||
"rimraf": "2.5.2",
|
||||
"run-sequence": "^1.2.2",
|
||||
"systemjs-builder": "^0.15.34",
|
||||
"traceur": "0.0.91",
|
||||
"traceur": "^0.0.91",
|
||||
"ts-node": "^1.7.0",
|
||||
"tslint": "3.15.1",
|
||||
"tslint": "^3.8.1",
|
||||
"typescript": "^2.0.3",
|
||||
"wsrv": "^0.1.5"
|
||||
},
|
||||
@@ -110,7 +73,7 @@
|
||||
],
|
||||
"license-check-config": {
|
||||
"src": [
|
||||
"./src/**/*.js"
|
||||
"./src/**/*.ts"
|
||||
],
|
||||
"path": "assets/license_header.txt",
|
||||
"blocking": true,
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-alfresco-publish-task',
|
||||
templateUrl: './diagram-alfresco-publish-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-box-publish-task',
|
||||
templateUrl: './diagram-box-publish-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-business-rule-task',
|
||||
templateUrl: './diagram-business-rule-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-camel-task',
|
||||
templateUrl: './diagram-camel-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-container-service-task',
|
||||
templateUrl: './diagram-container-service-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-google-drive-publish-task',
|
||||
templateUrl: './diagram-google-drive-publish-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-manual-task',
|
||||
templateUrl: './diagram-manual-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-mule-task',
|
||||
templateUrl: './diagram-mule-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-receive-task',
|
||||
templateUrl: './diagram-receive-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-rest-call-task',
|
||||
templateUrl: './diagram-rest-call-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-script-task',
|
||||
templateUrl: './diagram-script-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-send-task',
|
||||
templateUrl: './diagram-send-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-service-task',
|
||||
templateUrl: './diagram-service-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-task',
|
||||
templateUrl: './diagram-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-user-task',
|
||||
templateUrl: './diagram-user-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-boundary-event',
|
||||
templateUrl: './diagram-boundary-event.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-throw-event',
|
||||
templateUrl: './diagram-throw-event.component.html'
|
||||
})
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-sequence-flow',
|
||||
templateUrl: './diagram-sequence-flow.component.html'
|
||||
})
|
||||
|
||||
@@ -23,7 +23,6 @@ import { RaphaelService } from './raphael/raphael.service';
|
||||
import { DiagramModel, DiagramElementModel } from '../models/diagram.model';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'activiti-diagram',
|
||||
styleUrls: ['./diagram.component.css'],
|
||||
templateUrl: './diagram.component.html'
|
||||
@@ -85,7 +84,6 @@ export class DiagramComponent {
|
||||
},
|
||||
(err: any) => {
|
||||
this.onError.emit(err);
|
||||
this.logService.error(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-end-event',
|
||||
templateUrl: './diagram-end-event.component.html'
|
||||
})
|
||||
|
||||
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-event',
|
||||
templateUrl: './diagram-event.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-start-event',
|
||||
templateUrl: './diagram-start-event.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-event-gateway',
|
||||
templateUrl: './diagram-event-gateway.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-exclusive-gateway',
|
||||
templateUrl: './diagram-exclusive-gateway.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-gateway',
|
||||
templateUrl: './diagram-gateway.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-inclusive-gateway',
|
||||
templateUrl: './diagram-inclusive-gateway.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-parallel-gateway',
|
||||
templateUrl: './diagram-parallel-gateway.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-container-icon-event',
|
||||
templateUrl: './diagram-container-icon-event.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-alfresco-publish-task',
|
||||
templateUrl: './diagram-icon-alfresco-publish-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-box-publish-task',
|
||||
templateUrl: './diagram-icon-box-publish-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-business-rule-task',
|
||||
templateUrl: './diagram-icon-business-rule-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-camel-task',
|
||||
templateUrl: './diagram-icon-camel-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-error',
|
||||
templateUrl: './diagram-icon-error.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-google-drive-publish-task',
|
||||
templateUrl: './diagram-icon-google-drive-publish-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-manual-task',
|
||||
templateUrl: './diagram-icon-manual-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-message',
|
||||
templateUrl: './diagram-icon-message.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-mule-task',
|
||||
templateUrl: './diagram-icon-mule-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-receive-task',
|
||||
templateUrl: './diagram-icon-receive-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-rest-call-task',
|
||||
templateUrl: './diagram-icon-rest-call-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-script-task',
|
||||
templateUrl: './diagram-icon-script-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-send-task',
|
||||
templateUrl: './diagram-icon-send-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-service-task',
|
||||
templateUrl: './diagram-icon-service-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-signal',
|
||||
templateUrl: './diagram-icon-signal.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-timer',
|
||||
templateUrl: './diagram-icon-timer.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-icon-user-task',
|
||||
templateUrl: './diagram-icon-user-task.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-intermediate-catching-event',
|
||||
templateUrl: './diagram-intermediate-catching-event.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-event-subprocess',
|
||||
templateUrl: './diagram-event-subprocess.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-subprocess',
|
||||
templateUrl: './diagram-subprocess.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-lane',
|
||||
templateUrl: './diagram-lane.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-lanes',
|
||||
templateUrl: './diagram-lanes.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -19,7 +19,6 @@ import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/cor
|
||||
import { DiagramColorService } from '../../services/diagram-color.service';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-pool',
|
||||
templateUrl: './diagram-pool.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, ElementRef, Input, Output, EventEmitter } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-pools',
|
||||
templateUrl: './diagram-pools.component.html'
|
||||
})
|
||||
|
||||
-1
@@ -18,7 +18,6 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'diagram-tooltip',
|
||||
templateUrl: './diagram-tooltip.component.html',
|
||||
styleUrls: ['./diagram-tooltip-style.css']
|
||||
|
||||
@@ -16,22 +16,20 @@
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"removeComments": true,
|
||||
"declaration": true,
|
||||
"outDir": "./dist",
|
||||
"lib": [
|
||||
"es2015",
|
||||
"dom"
|
||||
],
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
"../node_modules/@types"
|
||||
],
|
||||
"suppressImplicitAnyIndexErrors": true
|
||||
},
|
||||
"exclude": [
|
||||
"demo",
|
||||
"node_modules",
|
||||
"dist",
|
||||
"tools",
|
||||
"gulpfile.ts",
|
||||
"gulpfile.d.ts"
|
||||
"dist"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"strictMetadataEmit": false,
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
{
|
||||
"rules": {
|
||||
"align": [
|
||||
true,
|
||||
"parameters",
|
||||
"statements"
|
||||
],
|
||||
"ban": false,
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"curly": true,
|
||||
"eofline": true,
|
||||
"forin": true,
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"interface-name": false,
|
||||
"jsdoc-format": true,
|
||||
"label-position": true,
|
||||
"label-undefined": true,
|
||||
"max-line-length": [
|
||||
true,
|
||||
180
|
||||
],
|
||||
"member-ordering": [
|
||||
true,
|
||||
"static-before-instance",
|
||||
"variables-before-functions"
|
||||
],
|
||||
"no-any": false,
|
||||
"no-arg": true,
|
||||
"no-bitwise": false,
|
||||
"no-conditional-assignment": true,
|
||||
"no-consecutive-blank-lines": true,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-construct": true,
|
||||
"no-constructor-vars": false,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-key": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": false,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": false,
|
||||
"no-internal-module": true,
|
||||
"no-require-imports": false,
|
||||
"no-shadowed-variable": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-unreachable": true,
|
||||
"no-unused-expression": true,
|
||||
"no-unused-variable": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-keyword": true,
|
||||
"no-var-requires": true,
|
||||
"object-literal-sort-keys": false,
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-whitespace"
|
||||
],
|
||||
"quotemark": [
|
||||
true,
|
||||
"single",
|
||||
"avoid-escape"
|
||||
],
|
||||
"radix": true,
|
||||
"semicolon": true,
|
||||
"switch-default": true,
|
||||
"trailing-comma": [
|
||||
true,
|
||||
{
|
||||
"multiline": "never",
|
||||
"singleline": "never"
|
||||
}
|
||||
],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"typedef": false,
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"use-strict": false,
|
||||
"variable-name": [
|
||||
true,
|
||||
"check-format",
|
||||
"allow-leading-underscore",
|
||||
"ban-keywords"
|
||||
],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type",
|
||||
"check-module",
|
||||
"check-decl"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
const webpack = require("webpack");
|
||||
const webpackMerge = require('webpack-merge');
|
||||
const commonConfig = require('../config/webpack.common.js');
|
||||
|
||||
module.exports = webpackMerge(commonConfig, {
|
||||
|
||||
output: {
|
||||
filename: './bundles/[name].js',
|
||||
library: '[name]',
|
||||
libraryTarget: 'umd',
|
||||
chunkFilename: '[id].chunk.js'
|
||||
},
|
||||
|
||||
entry: {
|
||||
"ng2-activiti-diagrams": "./index.ts"
|
||||
}
|
||||
});
|
||||
@@ -523,7 +523,6 @@ npm start
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| npm run build | Build component |
|
||||
| npm run build:w | Build component and keep watching the changes |
|
||||
| npm run test | Run unit tests in the console |
|
||||
| npm run test-browser | Run unit tests in the browser
|
||||
| npm run coverage | Run unit tests and display code coverage report |
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"author": "Alfresco Software, Ltd.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings dist",
|
||||
"clean": "npm run clean-build && rimraf dist node_modules typings dist",
|
||||
"clean-build" : "rimraf 'src/{,**/}**.js' 'src/{,**/}**.js.map' 'src/{,**/}**.d.ts'",
|
||||
"postinstall": "npm run build",
|
||||
"start": "npm run build && concurrently \"npm run tsc:w\" \"npm run server\" ",
|
||||
@@ -32,22 +32,22 @@
|
||||
"activiti-form"
|
||||
],
|
||||
"dependencies": {
|
||||
"@angular/common": "2.2.2",
|
||||
"@angular/compiler": "2.2.2",
|
||||
"@angular/compiler-cli": "2.2.2",
|
||||
"@angular/core": "2.2.2",
|
||||
"@angular/forms": "2.2.2",
|
||||
"@angular/http": "2.2.2",
|
||||
"@angular/platform-browser": "2.2.2",
|
||||
"@angular/platform-browser-dynamic": "2.2.2",
|
||||
"@angular/common": "2.4.7",
|
||||
"@angular/compiler": "2.4.7",
|
||||
"@angular/compiler-cli": "2.4.7",
|
||||
"@angular/core": "2.4.7",
|
||||
"@angular/forms": "2.4.7",
|
||||
"@angular/http": "2.4.7",
|
||||
"@angular/platform-browser": "2.4.7",
|
||||
"@angular/platform-browser-dynamic": "2.4.7",
|
||||
"@angular/material": "2.0.0-beta.1",
|
||||
"@angular/router": "3.2.2",
|
||||
"@angular/upgrade": "2.2.2",
|
||||
"@angular/router": "3.4.7",
|
||||
"@angular/upgrade": "2.4.7",
|
||||
"core-js": "2.4.1",
|
||||
"reflect-metadata": "0.1.10",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"rxjs": "5.1.0",
|
||||
"systemjs": "0.19.27",
|
||||
"zone.js": "0.6.26",
|
||||
"zone.js": "0.7.6",
|
||||
"intl": "1.2.4",
|
||||
"dialog-polyfill": "0.4.7",
|
||||
"element.scrollintoviewifneeded-polyfill": "1.0.1",
|
||||
@@ -55,7 +55,7 @@
|
||||
"material-design-lite": "1.2.1",
|
||||
"moment": "2.15.1",
|
||||
"md-date-time-picker": "2.2.0",
|
||||
"ng2-translate": "2.5.0",
|
||||
"ng2-translate": "5.0.0",
|
||||
"alfresco-js-api": "~1.4.0",
|
||||
"ng2-alfresco-core": "1.4.0",
|
||||
"ng2-activiti-form": "1.4.0"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user