From d908cf4754c53550d09cc0a002787fd04bf29492 Mon Sep 17 00:00:00 2001 From: Mario Romano Date: Mon, 7 Nov 2016 17:37:11 +0000 Subject: [PATCH] #878 #797 demo folder form component and documentation update --- .../ng2-activiti-analytics/README.md | 1 + .../ng2-activiti-analytics/demo/index.html | 3 +- .../ng2-activiti-analytics/demo/src/main.ts | 2 +- .../ng2-activiti-diagrams/README.md | 1 + .../ng2-activiti-diagrams/demo/index.html | 4 +- .../ng2-activiti-diagrams/demo/src/main.ts | 2 +- ng2-components/ng2-activiti-form/README.md | 272 +++++++++++------- .../ng2-activiti-form/demo/.gitignore | 6 + .../ng2-activiti-form/demo/.npmignore | 3 + .../ng2-activiti-form/demo/README.md | 13 + .../ng2-activiti-form/demo/index.html | 55 ++++ .../ng2-activiti-form/demo/package.json | 44 +++ .../ng2-activiti-form/demo/src/main.ts | 100 +++++++ .../ng2-activiti-form/demo/systemjs.config.js | 48 ++++ .../ng2-activiti-form/demo/tsconfig.json | 26 ++ .../ng2-activiti-form/demo/tslint.json | 124 ++++++++ ng2-components/ng2-activiti-form/package.json | 19 -- .../ng2-activiti-processlist/demo/index.html | 4 +- .../ng2-activiti-processlist/demo/src/main.ts | 2 +- .../ng2-activiti-tasklist/demo/index.html | 2 +- .../ng2-activiti-tasklist/demo/src/main.ts | 2 +- .../ng2-alfresco-datatable/demo/index.html | 2 +- .../ng2-alfresco-datatable/demo/src/main.ts | 2 +- .../ng2-alfresco-documentlist/demo/index.html | 2 +- .../demo/src/main.ts | 2 +- ng2-components/ng2-alfresco-login/README.md | 9 +- .../ng2-alfresco-login/demo/index.html | 2 +- .../ng2-alfresco-login/demo/src/main.ts | 2 +- .../ng2-alfresco-search/demo/index.html | 2 +- .../ng2-alfresco-search/demo/src/main.ts | 2 +- .../ng2-alfresco-tag/demo/index.html | 2 +- .../ng2-alfresco-tag/demo/src/main.ts | 2 +- .../ng2-alfresco-upload/demo/index.html | 2 +- .../ng2-alfresco-upload/demo/src/main.ts | 2 +- .../ng2-alfresco-userinfo/demo/index.html | 2 +- .../ng2-alfresco-userinfo/demo/src/main.ts | 2 +- .../ng2-alfresco-viewer/demo/index.html | 2 +- .../ng2-alfresco-viewer/demo/src/main.ts | 2 +- .../ng2-alfresco-webscript/demo/index.html | 2 +- .../ng2-alfresco-webscript/demo/src/main.ts | 2 +- 40 files changed, 620 insertions(+), 158 deletions(-) create mode 100644 ng2-components/ng2-activiti-form/demo/.gitignore create mode 100644 ng2-components/ng2-activiti-form/demo/.npmignore create mode 100644 ng2-components/ng2-activiti-form/demo/README.md create mode 100644 ng2-components/ng2-activiti-form/demo/index.html create mode 100644 ng2-components/ng2-activiti-form/demo/package.json create mode 100644 ng2-components/ng2-activiti-form/demo/src/main.ts create mode 100644 ng2-components/ng2-activiti-form/demo/systemjs.config.js create mode 100644 ng2-components/ng2-activiti-form/demo/tsconfig.json create mode 100644 ng2-components/ng2-activiti-form/demo/tslint.json diff --git a/ng2-components/ng2-activiti-analytics/README.md b/ng2-components/ng2-activiti-analytics/README.md index 15a5437144..80d53964c1 100644 --- a/ng2-components/ng2-activiti-analytics/README.md +++ b/ng2-components/ng2-activiti-analytics/README.md @@ -81,6 +81,7 @@ Follow the 3 steps below: + diff --git a/ng2-components/ng2-activiti-analytics/demo/index.html b/ng2-components/ng2-activiti-analytics/demo/index.html index 5251a3000a..05273a659d 100644 --- a/ng2-components/ng2-activiti-analytics/demo/index.html +++ b/ng2-components/ng2-activiti-analytics/demo/index.html @@ -35,6 +35,7 @@ + @@ -52,7 +53,7 @@ - + diff --git a/ng2-components/ng2-activiti-analytics/demo/src/main.ts b/ng2-components/ng2-activiti-analytics/demo/src/main.ts index f07b5f2668..b897f7cb7b 100644 --- a/ng2-components/ng2-activiti-analytics/demo/src/main.ts +++ b/ng2-components/ng2-activiti-analytics/demo/src/main.ts @@ -22,7 +22,7 @@ import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } fr import { AnalyticsModule } from 'ng2-activiti-analytics'; @Component({ - selector: 'activiti-analytics-demo', + selector: 'alfresco-app-demo', template: `

diff --git a/ng2-components/ng2-activiti-diagrams/README.md b/ng2-components/ng2-activiti-diagrams/README.md index 651aa9b0f9..0b1ba2aff1 100644 --- a/ng2-components/ng2-activiti-diagrams/README.md +++ b/ng2-components/ng2-activiti-diagrams/README.md @@ -74,6 +74,7 @@ Follow the 3 steps below: + diff --git a/ng2-components/ng2-activiti-diagrams/demo/index.html b/ng2-components/ng2-activiti-diagrams/demo/index.html index 5947d24cd0..e4c28bdaf4 100644 --- a/ng2-components/ng2-activiti-diagrams/demo/index.html +++ b/ng2-components/ng2-activiti-diagrams/demo/index.html @@ -28,7 +28,7 @@ - + @@ -43,7 +43,7 @@ - + diff --git a/ng2-components/ng2-activiti-diagrams/demo/src/main.ts b/ng2-components/ng2-activiti-diagrams/demo/src/main.ts index c1a0bae4ef..e48a224366 100644 --- a/ng2-components/ng2-activiti-diagrams/demo/src/main.ts +++ b/ng2-components/ng2-activiti-diagrams/demo/src/main.ts @@ -23,7 +23,7 @@ import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } fr import { DiagramsModule } from 'ng2-activiti-diagrams'; @Component({ - selector: 'activiti-diagrams-demo', + selector: 'alfresco-app-demo', template: `

diff --git a/ng2-components/ng2-activiti-form/README.md b/ng2-components/ng2-activiti-form/README.md index 2c440d58a5..6fb4a5fa34 100644 --- a/ng2-components/ng2-activiti-form/README.md +++ b/ng2-components/ng2-activiti-form/README.md @@ -1,73 +1,156 @@ -# Alfresco Bpm Form component for Angular 2 +# Alfresco Login Component for Angular 2 +

+ + travis
+    Status + + + travis
+    Status + + + Coverage Status + + + npm downloads + + + license + + + alfresco component + + + angular 2 + + + typescript + + + node version + +

## Prerequisites -Before you start using this development framework, make sure you have installed all required software and done all the +Before you start using this development framework, make sure you have installed all required software and done all the necessary configuration, see this [page](https://github.com/Alfresco/alfresco-ng2-components/blob/master/PREREQUISITES.md). ## Install -```sh -npm install --save ng2-activiti-form -``` +Follow the 3 steps below: -### Dependencies +1. Npm -Add the following dependency to your index.html: + ```sh + npm install ng2-activiti-form --save + ``` -```html - -``` +2. Html -You must separately install the following libraries for your application: - -- [ng2-translate](https://github.com/ocombe/ng2-translate) -- [ng2-alfresco-core](https://www.npmjs.com/package/ng2-alfresco-core) + Include these dependencies in your index.html page: -```sh -npm install --save ng2-translate ng2-alfresco-core -``` + ```html -#### Material Design Lite + + -The style of this component is based on [material design](https://getmdl.io/), so if you want to visualize it correctly you have to add the material -design dependency to your project: + + + + -```sh -npm install --save material-design-icons material-design-lite -``` + + + + -Also make sure you include these dependencies in your `index.html` file: + + + -```html - - - - -``` -#### Dialogs Polyfill + + + + -To make the dialog working with all the browser you have to add the dialog polyfill to you project: + + + + -```sh -npm install --save dialog-polyfill -``` + + + + + ``` -Also make sure you include these dependencies in your `index.html` file: +3. SystemJs -```html - - - - -``` + Add the following components to your systemjs.config.js file: + + - ng2-translate + - ng2-alfresco-core + + Please refer to the following example file: [systemjs.config.js](demo/systemjs + .config.js) . ## Basic usage examples +The component shows a Form from Activiti + +```html + +``` + +Example of an App that use Activiti Analytics List component : + +**main.ts** +```ts + +import { NgModule, Component } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core'; +import { ActivitiFormModule } from 'ng2-activiti-form'; + +@Component({ + selector: 'activiti-app-demo', + template: `` +}) + +export class FormDemoComponent { + + constructor(private authService: AlfrescoAuthenticationService, private settingsService: AlfrescoSettingsService) { + settingsService.bpmHost = 'http://localhost:9999'; + + this.authService.login('admin', 'admin').subscribe( + ticket => { + console.log(ticket); + }, + error => { + console.log(error); + }); + } +} + +@NgModule({ + imports: [ + BrowserModule, + CoreModule.forRoot(), + ActivitiFormModule.forRoot() + ], + declarations: [FormDemoComponent], + bootstrap: [FormDemoComponent] +}) +export class AppModule { +} + +platformBrowserDynamic().bootstrapModule(AppModule); + + +``` + ### Display form instance by task id ```html @@ -138,42 +221,38 @@ The recommended set of properties can be found in the following table: | Name | Type | Default | Description | | --- | --- | --- | --- | -| taskId | string | | Task id to fetch corresponding form and values. | -| formId | string | | The id of the form definition to load and display with custom values. | -| formName | string | | Name of hte form definition to load and display with custom values. | -| data | `FormValues` | | Custom form values map to be used with the rendered form. | -| showTitle | boolean | true | Toggle rendering of the form title. | -| showCompleteButton | boolean | true | Toggle rendering of the `Complete` outcome button. | -| showSaveButton | boolean | true | Toggle rendering of the `Save` outcome button. | -| showDebugButton | boolean | false | Toggle debug options. | -| readOnly | boolean | false | Toggle readonly state of the form. Enforces all form widgets render readonly if enabled. | -| showRefreshButton | boolean | true | Toggle rendering of the `Refresh` button. | -| saveMetadata | boolean | false | Store the value of the form as metadata. | -| path | string | | Path of the folder where to store the metadata. | -| nameNode (optional) | string | true | Name to assign to the new node where the metadata are stored. | +| `taskId` | string | | Task id to fetch corresponding form and values. | +| `formId` | string | | The id of the form definition to load and display with custom values. | +| `formName` | string | | Name of hte form definition to load and display with custom values. | +| `data` | FormValues | | Custom form values map to be used with the rendered form. | +| `showTitle` | boolean | true | Toggle rendering of the form title. | +| `showCompleteButton` | boolean | true | Toggle rendering of the `Complete` outcome button. | +| `showSaveButton` | boolean | true | Toggle rendering of the `Save` outcome button. | +| `showDebugButton` | boolean | false | Toggle debug options. | +| `readOnly` | boolean | false | Toggle readonly state of the form. Enforces all form widgets render readonly if enabled. | +| `showRefreshButton` | boolean | true | Toggle rendering of the `Refresh` button. | +| `saveMetadata` | boolean | false | Store the value of the form as metadata. | +| `path` | string | | Path of the folder where to store the metadata. | +| `nameNode` (optional) | string | true | Name to assign to the new node where the metadata are stored. | - - * {path} string - path of the folder where the to store the metadata - * - * {nameNode} string (optional) - name of the node stored, if not defined the node will be sotred with an uuid as name #### Advanced properties The following properties are for complex customisation purposes: | Name | Type | Default | Description | | --- | --- | --- | --- | -| form | `FormModel` | | Underlying form model instance. | -| debugMode | boolean | false | Toggle debug mode, allows displaying additional data for development and debugging purposes. | +| `form` | FormModel | | Underlying form model instance. | +| `debugMode` | boolean | false | Toggle debug mode, allows displaying additional data for development and debugging purposes. | ### Events | Name | Description | | --- | --- | -| formLoaded | Invoked when form is loaded or reloaded. | -| formSaved | Invoked when form is submitted with `Save` or custom outcomes. | -| formCompleted | Invoked when form is submitted with `Complete` outcome. | -| executeOutcome | Invoked when any outcome is executed, default behaviour can be prevented via `event.preventDefault()` | -| onError | Invoked at any error | +| `formLoaded` | Invoked when form is loaded or reloaded. | +| `formSaved` | Invoked when form is submitted with `Save` or custom outcomes. | +| `formCompleted` | Invoked when form is submitted with `Complete` outcome. | +| `executeOutcome` | Invoked when any outcome is executed, default behaviour can be prevented via `event.preventDefault()` | +| `onError` | Invoked at any error | All `form*` events receive an instance of the `FormModel` as event argument for ease of development: @@ -242,46 +321,11 @@ There are two additional functions that can be of a great value when controlling **Please note that if `event.preventDefault()` is not called then default outcome behaviour will also be executed after your custom code.** -## Supported form widgets - -Form renderer provides support for all basic widgets: - -- [x] Tabs -- [x] Text -- [x] Multiline Text -- [x] Number -- [x] Checkbox -- [x] Date -- Dropdown - * [x] Manual - * [x] REST service -- [x] Typeahead -- [x] Amount -- Radio buttons - * [x] Manual - * [x] REST service -- [x] People -- [x] Group of People -- [x] Dynamic Table -- [x] Hyperlink -- Header - * [x] Plain header - * [x] Collapsible header -- [x] Attach file ** -- [x] Display value -- [x] Display text - -** Files may be uploaded from a user's device if the file source selected is -'Local file' or 'All sources' and 'link to files' is not selected. Alternatively -you can link to files in a configured Alfresco repository by selecting this source -explicitly from the list and making sure that 'link to files' is selected. Copying -files from Alfresco into Activiti via the control (no linking) is not currently -supported, nor is allowing the user to choose between more than one source. - ## Build from sources Alternatively you can build component from sources with the following commands: + ```sh npm install npm run build @@ -293,7 +337,7 @@ npm run build $ npm run build:w ``` -### Running unit tests +## Running unit tests ```sh npm test @@ -313,3 +357,17 @@ before performing unit testing. ```sh npm run coverage ``` + +## Demo + +If you want have a demo of how the component works, please check the demo folder : + +```sh +cd demo +npm install +npm start +``` + +## License + +[Apache Version 2.0](https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE) diff --git a/ng2-components/ng2-activiti-form/demo/.gitignore b/ng2-components/ng2-activiti-form/demo/.gitignore new file mode 100644 index 0000000000..25beca4c27 --- /dev/null +++ b/ng2-components/ng2-activiti-form/demo/.gitignore @@ -0,0 +1,6 @@ +node_modules +.idea +coverage +dist +typings +!systemjs.config.js diff --git a/ng2-components/ng2-activiti-form/demo/.npmignore b/ng2-components/ng2-activiti-form/demo/.npmignore new file mode 100644 index 0000000000..c51c008259 --- /dev/null +++ b/ng2-components/ng2-activiti-form/demo/.npmignore @@ -0,0 +1,3 @@ +node_modules +dist +typings \ No newline at end of file diff --git a/ng2-components/ng2-activiti-form/demo/README.md b/ng2-components/ng2-activiti-form/demo/README.md new file mode 100644 index 0000000000..3ff7a9b658 --- /dev/null +++ b/ng2-components/ng2-activiti-form/demo/README.md @@ -0,0 +1,13 @@ +# Activiti Form demo + +Install: + +``` +npm install +``` + +Run the project: + +``` +npm start +``` \ No newline at end of file diff --git a/ng2-components/ng2-activiti-form/demo/index.html b/ng2-components/ng2-activiti-form/demo/index.html new file mode 100644 index 0000000000..e56ebeef76 --- /dev/null +++ b/ng2-components/ng2-activiti-form/demo/index.html @@ -0,0 +1,55 @@ + + + + + + Alfresco Angular 2 Activiti Form - Demo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ng2-components/ng2-activiti-form/demo/package.json b/ng2-components/ng2-activiti-form/demo/package.json new file mode 100644 index 0000000000..9d754883ab --- /dev/null +++ b/ng2-components/ng2-activiti-form/demo/package.json @@ -0,0 +1,44 @@ +{ + "name": "ng2-activiti-form-demo", + "description": "Alfresco Activiti Form Component - Demo", + "version": "0.1.0", + "author": "Alfresco Software, Ltd.", + "main": "index.js", + "scripts": { + "clean": "npm install rimraf && rimraf dist node_modules typings dist", + "postinstall": "npm run build", + "start": "npm run build && concurrently \"npm run tsc:w\" \"npm run server\" ", + "server": "wsrv -o -s -l", + "build": "npm run tslint && rimraf dist && tsc", + "build:w": "npm run tslint && rimraf dist && tsc -w", + "tsc": "tsc", + "tsc:w": "tsc -w", + "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json src/{,**/}**.ts" + }, + "license": "Apache-2.0", + "contributors": [ + { + "name": "Mario Romano", + "email": "mario.romano@alfresco.com" + } + ], + "keywords": [ + "ng2", + "angular", + "angular2", + "activiti", + "activiti-form" + ], + "dependencies": { + "ng2-activiti-form": "^0.3.0" + }, + "devDependencies": { + "@types/core-js": "^0.9.32", + "@types/jasmine": "^2.2.33", + "concurrently": "^2.2.0", + "rimraf": "2.5.2", + "tslint": "^3.8.1", + "typescript": "^2.0.3", + "wsrv": "^0.1.5" + } +} diff --git a/ng2-components/ng2-activiti-form/demo/src/main.ts b/ng2-components/ng2-activiti-form/demo/src/main.ts new file mode 100644 index 0000000000..ea35ad17b1 --- /dev/null +++ b/ng2-components/ng2-activiti-form/demo/src/main.ts @@ -0,0 +1,100 @@ +/*! + * @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 { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } from 'ng2-alfresco-core'; +import { ActivitiFormModule } from 'ng2-activiti-form'; + +@Component({ + selector: 'alfresco-app-demo', + template: ` +
+
+
+

+
+ Authentication failed to ip {{ host }} with user: admin, admin, you can still try to add a valid ticket to perform + operations. +
+
+ +
+ + ` +}) + +export class FormDemoComponent implements OnInit { + + taskId: number; + + authenticated: boolean; + + host: string = 'http://localhost:9999'; + + ticket: string; + + constructor(private authService: AlfrescoAuthenticationService, private settingsService: AlfrescoSettingsService) { + settingsService.bpmHost = this.host; + settingsService.setProviders('BPM'); + + if (this.authService.getTicketBpm()) { + this.ticket = this.authService.getTicketBpm(); + } + } + + public updateTicket(): void { + localStorage.setItem('ticket-BPM', this.ticket); + } + + public updateHost(): void { + this.settingsService.bpmHost = this.host; + this.login(); + } + + public ngOnInit(): void { + this.login(); + } + + login() { + this.authService.login('admin', 'admin').subscribe( + ticket => { + console.log(ticket); + this.ticket = this.authService.getTicketBpm(); + this.authenticated = true; + }, + error => { + console.log(error); + this.authenticated = false; + }); + } +} + +@NgModule({ + imports: [ + BrowserModule, + CoreModule.forRoot(), + ActivitiFormModule.forRoot() + ], + declarations: [FormDemoComponent], + bootstrap: [FormDemoComponent] +}) +export class AppModule { +} + +platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/ng2-components/ng2-activiti-form/demo/systemjs.config.js b/ng2-components/ng2-activiti-form/demo/systemjs.config.js new file mode 100644 index 0000000000..3860ed6679 --- /dev/null +++ b/ng2-components/ng2-activiti-form/demo/systemjs.config.js @@ -0,0 +1,48 @@ +/** + * System configuration for Angular 2 samples + * Adjust as necessary for your application needs. + */ +(function (global) { + System.config({ + paths: { + // paths serve as alias + 'npm:': 'node_modules/' + }, + // map tells the System loader where to look for things + map: { + // our app is within the app folder + app: 'dist', + // 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', + // other libraries + 'rxjs': 'npm:rxjs', + 'moment': 'npm:moment/min/moment.min.js', + 'ng2-translate': 'npm:ng2-translate', + 'alfresco-js-api': 'npm:alfresco-js-api/dist', + 'ng2-alfresco-core': 'npm:ng2-alfresco-core/dist', + 'ng2-activiti-form': 'npm:ng2-activiti-form/dist' + }, + // packages tells the System loader how to load when no filename and/or no extension + packages: { + app: { + main: './main.js', + defaultExtension: 'js' + }, + rxjs: { + defaultExtension: 'js' + }, + '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-form': { main: './index.js', defaultExtension: 'js'} + } + }); +})(this); diff --git a/ng2-components/ng2-activiti-form/demo/tsconfig.json b/ng2-components/ng2-activiti-form/demo/tsconfig.json new file mode 100644 index 0000000000..7be35bfec8 --- /dev/null +++ b/ng2-components/ng2-activiti-form/demo/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "sourceMap": true, + "removeComments": true, + "declaration": true, + "noLib": false, + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "noImplicitAny": false, + "noImplicitReturns": false, + "noImplicitUseStrict": false, + "noFallthroughCasesInSwitch": true, + "outDir": "dist", + "types": ["core-js", "jasmine", "node"] + }, + "exclude": [ + "demo", + "node_modules", + "dist" + ] +} diff --git a/ng2-components/ng2-activiti-form/demo/tslint.json b/ng2-components/ng2-activiti-form/demo/tslint.json new file mode 100644 index 0000000000..8c9703b9de --- /dev/null +++ b/ng2-components/ng2-activiti-form/demo/tslint.json @@ -0,0 +1,124 @@ +{ + "rules": { + "align": [ + true, + "parameters", + "arguments", + "statements" + ], + "ban": false, + "class-name": true, + "comment-format": [ + true, + "check-space", + "check-lowercase" + ], + "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, + "public-before-private", + "static-before-instance", + "variables-before-functions" + ], + "no-any": false, + "no-arg": true, + "no-bitwise": true, + "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": true, + "no-eval": true, + "no-inferrable-types": false, + "no-internal-module": true, + "no-require-imports": true, + "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" + ] + } +} diff --git a/ng2-components/ng2-activiti-form/package.json b/ng2-components/ng2-activiti-form/package.json index f2df68ed03..75c9924e5b 100644 --- a/ng2-components/ng2-activiti-form/package.json +++ b/ng2-components/ng2-activiti-form/package.json @@ -45,27 +45,8 @@ "activiti" ], "dependencies": { - "@angular/common": "2.0.0", - "@angular/compiler": "2.0.0", - "@angular/core": "2.0.0", - "@angular/forms": "2.0.0", - "@angular/http": "2.0.0", - "@angular/platform-browser": "2.0.0", - "@angular/platform-browser-dynamic": "2.0.0", - "@angular/router": "3.0.0", - "@angular/upgrade": "2.0.0", - "@types/node": "^6.0.42", - "core-js": "^2.4.1", - "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-beta.12", - "systemjs": "0.19.27", - "zone.js": "^0.6.23", - - "ng2-translate": "2.5.0", "moment": "2.15.1", "md-date-time-picker": "^2.2.0", - - "alfresco-js-api": "^0.3.0", "ng2-alfresco-core": "0.3.2" }, "devDependencies": { diff --git a/ng2-components/ng2-activiti-processlist/demo/index.html b/ng2-components/ng2-activiti-processlist/demo/index.html index 1fe571c84c..3394cbf243 100644 --- a/ng2-components/ng2-activiti-processlist/demo/index.html +++ b/ng2-components/ng2-activiti-processlist/demo/index.html @@ -24,9 +24,9 @@ - +
-
+ diff --git a/ng2-components/ng2-activiti-processlist/demo/src/main.ts b/ng2-components/ng2-activiti-processlist/demo/src/main.ts index f6f5f52a6c..930fc783c1 100644 --- a/ng2-components/ng2-activiti-processlist/demo/src/main.ts +++ b/ng2-components/ng2-activiti-processlist/demo/src/main.ts @@ -24,7 +24,7 @@ import { ActivitiProcessListModule } from 'ng2-activiti-processlist'; import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; @Component({ - selector: 'my-app', + selector: 'alfresco-app-demo', template: `


diff --git a/ng2-components/ng2-activiti-tasklist/demo/index.html b/ng2-components/ng2-activiti-tasklist/demo/index.html index 19590ff9e8..3a6d1f47f0 100644 --- a/ng2-components/ng2-activiti-tasklist/demo/index.html +++ b/ng2-components/ng2-activiti-tasklist/demo/index.html @@ -26,7 +26,7 @@ - + diff --git a/ng2-components/ng2-activiti-tasklist/demo/src/main.ts b/ng2-components/ng2-activiti-tasklist/demo/src/main.ts index 78f34a7513..f01cbd302a 100644 --- a/ng2-components/ng2-activiti-tasklist/demo/src/main.ts +++ b/ng2-components/ng2-activiti-tasklist/demo/src/main.ts @@ -26,7 +26,7 @@ import { ActivitiTaskListModule } from 'ng2-activiti-tasklist'; import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; @Component({ - selector: 'activiti-tasklist-demo', + selector: 'alfresco-app-demo', template: `


diff --git a/ng2-components/ng2-alfresco-datatable/demo/index.html b/ng2-components/ng2-alfresco-datatable/demo/index.html index c32a86e1e9..c9a7a00b04 100644 --- a/ng2-components/ng2-alfresco-datatable/demo/index.html +++ b/ng2-components/ng2-alfresco-datatable/demo/index.html @@ -26,7 +26,7 @@ - + diff --git a/ng2-components/ng2-alfresco-datatable/demo/src/main.ts b/ng2-components/ng2-alfresco-datatable/demo/src/main.ts index 98cd125fbe..8b9daed126 100644 --- a/ng2-components/ng2-alfresco-datatable/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-datatable/demo/src/main.ts @@ -30,7 +30,7 @@ import { } from 'ng2-alfresco-datatable'; @Component({ - selector: 'alfresco-datatable-demo', + selector: 'alfresco-app-demo', template: `
diff --git a/ng2-components/ng2-alfresco-documentlist/demo/index.html b/ng2-components/ng2-alfresco-documentlist/demo/index.html index 8d2c80e4b8..46982ae396 100644 --- a/ng2-components/ng2-alfresco-documentlist/demo/index.html +++ b/ng2-components/ng2-alfresco-documentlist/demo/index.html @@ -31,7 +31,7 @@ - + diff --git a/ng2-components/ng2-alfresco-documentlist/demo/src/main.ts b/ng2-components/ng2-alfresco-documentlist/demo/src/main.ts index cd7259ee9f..5e9cc10c94 100644 --- a/ng2-components/ng2-alfresco-documentlist/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-documentlist/demo/src/main.ts @@ -32,7 +32,7 @@ import { import { DocumentActionsService } from 'ng2-alfresco-documentlist'; @Component({ - selector: 'alfresco-documentlist-demo', + selector: 'alfresco-app-demo', template: `

diff --git a/ng2-components/ng2-alfresco-login/README.md b/ng2-components/ng2-alfresco-login/README.md index 7532894b79..21fd802154 100644 --- a/ng2-components/ng2-alfresco-login/README.md +++ b/ng2-components/ng2-alfresco-login/README.md @@ -69,11 +69,12 @@ Follow the 3 steps below: + - - - - + + + + ``` 3. SystemJs diff --git a/ng2-components/ng2-alfresco-login/demo/index.html b/ng2-components/ng2-alfresco-login/demo/index.html index 3d4bce6e84..919ff26850 100644 --- a/ng2-components/ng2-alfresco-login/demo/index.html +++ b/ng2-components/ng2-alfresco-login/demo/index.html @@ -37,7 +37,7 @@ - + diff --git a/ng2-components/ng2-alfresco-login/demo/src/main.ts b/ng2-components/ng2-alfresco-login/demo/src/main.ts index c070ab3bee..1e270cb86b 100644 --- a/ng2-components/ng2-alfresco-login/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-login/demo/src/main.ts @@ -23,7 +23,7 @@ import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } fr import { LoginModule } from 'ng2-alfresco-login'; @Component({ - selector: 'my-app', + selector: 'alfresco-app-demo', template: `
ECM Host:
diff --git a/ng2-components/ng2-alfresco-search/demo/index.html b/ng2-components/ng2-alfresco-search/demo/index.html index f6b743299f..a4180c26a3 100644 --- a/ng2-components/ng2-alfresco-search/demo/index.html +++ b/ng2-components/ng2-alfresco-search/demo/index.html @@ -26,7 +26,7 @@
- +
diff --git a/ng2-components/ng2-alfresco-search/demo/src/main.ts b/ng2-components/ng2-alfresco-search/demo/src/main.ts index 631bc6d216..2259a85d8a 100644 --- a/ng2-components/ng2-alfresco-search/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-search/demo/src/main.ts @@ -30,7 +30,7 @@ import { @Component({ - selector: 'alfresco-search-demo', + selector: 'alfresco-app-demo', template: `


diff --git a/ng2-components/ng2-alfresco-tag/demo/index.html b/ng2-components/ng2-alfresco-tag/demo/index.html index 309e792adc..0d4cf98d82 100644 --- a/ng2-components/ng2-alfresco-tag/demo/index.html +++ b/ng2-components/ng2-alfresco-tag/demo/index.html @@ -30,7 +30,7 @@ - + diff --git a/ng2-components/ng2-alfresco-tag/demo/src/main.ts b/ng2-components/ng2-alfresco-tag/demo/src/main.ts index 8af97cc33a..519b1f1271 100644 --- a/ng2-components/ng2-alfresco-tag/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-tag/demo/src/main.ts @@ -23,7 +23,7 @@ import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } fr import { TagModule } from 'ng2-alfresco-tag'; @Component({ - selector: 'alfresco-tag-demo', + selector: 'alfresco-app-demo', template: `

diff --git a/ng2-components/ng2-alfresco-upload/demo/index.html b/ng2-components/ng2-alfresco-upload/demo/index.html index 0de5abaeda..9637c2b781 100644 --- a/ng2-components/ng2-alfresco-upload/demo/index.html +++ b/ng2-components/ng2-alfresco-upload/demo/index.html @@ -28,7 +28,7 @@ - + diff --git a/ng2-components/ng2-alfresco-upload/demo/src/main.ts b/ng2-components/ng2-alfresco-upload/demo/src/main.ts index 0169851cd1..d03a393d23 100644 --- a/ng2-components/ng2-alfresco-upload/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-upload/demo/src/main.ts @@ -23,7 +23,7 @@ import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } fr import { UploadModule } from 'ng2-alfresco-upload'; @Component({ - selector: 'my-app', + selector: 'alfresco-app-demo', template: `


diff --git a/ng2-components/ng2-alfresco-userinfo/demo/index.html b/ng2-components/ng2-alfresco-userinfo/demo/index.html index 21b9bde5ee..6d0b272ba6 100644 --- a/ng2-components/ng2-alfresco-userinfo/demo/index.html +++ b/ng2-components/ng2-alfresco-userinfo/demo/index.html @@ -26,7 +26,7 @@ - + diff --git a/ng2-components/ng2-alfresco-userinfo/demo/src/main.ts b/ng2-components/ng2-alfresco-userinfo/demo/src/main.ts index cb56b38c7b..171af79d8d 100644 --- a/ng2-components/ng2-alfresco-userinfo/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-userinfo/demo/src/main.ts @@ -24,7 +24,7 @@ import { CoreModule } from 'ng2-alfresco-core'; import { AlfrescoAuthenticationService, AlfrescoSettingsService } from 'ng2-alfresco-core'; @Component({ - selector: 'alfresco-userinfo-demo', + selector: 'alfresco-app-demo', template: `

START DEMO USERINFO

diff --git a/ng2-components/ng2-alfresco-viewer/demo/index.html b/ng2-components/ng2-alfresco-viewer/demo/index.html index 6c6cb39409..322b3edc35 100644 --- a/ng2-components/ng2-alfresco-viewer/demo/index.html +++ b/ng2-components/ng2-alfresco-viewer/demo/index.html @@ -29,7 +29,7 @@ - + diff --git a/ng2-components/ng2-alfresco-viewer/demo/src/main.ts b/ng2-components/ng2-alfresco-viewer/demo/src/main.ts index ec2ea9b2b6..378184d205 100644 --- a/ng2-components/ng2-alfresco-viewer/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-viewer/demo/src/main.ts @@ -22,7 +22,7 @@ import { CoreModule, AlfrescoSettingsService, AlfrescoAuthenticationService } fr import { ViewerModule } from 'ng2-alfresco-viewer'; @Component({ - selector: 'my-app', + selector: 'alfresco-app-demo', template: `

diff --git a/ng2-components/ng2-alfresco-webscript/demo/index.html b/ng2-components/ng2-alfresco-webscript/demo/index.html index ec2facc018..90435737db 100644 --- a/ng2-components/ng2-alfresco-webscript/demo/index.html +++ b/ng2-components/ng2-alfresco-webscript/demo/index.html @@ -33,7 +33,7 @@ - + diff --git a/ng2-components/ng2-alfresco-webscript/demo/src/main.ts b/ng2-components/ng2-alfresco-webscript/demo/src/main.ts index 186a6ac43c..66b3a8d1f7 100644 --- a/ng2-components/ng2-alfresco-webscript/demo/src/main.ts +++ b/ng2-components/ng2-alfresco-webscript/demo/src/main.ts @@ -24,7 +24,7 @@ import { DataTableModule } from 'ng2-alfresco-datatable'; import { WebScriptModule } from 'ng2-alfresco-webscript'; @Component({ - selector: 'alfresco-webscript-demo', + selector: 'alfresco-app-demo', template: `