mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#68 move example in demo folder
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
"start": "rm -rf dist && npm install && http-server -c-1 -o -p 8875 .",
|
"start": "rm -rf dist && npm install && http-server -c-1 -o -p 8875 .",
|
||||||
"build": "rm -rf dist && tsc"
|
"build": "rm -rf dist && tsc"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-beta.13",
|
"angular2": "2.0.0-beta.13",
|
||||||
"es6-promise": "3.0.2",
|
"es6-promise": "3.0.2",
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
"build": "rm -rf dist && tsc",
|
"build": "rm -rf dist && tsc",
|
||||||
"pretest": "npm install && npm run build"
|
"pretest": "npm install && npm run build"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-beta.13",
|
"angular2": "2.0.0-beta.13",
|
||||||
"es6-promise": "3.0.2",
|
"es6-promise": "3.0.2",
|
||||||
|
@@ -1,101 +1,102 @@
|
|||||||
{
|
{
|
||||||
"name": "ng2-alfresco-upload",
|
"name": "ng2-alfresco-upload",
|
||||||
"description": "Alfresco Angular2 Upload Component",
|
"description": "Alfresco Angular2 Upload Component",
|
||||||
"version": "0.1.10",
|
"version": "0.1.10",
|
||||||
"author": "Alfresco Software, Ltd.",
|
"author": "Alfresco Software, Ltd.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"typings": "typings install",
|
"typings": "typings install",
|
||||||
"start": "npm run test && http-server -c-1 -o -p 8875 .",
|
"start": "npm run test && http-server -c-1 -o -p 8875 .",
|
||||||
"build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check",
|
"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": "npm run tslint-src && npm run tslint-root",
|
||||||
"tslint-src": "tslint -c tslint.json src/**/*.ts",
|
"tslint-src": "tslint -c tslint.json src/**/*.ts",
|
||||||
"tslint-root": "tslint -c tslint.json *.ts",
|
"tslint-root": "tslint -c tslint.json *.ts",
|
||||||
"copytemplates": "npm run copy-html && npm run copy-css && npm run copy-i18n",
|
"copytemplates": "npm run copy-html && npm run copy-css && npm run copy-i18n",
|
||||||
"copy-html": "copyfiles './src/**/*.html' dist",
|
"copy-html": "copyfiles './src/**/*.html' dist",
|
||||||
"copy-css": "copyfiles './src/**/*.css' dist",
|
"copy-css": "copyfiles './src/**/*.css' dist",
|
||||||
"copy-i18n": "copyfiles './i18n/**/*.json' dist",
|
"copy-i18n": "copyfiles './i18n/**/*.json' dist",
|
||||||
"licensecheck": "license-check",
|
"licensecheck": "license-check",
|
||||||
"tsc": "tsc",
|
"tsc": "tsc",
|
||||||
"pretest": "npm run build",
|
"pretest": "npm run build",
|
||||||
"test": "karma start karma.conf.js",
|
"test": "karma start karma.conf.js",
|
||||||
"posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html",
|
"posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html",
|
||||||
"coverage": "http-server -c-1 -o -p 9875 ./coverage",
|
"coverage": "http-server -c-1 -o -p 9875 ./coverage",
|
||||||
"prepublish": "npm run build"
|
"prepublish": "npm run build"
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/Alfresco/dev-platform-webcomponents.git"
|
|
||||||
},
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/Alfresco/dev-platform-webcomponents/issues"
|
|
||||||
},
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"contributors": [
|
|
||||||
{
|
|
||||||
"name": "Mario Romano",
|
|
||||||
"email": "mario.romano83@gmail.com"
|
|
||||||
},
|
},
|
||||||
{
|
"repository": {
|
||||||
"name": "Eugenio Romano",
|
"type": "git",
|
||||||
"email": "eugenio.romano83@gmail.com"
|
"url": "https://github.com/Alfresco/dev-platform-webcomponents.git"
|
||||||
}
|
},
|
||||||
],
|
"bugs": {
|
||||||
"keywords": [
|
"url": "https://github.com/Alfresco/dev-platform-webcomponents/issues"
|
||||||
"ng2",
|
},
|
||||||
"angular",
|
"license": "Apache-2.0",
|
||||||
"angular2",
|
"contributors": [
|
||||||
"alfresco"
|
{
|
||||||
],
|
"name": "Mario Romano",
|
||||||
"dependencies": {
|
"email": "mario.romano83@gmail.com"
|
||||||
"alfresco-core-rest-api": "^0.1.0",
|
},
|
||||||
"angular2": "2.0.0-beta.15",
|
{
|
||||||
"es6-module-loader": "^0.17.8",
|
"name": "Eugenio Romano",
|
||||||
"es6-shim": "^0.35.0",
|
"email": "eugenio.romano83@gmail.com"
|
||||||
"ng2-alfresco-core": "^0.1.0",
|
}
|
||||||
"reflect-metadata": "0.1.2",
|
|
||||||
"rxjs": "5.0.0-beta.2",
|
|
||||||
"systemjs": "0.19.26",
|
|
||||||
"zone.js": "^0.6.12",
|
|
||||||
"ng2-translate": "^1.11.3"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"angular2": "2.0.0-beta.15"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"copyfiles": "^0.2.1",
|
|
||||||
"coveralls": "^2.11.9",
|
|
||||||
"http-server": "0.8.5",
|
|
||||||
"jasmine-ajax": "^3.2.0",
|
|
||||||
"jasmine-core": "2.4.1",
|
|
||||||
"karma": "~0.13.22",
|
|
||||||
"karma-chrome-launcher": "~1.0.1",
|
|
||||||
"karma-coverage": "^1.0.0",
|
|
||||||
"karma-jasmine": "~1.0.2",
|
|
||||||
"karma-jasmine-ajax": "^0.1.13",
|
|
||||||
"karma-mocha-reporter": "^2.0.3",
|
|
||||||
"license-check": "^1.0.4",
|
|
||||||
"remap-istanbul": "^0.6.3",
|
|
||||||
"traceur": "^0.0.91",
|
|
||||||
"tslint": "^3.8.1",
|
|
||||||
"typescript": "^1.8.10",
|
|
||||||
"typings": "^0.7.12"
|
|
||||||
},
|
|
||||||
"license-check-config": {
|
|
||||||
"src": [
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.ts",
|
|
||||||
"!/**/coverage/**/*",
|
|
||||||
"!/**/demo/**/*",
|
|
||||||
"!/**/node_modules/**/*",
|
|
||||||
"!/**/typings/**/*",
|
|
||||||
"!*.js"
|
|
||||||
],
|
],
|
||||||
"path": "assets/license_header.txt",
|
"keywords": [
|
||||||
"blocking": false,
|
"ng2",
|
||||||
"logInfo": false,
|
"angular",
|
||||||
"logError": true
|
"angular2",
|
||||||
},
|
"upload",
|
||||||
"publishConfig": {
|
"alfresco"
|
||||||
"registry": "http://devproducts.alfresco.me:4873/"
|
],
|
||||||
}
|
"dependencies": {
|
||||||
|
"alfresco-core-rest-api": "^0.1.0",
|
||||||
|
"angular2": "2.0.0-beta.15",
|
||||||
|
"es6-module-loader": "^0.17.8",
|
||||||
|
"es6-shim": "^0.35.0",
|
||||||
|
"ng2-alfresco-core": "^0.1.0",
|
||||||
|
"reflect-metadata": "0.1.2",
|
||||||
|
"rxjs": "5.0.0-beta.2",
|
||||||
|
"systemjs": "0.19.26",
|
||||||
|
"zone.js": "^0.6.12",
|
||||||
|
"ng2-translate": "^1.11.3"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"angular2": "2.0.0-beta.15"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"copyfiles": "^0.2.1",
|
||||||
|
"coveralls": "^2.11.9",
|
||||||
|
"http-server": "0.8.5",
|
||||||
|
"jasmine-ajax": "^3.2.0",
|
||||||
|
"jasmine-core": "2.4.1",
|
||||||
|
"karma": "~0.13.22",
|
||||||
|
"karma-chrome-launcher": "~1.0.1",
|
||||||
|
"karma-coverage": "^1.0.0",
|
||||||
|
"karma-jasmine": "~1.0.2",
|
||||||
|
"karma-jasmine-ajax": "^0.1.13",
|
||||||
|
"karma-mocha-reporter": "^2.0.3",
|
||||||
|
"license-check": "^1.0.4",
|
||||||
|
"remap-istanbul": "^0.6.3",
|
||||||
|
"traceur": "^0.0.91",
|
||||||
|
"tslint": "^3.8.1",
|
||||||
|
"typescript": "^1.8.10",
|
||||||
|
"typings": "^0.7.12"
|
||||||
|
},
|
||||||
|
"license-check-config": {
|
||||||
|
"src": [
|
||||||
|
"**/*.js",
|
||||||
|
"**/*.ts",
|
||||||
|
"!/**/coverage/**/*",
|
||||||
|
"!/**/demo/**/*",
|
||||||
|
"!/**/node_modules/**/*",
|
||||||
|
"!/**/typings/**/*",
|
||||||
|
"!*.js"
|
||||||
|
],
|
||||||
|
"path": "assets/license_header.txt",
|
||||||
|
"blocking": false,
|
||||||
|
"logInfo": false,
|
||||||
|
"logError": true
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"registry": "http://devproducts.alfresco.me:4873/"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -22,28 +22,24 @@
|
|||||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
||||||
|
|
||||||
|
<script src="node_modules/pdfjs-dist/build/pdf.js"></script>
|
||||||
|
<script src="node_modules/pdfjs-dist/build/pdf.worker.js"></script>
|
||||||
|
<script src="node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
System.config({
|
System.config({
|
||||||
defaultJSExtensions: true,
|
defaultJSExtensions: true,
|
||||||
map: {
|
map: {
|
||||||
'ng2-alfresco-core': 'node_modules/ng2-alfresco-core',
|
'ng2-alfresco-viewer': 'node_modules/ng2-alfresco-viewer',
|
||||||
'ng2-alfresco-upload': 'node_modules/ng2-alfresco-upload',
|
|
||||||
'ng2-translate': 'node_modules/ng2-translate',
|
|
||||||
'rxjs': 'node_modules/rxjs',
|
'rxjs': 'node_modules/rxjs',
|
||||||
'angular2' : 'node_modules/angular2',
|
'angular2': 'node_modules/angular2',
|
||||||
'app': 'dist/src'
|
'app': 'dist/main'
|
||||||
},
|
},
|
||||||
packages: {
|
packages: {
|
||||||
'app': {
|
'src': {
|
||||||
defaultExtension: 'js'
|
defaultExtension: 'js'
|
||||||
},
|
},
|
||||||
'ng2-alfresco-core': {
|
'ng2-alfresco-viewer': {
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'ng2-alfresco-upload': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'ng2-translate': {
|
|
||||||
defaultExtension: 'js'
|
defaultExtension: 'js'
|
||||||
},
|
},
|
||||||
'rxjs': {
|
'rxjs': {
|
||||||
@@ -54,8 +50,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
System.import('app').catch(console.log.bind(console));
|
||||||
System.import('dist/src/my-app').catch(console.log.bind(console));
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@@ -5,20 +5,20 @@
|
|||||||
"author": "Alfresco Software, Ltd.",
|
"author": "Alfresco Software, Ltd.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "npm run build && npm run typings && npm link ng2-alfresco-upload && npm link ng2-alfresco-core",
|
"postinstall": "npm run typings && npm run build && npm link ng2-alfresco-viewer",
|
||||||
"typings": "typings install",
|
"typings": "typings install",
|
||||||
"start": "rm -rf dist && npm install && http-server -c-1 -o -p 8875 .",
|
"start": "rm -rf dist && npm install && http-server -c-1 -o -p 8875 .",
|
||||||
"build": "rm -rf dist && tsc"
|
"build": "rm -rf dist && tsc"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"angular2": "2.0.0-beta.13",
|
"angular2": "2.0.0-beta.15",
|
||||||
"es6-promise": "3.0.2",
|
"es6-promise": "3.0.2",
|
||||||
"es6-shim": "0.35.0",
|
"es6-shim": "0.35.0",
|
||||||
"reflect-metadata": "0.1.2",
|
"reflect-metadata": "0.1.2",
|
||||||
"rxjs": "5.0.0-beta.2",
|
"rxjs": "5.0.0-beta.2",
|
||||||
"zone.js": "0.6.6",
|
"zone.js": "0.6.6",
|
||||||
"ng2-translate": "^1.11.2",
|
"ng2-alfresco-viewer": "^0.1.4",
|
||||||
"material-design-icons": "^2.2.3",
|
"material-design-icons": "^2.2.3",
|
||||||
"material-design-lite": "^1.1.3"
|
"material-design-lite": "^1.1.3"
|
||||||
},
|
},
|
||||||
|
@@ -1,34 +0,0 @@
|
|||||||
///<reference path="../../node_modules/angular2/typings/browser.d.ts"/>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @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 { Component } from 'angular2/core';
|
|
||||||
import { ALFRESCO_ULPOAD_COMPONENT } from 'ng2-alfresco-upload/dist/ng2-alfresco-upload';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'my-demo',
|
|
||||||
template: `<alfresco-upload-button [showDialogUpload]="true"
|
|
||||||
[showUdoNotificationBar]="true"
|
|
||||||
[uploadFolders]="false"
|
|
||||||
[multipleFiles]="false">
|
|
||||||
</alfresco-upload-button>`,
|
|
||||||
directives: [ALFRESCO_ULPOAD_COMPONENT]
|
|
||||||
})
|
|
||||||
export class MyDemoComponent {
|
|
||||||
|
|
||||||
}
|
|
@@ -15,26 +15,22 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, provide } from 'angular2/core';
|
import { Component } from 'angular2/core';
|
||||||
import { bootstrap } from 'angular2/platform/browser';
|
import { bootstrap } from 'angular2/platform/browser';
|
||||||
import { HTTP_PROVIDERS } from 'angular2/http';
|
import { ViewerComponent } from 'ng2-alfresco-viewer/dist/ng2-alfresco-viewer';
|
||||||
import { MyDemoComponent } from "./components/my-demo.component";
|
|
||||||
import { TranslateLoader, TranslateService } from 'ng2-translate/ng2-translate';
|
|
||||||
import { AlfrescoTranslationLoader } from 'ng2-alfresco-core/services';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template: '<my-demo></my-demo>',
|
template: ` <alfresco-viewer [urlFile]="'localTestFile.pdf'">
|
||||||
directives: [MyDemoComponent]
|
<div class="mdl-spinner mdl-js-spinner is-active"></div>
|
||||||
|
</alfresco-viewer>`,
|
||||||
|
directives: [ViewerComponent]
|
||||||
})
|
})
|
||||||
class VgDemo {
|
class MyDemoApp {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
console.log('constructor');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bootstrap(MyDemoApp, [
|
||||||
bootstrap(VgDemo, [
|
ViewerComponent
|
||||||
HTTP_PROVIDERS,
|
|
||||||
provide(TranslateLoader, {useClass: AlfrescoTranslationLoader}),
|
|
||||||
TranslateService
|
|
||||||
]);
|
]);
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES5",
|
"target": "es5",
|
||||||
"module": "commonjs",
|
"module": "system",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
@@ -11,8 +11,9 @@
|
|||||||
"outDir": "dist"
|
"outDir": "dist"
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
|
"dist",
|
||||||
"node_modules",
|
"node_modules",
|
||||||
"typings",
|
"typings/main",
|
||||||
"dist"
|
"typings/main.d.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -1,9 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "angular2-testing",
|
"ambientDependencies": {
|
||||||
"dependencies": {},
|
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c",
|
||||||
"devDependencies": {},
|
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#d594ef506d1efe2fea15f8f39099d19b39436b71"
|
||||||
"ambientDependencies": {
|
}
|
||||||
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#4de74cb527395c13ba20b438c3a7a419ad931f1c",
|
|
||||||
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#dd638012d63e069f2c99d06ef4dcc9616a943ee4"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -1,59 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Angular 2 Viewer - Demo</title>
|
|
||||||
<base href="/">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="node_modules/material-design-lite/material.min.css">
|
|
||||||
<script src="node_modules/material-design-lite/material.min.js"></script>
|
|
||||||
<link rel="stylesheet" href="node_modules/material-design-icons/iconfont/material-icons.css">
|
|
||||||
|
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/pdfjs-dist/build/pdf.js"></script>
|
|
||||||
<script src="node_modules/pdfjs-dist/build/pdf.worker.js"></script>
|
|
||||||
<script src="node_modules/pdfjs-dist/web/pdf_viewer.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
System.config({
|
|
||||||
defaultJSExtensions: true,
|
|
||||||
map: {
|
|
||||||
'rxjs': 'node_modules/rxjs',
|
|
||||||
'angular2': 'node_modules/angular2',
|
|
||||||
'app': 'dist/main'
|
|
||||||
},
|
|
||||||
packages: {
|
|
||||||
'pdfjsDistBuildPdf': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'app': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'rxjs': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
},
|
|
||||||
'angular2': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
System.import('app').catch(console.log.bind(console));
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<alfresco-viewer [urlFile]="'localTestFile.pdf'">
|
|
||||||
<div class="mdl-spinner mdl-js-spinner is-active"></div>
|
|
||||||
</alfresco-viewer>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@@ -1,21 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright 2016 Alfresco Software, Ltd.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import {bootstrap} from 'angular2/platform/browser';
|
|
||||||
import {ViewerComponent} from './ng2-alfresco-viewer';
|
|
||||||
|
|
||||||
bootstrap(ViewerComponent);
|
|
@@ -1,90 +1,92 @@
|
|||||||
{
|
{
|
||||||
"keywords": [
|
"name": "ng2-alfresco-viewer",
|
||||||
"viewer",
|
"description": "Alfresco documents viewer",
|
||||||
"pdf",
|
"version": "0.1.5",
|
||||||
"alfresco-component"
|
"author": "Eugenio Romano",
|
||||||
],
|
"scripts": {
|
||||||
"name": "ng2-alfresco-viewer",
|
"typings": "typings install",
|
||||||
"description": "Alfresco documents viewer",
|
"start": "npm run build && http-server -c-1 -o -p 8875 .",
|
||||||
"version": "0.1.3",
|
"build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check",
|
||||||
"author": "Eugenio Romano",
|
"tslint": "npm run tslint-src && npm run tslint-root",
|
||||||
"scripts": {
|
"tslint-src": "tslint -c tslint.json src/**/*.ts",
|
||||||
"typings": "typings install",
|
"tslint-root": "tslint -c tslint.json *.ts",
|
||||||
"start": "npm run build && http-server -c-1 -o -p 8875 .",
|
"copytemplates": "npm run copy-html && npm run copy-css && npm run copy-i18n",
|
||||||
"build": "npm run tslint && typings install && rm -rf dist && tsc && npm run copytemplates && license-check",
|
"copy-html": "copyfiles './src/**/*.html' dist",
|
||||||
"tslint": "npm run tslint-src && npm run tslint-root",
|
"copy-css": "copyfiles './src/**/*.css' dist",
|
||||||
"tslint-src": "tslint -c tslint.json src/**/*.ts",
|
"copy-i18n": "copyfiles './i18n/**/*.json' dist",
|
||||||
"tslint-root": "tslint -c tslint.json *.ts",
|
"licensecheck": "license-check",
|
||||||
"copytemplates": "npm run copy-html && npm run copy-css && npm run copy-i18n",
|
"tsc": "tsc",
|
||||||
"copy-html": "copyfiles './src/**/*.html' dist",
|
"pretest": "npm run build",
|
||||||
"copy-css": "copyfiles './src/**/*.css' dist",
|
"test": "karma start karma.conf.js",
|
||||||
"copy-i18n": "copyfiles './i18n/**/*.json' dist",
|
"posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html",
|
||||||
"licensecheck": "license-check",
|
"coverage": "http-server -c-1 -o -p 9875 ./coverage",
|
||||||
"tsc": "tsc",
|
"prepublish": "npm run build"
|
||||||
"pretest": "npm run build",
|
},
|
||||||
"test": "karma start karma.conf.js",
|
"repository": {
|
||||||
"posttest": "node_modules/.bin/remap-istanbul -i coverage/coverage-final.json -o coverage -t html",
|
"type": "git",
|
||||||
"coverage": "http-server -c-1 -o -p 9875 ./coverage",
|
"url": "https://github.com/alfresco/ng2-alfresco-viewer.git"
|
||||||
"prepublish": "npm run build"
|
},
|
||||||
},
|
"bugs": {
|
||||||
"repository": {
|
"url": "https://github.com/alfresco/ng2-alfresco-viewer/issues"
|
||||||
"type": "git",
|
},
|
||||||
"url": "https://github.com/alfresco/ng2-alfresco-viewer.git"
|
"keywords": [
|
||||||
},
|
"ng2",
|
||||||
"bugs": {
|
"angular",
|
||||||
"url": "https://github.com/alfresco/ng2-alfresco-viewer/issues"
|
"angular2",
|
||||||
},
|
"viewer",
|
||||||
"dependencies": {
|
"pdf",
|
||||||
"angular2": "2.0.0-beta.15",
|
"alfresco-component",
|
||||||
"systemjs": "0.19.26",
|
"alfresco"
|
||||||
"es6-shim": "^0.35.0",
|
|
||||||
"es6-module-loader": "^0.17.8",
|
|
||||||
"pdfjs-dist": "^1.5.258",
|
|
||||||
"reflect-metadata": "0.1.2",
|
|
||||||
"rxjs": "5.0.0-beta.2",
|
|
||||||
"zone.js": "^0.6.12"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"angular2": "2.0.0-beta.15"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"codelyzer": "0.0.19",
|
|
||||||
"copyfiles": "^0.2.1",
|
|
||||||
"coveralls": "^2.11.9",
|
|
||||||
"http-server": "0.8.5",
|
|
||||||
"jasmine-core": "2.4.1",
|
|
||||||
"karma": "~0.12.0",
|
|
||||||
"karma-chrome-launcher": "~1.0.1",
|
|
||||||
"karma-coverage": "^1.0.0",
|
|
||||||
"karma-jasmine": "~1.0.2",
|
|
||||||
"karma-jasmine-ajax": "0.1.12",
|
|
||||||
"karma-mocha-reporter": "^2.0.3",
|
|
||||||
"license-check": "^1.0.4",
|
|
||||||
"remap-istanbul": "^0.6.3",
|
|
||||||
"traceur": "^0.0.91",
|
|
||||||
"tslint": "^3.8.1",
|
|
||||||
"typescript": "^1.8.10",
|
|
||||||
"typings": "^0.7.12",
|
|
||||||
"xo": "^0.14.0",
|
|
||||||
"yargs": "^4.7.0"
|
|
||||||
},
|
|
||||||
"license-check-config": {
|
|
||||||
"src": [
|
|
||||||
"**/*.js",
|
|
||||||
"**/*.ts",
|
|
||||||
"!/**/coverage/**/*",
|
|
||||||
"!/**/demo/**/*",
|
|
||||||
"!/**/node_modules/**/*",
|
|
||||||
"!/**/typings/**/*",
|
|
||||||
"!*.js"
|
|
||||||
],
|
],
|
||||||
"path": "assets/license_header.txt",
|
"dependencies": {
|
||||||
"blocking": false,
|
"angular2": "2.0.0-beta.15",
|
||||||
"logInfo": false,
|
"es6-module-loader": "^0.17.8",
|
||||||
"logError": true
|
"es6-shim": "^0.35.0",
|
||||||
},
|
"pdfjs-dist": "^1.5.258",
|
||||||
"license": "Apache-2.0",
|
"reflect-metadata": "0.1.2",
|
||||||
"publishConfig": {
|
"rxjs": "5.0.0-beta.2",
|
||||||
"registry": "http://devproducts.alfresco.me:4873/"
|
"systemjs": "0.19.26",
|
||||||
}
|
"zone.js": "^0.6.12"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"angular2": "2.0.0-beta.15"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"copyfiles": "^0.2.1",
|
||||||
|
"coveralls": "^2.11.9",
|
||||||
|
"http-server": "0.8.5",
|
||||||
|
"jasmine-ajax": "^3.2.0",
|
||||||
|
"jasmine-core": "2.4.1",
|
||||||
|
"karma": "~0.13.22",
|
||||||
|
"karma-chrome-launcher": "~1.0.1",
|
||||||
|
"karma-coverage": "^1.0.0",
|
||||||
|
"karma-jasmine": "~1.0.2",
|
||||||
|
"karma-jasmine-ajax": "^0.1.13",
|
||||||
|
"karma-mocha-reporter": "^2.0.3",
|
||||||
|
"license-check": "^1.0.4",
|
||||||
|
"remap-istanbul": "^0.6.3",
|
||||||
|
"traceur": "^0.0.91",
|
||||||
|
"tslint": "^3.8.1",
|
||||||
|
"typescript": "^1.8.10",
|
||||||
|
"typings": "^0.7.12"
|
||||||
|
},
|
||||||
|
"license-check-config": {
|
||||||
|
"src": [
|
||||||
|
"**/*.js",
|
||||||
|
"**/*.ts",
|
||||||
|
"!/**/coverage/**/*",
|
||||||
|
"!/**/demo/**/*",
|
||||||
|
"!/**/node_modules/**/*",
|
||||||
|
"!/**/typings/**/*",
|
||||||
|
"!*.js"
|
||||||
|
],
|
||||||
|
"path": "assets/license_header.txt",
|
||||||
|
"blocking": false,
|
||||||
|
"logInfo": false,
|
||||||
|
"logError": true
|
||||||
|
},
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"publishConfig": {
|
||||||
|
"registry": "http://devproducts.alfresco.me:4873/"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
<div class="mdl-layout__header-row">
|
<div class="mdl-layout__header-row">
|
||||||
|
|
||||||
<!-- File Title -->
|
<!-- File Title -->
|
||||||
<span class="mdl-layout-title">{{nameFile}}</span>
|
<span class="mdl-layout-title">{{urlFile}}</span>
|
||||||
|
|
||||||
<!-- pagination toolbar start -->
|
<!-- pagination toolbar start -->
|
||||||
<div id="viewer-toolbar-pagination">
|
<div id="viewer-toolbar-pagination">
|
||||||
|
@@ -39,10 +39,9 @@ export class ViewerComponent {
|
|||||||
totalPages: number;
|
totalPages: number;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
console.log('A.urlFile ' + this.urlFile);
|
console.log('urlFile ' + this.urlFile);
|
||||||
|
|
||||||
this.urlFile = this.urlFile ? this.urlFile : 'localTestFile.pdf';
|
this.nameFile = PDFJS.getFilenameFromUrl(this.urlFile);
|
||||||
this.nameFile = PDFJS.getFilenameFromUrl(this.loadFile);
|
|
||||||
|
|
||||||
PDFJS.getDocument(this.urlFile).then((pdf) => {
|
PDFJS.getDocument(this.urlFile).then((pdf) => {
|
||||||
this.currentPdf = pdf;
|
this.currentPdf = pdf;
|
||||||
|
Reference in New Issue
Block a user