diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index 1c05bb4deb..539ef8b1d5 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -35,7 +35,7 @@ "alfresco" ], "dependencies": { - "alfresco-core-rest-api": "https://github.com/Alfresco/dev-platform-js-api", + "alfresco-core-rest-api": "git@github.com:Alfresco/dev-platform-js-api.git#master", "angular2": "2.0.0-beta.15", "bootstrap": "^3.3.6", "es6-shim": "^0.35.0", diff --git a/ng2-components/ng2-alfresco-viewer/README.md b/ng2-components/ng2-alfresco-viewer/README.md index 41b500a54b..7d010567bb 100644 --- a/ng2-components/ng2-alfresco-viewer/README.md +++ b/ng2-components/ng2-alfresco-viewer/README.md @@ -1,4 +1,4 @@ -# <ng-2-alfresco-viewer> +# <ng2-alfresco-viewer> [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] @@ -6,19 +6,19 @@ [![Style guide][style-image]][style-url] [![Alfresco component][alfrescocomponent-image]][alfrescocomponent-url] -## About ng-2-alfresco-viewer +## About ng2-alfresco-viewer > Alfresco documents viewer ## Installation ```bash -npm install ng-2-alfresco-viewer --save +npm install ng2-alfresco-viewer --save ``` ## Example ```html - + ``` ## Reference @@ -60,21 +60,21 @@ Method | Parameters | Returns | Description ## History -For detailed changelog, check [Releases](https://github.com/alfresco/ng-2-alfresco-viewer/releases). +For detailed changelog, check [Releases](https://github.com/alfresco/ng2-alfresco-viewer/releases). ## Contributors -[Contributors](https://github.com/alfresco/ng-2-alfresco-viewer/graphs/contributors) +[Contributors](https://github.com/alfresco/ng2-alfresco-viewer/graphs/contributors) -[npm-image]: https://badge.fury.io/js/ng-2-alfresco-viewer.svg -[npm-url]: https://npmjs.org/package/ng-2-alfresco-viewer -[travis-image]: https://travis-ci.org/alfresco/ng-2-alfresco-viewer.svg?branch=master -[travis-url]: https://travis-ci.org/alfresco/ng-2-alfresco-viewer -[daviddm-image]: https://david-dm.org/alfresco/ng-2-alfresco-viewer.svg?theme=shields.io -[daviddm-url]: https://david-dm.org/alfresco/ng-2-alfresco-viewer -[coveralls-image]: https://coveralls.io/repos/alfresco/ng-2-alfresco-viewer/badge.svg -[coveralls-url]: https://coveralls.io/r/alfresco/ng-2-alfresco-viewer +[npm-image]: https://badge.fury.io/js/ng2-alfresco-viewer.svg +[npm-url]: https://npmjs.org/package/ng2-alfresco-viewer +[travis-image]: https://travis-ci.org/alfresco/ng2-alfresco-viewer.svg?branch=master +[travis-url]: https://travis-ci.org/alfresco/ng2-alfresco-viewer +[daviddm-image]: https://david-dm.org/alfresco/ng2-alfresco-viewer.svg?theme=shields.io +[daviddm-url]: https://david-dm.org/alfresco/ng2-alfresco-viewer +[coveralls-image]: https://coveralls.io/repos/alfresco/ng2-alfresco-viewer/badge.svg +[coveralls-url]: https://coveralls.io/r/alfresco/ng2-alfresco-viewer [style-url]: https://github.com/mgechev/angular2-style-guide [style-image]: https://mgechev.github.io/angular2-style-guide/images/badge.svg [alfrescocomponent-image]: https://img.shields.io/badge/Alfresco%20component-approved-green.svg diff --git a/ng2-components/ng2-alfresco-viewer/index.html b/ng2-components/ng2-alfresco-viewer/index.html new file mode 100644 index 0000000000..d263eb1cc5 --- /dev/null +++ b/ng2-components/ng2-alfresco-viewer/index.html @@ -0,0 +1,54 @@ + + + + + Angular 2 Viewer - Demo + + + + + + + + + + + + + + + + + + + +Loading... + + + diff --git a/ng2-components/ng2-alfresco-viewer/localTestFile.pdf b/ng2-components/ng2-alfresco-viewer/localTestFile.pdf new file mode 100644 index 0000000000..d9f91b87de Binary files /dev/null and b/ng2-components/ng2-alfresco-viewer/localTestFile.pdf differ diff --git a/ng2-components/ng2-alfresco-viewer/main.ts b/ng2-components/ng2-alfresco-viewer/main.ts new file mode 100644 index 0000000000..c5bcba005a --- /dev/null +++ b/ng2-components/ng2-alfresco-viewer/main.ts @@ -0,0 +1,4 @@ +import {bootstrap} from 'angular2/platform/browser'; +import {Ng2AlfrescoViewerComponent} from './ng2-alfresco-viewer'; + +bootstrap(Ng2AlfrescoViewerComponent); diff --git a/ng2-components/ng2-alfresco-viewer/ng-2-alfresco-viewer.ts b/ng2-components/ng2-alfresco-viewer/ng2-alfresco-viewer.ts similarity index 92% rename from ng2-components/ng2-alfresco-viewer/ng-2-alfresco-viewer.ts rename to ng2-components/ng2-alfresco-viewer/ng2-alfresco-viewer.ts index f8701dc6fa..7df699277d 100644 --- a/ng2-components/ng2-alfresco-viewer/ng-2-alfresco-viewer.ts +++ b/ng2-components/ng2-alfresco-viewer/ng2-alfresco-viewer.ts @@ -15,4 +15,4 @@ * limitations under the License. */ -export * from './src/ng-2-alfresco-viewer.component'; +export * from './src/ng2-alfresco-viewer.component'; diff --git a/ng2-components/ng2-alfresco-viewer/package.json b/ng2-components/ng2-alfresco-viewer/package.json index a3f2b40ad4..fe5c9451d8 100644 --- a/ng2-components/ng2-alfresco-viewer/package.json +++ b/ng2-components/ng2-alfresco-viewer/package.json @@ -4,13 +4,13 @@ "pdf", "alfresco-component" ], - "name": "ng-2-alfresco-viewer", + "name": "ng2-alfresco-viewer", "description": "Alfresco documents viewer", "version": "0.1.1", "author": "Eugenio Romano", "scripts": { "typings": "typings install", - "start": "npm run test && http-server -c-1 -o -p 8875 .", + "start": "http-server -c-1 -o -p 8875 .", "build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check", "tslint": "npm run tslint-src && npm run tslint-root", "tslint-src": "tslint -c tslint.json src/**/*.ts", @@ -25,15 +25,14 @@ "test": "karma start karma.conf.js", "posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html", "coverage": "http-server -c-1 -o -p 9875 ./coverage", - "deploy": "http-server -c-1 -o -p 9875 ./demo/demo.html", "prepublish": "npm run build" }, "repository": { "type": "git", - "url": "https://github.com/alfresco/ng-2-alfresco-viewer.git" + "url": "https://github.com/alfresco/ng2-alfresco-viewer.git" }, "bugs": { - "url": "https://github.com/alfresco/ng-2-alfresco-viewer/issues" + "url": "https://github.com/alfresco/ng2-alfresco-viewer/issues" }, "dependencies": { "angular2": "2.0.0-beta.15", diff --git a/ng2-components/ng2-alfresco-viewer/src/ng-2-alfresco-viewer.component.spec.ts b/ng2-components/ng2-alfresco-viewer/src/ng2-alfresco-viewer.component.spec.ts similarity index 88% rename from ng2-components/ng2-alfresco-viewer/src/ng-2-alfresco-viewer.component.spec.ts rename to ng2-components/ng2-alfresco-viewer/src/ng2-alfresco-viewer.component.spec.ts index 937d31ca34..e075db50ea 100644 --- a/ng2-components/ng2-alfresco-viewer/src/ng-2-alfresco-viewer.component.spec.ts +++ b/ng2-components/ng2-alfresco-viewer/src/ng2-alfresco-viewer.component.spec.ts @@ -17,9 +17,9 @@ import {describe, expect, it, injectAsync, TestComponentBuilder, setBaseTestProviders} from 'angular2/testing'; import {TEST_BROWSER_PLATFORM_PROVIDERS, TEST_BROWSER_APPLICATION_PROVIDERS} from 'angular2/platform/testing/browser'; -import {Ng2AlfrescoViewerComponent} from '../src/ng-2-alfresco-viewer.component'; +import {Ng2AlfrescoViewerComponent} from '../src/ng2-alfresco-viewer.component'; -describe('Basic Example test ng-2-alfresco-viewer', () => { +describe('Basic Example test ng2-alfresco-viewer', () => { setBaseTestProviders(TEST_BROWSER_PLATFORM_PROVIDERS, TEST_BROWSER_APPLICATION_PROVIDERS); it('Test hello world', injectAsync([TestComponentBuilder], (tcb:TestComponentBuilder) => { @@ -28,7 +28,7 @@ describe('Basic Example test ng-2-alfresco-viewer', () => { .then((fixture) => { let element = fixture.nativeElement; expect(element.querySelector('h1')).toBeDefined(); - expect(element.getElementsByTagName('h1')[0].innerHTML).toEqual('ng-2-alfresco-viewer'); + expect(element.getElementsByTagName('h1')[0].innerHTML).toEqual('ng2-alfresco-viewer'); }); })); }); diff --git a/ng2-components/ng2-alfresco-viewer/src/ng-2-alfresco-viewer.component.ts b/ng2-components/ng2-alfresco-viewer/src/ng2-alfresco-viewer.component.ts similarity index 80% rename from ng2-components/ng2-alfresco-viewer/src/ng-2-alfresco-viewer.component.ts rename to ng2-components/ng2-alfresco-viewer/src/ng2-alfresco-viewer.component.ts index bd93803bea..e623867bfa 100644 --- a/ng2-components/ng2-alfresco-viewer/src/ng-2-alfresco-viewer.component.ts +++ b/ng2-components/ng2-alfresco-viewer/src/ng2-alfresco-viewer.component.ts @@ -18,7 +18,7 @@ import {Component} from 'angular2/core'; @Component({ - selector: 'ng-2-alfresco-viewer', + selector: 'ng2-alfresco-viewer', styles: [ ` :host h1 { @@ -26,6 +26,12 @@ import {Component} from 'angular2/core'; } ` ], - template: `

ng-2-alfresco-viewer

` + template: `

ng2-alfresco-viewer

` }) -export class Ng2AlfrescoViewerComponent {} +export class Ng2AlfrescoViewerComponent { + + constructor() { + console.log('../contructor'); + } + +}