mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2147] test upgrade 2.0.0 (#2902)
* add integration 2.0.0 test * update readme * add integration test in travis * restore tsconfig.dev * fix test script travis call * improve script * fix npm run test
This commit is contained in:
@@ -58,6 +58,10 @@ script:
|
||||
(./scripts/start.sh -dev -t -ss -vjsapi alpha || exit 1;);
|
||||
fi
|
||||
fi
|
||||
jobs:
|
||||
include:
|
||||
- stage: Check 2.0.0 Project Update
|
||||
script: ./scripts/test-e2e-bc.sh
|
||||
|
||||
# jobs:
|
||||
# include:
|
||||
|
106
integration/base_ver_2_app/.angular-cli.json
Normal file
106
integration/base_ver_2_app/.angular-cli.json
Normal file
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"project": {
|
||||
"name": "myapp"
|
||||
},
|
||||
"apps": [
|
||||
{
|
||||
"name" : "dist",
|
||||
"root": "src",
|
||||
"outDir": "dist",
|
||||
"assets": [
|
||||
"assets",
|
||||
"favicon.ico",
|
||||
"app.config.json",
|
||||
"versions.json",
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../resources",
|
||||
"output": "./resources"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-core/prebuilt-themes",
|
||||
"output": "./assets/prebuilt-themes"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-core/bundles/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-insights/bundles/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-process-services/bundles/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "../node_modules/@alfresco/adf-content-services/bundles/assets",
|
||||
"output": "./assets/"
|
||||
},
|
||||
{ "glob": "pdf.worker.js", "input": "../node_modules/pdfjs-dist/build", "output": "./" }
|
||||
],
|
||||
"index": "index.html",
|
||||
"main": "main.ts",
|
||||
"polyfills": "polyfills.ts",
|
||||
"test": "test.ts",
|
||||
"tsconfig": "tsconfig.app.json",
|
||||
"testTsconfig": "tsconfig.spec.json",
|
||||
"prefix": "app",
|
||||
"styles": [
|
||||
"custom-style.scss"
|
||||
],
|
||||
"stylePreprocessorOptions": {
|
||||
"includePaths": [
|
||||
"../node_modules/"
|
||||
]
|
||||
},
|
||||
"scripts": [
|
||||
"../node_modules/pdfjs-dist/build/pdf.js",
|
||||
"../node_modules/pdfjs-dist/web/pdf_viewer.js",
|
||||
"../node_modules/raphael/raphael.min.js",
|
||||
"../node_modules/moment/min/moment.min.js"
|
||||
],
|
||||
"environmentSource": "environments/environment.ts",
|
||||
"environments": {
|
||||
"dev": "environments/environment.ts",
|
||||
"prod": "environments/environment.prod.ts"
|
||||
}
|
||||
}
|
||||
],
|
||||
"e2e": {
|
||||
"protractor": {
|
||||
"config": "./protractor.conf.js"
|
||||
}
|
||||
},
|
||||
"lint": [
|
||||
{
|
||||
"project": "src/tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"project": "src/tsconfig.spec.json"
|
||||
},
|
||||
{
|
||||
"project": "e2e/tsconfig.e2e.json"
|
||||
}
|
||||
],
|
||||
"test": {
|
||||
"karma": {
|
||||
"config": "./karma.conf.js"
|
||||
}
|
||||
},
|
||||
"defaults": {
|
||||
"styleExt": "scss",
|
||||
"component": {
|
||||
},
|
||||
"serve": {
|
||||
"proxyConfig": "proxy.conf.json",
|
||||
"port": 4200
|
||||
}
|
||||
}
|
||||
}
|
13
integration/base_ver_2_app/.editorconfig
Normal file
13
integration/base_ver_2_app/.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
||||
# Editor configuration, see http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
42
integration/base_ver_2_app/.npmignore
Normal file
42
integration/base_ver_2_app/.npmignore
Normal file
@@ -0,0 +1,42 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# e2e
|
||||
/e2e/*.js
|
||||
/e2e/*.map
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
19
integration/base_ver_2_app/.travis.yml
Normal file
19
integration/base_ver_2_app/.travis.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
dist: trusty
|
||||
sudo: false
|
||||
|
||||
language: node_js
|
||||
node_js:
|
||||
- "8"
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- ./node_modules
|
||||
|
||||
install:
|
||||
- npm install
|
||||
|
||||
script:
|
||||
# Use Chromium instead of Chrome.
|
||||
- export CHROME_BIN=chromium-browser
|
||||
- xvfb-run -a npm run test -- --single-run --no-progress --browser=ChromeNoSandbox
|
||||
#- xvfb-run -a npm run e2e -- --no-progress --config=protractor-ci.conf.js
|
21
integration/base_ver_2_app/LICENSE
Normal file
21
integration/base_ver_2_app/LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 Denys Vuika
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
56
integration/base_ver_2_app/README.md
Normal file
56
integration/base_ver_2_app/README.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# ADF/APS/ACS Application with Angular CLI
|
||||
|
||||
Minimal ready-to-use Angular CLI project template pre-configured with ADF 2.0.0 components.
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.5.0
|
||||
|
||||
## Quick start
|
||||
|
||||
```sh
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
## Supported ADF component libraries
|
||||
|
||||
This project has all the existing ADF component libraries already pre-configured.
|
||||
|
||||
The main focus of the project is:
|
||||
|
||||
- ADF integration and setup
|
||||
- Basic demonstration of working components
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
### Proxy settings
|
||||
|
||||
The template provides certain proxy settings to allow running web application locally without CORS setup.
|
||||
You can find details in the `proxy.conf.json` file.
|
||||
|
||||
List of URLs being proxied:
|
||||
|
||||
- `/alfresco` -> `http://0.0.0.0:8080`
|
||||
- `/activiti-app` -> `http://0.0.0.0:9999`
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
Run `ng generate component component-name -m app.module` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`.
|
||||
|
||||
## Build
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
|
||||
Before running the tests make sure you are serving the app via `ng serve`.
|
||||
|
||||
## Further help
|
||||
|
||||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|
14
integration/base_ver_2_app/e2e/app.e2e-spec.ts
Normal file
14
integration/base_ver_2_app/e2e/app.e2e-spec.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { AdfAppPage } from './app.po';
|
||||
|
||||
describe('adf-app App', () => {
|
||||
let page: AdfAppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AdfAppPage();
|
||||
});
|
||||
|
||||
it('should display toolbar', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getToolbar()).toBeDefined();
|
||||
});
|
||||
});
|
11
integration/base_ver_2_app/e2e/app.po.ts
Normal file
11
integration/base_ver_2_app/e2e/app.po.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AdfAppPage {
|
||||
navigateTo() {
|
||||
return browser.get('/');
|
||||
}
|
||||
|
||||
getToolbar() {
|
||||
return element(by.tagName('adf-toolbar'));
|
||||
}
|
||||
}
|
14
integration/base_ver_2_app/e2e/tsconfig.e2e.json
Normal file
14
integration/base_ver_2_app/e2e/tsconfig.e2e.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"baseUrl": "./",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"jasminewd2",
|
||||
"node"
|
||||
]
|
||||
}
|
||||
}
|
56
integration/base_ver_2_app/karma.conf.js
Normal file
56
integration/base_ver_2_app/karma.conf.js
Normal file
@@ -0,0 +1,56 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/0.13/config/configuration-file.html
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular/cli'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular/cli/plugins/karma')
|
||||
],
|
||||
files: [
|
||||
{ pattern: './node_modules/hammerjs/hammer.js', watched: false },
|
||||
{ pattern: './node_modules/@angular/material/prebuilt-themes/indigo-pink.css', watched: false },
|
||||
{ pattern: './node_modules/@alfresco/adf-core/bundles/assets/adf-core/i18n/en.json', watched: false, served: true, included: false },
|
||||
{ pattern: './node_modules/@alfresco/adf-content-services/bundles/assets/adf-content-services/i18n/en.json', watched: false, served: true, included: false },
|
||||
{ pattern: './node_modules/@alfresco/adf-process-services/bundles/assets/adf-process-services/i18n/en.json', watched: false, served: true, included: false }
|
||||
],
|
||||
proxies: {
|
||||
'/assets/adf-core/i18n/en.json': '/base/node_modules/@alfresco/adf-core/bundles/assets/adf-core/i18n/en.json',
|
||||
'/assets/adf-content-services/i18n/en.json': '/base/node_modules/@alfresco/adf-content-services/bundles/assets/adf-content-services/i18n/en.json',
|
||||
'/assets/adf-process-services/i18n/en.json': '/base/node_modules/@alfresco/adf-process-services/bundles/assets/adf-process-services/i18n/en.json'
|
||||
},
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
reports: ['html', 'lcovonly'],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
angularCli: {
|
||||
environment: 'dev'
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
customLaunchers: {
|
||||
ChromeNoSandbox: {
|
||||
base: 'Chrome',
|
||||
flags: ['--no-sandbox']
|
||||
}
|
||||
},
|
||||
singleRun: false,
|
||||
|
||||
captureTimeout: 180000,
|
||||
browserDisconnectTimeout: 180000,
|
||||
browserDisconnectTolerance: 3,
|
||||
browserNoActivityTimeout: 300000
|
||||
});
|
||||
};
|
75
integration/base_ver_2_app/package.json
Normal file
75
integration/base_ver_2_app/package.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "adf-cli-acs-aps-template",
|
||||
"version": "2.0.0",
|
||||
"blueprint": "Process and Content Services",
|
||||
"description": "ACS APS ADF Application with Angular CLI",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --open",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@alfresco/adf-content-services": "2.0.0",
|
||||
"@alfresco/adf-core": "2.0.0",
|
||||
"@alfresco/adf-insights": "2.0.1",
|
||||
"@alfresco/adf-process-services": "2.0.0",
|
||||
"@angular/animations": "5.0.0",
|
||||
"@angular/cdk": "5.0.0-rc0",
|
||||
"@angular/common": "5.0.0",
|
||||
"@angular/compiler": "5.0.0",
|
||||
"@angular/core": "5.0.0",
|
||||
"@angular/flex-layout": "2.0.0-beta.10",
|
||||
"@angular/forms": "5.0.0",
|
||||
"@angular/http": "5.0.0",
|
||||
"@angular/material": "5.0.0-rc0",
|
||||
"@angular/platform-browser": "5.0.0",
|
||||
"@angular/platform-browser-dynamic": "5.0.0",
|
||||
"@angular/router": "5.0.0",
|
||||
"@ngx-translate/core": "8.0.0",
|
||||
"alfresco-js-api": "^2.1.0-4c702fe0041642c09f12fb939014cf70671d8ed8",
|
||||
"chart.js": "2.5.0",
|
||||
"classlist.js": "1.1.20150312",
|
||||
"core-js": "2.4.1",
|
||||
"custom-event-polyfill": "0.3.0",
|
||||
"hammerjs": "2.0.8",
|
||||
"intl": "1.2.5",
|
||||
"minimatch": "3.0.4",
|
||||
"moment": "2.15.2",
|
||||
"moment-es6": "1.0.0",
|
||||
"ng2-charts": "1.6.0",
|
||||
"pdfjs-dist": "1.5.404",
|
||||
"raphael": "2.2.7",
|
||||
"reflect-metadata": "0.1.10",
|
||||
"rxjs": "5.5.2",
|
||||
"web-animations-js": "2.3.1",
|
||||
"zone.js": "0.8.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/core": "^0.2.0",
|
||||
"@angular/cli": "1.5.0",
|
||||
"@angular/compiler-cli": "5.0.0",
|
||||
"@angular/language-service": "5.0.0",
|
||||
"@types/jasmine": "~2.5.53",
|
||||
"@types/jasminewd2": "~2.0.2",
|
||||
"@types/node": "~6.0.60",
|
||||
"codelyzer": "~3.2.0",
|
||||
"jasmine-core": "~2.6.2",
|
||||
"jasmine-spec-reporter": "~4.1.0",
|
||||
"karma": "~1.7.0",
|
||||
"karma-chrome-launcher": "~2.1.1",
|
||||
"karma-cli": "~1.0.1",
|
||||
"karma-coverage-istanbul-reporter": "^1.2.1",
|
||||
"karma-jasmine": "~1.1.0",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"protractor": "~5.1.2",
|
||||
"rimraf": "^2.6.2",
|
||||
"ts-node": "~3.2.0",
|
||||
"tslint": "~5.7.0",
|
||||
"typescript": "~2.4.2"
|
||||
}
|
||||
}
|
10
integration/base_ver_2_app/protractor-ci.conf.js
Normal file
10
integration/base_ver_2_app/protractor-ci.conf.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const config = require('./protractor.conf').config;
|
||||
|
||||
config.capabilities = {
|
||||
browserName: 'chrome',
|
||||
chromeOptions: {
|
||||
args: ['--no-sandbox']
|
||||
}
|
||||
};
|
||||
|
||||
exports.config = config;
|
28
integration/base_ver_2_app/protractor.conf.js
Normal file
28
integration/base_ver_2_app/protractor.conf.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: [
|
||||
'./e2e/**/*.e2e-spec.ts'
|
||||
],
|
||||
capabilities: {
|
||||
'browserName': 'chrome'
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
framework: 'jasmine',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function() {}
|
||||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: 'e2e/tsconfig.e2e.json'
|
||||
});
|
||||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||
}
|
||||
};
|
12
integration/base_ver_2_app/proxy.conf.json
Normal file
12
integration/base_ver_2_app/proxy.conf.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"/alfresco": {
|
||||
"target": "http://localhost:8080",
|
||||
"secure": false,
|
||||
"changeOrigin": true
|
||||
},
|
||||
"/activiti-app": {
|
||||
"target": "http://localhost:9999",
|
||||
"secure": false,
|
||||
"changeOrigin": true
|
||||
}
|
||||
}
|
54
integration/base_ver_2_app/src/app.config.json
Normal file
54
integration/base_ver_2_app/src/app.config.json
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"ecmHost": "http://{hostname}{:port}",
|
||||
"bpmHost": "http://{hostname}{:port}",
|
||||
"application": {
|
||||
"name": "Alfresco ADF Appplication"
|
||||
},
|
||||
"languages": [
|
||||
{
|
||||
"key": "en",
|
||||
"label": "English"
|
||||
},
|
||||
{
|
||||
"key": "fr",
|
||||
"label": "French"
|
||||
},
|
||||
{
|
||||
"key": "de",
|
||||
"label": "German"
|
||||
},
|
||||
{
|
||||
"key": "it",
|
||||
"label": "Italian"
|
||||
},
|
||||
{
|
||||
"key": "es",
|
||||
"label": "Spanish"
|
||||
},
|
||||
{
|
||||
"key": "ja",
|
||||
"label": "Japanese"
|
||||
},
|
||||
{
|
||||
"key": "nl",
|
||||
"label": "Dutch"
|
||||
},
|
||||
{
|
||||
"key": "pt-BR",
|
||||
"label": "Brazilian Portuguese"
|
||||
},
|
||||
{
|
||||
"key": "nb",
|
||||
"label": "Norwegian"
|
||||
},
|
||||
{
|
||||
"key": "ru",
|
||||
"label": "Russian"
|
||||
},
|
||||
{
|
||||
"key": "zh-CN",
|
||||
"label": "Simplified Chinese"
|
||||
}
|
||||
],
|
||||
"logLevel" : "trace"
|
||||
}
|
20
integration/base_ver_2_app/src/app/adf.module.ts
Normal file
20
integration/base_ver_2_app/src/app/adf.module.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
// ADF modules
|
||||
import { ContentModule } from '@alfresco/adf-content-services';
|
||||
import { ProcessModule } from '@alfresco/adf-process-services';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
|
||||
export function modules() {
|
||||
return [
|
||||
CoreModule,
|
||||
ContentModule,
|
||||
ProcessModule
|
||||
];
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
imports: modules(),
|
||||
exports: modules()
|
||||
})
|
||||
export class AdfModule {}
|
13
integration/base_ver_2_app/src/app/app.component.html
Normal file
13
integration/base_ver_2_app/src/app/app.component.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<adf-toolbar color="primary">
|
||||
<adf-toolbar-title>
|
||||
<a mat-button routerLink="/">ADF</a>
|
||||
</adf-toolbar-title>
|
||||
|
||||
<a mat-button href="" routerLink="/login">Login</a>
|
||||
<a mat-button href="" routerLink="/apps">Apps</a>
|
||||
<a mat-button href="" routerLink="/documentlist">Documents</a>
|
||||
|
||||
<button mat-button (click)="logout()">Logout</button>
|
||||
</adf-toolbar>
|
||||
|
||||
<router-outlet></router-outlet>
|
25
integration/base_ver_2_app/src/app/app.component.spec.ts
Normal file
25
integration/base_ver_2_app/src/app/app.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { AdfModule } from './adf.module';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule,
|
||||
AdfModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', async(() => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
}));
|
||||
});
|
24
integration/base_ver_2_app/src/app/app.component.ts
Normal file
24
integration/base_ver_2_app/src/app/app.component.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { TranslationService, AuthenticationService } from '@alfresco/adf-core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.css']
|
||||
})
|
||||
export class AppComponent {
|
||||
|
||||
constructor(translationService: TranslationService,
|
||||
private authService: AuthenticationService,
|
||||
private router: Router) {
|
||||
translationService.use('en');
|
||||
}
|
||||
|
||||
logout() {
|
||||
this.authService.logout().subscribe(() => {
|
||||
this.router.navigate(['/login']);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
85
integration/base_ver_2_app/src/app/app.module.ts
Normal file
85
integration/base_ver_2_app/src/app/app.module.ts
Normal file
@@ -0,0 +1,85 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
// ADF modules
|
||||
import { AdfModule } from './adf.module';
|
||||
import { AuthGuardBpm } from '@alfresco/adf-core';
|
||||
import { AuthGuardEcm } from '@alfresco/adf-core';
|
||||
|
||||
// Custom stencils
|
||||
import { StencilsModule } from './stencils.module';
|
||||
|
||||
// App components
|
||||
import { AppComponent } from './app.component';
|
||||
import { HomeComponent } from './home/home.component';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { AppsComponent } from './apps/apps.component';
|
||||
import { TasksComponent } from './tasks/tasks.component';
|
||||
import { TaskDetailsComponent } from './task-details/task-details.component';
|
||||
import { DocumentlistComponent } from './documentlist/documentlist.component';
|
||||
import { StartProcessComponent } from './start-process/start-process.component';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: HomeComponent
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
component: LoginComponent
|
||||
},
|
||||
{
|
||||
path: 'apps',
|
||||
component: AppsComponent,
|
||||
canActivate: [ AuthGuardBpm ]
|
||||
},
|
||||
{
|
||||
path: 'apps/:appId/tasks',
|
||||
component: TasksComponent,
|
||||
canActivate: [ AuthGuardBpm ]
|
||||
},
|
||||
{
|
||||
path: 'apps/:appId/tasks/:taskId',
|
||||
component: TaskDetailsComponent,
|
||||
canActivate: [ AuthGuardBpm ]
|
||||
},
|
||||
{
|
||||
path: 'apps/:appId/start-process',
|
||||
component: StartProcessComponent,
|
||||
canActivate: [ AuthGuardBpm ]
|
||||
},
|
||||
{
|
||||
path: 'documentlist',
|
||||
component: DocumentlistComponent,
|
||||
canActivate: [ AuthGuardEcm ]
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
BrowserModule,
|
||||
RouterModule.forRoot(
|
||||
appRoutes // ,
|
||||
// { enableTracing: true } // <-- debugging purposes only
|
||||
),
|
||||
|
||||
// ADF modules
|
||||
AdfModule,
|
||||
|
||||
StencilsModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
AppsComponent,
|
||||
HomeComponent,
|
||||
LoginComponent,
|
||||
TasksComponent,
|
||||
TaskDetailsComponent,
|
||||
DocumentlistComponent,
|
||||
StartProcessComponent
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
@@ -0,0 +1,3 @@
|
||||
<adf-apps
|
||||
(appClick)="onAppClicked($event)">
|
||||
</adf-apps>
|
18
integration/base_ver_2_app/src/app/apps/apps.component.ts
Normal file
18
integration/base_ver_2_app/src/app/apps/apps.component.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AppDefinitionRepresentationModel } from '@alfresco/adf-process-services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-apps',
|
||||
templateUrl: './apps.component.html',
|
||||
styleUrls: ['./apps.component.css']
|
||||
})
|
||||
export class AppsComponent {
|
||||
|
||||
constructor(private router: Router) { }
|
||||
|
||||
onAppClicked(app: AppDefinitionRepresentationModel) {
|
||||
this.router.navigate(['/apps', app.id || 0, 'tasks']);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
<adf-toolbar>
|
||||
<adf-toolbar-title>
|
||||
<adf-breadcrumb
|
||||
class="files-breadcrumb"
|
||||
root="Personal Files"
|
||||
[target]="documentList"
|
||||
[folderNode]="documentList.folderNode">
|
||||
</adf-breadcrumb>
|
||||
</adf-toolbar-title>
|
||||
<adf-upload-button
|
||||
[rootFolderId]="documentList.currentFolderId || '-root-'"
|
||||
[adf-node-permission]="'create'"
|
||||
(success)="uploadSuccess($event)">
|
||||
</adf-upload-button>
|
||||
|
||||
</adf-toolbar>
|
||||
|
||||
|
||||
<adf-document-list
|
||||
#documentList
|
||||
[currentFolderId]="'-root-'"
|
||||
(preview)="showPreview($event)">
|
||||
</adf-document-list>
|
||||
|
||||
<adf-viewer
|
||||
[showViewer]="showViewer"
|
||||
[overlayMode]="true"
|
||||
[fileNodeId]="nodeId"
|
||||
(goBack)="onGoBack($event)">
|
||||
</adf-viewer>
|
||||
<file-uploading-dialog></file-uploading-dialog>
|
@@ -0,0 +1,34 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Location } from '@angular/common';
|
||||
import { SpyLocation } from '@angular/common/testing';
|
||||
|
||||
import { AdfModule } from '../adf.module';
|
||||
import { DocumentlistComponent } from './documentlist.component';
|
||||
|
||||
describe('DocumentlistComponent', () => {
|
||||
let component: DocumentlistComponent;
|
||||
let fixture: ComponentFixture<DocumentlistComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
AdfModule
|
||||
],
|
||||
declarations: [ DocumentlistComponent ],
|
||||
providers: [
|
||||
{ provide: Location, useClass: SpyLocation }
|
||||
]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(DocumentlistComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@@ -0,0 +1,41 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { NotificationService } from '@alfresco/adf-core';
|
||||
import { DocumentListComponent } from '@alfresco/adf-content-services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-documentlist',
|
||||
templateUrl: './documentlist.component.html',
|
||||
styleUrls: ['./documentlist.component.css']
|
||||
})
|
||||
export class DocumentlistComponent implements OnInit {
|
||||
|
||||
showViewer: Boolean = false;
|
||||
nodeId: String = null;
|
||||
|
||||
@ViewChild(DocumentListComponent)
|
||||
documentList: DocumentListComponent;
|
||||
|
||||
constructor(private notificationService: NotificationService) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
uploadSuccess(event: any) {
|
||||
this.notificationService.openSnackMessage('File uploaded');
|
||||
this.documentList.reload();
|
||||
}
|
||||
|
||||
showPreview(event) {
|
||||
this.showViewer = false;
|
||||
if (event.value.entry.isFile) {
|
||||
this.nodeId = event.value.entry.id;
|
||||
this.showViewer = true;
|
||||
}
|
||||
}
|
||||
|
||||
onGoBack(event: any) {
|
||||
this.showViewer = false;
|
||||
this.nodeId = null;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1 @@
|
||||
<h3>Please select a feature in the app menu</h3>
|
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { HomeComponent } from './home.component';
|
||||
|
||||
describe('HomeComponent', () => {
|
||||
let component: HomeComponent;
|
||||
let fixture: ComponentFixture<HomeComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ HomeComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(HomeComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
15
integration/base_ver_2_app/src/app/home/home.component.ts
Normal file
15
integration/base_ver_2_app/src/app/home/home.component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
templateUrl: './home.component.html',
|
||||
styleUrls: ['./home.component.css']
|
||||
})
|
||||
export class HomeComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
<adf-login
|
||||
providers="ALL"
|
||||
copyrightText="© 2017 Alfresco Software, Inc. All Rights Reserved."
|
||||
successRoute="/apps">
|
||||
</adf-login>
|
@@ -0,0 +1,31 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { AdfModule } from '../adf.module';
|
||||
import { LoginComponent } from './login.component';
|
||||
|
||||
describe('LoginComponent', () => {
|
||||
let component: LoginComponent;
|
||||
let fixture: ComponentFixture<LoginComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule,
|
||||
AdfModule
|
||||
],
|
||||
declarations: [ LoginComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LoginComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
12
integration/base_ver_2_app/src/app/login/login.component.ts
Normal file
12
integration/base_ver_2_app/src/app/login/login.component.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
templateUrl: './login.component.html',
|
||||
styleUrls: ['./login.component.css']
|
||||
})
|
||||
export class LoginComponent {
|
||||
|
||||
constructor() { }
|
||||
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
<adf-start-process
|
||||
[appId]="appId"
|
||||
(start)="onProcessStarted($event)"
|
||||
(cancel)="onCancelStartProcess()">
|
||||
</adf-start-process>
|
@@ -0,0 +1,31 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { AdfModule } from '../adf.module';
|
||||
import { StartProcessComponent } from './start-process.component';
|
||||
|
||||
describe('StartProcessComponent', () => {
|
||||
let component: StartProcessComponent;
|
||||
let fixture: ComponentFixture<StartProcessComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule,
|
||||
AdfModule
|
||||
],
|
||||
declarations: [ StartProcessComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(StartProcessComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@@ -0,0 +1,34 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ProcessInstance } from '@alfresco/adf-process-services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-start-process',
|
||||
templateUrl: './start-process.component.html',
|
||||
styleUrls: ['./start-process.component.scss']
|
||||
})
|
||||
export class StartProcessComponent implements OnInit {
|
||||
|
||||
appId: string = null;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
if (params.appId && params.appId !== '0') {
|
||||
this.appId = params.appId;
|
||||
} else {
|
||||
this.router.navigate(['/apps']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onProcessStarted(process: ProcessInstance) {
|
||||
this.router.navigate(['/apps', this.appId || 0, 'tasks']);
|
||||
}
|
||||
|
||||
onCancelStartProcess() {
|
||||
this.router.navigate(['/apps', this.appId || 0, 'tasks']);
|
||||
}
|
||||
}
|
44
integration/base_ver_2_app/src/app/stencils.module.ts
Normal file
44
integration/base_ver_2_app/src/app/stencils.module.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
/* tslint:disable */
|
||||
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { WidgetComponent } from '@alfresco/adf-core';
|
||||
|
||||
@Component({
|
||||
selector: 'custom-editor',
|
||||
template: `
|
||||
<div style="color: red">Look, I'm a custom editor!</div>
|
||||
`
|
||||
})
|
||||
export class CustomEditorComponent extends WidgetComponent {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'custom-stencil-01',
|
||||
template: `<div style="color: green">ADF version of custom Activiti stencil</div>`
|
||||
})
|
||||
export class CustomStencil01 extends WidgetComponent {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
CustomEditorComponent,
|
||||
CustomStencil01
|
||||
],
|
||||
exports: [
|
||||
CustomEditorComponent,
|
||||
CustomStencil01
|
||||
],
|
||||
entryComponents: [
|
||||
CustomEditorComponent,
|
||||
CustomStencil01
|
||||
]
|
||||
})
|
||||
export class StencilsModule {}
|
@@ -0,0 +1,15 @@
|
||||
<h3>Task details</h3>
|
||||
|
||||
<adf-task-details
|
||||
[taskId]="taskId"
|
||||
(formContentClicked)="onFormContentClick($event)">
|
||||
</adf-task-details>
|
||||
|
||||
<div *ngIf="fileShowed">
|
||||
<adf-viewer
|
||||
[(showViewer)]="fileShowed"
|
||||
[blobFile]="content"
|
||||
[displayName]="contentName"
|
||||
[overlayMode]="true">
|
||||
</adf-viewer>
|
||||
</div>
|
@@ -0,0 +1,31 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { AdfModule } from '../adf.module';
|
||||
import { TaskDetailsComponent } from './task-details.component';
|
||||
|
||||
describe('TaskDetailsComponent', () => {
|
||||
let component: TaskDetailsComponent;
|
||||
let fixture: ComponentFixture<TaskDetailsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule,
|
||||
AdfModule
|
||||
],
|
||||
declarations: [ TaskDetailsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TaskDetailsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@@ -0,0 +1,42 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { FormRenderingService } from '@alfresco/adf-core';
|
||||
import { CustomEditorComponent } from '../stencils.module';
|
||||
|
||||
@Component({
|
||||
selector: 'app-task-details',
|
||||
templateUrl: './task-details.component.html',
|
||||
styleUrls: ['./task-details.component.css']
|
||||
})
|
||||
export class TaskDetailsComponent implements OnInit {
|
||||
|
||||
appId: string = null;
|
||||
taskId: string = null;
|
||||
fileShowed: any = null;
|
||||
content: any = null;
|
||||
contentName: any= null;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
formRenderingService: FormRenderingService) {
|
||||
formRenderingService.setComponentTypeResolver('testole_01', () => CustomEditorComponent, true);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
if (params.appId && params.appId !== '0') {
|
||||
this.appId = params.appId;
|
||||
}
|
||||
if (params.taskId) {
|
||||
this.taskId = params.taskId;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onFormContentClick(content: any): void {
|
||||
this.fileShowed = true;
|
||||
this.content = content.contentBlob;
|
||||
this.contentName = content.name;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
<h3>Tasks</h3>
|
||||
|
||||
<a *ngIf="appId" md-button href="" routerLink="/apps/{{appId}}/start-process">
|
||||
Start new process
|
||||
</a>
|
||||
|
||||
<adf-tasklist
|
||||
[appId]="appId"
|
||||
state="open"
|
||||
assignment="assignee"
|
||||
(rowClick)="onRowClick($event)">
|
||||
</adf-tasklist>
|
@@ -0,0 +1,31 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
|
||||
import { AdfModule } from '../adf.module';
|
||||
import { TasksComponent } from './tasks.component';
|
||||
|
||||
describe('TasksComponent', () => {
|
||||
let component: TasksComponent;
|
||||
let fixture: ComponentFixture<TasksComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule,
|
||||
AdfModule
|
||||
],
|
||||
declarations: [ TasksComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TasksComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
31
integration/base_ver_2_app/src/app/tasks/tasks.component.ts
Normal file
31
integration/base_ver_2_app/src/app/tasks/tasks.component.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tasks',
|
||||
templateUrl: './tasks.component.html',
|
||||
styleUrls: ['./tasks.component.css']
|
||||
})
|
||||
export class TasksComponent implements OnInit {
|
||||
|
||||
appId: string = null;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.route.params.subscribe(params => {
|
||||
const applicationId = params['appId'];
|
||||
if (applicationId && applicationId !== '0') {
|
||||
this.appId = params['appId'];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onRowClick(taskId: string) {
|
||||
if (taskId) {
|
||||
this.router.navigate(['/apps', this.appId || 0, 'tasks', taskId]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
0
integration/base_ver_2_app/src/assets/.gitkeep
Normal file
0
integration/base_ver_2_app/src/assets/.gitkeep
Normal file
33
integration/base_ver_2_app/src/custom-style.scss
Normal file
33
integration/base_ver_2_app/src/custom-style.scss
Normal file
@@ -0,0 +1,33 @@
|
||||
@import '~@alfresco/adf-core/prebuilt-themes/adf-blue-orange.css';
|
||||
|
||||
|
||||
@import '~@alfresco/adf-content-services/theming';
|
||||
@import '~@alfresco/adf-process-services/theming';
|
||||
@import '~@alfresco/adf-core/theming';
|
||||
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@include mat-core($alfresco-typography);
|
||||
|
||||
$primary: mat-palette($alfresco-accent-orange);
|
||||
$accent: mat-palette($alfresco-accent-purple);
|
||||
$warn: mat-palette($alfresco-warn);
|
||||
$theme: mat-light-theme($primary, $accent, $warn);
|
||||
|
||||
@include angular-material-theme($theme);
|
||||
@include adf-content-services-theme($theme);
|
||||
@include adf-process-services-theme($theme);
|
||||
@include adf-core-theme($theme);
|
||||
|
||||
body, html {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
font-size: mat-font-size($alfresco-typography, body-1);
|
||||
font-family: mat-font-family($alfresco-typography);
|
||||
line-height: mat-line-height($alfresco-typography, body-1);
|
||||
}
|
||||
|
||||
body {
|
||||
overflow: auto;
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
};
|
@@ -0,0 +1,8 @@
|
||||
// The file contents for the current environment will overwrite these during build.
|
||||
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
|
||||
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
|
||||
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
};
|
BIN
integration/base_ver_2_app/src/favicon-96x96.png
Normal file
BIN
integration/base_ver_2_app/src/favicon-96x96.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
17
integration/base_ver_2_app/src/index.html
Normal file
17
integration/base_ver_2_app/src/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ACS APS ADF Application with Angular CLI</title>
|
||||
<base href="/">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/png" href="favicon-96x96.png" sizes="96x96">
|
||||
<link href="https://fonts.googleapis.com/css?family=Muli" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
16
integration/base_ver_2_app/src/main.ts
Normal file
16
integration/base_ver_2_app/src/main.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
import 'hammerjs';
|
||||
|
||||
import pdfjsLib from 'pdfjs-dist';
|
||||
pdfjsLib.PDFJS.workerSrc = 'pdf.worker.js';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
72
integration/base_ver_2_app/src/polyfills.ts
Normal file
72
integration/base_ver_2_app/src/polyfills.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
/**
|
||||
* This file includes polyfills needed by Angular and is loaded before the app.
|
||||
* You can add your own extra polyfills to this file.
|
||||
*
|
||||
* This file is divided into 2 sections:
|
||||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
||||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
||||
* file.
|
||||
*
|
||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
||||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
||||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
||||
*
|
||||
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
||||
// import 'core-js/es6/symbol';
|
||||
// import 'core-js/es6/object';
|
||||
// import 'core-js/es6/function';
|
||||
// import 'core-js/es6/parse-int';
|
||||
// import 'core-js/es6/parse-float';
|
||||
// import 'core-js/es6/number';
|
||||
// import 'core-js/es6/math';
|
||||
// import 'core-js/es6/string';
|
||||
// import 'core-js/es6/date';
|
||||
// import 'core-js/es6/array';
|
||||
// import 'core-js/es6/regexp';
|
||||
// import 'core-js/es6/map';
|
||||
// import 'core-js/es6/weak-map';
|
||||
// import 'core-js/es6/set';
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/** Evergreen browsers require these. **/
|
||||
import 'core-js/es6/reflect';
|
||||
import 'core-js/es7/reflect';
|
||||
|
||||
|
||||
/**
|
||||
* Required to support Web Animations `@angular/animation`.
|
||||
* Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
|
||||
**/
|
||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
|
||||
/**
|
||||
* Date, currency, decimal and percent pipes.
|
||||
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
|
||||
*/
|
||||
// import 'intl'; // Run `npm install --save intl`.
|
||||
/**
|
||||
* Need to import at least one locale-data with intl.
|
||||
*/
|
||||
// import 'intl/locale-data/jsonp/en';
|
32
integration/base_ver_2_app/src/test.ts
Normal file
32
integration/base_ver_2_app/src/test.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/long-stack-trace-zone';
|
||||
import 'zone.js/dist/proxy.js';
|
||||
import 'zone.js/dist/sync-test';
|
||||
import 'zone.js/dist/jasmine-patch';
|
||||
import 'zone.js/dist/async-test';
|
||||
import 'zone.js/dist/fake-async-test';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
|
||||
declare const __karma__: any;
|
||||
declare const require: any;
|
||||
|
||||
// Prevent Karma from running prematurely.
|
||||
__karma__.loaded = function () {};
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
// Finally, start Karma to run the tests.
|
||||
__karma__.start();
|
41
integration/base_ver_2_app/src/tsconfig.app.json
Normal file
41
integration/base_ver_2_app/src/tsconfig.app.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/app",
|
||||
"module": "es2015",
|
||||
"rootDir": "..",
|
||||
"baseUrl": ".",
|
||||
"skipLibCheck": false,
|
||||
"types": [],
|
||||
"paths": {
|
||||
"alfresco-js-api": [
|
||||
"../node_modules/alfresco-js-api/dist/alfresco-js-api.js"
|
||||
],
|
||||
"rxjs/*": [
|
||||
"../node_modules/rxjs/*"
|
||||
],
|
||||
"@angular/*": [
|
||||
"../node_modules/@angular/*"
|
||||
],
|
||||
"@alfresco/adf-core": [
|
||||
"../../../lib/core"
|
||||
],
|
||||
"@alfresco/adf-content-services": [
|
||||
"../../../lib/content-services"
|
||||
],
|
||||
"@alfresco/adf-process-services": [
|
||||
"../../../lib/process-services"
|
||||
],
|
||||
"@alfresco/adf-insights": [
|
||||
"../../../lib/insights"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": false
|
||||
}
|
||||
}
|
41
integration/base_ver_2_app/src/tsconfig.spec.json
Normal file
41
integration/base_ver_2_app/src/tsconfig.spec.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/spec",
|
||||
"module": "es2015",
|
||||
"rootDir": "..",
|
||||
"baseUrl": ".",
|
||||
"skipLibCheck": false,
|
||||
"types": [],
|
||||
"paths": {
|
||||
"alfresco-js-api": [
|
||||
"../node_modules/alfresco-js-api/dist/alfresco-js-api.js"
|
||||
],
|
||||
"rxjs/*": [
|
||||
"../node_modules/rxjs/*"
|
||||
],
|
||||
"@angular/*": [
|
||||
"../node_modules/@angular/*"
|
||||
],
|
||||
"@alfresco/adf-core": [
|
||||
"../../../lib/core"
|
||||
],
|
||||
"@alfresco/adf-content-services": [
|
||||
"../../../lib/content-services"
|
||||
],
|
||||
"@alfresco/adf-process-services": [
|
||||
"../../../lib/process-services"
|
||||
],
|
||||
"@alfresco/adf-insights": [
|
||||
"../../../lib/insights"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": false
|
||||
}
|
||||
}
|
5
integration/base_ver_2_app/src/typings.d.ts
vendored
Normal file
5
integration/base_ver_2_app/src/typings.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/* SystemJS module definition */
|
||||
declare var module: NodeModule;
|
||||
interface NodeModule {
|
||||
id: string;
|
||||
}
|
30
integration/base_ver_2_app/tsconfig.json
Normal file
30
integration/base_ver_2_app/tsconfig.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/out-tsc",
|
||||
"baseUrl": "src",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
"noUnusedLocals": false,
|
||||
"target": "es5",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"lib": [
|
||||
"es2016",
|
||||
"dom"
|
||||
],
|
||||
"paths": {
|
||||
"rxjs/*": [
|
||||
"../node_modules/rxjs/*"
|
||||
],
|
||||
"@angular/*": [
|
||||
"../node_modules/@angular/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
142
integration/base_ver_2_app/tslint.json
Normal file
142
integration/base_ver_2_app/tslint.json
Normal file
@@ -0,0 +1,142 @@
|
||||
{
|
||||
"rulesDirectory": [
|
||||
"node_modules/codelyzer"
|
||||
],
|
||||
"rules": {
|
||||
"arrow-return-shorthand": true,
|
||||
"callable-types": true,
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"curly": true,
|
||||
"eofline": true,
|
||||
"forin": true,
|
||||
"import-blacklist": [
|
||||
true,
|
||||
"rxjs"
|
||||
],
|
||||
"import-spacing": true,
|
||||
"indent": [
|
||||
true,
|
||||
"spaces"
|
||||
],
|
||||
"interface-over-type-literal": true,
|
||||
"label-position": true,
|
||||
"max-line-length": [
|
||||
true,
|
||||
140
|
||||
],
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
true,
|
||||
{
|
||||
"order": [
|
||||
"static-field",
|
||||
"instance-field",
|
||||
"static-method",
|
||||
"instance-method"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-arg": true,
|
||||
"no-bitwise": true,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-construct": true,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-super": true,
|
||||
"no-empty": false,
|
||||
"no-empty-interface": true,
|
||||
"no-eval": true,
|
||||
"no-inferrable-types": [
|
||||
true,
|
||||
"ignore-params"
|
||||
],
|
||||
"no-misused-new": true,
|
||||
"no-non-null-assertion": true,
|
||||
"no-shadowed-variable": true,
|
||||
"no-string-literal": false,
|
||||
"no-string-throw": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-unnecessary-initializer": true,
|
||||
"no-unused-expression": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-keyword": true,
|
||||
"object-literal-sort-keys": false,
|
||||
"one-line": [
|
||||
true,
|
||||
"check-open-brace",
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-whitespace"
|
||||
],
|
||||
"prefer-const": true,
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
],
|
||||
"radix": true,
|
||||
"semicolon": [
|
||||
true,
|
||||
"always"
|
||||
],
|
||||
"triple-equals": [
|
||||
true,
|
||||
"allow-null-check"
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"typeof-compare": true,
|
||||
"unified-signatures": true,
|
||||
"variable-name": false,
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type"
|
||||
],
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
"app",
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"app",
|
||||
"kebab-case"
|
||||
],
|
||||
"use-input-property-decorator": true,
|
||||
"use-output-property-decorator": true,
|
||||
"use-host-property-decorator": true,
|
||||
"no-input-rename": true,
|
||||
"no-output-rename": true,
|
||||
"use-life-cycle-interface": true,
|
||||
"use-pipe-transform-interface": true,
|
||||
"component-class-suffix": true,
|
||||
"directive-class-suffix": true,
|
||||
"no-access-missing-member": true,
|
||||
"templates-use-public": true,
|
||||
"invoke-injectable": true
|
||||
}
|
||||
}
|
1
lib/config/test-export.js
Normal file
1
lib/config/test-export.js
Normal file
@@ -0,0 +1 @@
|
||||
console.log('Start');
|
@@ -32,6 +32,7 @@
|
||||
"build-content": "ng-packagr -p ./ng-package/ng-package-content.json",
|
||||
"build-process": "ng-packagr -p ./ng-package/ng-package-process.json",
|
||||
"build-insights": "ng-packagr -p ./ng-package/ng-package-insights.json",
|
||||
"test-export": "node config/test-export.js",
|
||||
"webpack": "node node_modules/webpack/bin/webpack.js"
|
||||
},
|
||||
"main": "./index.js",
|
||||
@@ -128,6 +129,9 @@
|
||||
"raw-loader": "0.5.1",
|
||||
"remap-istanbul": "0.6.3",
|
||||
"rimraf": "^2.6.2",
|
||||
"rollup-plugin-cleanup": "^2.0.0",
|
||||
"rollup-plugin-license": "^0.5.0",
|
||||
"rollup-plugin-shift-header": "^1.0.1",
|
||||
"run-sequence": "1.2.2",
|
||||
"sass-loader": "6.0.5",
|
||||
"script-loader": "0.7.0",
|
||||
|
@@ -267,10 +267,14 @@ For development environment configuration please refer to [project docs](../demo
|
||||
| -v or --version | the version of the components to check |
|
||||
|
||||
|
||||
# npm-add-pkg.sh
|
||||
|
||||
***npm-add-pkg.sh*** check the bundles in the package npm are present
|
||||
|
||||
Add a package across all the pacakge json in the project
|
||||
|
||||
## Options
|
||||
|
||||
| Option | Description |
|
||||
| --- | --- |
|
||||
| -h or --help | show the help |
|
||||
@@ -279,35 +283,59 @@ Add a package across all the pacakge json in the project
|
||||
|
||||
* Add a package in the project
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
./npm-add-pkg.sh --save-dev NPM_NAME
|
||||
```
|
||||
|
||||
# extract-langs.sh
|
||||
|
||||
***extract-langs.sh***
|
||||
|
||||
Extract the i18n files from the repo and create a zip
|
||||
|
||||
## Options
|
||||
|
||||
| Option | Description |
|
||||
| --- | --- |
|
||||
| -h or --help | show the help |
|
||||
| --output or o | output folder otherwise will be 18n |
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
./extract-langs.sh
|
||||
```
|
||||
|
||||
# docker-publish.sh
|
||||
|
||||
***docker-publish.sh***
|
||||
|
||||
publish doker images in the selected repository
|
||||
|
||||
## Options
|
||||
|
||||
| Option | Description |
|
||||
| --- | --- |
|
||||
| -u or --username | username |
|
||||
| -p or --password | password |
|
||||
| -t or --tags | tags |
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
./docker-publish.sh
|
||||
```
|
||||
|
||||
# test-e2e-bc.sh
|
||||
|
||||
***test-e2e-bc.sh***
|
||||
|
||||
This script test that the update from 2.0.0 to 2.x.x is still smooth
|
||||
|
||||
## Examples
|
||||
|
||||
```sh
|
||||
./test-e2e-bc
|
||||
```
|
23
scripts/test-e2e-bc.sh
Executable file
23
scripts/test-e2e-bc.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
rm -rf "$DIR/../lib/node_modules/@angular"
|
||||
cd "$DIR/../integration/base_ver_2_app"
|
||||
|
||||
ADF_VERSION=$(npm view @alfresco/adf-core version)
|
||||
ANGULAR_VERSION="5.1.1"
|
||||
MATERIAL_VERSION="5.0.1"
|
||||
|
||||
npm install
|
||||
|
||||
#Use last js-api
|
||||
npm install --save alfresco-js-api@alpha
|
||||
|
||||
#New documented dependency
|
||||
npm install --save-exact --save @alfresco/adf-content-services@${ADF_VERSION} @alfresco/adf-core@${ADF_VERSION} @alfresco/adf-insights@${ADF_VERSION} @alfresco/adf-process-services@${ADF_VERSION}
|
||||
npm install --save-exact --save-dev @angular-devkit/core@0.0.28 @angular/compiler-cli@${ANGULAR_VERSION} typescript@2.6.2
|
||||
npm install --save @mat-datetimepicker/core @mat-datetimepicker/moment
|
||||
npm install --save-exact --save @angular/animations@${ANGULAR_VERSION} @angular/common@${ANGULAR_VERSION} @angular/compiler@${ANGULAR_VERSION} @angular/core@${ANGULAR_VERSION} @angular/platform-browser@${ANGULAR_VERSION} @angular/router@${ANGULAR_VERSION} @angular/flex-layout@2.0.0-beta.12 @angular/forms@${ANGULAR_VERSION} @angular/forms@${ANGULAR_VERSION} @angular/http@${ANGULAR_VERSION} @angular/platform-browser-dynamic@${ANGULAR_VERSION}
|
||||
npm install --save-exact --save @angular/cdk@${MATERIAL_VERSION} @angular/material@${MATERIAL_VERSION}
|
||||
|
||||
npm run e2e
|
Reference in New Issue
Block a user