[ADF-973] Remove demo folder moved in https://github.com/Alfresco/adf-examples … (#2036)

* remove demo folder moved in https://github.com/Alfresco/adf-examples 1.6.1

* remove analytics demo
This commit is contained in:
Eugenio Romano
2017-07-04 09:37:36 +02:00
parent e33f6cf670
commit 6ac4edde24
263 changed files with 0 additions and 12610 deletions

View File

@@ -1,23 +0,0 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[package.json]
indent_style = space
indent_size = 2
[karma.conf.js]
indent_style = space
indent_size = 2
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

View File

@@ -1,6 +0,0 @@
node_modules
.idea
coverage
dist
typings
!systemjs.config.js

View File

@@ -1,3 +0,0 @@
node_modules
dist
typings

View File

@@ -1,13 +0,0 @@
# User info demo
Install:
```
npm install
```
Run the project:
```
npm start
```

View File

@@ -1,10 +0,0 @@
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;

View File

@@ -1,134 +0,0 @@
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const helpers = require('./helpers');
const path = require('path');
const alfrescoLibs = [
'ng2-alfresco-login',
'ng2-alfresco-userinfo'
];
module.exports = {
entry: {
'polyfills': './src/polyfills.ts',
'vendor': './src/vendor.ts',
'dist': './src/main.ts'
},
module: {
rules: [
{
enforce: 'pre',
test: /\.js$/,
include: [helpers.root('src'), helpers.root('../ng2-components')],
loader: 'source-map-loader',
exclude: [ /node_modules/, /public/, /resources/, /dist/]
},
{
test: /\.ts$/,
include: [helpers.root('src'), helpers.root('..')],
loader: [
'ts-loader',
'angular2-template-loader'
],
exclude: [ /node_modules/, /public/, /resources/, /dist/]
},
{
enforce: 'pre',
test: /\.ts$/,
loader: 'tslint-loader',
include: [helpers.root('src')],
options: {
emitErrors: true
},
exclude: [ /node_modules/, /public/, /resources/, /dist/]
},
{
enforce: 'pre',
test: /\.ts$/,
use: 'source-map-loader',
exclude: [ /public/, /resources/, /dist/]
},
{
test: /\.html$/,
loader: 'html-loader',
exclude: [ /node_modules/, /public/, /resources/, /dist/]
},
{
test: /\.css$/,
exclude: [helpers.root('src'), helpers.root('../ng2-components')],
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader?sourceMap'
})
},
{
test: /\.css$/,
include: [helpers.root('src'), helpers.root('../ng2-components')],
loader: 'raw-loader'
},
{
test: /\.component.scss$/,
use: ['to-string-loader', 'raw-loader', 'sass-loader']
},
{
test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)$/,
loader: 'file-loader?name=assets/[name].[hash].[ext]'
}
]
},
plugins: [
// Workaround for angular/angular#11580
new webpack.ContextReplacementPlugin(
// The (\\|\/) piece accounts for path separators in *nix and Windows
/angular(\\|\/)core(\\|\/)@angular/,
helpers.root('./src'), // location of your src
{} // a map of your routes
),
new HtmlWebpackPlugin({
template: './index.html'
}),
new CopyWebpackPlugin([
... alfrescoLibs.map(lib => {
return {
context: `../ng2-components/${lib}/bundles/assets/` ,
from: '**/*',
to: `assets/`
}
}),
{
context: 'resources/i18n',
from: '**/*.json',
to: 'resources/i18n'
},
... alfrescoLibs.map(lib => {
return {
context: 'node_modules',
from: `${lib}/src/i18n/*.json`,
to: 'node_modules'
}
})
]),
new webpack.optimize.CommonsChunkPlugin({
name: ['src', 'vendor', 'polyfills']
})
],
devServer: {
contentBase: helpers.root('dist'),
compress: true,
port: 3000,
historyApiFallback: true,
host: '0.0.0.0',
inline: true
},
node: {
fs: 'empty'
}
};

View File

@@ -1,37 +0,0 @@
const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const commonConfig = require('./webpack.common.js');
const helpers = require('./helpers');
const path = require('path');
module.exports = webpackMerge(commonConfig, {
devtool: 'cheap-module-eval-source-map',
output: {
path: helpers.root('dist'),
filename: '[name].js',
chunkFilename: '[id].chunk.js'
},
resolve: {
alias: {
"ng2-alfresco-core$": path.resolve(__dirname, '../../ng2-alfresco-core/index.ts'),
"ng2-alfresco-login$": path.resolve(__dirname, '../../ng2-alfresco-login/index.ts'),
"ng2-alfresco-userinfo$": path.resolve(__dirname, '../../ng2-alfresco-userinfo/index.ts')
},
extensions: ['.ts', '.js'],
modules: [path.resolve(__dirname, '../node_modules')]
},
plugins: [
new webpack.NoEmitOnErrorsPlugin(),
new ExtractTextPlugin('[name].[hash].css'),
new webpack.LoaderOptionsPlugin({
htmlLoader: {
minimize: false // workaround for ng2
}
})
]
});

View File

@@ -1,66 +0,0 @@
const webpack = require('webpack');
const webpackMerge = require('webpack-merge');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const commonConfig = require('./webpack.common.js');
const helpers = require('./helpers');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
const alfrescoLibs = [
'ng2-alfresco-userinfo',
'ng2-alfresco-login'
];
module.exports = webpackMerge(commonConfig, {
devtool: 'source-map',
output: {
path: helpers.root('dist'),
publicPath: '/',
filename: '[name].[hash].js',
chunkFilename: '[id].[hash].chunk.js'
},
resolve: {
extensions: ['.ts', '.js'],
modules: [helpers.root('node_modules')]
},
plugins: [
new CopyWebpackPlugin([
... alfrescoLibs.map(lib => {
return {
context: `node_modules/${lib}/bundles/assets/` ,
from: '**/*',
to: `assets/`
}
})
]),
new webpack.NoEmitOnErrorsPlugin(),
new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618
mangle: {
keep_fnames: true
},
compress: {
warnings: false
},
output: {
comments: false
},
sourceMap: true
}),
new ExtractTextPlugin('[name].[hash].css'),
new webpack.DefinePlugin({
'process.env': {
'ENV': JSON.stringify(ENV)
}
}),
new webpack.LoaderOptionsPlugin({
htmlLoader: {
minimize: false // workaround for ng2
}
})
]
});

View File

@@ -1,14 +0,0 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Angular 2 UserInfo - Demo</title>
<base href="./">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<alfresco-app-demo></alfresco-app-demo>
</body>
</html>

View File

@@ -1,112 +0,0 @@
{
"name": "ng2-alfresco-userinfo-demo",
"description": "Alfresco Angular2 User Info Component - Demo",
"version": "0.1.0",
"author": "Alfresco Software, Ltd.",
"scripts": {
"build": "rimraf dist && npm run webpack -- --config config/webpack.prod.js --progress --profile --bail",
"build:dev": "rimraf dist && npm run webpack -- --config config/webpack.dev.js --progress --profile --bail",
"start:dist": "wsrv -s dist/ -p 3000 -a 0.0.0.0",
"start": "npm run webpack-dev-server -- --config config/webpack.prod.js --progress --content-base app/",
"start:dev": "npm run webpack-dev-server -- --config config/webpack.dev.js --progress --content-base app/",
"clean": "npm run clean-build && rimraf dist node_modules typings dist",
"clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'",
"webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
"webpack": "webpack"
},
"license": "Apache-2.0",
"dependencies": {
"@angular/animations": "4.2.5",
"@angular/common": "4.2.5",
"@angular/compiler": "4.2.5",
"@angular/core": "4.2.5",
"@angular/forms": "4.2.5",
"@angular/http": "4.2.5",
"@angular/platform-browser": "4.2.5",
"@angular/platform-browser-dynamic": "4.2.5",
"@angular/router": "4.2.5",
"@angular/material": "2.0.0-beta.1",
"alfresco-js-api": "~1.6.1",
"core-js": "2.4.1",
"hammerjs": "2.0.8",
"ng2-alfresco-core": "1.6.1",
"@ngx-translate/core": "7.0.0",
"reflect-metadata": "0.1.10",
"rxjs": "5.1.0",
"systemjs": "0.19.27",
"zone.js": "0.7.6",
"intl": "1.2.4",
"dialog-polyfill": "0.4.7",
"element.scrollintoviewifneeded-polyfill": "1.0.1",
"material-design-icons": "2.2.3",
"material-design-lite": "1.2.1",
"ng2-alfresco-login": "1.6.1",
"ng2-alfresco-userinfo": "1.6.1"
},
"devDependencies": {
"@types/hammerjs": "2.0.34",
"@types/jasmine": "2.5.35",
"@types/node": "6.0.45",
"angular2-template-loader": "0.6.2",
"autoprefixer": "6.5.4",
"copy-webpack-plugin": "4.0.1",
"css-loader": "0.23.1",
"css-to-string-loader": "0.1.2",
"cssnano": "3.8.1",
"extract-text-webpack-plugin": "2.0.0-rc.3",
"file-loader": "0.11.1",
"html-loader": "0.4.4",
"html-webpack-plugin": "2.28.0",
"istanbul-instrumenter-loader": "0.2.0",
"jasmine-ajax": "3.2.0",
"jasmine-core": "2.4.1",
"karma": "0.13.22",
"karma-chrome-launcher": "~1.0.1",
"karma-coverage": "1.1.1",
"karma-jasmine": "~1.0.2",
"karma-jasmine-ajax": "0.1.13",
"karma-jasmine-html-reporter": "0.2.0",
"karma-mocha-reporter": "2.2.2",
"karma-remap-istanbul": "0.6.0",
"karma-sourcemap-loader": "0.3.7",
"karma-systemjs": "0.16.0",
"karma-webpack": "2.0.3",
"loader-utils": "1.1.0",
"merge-stream": "1.0.1",
"null-loader": "0.1.1",
"package-json-merge": "0.0.1",
"raw-loader": "0.5.1",
"remap-istanbul": "0.6.3",
"rimraf": "2.5.4",
"run-sequence": "1.2.2",
"script-loader": "0.7.0",
"source-map-loader": "0.1.6",
"style-loader": "0.13.1",
"systemjs-builder": "0.15.34",
"to-string-loader": "1.1.5",
"traceur": "0.0.91",
"ts-loader": "2.2.1",
"ts-node": "1.7.0",
"tslint": "4.5.1",
"tslint-loader": "3.5.3",
"typescript": "2.1.6",
"webpack": "2.2.1",
"webpack-dev-server": "2.3.0",
"webpack-merge": "2.6.1",
"wsrv": "0.1.7",
"node-sass": "3.13.1",
"sass-loader": "6.0.2"
},
"keywords": [
"angular2",
"typescript"
],
"contributors": [
{
"name": "Vito Albano",
"email": "vito.albano@alfresco.com"
}
]
}

View File

@@ -1,190 +0,0 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { NgModule, Component, OnInit } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { UserInfoComponentModule } from 'ng2-alfresco-userinfo';
import { CoreModule, AlfrescoAuthenticationService, AlfrescoSettingsService, LogService } from 'ng2-alfresco-core';
import { LoginModule } from 'ng2-alfresco-login';
@Component({
selector: 'alfresco-app-demo',
template: `
<label for="host"><b>Insert the ip of your Alfresco and Activiti instance:</b></label><br>
ECM Host: <input id="ecmHost" type="text" size="48" (change)="updateEcmHost()" [(ngModel)]="ecmHost"><br>
BPM Host: <input id="bpmHost" type="text" size="48" (change)="updateBpmHost()" [(ngModel)]="bpmHost"><br>
<div style="border-radius: 8px; position: absolute; background-color: papayawhip; color: cadetblue; right: 10px;
top: 120px; z-index: 1;">
<p style="width:120px;margin: 20px;">
<label for="switch1" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch1" class="mdl-switch__input" [checked]="isECM"
(click)="toggleECM()" #ecm>
<span class="mdl-switch__label">ECM</span>
</label>
</p>
<p style="width:120px;margin: 20px;">
<label for="switch2" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch2" class="mdl-switch__input" [checked]="isBPM"
(click)="toggleBPM()" #bpm>
<span class="mdl-switch__label">BPM</span>
</label>
</p>
<p style="width:120px;margin: 20px;">
<label for="switch3" class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
<input type="checkbox" id="switch3" class="mdl-switch__input" checked (click)="toggleCSRF()" #csrf>
<span class="mdl-switch__label">CSRF</span>
</label>
</p>
<p style="width:120px;margin: 20px;">
<button (click)="logout()" class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent">Logout</button>
</p>
</div>
{{ status }}
<hr>
<!-- USER INFO COMPONENT -->
<div style="position: absolute;z-index: 2;">
<ng2-alfresco-userinfo [menuOpenType]="left"></ng2-alfresco-userinfo>
</div>
<!-- LOGIN COMPONENT -->
<alfresco-login [providers]="providers"
[disableCsrf]="disableCsrf"></alfresco-login>`,
styles: [
':host > .container {padding: 10px}',
'.p-10 { padding: 10px; }'
]
})
class UserInfoDemo implements OnInit {
ecmHost: string = 'http://localhost:8080';
bpmHost: string = 'http://localhost:9999';
userToLogin: string = 'admin';
password: string = 'admin';
loginErrorMessage: string;
providers: string = 'ALL';
private authenticated: boolean;
private token: any;
disableCsrf: boolean = false;
isECM: boolean = true;
isBPM: boolean = false;
constructor(private authService: AlfrescoAuthenticationService,
private settingsService: AlfrescoSettingsService,
private logService: LogService) {
settingsService.ecmHost = this.ecmHost;
settingsService.bpmHost = this.bpmHost;
}
ngOnInit() {
this.settingsService.setProviders(this.providers);
this.initProviders();
}
logout() {
this.authService.logout();
}
login(user, password) {
this.settingsService.setProviders(this.providers);
this.authService.login(user, password).subscribe(
token => {
this.logService.info(token);
this.token = token;
this.authenticated = true;
},
error => {
this.logService.error(error);
this.authenticated = false;
this.loginErrorMessage = error;
});
}
initProviders() {
if (this.providers === 'BPM') {
this.isECM = false;
this.isBPM = true;
} else if (this.providers === 'ECM') {
this.isECM = true;
this.isBPM = false;
} else if (this.providers === 'ALL') {
this.isECM = true;
this.isBPM = true;
}
}
toggleECM() {
this.isECM = !this.isECM;
this.settingsService.setProviders(this.updateProvider());
}
toggleBPM() {
this.isBPM = !this.isBPM;
this.settingsService.setProviders(this.updateProvider());
}
updateProvider() {
if (this.isBPM && this.isECM) {
this.providers = 'ALL';
return this.providers;
}
if (this.isECM) {
this.providers = 'ECM';
return this.providers;
}
if (this.isBPM) {
this.providers = 'BPM';
return this.providers;
}
this.providers = '';
return this.providers;
};
toggleCSRF() {
this.disableCsrf = !this.disableCsrf;
}
updateEcmHost(): void {
this.settingsService.ecmHost = this.ecmHost;
}
updateBpmHost(): void {
this.settingsService.bpmHost = this.bpmHost;
}
}
@NgModule({
imports: [
BrowserModule,
CoreModule.forRoot(),
UserInfoComponentModule.forRoot(),
LoginModule
],
declarations: [UserInfoDemo],
bootstrap: [UserInfoDemo]
})
export class AppModule {
}
platformBrowserDynamic().bootstrapModule(AppModule);

View File

@@ -1,17 +0,0 @@
import 'core-js/es6';
import 'core-js/es7/reflect';
import 'intl';
require('zone.js/dist/zone'); // IE 8-11
require('element.scrollintoviewifneeded-polyfill'); // IE/FF
if (process.env.ENV === 'production') {
// Production
} else {
// Development
Error['stackTraceLimit'] = Infinity;
require('zone.js/dist/long-stack-trace-zone');
}

View File

@@ -1,26 +0,0 @@
// Angular
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
import '@angular/core';
import '@angular/common';
import '@angular/http';
import '@angular/router';
// RxJS
import 'rxjs';
// hammerjs
import 'hammerjs';
// Alfresco
import 'alfresco-js-api';
import 'ng2-alfresco-userinfo';
// Google Material Design Lite
import 'material-design-lite/material.js';
import 'material-design-lite/dist/material.orange-blue.min.css';
import 'material-design-icons/iconfont/material-icons.css';
// Polyfill(s) for dialogs
require('script-loader!dialog-polyfill/dialog-polyfill');
import 'dialog-polyfill/dialog-polyfill.css';

View File

@@ -1,36 +0,0 @@
{
"compilerOptions": {
"baseUrl": ".",
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"noLib": false,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitAny": false,
"noImplicitReturns": false,
"noImplicitUseStrict": false,
"noFallthroughCasesInSwitch": true,
"removeComments": true,
"declaration": true,
"outDir": "./dist",
"lib": [
"es2015",
"dom"
],
"suppressImplicitAnyIndexErrors": true
},
"exclude": [
"demo",
"node_modules",
"dist"
],
"angularCompilerOptions": {
"strictMetadataEmit": false,
"skipTemplateCodegen": true
}
}

View File

@@ -1,118 +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,
"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-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-unused-expression": true,
"no-unused-variable": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"no-var-requires": false,
"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"
]
}
}

View File

@@ -1 +0,0 @@
module.exports = require('./config/webpack.dev.js');